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
[Bug] Console Go gateway rejects OpenAI-compatible client metadata with extra inputs are not permitted (strict schema, extra="forbid") #43089
The OpenCode "Console Go" API gateway (https://opencode.ai/zen/go/v1) validates the messages array with a strict schema (pydantic extra="forbid" behavior). Any non-standard field attached to a message is rejected with HTTP 400:
[invalid_request_error] Extra inputs are not permitted, field: 'messages[1].agent', value: 'cli'
This breaks interoperability with OpenAI-compatible clients that attach extra metadata to messages (e.g. agent, reasoning, messageId, model, traceId, usage, extra_fields, etc.). Standard OpenAI-compatible behavior is to ignore unknown fields, not reject them.
To Reproduce
Send a minimal chat completion, then the same request with one extra field:
# 1) Clean payload -> HTTP 200 (model, key, format all fine)
curl https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_KEY" -H "Content-Type: application/json" \
-d '{"model":"glm-5.2","messages":[{"role":"user","content":"hi"}],"max_tokens":16,"stream":false}'# 2) Same request + one extra field on a message -> HTTP 400
curl https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_KEY" -H "Content-Type: application/json" \
-d '{"model":"glm-5.2","messages":[{"role":"user","content":"hi"},{"role":"assistant","content":"hello","agent":"cli"}],"max_tokens":16,"stream":false}'# -> 400 {"error":{"message":"Error from provider (Console Go): ... Extra inputs are not permitted, field: 'messages[1].agent', value: 'cli'"}}
Expected behavior
OpenAI-compatible endpoints should tolerate and ignore unknown message fields, so clients that attach metadata (agent ids, tracing, reasoning flags) keep working. The request in step 2 should return 200 like step 1.
Actual behavior
HTTP 400 with Extra inputs are not permitted for any non-standard field on any message.
Client: WorkBuddy App 5.3.13 (sends requests via its backend, which attaches internal metadata fields)
Observed on: macOS
Suggested fix
Relax the messages / message schema at the Console Go gateway to extra="allow" (ignore unknown fields), matching standard OpenAI-compatible server behavior. Optionally document which fields are required vs optional.
Additional context
This is not specific to one client — any OpenAI-compatible proxy/agent that forwards internal metadata will hit the same 400. A clean payload works perfectly (step 1 returns valid reasoning_content too), confirming auth + model + base format are correct; only the strict schema blocks it.
Having this very same issue by passing the apikey as BYOK in other applications. Some models return the extra inputs are not permitted error while others return Your API key does not have permission to access this resource.
Activity
wgomg commentedon Aug 17, 2026
Having this very same issue by passing the apikey as BYOK in other applications. Some models return the
extra inputs are not permittederror while others returnYour API key does not have permission to access this resource.github-actions commentedon Oct 17, 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.