File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949const MODEL = config ?. OCO_MODEL ;
5050if ( 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 ) ;
6058}
6159
6260export class AnthropicAi implements AiEngine {
Original file line number Diff line number Diff line change 5454
5555const MODEL = config ?. OCO_MODEL || 'gpt-3.5-turbo' ;
5656if ( provider === 'openai' &&
57- ! MODEL_LIST . openai . includes ( MODEL ) &&
57+ MODEL . typeof !== 'string' &&
5858 command !== 'config' &&
5959 mode !== CONFIG_MODES . set ) {
6060 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.`
6462 ) ;
65-
6663 process . exit ( 1 ) ;
6764}
6865
You can’t perform that action at this time.
0 commit comments