Title:
[OpenCode Go] deepseek-v4-pro: tools[0].function missing name in Anthropic proxy
Body:
Description
When using Claude Code with OpenCode Go as the Anthropic-compatible proxy
(ANTHROPIC_BASE_URL: https://opencode.ai/zen/go), the deepseek-v4-pro model
fails with a 400 error on any request involving tool calls:
API Error: 400 {"error":{"message":"Error from provider (DeepSeek): Failed
to deserialize the JSON body into the target type: tools[0].function: missing
field name at line 1 column 30415","type":"invalid_request_error"}}
Root cause
Claude Code sends Anthropic-format tools (flat: {name, description, input_schema}).
OpenCode Go translates them to DeepSeek's OpenAI format (nested: {type: "function",
function: {name, description, parameters}}). The function.name field gets dropped
in the translation, causing DeepSeek to reject the request.
What works
- Direct DeepSeek official API: works
- MiniMax through OpenCode Go: works
- Only deepseek-v4-pro and deepseek-v4-flash through Go fail
Steps to reproduce
- Configure Claude Code with ANTHROPIC_BASE_URL: https://opencode.ai/zen/go
- Set ANTHROPIC_MODEL: deepseek-v4-pro
- Send a prompt that triggers a tool call (read file, search, etc.)
- 400 error immediately
Environment
- Windows 11 / PowerShell
- Claude Code via OpenCode Go proxy
Title:
[OpenCode Go] deepseek-v4-pro: tools[0].function missing name in Anthropic proxy
Body:
Description
When using Claude Code with OpenCode Go as the Anthropic-compatible proxy
(ANTHROPIC_BASE_URL: https://opencode.ai/zen/go), the deepseek-v4-pro model
fails with a 400 error on any request involving tool calls:
API Error: 400 {"error":{"message":"Error from provider (DeepSeek): Failed
to deserialize the JSON body into the target type: tools[0].function: missing
field name at line 1 column 30415","type":"invalid_request_error"}}
Root cause
Claude Code sends Anthropic-format tools (flat: {name, description, input_schema}).
OpenCode Go translates them to DeepSeek's OpenAI format (nested: {type: "function",
function: {name, description, parameters}}). The function.name field gets dropped
in the translation, causing DeepSeek to reject the request.
What works
Steps to reproduce
Environment