Skip to content

Commit f0f404e

Browse files
committed
update docs for mistral tools compat
1 parent 8d4d5de commit f0f404e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

doc/usage/chat-buffer/tools.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,31 @@ Below is the tool use status of various adapters and models in CodeCompanion:
308308
| Ollama | Tested with Qwen3 | :white_check_mark: | Dependent on the model |
309309
| OpenAI | | :white_check_mark: | Dependent on the model |
310310
| xAI | All | :x: | Not supported yet |
311+
312+
313+
### Mistral compatibility
314+
315+
When using Mistral models, make sure you enable the `auto_submit_error` tools option (`auto_submit_success` is on by default). Otherwise the tools may not work as expected and you may see the following error :
316+
317+
```
318+
Error: {"object":"error","message":"Unexpected role 'user' after role 'tool'","type":"invalid_request_message_order","param":null,"
319+
code":"3230"}
320+
```
321+
322+
Use the following configuration:
323+
324+
```lua
325+
{
326+
strategies = {
327+
chat = {
328+
adapter = "mistral",
329+
tools = {
330+
opts = {
331+
-- this is needed for mistral to work peroperly
332+
auto_submit_errors = true, -- Send any errors to the LLM
333+
},
334+
}
335+
},
336+
}
337+
}
338+
```

0 commit comments

Comments
 (0)