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
{{ message }}
Repository navigation
Silent agent crash and subsequent 400 Bad Request with local vLLM (Qwen 3 XML Tools) #16488
However, OpenCode fails in the following sequence:
Run 1 (Initial Prompt): The OpenCode agent silently halts/aborts the loop. Nothing happens on the client side, and the tool is never executed. (Note: Setting "stream": false in opencode.json does not prevent this, as the background agent loop seems to force a stream regardless).
Run 2 (Retrying Prompt): Instantly fails with a 400 Bad Request. The aborted tool state from Run 1 corrupts the context history, causing the vLLM server to reject the malformed conversation payload on the next request.
(Additional Context: If the OpenCode provider is explicitly named "vllm", it triggers a separate issue entirely. It attempts to hit the /v1/responses endpoint, resulting in an immediate 400 Bad Request because vLLM's strict Pydantic validation rejects OpenCode's custom LocalShellCall and ApplyPatchCall schemas).
Plugins
No response
OpenCode version
1.20.0
Steps to reproduce
Steps to Reproduce:
Start a local vLLM server running a Qwen 3 model with XML parsing enabled: vllm serve Qwen/Qwen3-Coder-Next-FP8 --enable-auto-tool-choice --tool-call-parser qwen3_xml
Configure opencode.json to point to the local server using the @ai-sdk/openai provider.
In OpenCode, issue a prompt that triggers a tool call (e.g., "Read the codebase to understand its structure").
Observe the silent failure, then issue the exact same prompt a second time.
This issue might be a duplicate of existing issues. Please check:
Weird error with toolcalling on local model #6649: Same error message AI_InvalidResponseDataError: Expected 'function.name' to be a string when using a local model via an OpenAI-compatible endpoint with tool calling.
changed the title [-][Bug] AI_InvalidResponseDataError and 400 Bad Request with local vLLM (Qwen 3 XML Tools)[/-][+]Silent agent crash and subsequent `400 Bad Request` with local vLLM (Qwen 3 XML Tools)[/+]on Mar 7, 2026
Activity
github-actions commentedon Mar 7, 2026
This issue might be a duplicate of existing issues. Please check:
AI_InvalidResponseDataError: Expected 'function.name' to be a stringwhen using a local model via an OpenAI-compatible endpoint with tool calling.[-][Bug] AI_InvalidResponseDataError and 400 Bad Request with local vLLM (Qwen 3 XML Tools)[/-][+]Silent agent crash and subsequent `400 Bad Request` with local vLLM (Qwen 3 XML Tools)[/+]naveline67 commentedon Mar 21, 2026
i have same issue
nunodonato commentedon Apr 16, 2026
also getting this with qwen3.5 and xml tool parser
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.