Commit ce38fd4
committed
fix: add mergeToolResultText for Mistral/Devstral models in OpenRouter
Fixes the "Unexpected role user after role tool" error for Mistral and
Devstral models when using OpenRouter.
Changes:
- Extended model detection to include "devstral" (e.g. mistralai/devstral-2512)
- Added mergeToolResultText: true to merge text content into tool messages
instead of creating a separate user message that violates Mistral ordering
Closes #106181 parent 632b86c commit ce38fd4
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
238 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| |||
0 commit comments