Claude Code 2.1.304→2.1.310: gateway 400/422 errors and fixes
As of 2026-10-26: the gateway regression introduced in 2.1.304 is fixed in 2.1.305 - when the endpoint or a gateway rejects tool search, Claude Code now retries without it instead of failing every request; 2.1.310 fixes two more rejections - gateways or compatible servers that reject the effort-2025-11-24 beta value or mid-conversation system messages - by retrying without them. Under 2.1.304 a 400 or 422 from the gateway is retried without tool search; the same release also fixed the context_management: Extra inputs are not permitted error (official changelog, 2026-10-19 UTC).
Updated 2026-10-26
One key for Claude, GPT and leading Chinese models, billed per token, up and running in minutes.
- Billed per token — live rates on /models
- Pay by card (Visa / Mastercard), Apple Pay, Google Pay or crypto
- Self-service: top up and activate instantly
Versions and dates: introduced in 304, fixed in 305 and 310, checking your version
the official release
The release page lists the tag v2.1.304, published on 2026-10-19 (21:34 UTC).
fixes the 2.1.304 tool search gateway regression
Official changelog: under 2.1.304 a 400 or 422 from the gateway is retried without tool search; when the endpoint or a gateway rejects tool search, or a gateway disallows ToolSearch, every request fails (a 2.1.304 regression); from 2.1.305 Claude Code retries without tool search.
retries when a gateway rejects the effort beta or mid-conversation system messages
Official changelog: some gateways and compatible servers reject the effort-2025-11-24 beta value or mid-conversation system messages, so requests fail; from 2.1.310 Claude Code retries without them.
check your own version
The official install docs say that claude --version prints the version number, that claude doctor gives a detailed look at the installation and the settings, and that claude update updates the install.
What changed in 304, 305 and 310
The official changelog splits the gateway behavior across three versions. 2.1.304 (2026-10-19 UTC): tool search is on by default behind a custom ANTHROPIC_BASE_URL, and a 400 or 422 from the gateway is retried without it; the same release fixed the context_management: Extra inputs are not permitted error, with Claude Code resending the request without that field. 2.1.305 (2026-10-20 UTC): the 2.1.304 regression - when the endpoint or a gateway rejects tool search, or a gateway disallows ToolSearch, every request no longer fails and Claude Code retries without tool search. 2.1.310 (2026-10-23 UTC): when some gateways or compatible servers reject the effort-2025-11-24 beta value or mid-conversation system messages, Claude Code retries without them.
2.1.304 and the two gateway fixes after it
The official release v2.1.304 was published on 2026-10-19 (21:34 UTC), with two gateway-related entries under 2.1.304 in the changelog; 2.1.305 was published on 2026-10-20 (20:46 UTC) and 2.1.310 on 2026-10-23 (23:39 UTC). The QCode docs page "Claude Code Complete Tutorial" is marked as updated on 2026-10-20, and "Endpoints & API Paths" on 2026-10-19.
Timeline
The official release v2.1.304 is published (21:34 UTC); the two behavior changes are listed under 2.1.304 in the official changelog.
2.1.305 is published (20:46 UTC): it fixes the regression from 2.1.304 (release tag v2.1.304, published 21:34 UTC) where every request failed when the endpoint or a gateway rejected tool search, and Claude Code now retries without tool search.
2.1.310 is published (23:39 UTC): when a gateway or compatible server rejects the effort-2025-11-24 beta value or mid-conversation system messages, Claude Code retries without them.
What the official pages state and what they do not
Checked against the official sources
① The official changelog has two gateway-related entries under 2.1.304 (tool search on by default; the context_management error fixed). ② The 2.1.305 entry says this is a 2.1.304 regression and that Claude Code now retries without tool search. ③ The 2.1.310 entry says Claude Code retries without the effort-2025-11-24 beta value or mid-conversation system messages when they are rejected. ④ Release dates come from the GitHub release metadata: v2.1.304 on 2026-10-19 (21:34 UTC), v2.1.305 on 2026-10-20, v2.1.310 on 2026-10-23 (all UTC).
What the official pages do not say
① The changelog does not say which request fields tool search consists of, and it gives no error text for 400 or 422 and no difference between the two. ② It does not say how earlier versions behaved with a custom ANTHROPIC_BASE_URL. ③ It does not say which fields the retried request still carries after tool search has been removed. ④ 2.1.310 does not say which gateways or compatible servers reject effort-2025-11-24 or mid-conversation system messages, and gives no error text for either rejection.
Two fixes, one line each in the official changelog
2.1.305: gateway 400/422 and rejected tool search
When the endpoint or a gateway rejects tool search, Claude Code retries without it instead of failing every request.
2.1.310: the effort beta or mid-conversation system messages rejected
When a gateway or compatible server rejects the effort-2025-11-24 beta value or mid-conversation system messages, Claude Code retries without them.
Checking the version, updating, connecting to QCode
① Check the version: run claude --version in a terminal; the official install docs say a working installation prints a version number. ② Look at the installation and the settings: run claude doctor; the docs say it prints read-only installation and settings diagnostics without starting a session. ③ Update: run claude update, which the official CLI docs list as the update command. ④ Connect to QCode: follow the QCode docs page on the Claude Code tutorial and set the two environment variables ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. ⑤ Still on 2.1.304: update to 2.1.305 or later so a gateway that rejects tool search no longer fails every request, and to 2.1.310 if a gateway rejects the effort beta.
On QCode
Following the QCode docs page "Claude Code Complete Tutorial" (updated 2026-10-20), set two environment variables in your terminal: ANTHROPIC_BASE_URL pointing at https://api.qcode.cc/api and ANTHROPIC_AUTH_TOKEN set to an API key that starts with cr_. The same API key works for Claude Code, Codex and other tools.
Frequently asked questions
How do I check that I run a version after 2.1.304?
Run claude --version in a terminal; the official install docs say a working installation prints a version number. For a more detailed look at the installation and the settings run claude doctor, which prints read-only results and starts no session. 2.1.305 fixes the 2.1.304 tool search gateway regression, and 2.1.310 fixes the case where a gateway rejects the effort beta value or mid-conversation system messages.
What happens on a 400 or 422?
From 2.1.304, a 400 or 422 from the gateway is retried without tool search. From 2.1.305, the case where a rejected tool search made every request fail is fixed too, and Claude Code retries without tool search (from the official changelog under 2.1.304 and 2.1.305).
What does 2.1.304 do about context_management: Extra inputs are not permitted?
Under 2.1.304 the official changelog says: context_management: Extra inputs are not permitted errors behind LLM gateways are fixed, and Claude Code now resends the request without that field.
Where can I see the full list of 400 errors?
The site page "Claude Code Gateway Errors 2026: 400 and Beta Header Fixes" lists the common 400 errors behind a gateway one by one with their cause and their fix, so you can read them side by side.
Which two environment variables does QCode need?
Following the QCode docs page "Claude Code Complete Tutorial", ANTHROPIC_BASE_URL points at https://api.qcode.cc/api and ANTHROPIC_AUTH_TOKEN takes an API key that starts with cr_.
How does QCode bill?
Billed per token, and the price per model is listed at qcode.cc/models.
Sources
The changelog and releases of the official Claude Code repository (v2.1.304, v2.1.305, v2.1.307, v2.1.310; first compared on 2026-10-20, re-checked 2026-10-26); the official Claude Code install docs and the CLI reference (checked 2026-10-26); the QCode docs pages "Claude Code Complete Tutorial" (updated 2026-10-20) and "Endpoints & API Paths" (updated 2026-10-19).
Connect Claude Code to QCode
Billed per token, and the price per model is listed at qcode.cc/models.
Related reading
Claude Code Pay-as-you-go Packs: No Subscription, 7 Days
One-time quota packs valid for 7 days, no subscription; extra packs add to the same key.
Claude Code Gateway Errors 2026: 400 and Beta Header Fixes
The common 400 errors behind a gateway are listed one by one with their error text, their cause and their fix.
ANTHROPIC_BASE_URL in Claude Code (Oct 2026): 2 Env Vars
How the two environment variables that put ANTHROPIC_BASE_URL into Claude Code are set.
Crypto payment guide
Nine coins, 56 networks, zero platform fee for AI coding API credits.
The content of this page was checked on 2026-10-20 and again on 2026-10-26 against the official Claude Code changelog, the release pages and the official documentation; the vendor has adjusted this behavior since 2.1.304 and may keep changing it after 2.1.310, so the official pages are the reference. Model availability is whatever /models shows.