File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 48
48
49
49
const MODEL = config ?. OCO_MODEL ;
50
50
if ( provider === 'anthropic' &&
51
- ! MODEL_LIST . anthropic . includes ( MODEL ) &&
52
- command !== 'config' &&
53
- mode !== CONFIG_MODES . set ) {
54
- outro (
55
- `${ chalk . red ( '✖' ) } Unsupported model ${ MODEL } for Anthropic. Supported models are: ${ MODEL_LIST . anthropic . join (
56
- ', '
57
- ) } `
58
- ) ;
59
- process . exit ( 1 ) ;
51
+ MODEL . typeof !== 'string' &&
52
+ command !== 'config' &&
53
+ mode !== CONFIG_MODES . set ) {
54
+ outro (
55
+ `${ chalk . red ( '✖' ) } Unsupported model ${ MODEL } . The model can be any string, but the current configuration is not supported.`
56
+ ) ;
57
+ process . exit ( 1 ) ;
60
58
}
61
59
62
60
export class AnthropicAi implements AiEngine {
Original file line number Diff line number Diff line change 54
54
55
55
const MODEL = config ?. OCO_MODEL || 'gpt-3.5-turbo' ;
56
56
if ( provider === 'openai' &&
57
- ! MODEL_LIST . openai . includes ( MODEL ) &&
57
+ MODEL . typeof !== 'string' &&
58
58
command !== 'config' &&
59
59
mode !== CONFIG_MODES . set ) {
60
60
outro (
61
- `${ chalk . red ( '✖' ) } Unsupported model ${ MODEL } for OpenAI. Supported models are: ${ MODEL_LIST . openai . join (
62
- ', '
63
- ) } `
61
+ `${ chalk . red ( '✖' ) } Unsupported model ${ MODEL } . The model can be any string, but the current configuration is not supported.`
64
62
) ;
65
-
66
63
process . exit ( 1 ) ;
67
64
}
68
65
You can’t perform that action at this time.
0 commit comments