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
fix: handle Mistral thinking content as reasoning chunks (#7106)
* fix: handle Mistral thinking content as reasoning chunks
- Add TypeScript interfaces for Mistral content types (text and thinking)
- Update createMessage to yield reasoning chunks for thinking content
- Update completePrompt to filter out thinking content in non-streaming mode
- Add comprehensive tests for reasoning content handling
- Follow the pattern used by other providers (Anthropic, OpenAI, Gemini, etc.)
Fixes#6842
* fix: resolve TypeScript type issue in completePrompt method
* fix: handle Mistral thinking content chunks in streaming responses
- Added ContentChunkWithThinking type helper to handle thinking chunks
- Properly converts thinking content to reasoning chunks in streaming
- Filters out thinking content in non-streaming completePrompt responses
- Confirmed that Mistral API does send thinking chunks with type 'thinking'
- Works with Mistral SDK v1.9.18
---------
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
0 commit comments