Skip to content

hasTranslation

hasTranslation(modelName, mapping): boolean

Defined in: ai.matey.core/src/model-translation.ts:214

Check if a model name has an exact translation.

string

Model name to check

ModelMapping

Model mapping

boolean

True if exact translation exists

const mapping = { 'gpt-4': 'claude-3-5-sonnet' };
hasTranslation('gpt-4', mapping); // → true
hasTranslation('gpt-3.5', mapping); // → false