File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' token.js ' : patch
3
+ ---
4
+
5
+ fix unknown model error add max tokens for missing anthropic models
Original file line number Diff line number Diff line change @@ -341,9 +341,19 @@ export const getDefaultMaxTokens = (model: string): number => {
341
341
model === 'claude-instant-1.2'
342
342
) {
343
343
return 4096
344
- } else {
345
- throw new InputError ( `Unknown model: ${ model } ` )
346
344
}
345
+
346
+ if (
347
+ model === 'claude-3-5-sonnet-latest' ||
348
+ model === 'claude-3-5-sonnet-20241022' ||
349
+ model === 'claude-3-7-sonnet-latest' ||
350
+ model === 'claude-3-7-sonnet-20250219' ||
351
+ model === 'claude-3-5-haiku-20241022'
352
+ ) {
353
+ return 8192
354
+ }
355
+
356
+ throw new InputError ( `Unknown model: ${ model } ` )
347
357
}
348
358
349
359
export const convertMessages = async (
You can’t perform that action at this time.
0 commit comments