File tree Expand file tree Collapse file tree 5 files changed +12
-1
lines changed
Expand file tree Collapse file tree 5 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' token.js ' : minor
3+ ---
4+
5+ Add support for Codestral Mamba
Original file line number Diff line number Diff line change 5454| mistral-large-2402 | ✅ | ✅ | ✅ | ➖ | ✅ | ➖ |
5555| codestral-latest | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
5656| codestral-2405 | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
57+ | codestral-mamba-2407 | ✅ | ✅ | ✅ | ➖ | ✅ | ➖ |
5758
5859### Legend
5960| Symbol | Description |
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export abstract class BaseHandler<T extends LLMChatModel> {
4242 throw new InputError ( `Invalid 'model' field: ${ body . model } .` )
4343 }
4444
45- if ( ! this . supportsStreaming ( body . model ) ) {
45+ if ( body . stream && ! this . supportsStreaming ( body . model ) ) {
4646 throw new Error (
4747 `Detected 'stream: true', but the following model does not support streaming: ${ body . model } `
4848 )
Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ export const models = {
265265 'mistral-large-2402' ,
266266 'codestral-latest' ,
267267 'codestral-2405' ,
268+ 'codestral-mamba-2407' ,
268269 ] as const ,
269270 supportsCompletion : true ,
270271 supportsStreaming : [
@@ -282,6 +283,7 @@ export const models = {
282283 'mistral-large-2402' ,
283284 'codestral-latest' ,
284285 'codestral-2405' ,
286+ 'codestral-mamba-2407' ,
285287 ] as const ,
286288 // Mistral claims that all of its models support JSON, but several of their weaker models either
287289 // fail to produce valid JSON or produce very low quality results for the following prompt:
@@ -296,6 +298,7 @@ export const models = {
296298 'mistral-large-2402' ,
297299 'codestral-latest' ,
298300 'codestral-2405' ,
301+ 'codestral-mamba-2407' ,
299302 ] as const ,
300303 supportsImages : [ ] as const ,
301304 supportsToolCalls : [
@@ -305,6 +308,7 @@ export const models = {
305308 'mistral-small-2402' ,
306309 'mistral-large-latest' ,
307310 'mistral-large-2402' ,
311+ 'codestral-mamba-2407' ,
308312 ] as const ,
309313 supportsN : false ,
310314 } ,
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ describe('Base Handler', () => {
100100 provider : 'openai' ,
101101 model : 'dummyModel' as any ,
102102 messages : getDummyMessages ( ) ,
103+ stream : true ,
103104 } )
104105 ) . rejects . toThrow (
105106 new InputError (
You can’t perform that action at this time.
0 commit comments