translateModel
translateModel(
modelName,options):string
Defined in: utils/model-translation.ts:47
Translate a model name using mapping or backend default.
Parameters
Section titled “Parameters”modelName
Section titled “modelName”string
Original model name
options
Section titled “options”Translation options
Returns
Section titled “Returns”string
Translated model name or original if no mapping
Example
Section titled “Example”const backend = new OpenAIBackend({ defaultModel: 'gpt-4o' });backend.modelMapping = { 'llama3.1': 'gpt-4o' };
const translated = translateModel('llama3.1', { backend });// → 'gpt-4o'