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
OpenCode Go: kimi-k3, kimi-k2.6, kimi-k2.7-code, glm-5.2, grok-4.5, qwen3.7-max, hy3-preview all fail with 'Upstream request failed' — non-standard 'mcp'/'system' fields rejected by strict provider validators #37771
7 of the newest OpenCode Go (zen/go/v1) models fail on every call with a generic Error from provider (Console Go): Upstream request failed, wrapped from an underlying HTTP 400. Confirmed via direct capture of the CLI's real outbound request (bypassing opencode's swallowed error), the upstream provider returns:
"Error from provider: 2 request validation errors: Extra inputs are not permitted, field: 'mcp', value: [...]; Extra inputs are not permitted, field: 'system', value: '...'"
Affected models (confirmed via opencode-go)
kimi-k3
kimi-k2.6
kimi-k2.7-code
glm-5.2
grok-4.5
qwen3.7-max
hy3-preview
Working models on the same provider (glm-5.1, mimo-v2.5/-pro, minimax-m2.7/m3, qwen3.6-plus/3.7-plus, deepseek-v4-pro/flash) are unaffected — their backing providers apparently tolerate unknown top-level fields; the affected models' backends (Moonshot/Fireworks-routed Kimi, and presumably similar strict validators for the others) reject the request outright per Pydantic-style strict schema validation.
Root cause
opencode's request body to zen/go/v1/chat/completions includes two non-standard top-level fields not part of the OpenAI Chat Completions spec:
"mcp": ["context7","savecontext","serena",...] — array of active MCP provider names
"system": "<full system prompt string>" (in addition to / instead of a messages[].role=system entry)
These are presumably intended as opencode-internal metadata or a legacy field format, but get forwarded verbatim to the upstream Console Go endpoint instead of being stripped for providers with strict input validation.
Reproduction
opencode run -m opencode-go/kimi-k2.6 "hello" (or any of the affected models above)
Fails instantly (~1.2s) with Error from provider (Console Go): Upstream request failed
Direct curl replay of the exact captured request body against https://opencode.ai/zen/go/v1/chat/completions reproduces the 400 with the full validation error shown above.
Removing the mcp and system fields from the payload (keeping messages with a system-role entry instead) is expected to fix it — not yet tested with fields fully removed, but the validator error names them explicitly as the two rejected fields.
Version
opencode 1.18.3 (bun 1.3.14), installed via brew
Related
KIMI K2.6 showing error in Opencode GO #27054 (KIMI K2.6 showing error in Opencode GO — JSON Schema $defs mismatch) — different underlying cause (tool schema shape) but same symptom class (Kimi/Moonshot strict-validator rejecting opencode's request shape) and same generic wrapped error message.
Multiple users independently hit this in the last 1-2 days on Reddit (r/opencodeCLI, r/opencode) and X, all reporting Kimi K3 "unusable" on Go subscriptions with the identical error string.
Reacted by ctml91, proluct, Kimani, spfagetty, Joe Petrakovich, twsl, Muhammad Atta Ur Rahman and Sage McConnell
Activity
joepetrakovich commentedon Jul 24, 2026
Disabling all my active MCPs seems to have fixed this for me fwiw. I had an xcode mcp and an apple docs mcp loaded.
VentulusCN commentedon Aug 7, 2026
问题是如何解决呢?
github-actions commentedon Oct 8, 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.