Files
magpie/internal
yetone 47128ffa59 gateway: a remote client's effort reaches Claude Code from every route (amhcwushuang on X)
amhcwushuang on X runs Claude Code -> new-api -> magpie on a server ->
the Claude subscription, and says the thinking level is lost.

Read from new-api (QuantumNous/new-api main): a Claude channel keeps
thinking and output_config as written (relayconvert shared/claude
ApplyReasoning passes a native request through), including the
{role: system} turn's output_config; an OpenAI channel turns the request
into Chat with reasoning_effort (reasoning.ApplyToOpenAIChat), and an
OpenRouter-dialect channel into a `reasoning` object. Claude Code's own
fixture (claude-code-2.1.296.json) carries top-level output_config.effort,
thinking adaptive, and the same effort on a system turn.

magpie already passed, to the spawned Claude Code's --effort: Messages with
a thinking budget or a top-level output_config, Chat reasoning_effort,
Responses reasoning.effort (checked by the new test on the old code).
It did not take the level from:
- a Messages request whose only effort is the last turn's output_config;
- a Chat request with reasoning.effort (an object), output_config.effort
  or a thinking budget in place of reasoning_effort.
Those now set the request's effort. reasoning_effort, when present, stays
the client's word; no setting of the user is read or overridden.

Run: TestClaudeBridgeTakesTheEffortOfEveryRoute red on the old chat.go and
decide.go (4 of 9 cases), green now; gofmt; go vet darwin, linux nogui,
windows on internal/gateway; internal/gateway full package on mote.
Not tried: a real Claude subscription behind new-api; Claude Code's
interactive mode with a message-only effort (the -p stand-in was used).
2026-11-12 08:30:48 +08:00
..
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…
…