Component
CLI
Summary
I am using a local Mistral Small 4 model running with llvm on a DGX spark.
If I cancel the use of a tool, for example a bash script, I have a "Unexpected role 'user' after role 'tool'" error. This is copy of an example output.
Run the unit test using the .venv virtual environment and unittest
bash: skipped
Skipped: User cancelled the operation.
Run the unit test using the .venv virtual environment and unittest
Error: API error from spark (model: mistralai/Mistral-Small-4-119B-2603-NVFP4): LLM backend error [spark]
status: 400 Bad Request
reason: Bad Request
request_id: N/A
endpoint: http://spark-5500.local:8000/v1/chat/completions
model: mistralai/Mistral-Small-4-119B-2603-NVFP4
provider_message: Unexpected role 'user' after role 'tool'
body_excerpt: {"error":{"message":"Unexpected role 'user' after role 'tool'","type":"BadRequestError","param":null,"code":400}}
payload_summary: {"model":"mistralai/Mistral-Small-4-119B-2603-NVFP4","message_count":5,"approx_chars":26815,"temperature":0.2,"has_tools":true,"tool_choice":"auto"}
Reproduction steps
- Add a local Mistral Small 4 model
- Ask to run any bash command
- Instead of approving say "No and say what to do..."
- Relaunch the same command
- See the crash
Versions / environment
vide 2.7.3 uv 0.11.1 Ubuntu 24.05
Logs & screenshots
Component
CLI
Summary
I am using a local Mistral Small 4 model running with llvm on a DGX spark.
If I cancel the use of a tool, for example a bash script, I have a "Unexpected role 'user' after role 'tool'" error. This is copy of an example output.
Reproduction steps
Versions / environment
vide 2.7.3 uv 0.11.1 Ubuntu 24.05
Logs & screenshots