You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -131,6 +126,15 @@ export class TokenJS implements TokenJSInterface {
131
126
if(this.extendedModelExist(provider,name)){
132
127
returnthis
133
128
}
129
+
// If a model name is pre-defined, there is a conflict so we throw an error
130
+
if(
131
+
Array.isArray(models[provider].models)&&
132
+
models[provider].models.includes(name)
133
+
){
134
+
thrownewInputError(
135
+
`You tried to add the following custom model name: "${name}", for provider: "${provider}". But it conflicts with an existing pre-defined model name. Please try again using different name e.g.: "${name}-custom"`
0 commit comments