Skip to content

Zen and Go backends fail on DeepSeek V4 / MiMo tool calling with "Internal server error" #36354

Description

@santiagolu-lgtm

Description

Environment

  • OpenCode version: 1.17.18
  • OS: Windows 11

Affected providers

  • opencode (Zen)
  • opencode-go

Affected models

  • deepseek-v4-flash
  • deepseek-v4-pro
  • mimo-v2.5-pro

Error
When using these models in agent mode, OpenCode shows "Internal server error" and retries repeatedly.

Direct API test shows the backend returns:

{"error":{"message":"Error from provider (Console Go): Upstream request failed","type":"invalid_request_error","code":"invalid_request_error"}}
Verification
- Same request without tools parameter → 200 OK
- DeepSeek official API with tools → 200 OK
- Other Zen/Go models with tools → 200 OK
Working models
- Zen: hy3
- Go: minimax-m3, glm-5.2, qwen3.6-plus, qwen3.7-max
Suspected root cause
OpenCode backend does not correctly handle reasoning_content echoing for DeepSeek V4 tool calls (and possibly MiMo), causing 400 errors that the client displays as "Internal server error".
Expected behavior
Either fix backend handling for these models, or update models.json to mark tool_call: false for affected models until fixed.

### Plugins

opencode-sessions, opencode-context-cache, magic-context

### OpenCode version

1.17.18

### Steps to reproduce

_No response_

### Screenshot and/or share link

_No response_

### Operating System

Windows 11

### Terminal

wezterm,Windows

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions