anomalyco / anomalyco/opencode

[Bug] OpenCode Go intermittently returns 400 [1210] "thinking cannot be disabled" and MissingSessionID when routing omen-alpha requests

Open
#47,872 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description
Description

When using omen-alpha via the OpenCode Go gateway (opencode.ai/zen/go/v1/chat/completions) from a third-party client (QwenPaw, an open-source agent framework using the OpenAI-compatible chat completions endpoint), requests intermittently fail with two distinct 400 errors returned by the "Console Go" provider:

Error 1 — [1210] thinking cannot be disabled

Error code: 400 - {'error': {'type': 'server_error', 'message': 'Error from provider (Console Go): Upstream request failed: [1210] This model always engages in thinking and cannot be disabled; please use low, high, or max'}}

Error 2 — MissingSessionID

Error code: 400 - {'type': 'error', 'error': {'type': 'MissingSessionID', 'message': 'Error from provider (Console Go): Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it'}}
Environment & Context
  • Model: omen-alpha (Go subscription, chat/completions endpoint)
  • Client: QwenPaw (open-source agent framework, uses the standard OpenAI-compatible endpoint; not yet in the Validated Clients list — it does not currently send x-opencode-session)
  • Time window: 2026-09-08, 08:46–10:07 (UTC+8); intermittent — most requests succeed, some fail
  • Observed pattern: burst failures on consecutive messages, then recovery — consistent with gateway-side routing/fallback decisions
Controlled experiment (same session, model-switched)

In the same session (identical context size, identical request pattern, rapid consecutive messages):

Model | Result -- | -- omen-alpha | 400 [1210] / MissingSessionID reproduced consistently DeepSeek v4 flash | zero failures, rapid consecutive messages all succeed

This isolates the failure to the omen-alpha routing path (not client concurrency, not channel queuing, not oversized context).

Analysis

Error 1: For the failing requests, the client does not send any thinking-related parameters (no reasoning_effort, no enable_thinking). The gateway appears to inject a "disable thinking" parameter when routing the request — but omen-alpha always engages in thinking and rejects it with [1210].

We also tried explicitly sending reasoning_effort: "low" (and "high") from the client via extra_body — the error still occurred, suggesting the gateway may override or drop client-side thinking parameters for these routed requests.

Error 2: QwenPaw does not send x-opencode-session (documented requirement: https://opencode.ai/docs/go/#where-can-i-use-it). Requests lacking the header fail when the gateway needs to make routing decisions.

Impact

In a chat/agent product this surfaces as intermittent "Internal error" replies to end users. Conversations fail in bursts (consecutive messages), then self-recover — making it hard to debug from the client side.

Workaround confirmed: switching the model from omen-alpha to deepseek-v4-flash (same session, same client, same request pattern) made all failures stop immediately — further confirming the issue is specific to the omen-alpha routing path.

Suggested remediation
  1. Gateway: preserve or forward client thinking parameters when routing omen-alpha requests, instead of injecting a "disabled" flag (omen-alpha rejects it).
  2. Gateway: make x-opencode-session degrade gracefully (log/flag) rather than hard-fail with 400, or provide a documented migration path for third-party clients.
  3. Client-side (QwenPaw): we will add x-opencode-session support in an upcoming release; tracking in our repo.
Related
  • #46378 — same [1210] error code but different root cause (GLM-5.3-Flash Unicode tokenizer vs. thinking parameter routing)
Additional info (compliance)
  • OpenCode version: Go gateway API (opencode.ai/zen/go/v1/chat/completions),
    called via third-party client QwenPaw 2.2.0 (OpenAI-compatible provider)
  • Steps to reproduce:
    1. Use omen-alpha via the Go chat/completions endpoint from a third-party
      client (no x-opencode-session header)
    2. Send rapid consecutive requests (burst pattern)
    3. Observe intermittent 400 [1210] "This model always engages in thinking
      and cannot be disabled" and/or MissingSessionID
    4. Switch model to deepseek-v4-flash in the same session → failures stop
      immediately
  • Operating System: Linux (client-side server); issue is gateway-side
  • Terminal: n/a (HTTP API client)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the OpenCode Go gateway's chat/completions handling for omen-alpha, focusing on the x-opencode-session header and thinking settings. Reproduce requests from QwenPaw and compare successful and failing cases. Done means the intermittent thinking-disabled and MissingSessionID 400 responses are resolved or clearly handled for this client pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.