Cline 400 Error With a Custom Anthropic Base URL: Cause and Fix
As of 2026-10-13, calling Claude through a custom Anthropic base URL (the official examples are Azure AI Foundry and corporate gateways) fails with a 400 error on Cline 4.1.22, because 4.1.22 started sending an option only Anthropic's own API accepts: fallbacks. The fix is to upgrade to 4.1.23, released 2026-10-07, or later; the CLI and the desktop app shipped the same fix the same day as cli-v3.0.69 and desktop-v0.0.44, and the CLI has since shipped cli-v3.0.70 (2026-10-08) and cli-v3.0.71 (2026-10-13). This page walks through the cause, the affected versions and what to check after upgrading, quoting Cline's official release notes word for word.
Updated 2026-10-14
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 the field at a glance
The version that broke
Released 2026-09-30. The 4.1.23 release notes state that 4.1.22 started sending an option only Anthropic's own API accepts.
The fix (VS Code extension)
Released 2026-10-07. Its Fixed section says Claude through a custom Anthropic base URL no longer fails with a 400 error.
The option that gets rejected
Per the SDK v0.0.91 notes (2026-10-07, the same day as extension 4.1.23), the Anthropic provider now sends the server-side refusal fallbacks option only to api.anthropic.com; custom endpoints such as Azure AI Foundry rejected it with a 400.
The fix for CLI and desktop
cli-v3.0.69 and desktop-v0.0.44 both shipped on 2026-10-07 with the same fix in their release notes: Claude through a custom Anthropic base URL no longer fails with a 400 error. The CLI has since shipped cli-v3.0.70 (2026-10-08) and cli-v3.0.71 (2026-10-13), and the desktop app shipped desktop-v0.0.45 (2026-10-08).
Where the 400 comes from
As of 2026-10-13, Cline has documented the cause: 4.1.22 started adding an option to Anthropic-provider requests that only Anthropic's own API accepts, so once you tick Use custom base URL and point Cline elsewhere (third-party gateways and relays count too), an endpoint that does not recognize the field answers with a 400. The 4.1.22 release notes describe the change as "Direct Anthropic requests now use Anthropic's server-side refusal fallback."; the SDK v0.0.88 notes from the same day spell out the field as anthropic.fallbacks: "default". From 4.1.23 the option is no longer sent to custom addresses (the SDK v0.0.91 notes from the same day state that it goes only to api.anthropic.com), so after upgrading a custom base URL no longer receives it. You are affected only when both conditions hold: API Provider is set to Anthropic, and Use custom base URL is ticked.
The official release notes, word for word (2026-10-07 to 2026-10-13)
The Fixed section of 4.1.23 reads: "Claude through a custom Anthropic base URL (Azure AI Foundry, corporate gateways) no longer fails with a 400 error. 4.1.22 started sending an option only Anthropic's own API accepts." SDK v0.0.91, from the same day, is more specific (the quote below drops the code formatting marks used in the original): "The Anthropic provider sends the server-side refusal fallbacks option only to api.anthropic.com. Custom endpoints such as Azure AI Foundry rejected it with a 400." CLI release cli-v3.0.69, also from that day, states the same thing: "Claude through a custom Anthropic base URL (Azure AI Foundry, corporate gateways) no longer fails with a 400 error." The same batch of releases fixes other things too: Kimi K3 and other models that only accept certain reasoning levels no longer reject requests, and when a response ends without a recognized finish reason, Cline asks the model to continue once instead of treating it as complete. The two later CLI releases change other areas: cli-v3.0.70 (2026-10-08) includes "Refreshed the model catalog. Adds Claude Haiku 5.5.", and cli-v3.0.71 was released on 2026-10-13. Note that these are names in Cline's own model catalog, not QCode model ids: when you connect to QCode, type the id listed on /models, and QCode has supported claude-haiku-5-5 since 2026-10-09.
From breakage to fix
Cline 4.1.22 ships; its release notes say direct Anthropic requests now use Anthropic's server-side refusal fallback.
A GitHub user reports (issue #14816) that after updating to 4.1.22, requests to a custom Anthropic base URL on Azure AI Foundry fail, with the endpoint returning a 400 "fallbacks: Extra inputs are not permitted".
4.1.23 ships the fix; CLI cli-v3.0.69 and desktop-v0.0.44 ship the same day with the same fix in their release notes. The CLI then shipped cli-v3.0.70 (2026-10-08) and cli-v3.0.71 (2026-10-13), and the desktop app shipped desktop-v0.0.45 (2026-10-08).
Confirmed vs not verified
Confirmed (verbatim in the official release notes)
All of the following can be checked word for word in Cline's official release notes (re-crawled and archived on 2026-10-13): 4.1.22 shipped on 2026-09-30 and direct Anthropic requests started using the server-side refusal fallback; 4.1.23 shipped on 2026-10-07, and Claude through a custom Anthropic base URL (Azure AI Foundry, corporate gateways) no longer fails with a 400 error, with the cause given as 4.1.22 sending an option only Anthropic's own API accepts; SDK v0.0.91 states that the fallbacks option now goes only to api.anthropic.com; CLI cli-v3.0.69 and desktop-v0.0.44 carry the same fix, released the same day; the CLI has since moved to cli-v3.0.70 (2026-10-08) and cli-v3.0.71 (2026-10-13). The QCode side comes from the Cline page on docs.qcode.cc (updated 2026-09-25, last verified 2026-09-18): Claude uses the Anthropic provider, with Use custom base URL set to https://api.qcode.cc/api.
Not verified or not stated officially
Four things this page does not conclude: first, the error text "fallbacks: Extra inputs are not permitted" appears only in a GitHub user report (issue #14816, endpoint on Azure AI Foundry); the official notes say only "a 400 error", and other gateways may word it differently. Second, what the release notes offer as the remedy is upgrading to a release that carries the fix; the workarounds users describe in the issue are not official, so they are not listed here. Third, this page makes no claim about whether QCode's endpoint accepts the field; from 4.1.23 on, Cline simply stops sending it to custom addresses. Fourth, QCode's Cline docs were last verified on 2026-09-18 against VS Code extension 4.1.19, and newer interfaces have not been tested here, so go by what your client shows; names in Cline's model catalog are also not QCode model ids, so type the id from /models.
Two comparisons: version and provider
4.1.22 vs 4.1.23
4.1.22 adds the fallbacks option to Anthropic-provider requests, custom base URLs included; from 4.1.23 the option is no longer sent to custom addresses, and the SDK v0.0.91 notes from the same day state that it goes only to api.anthropic.com. So if you use a custom base URL, move to 4.1.23 or later; for the CLI and the desktop app, look for cli-v3.0.69 and desktop-v0.0.44 (both released 2026-10-07), and the CLI has since shipped cli-v3.0.70 and cli-v3.0.71 (2026-10-13).
Anthropic provider vs OpenAI Compatible
The fix targets the Anthropic provider, and switching to OpenAI Compatible is not a way around it: QCode's docs state that OpenAI-compatible mode cannot use Claude, and a claude-* id returns model_not_available_on_endpoint. Claude goes only through the Anthropic provider (https://api.qcode.cc/api); OpenAI Compatible (https://api.qcode.cc/openai/v1) is for GPT and Chinese models.
How to fix it
① Check your version: open the VS Code Extensions panel (Ctrl+Shift+X / Cmd+Shift+X), search for Cline and look at the installed version; 4.1.22 is the one the release notes name. ② Upgrade to 4.1.23 or later; on the CLI, to cli-v3.0.69 or later (the CLI has since shipped cli-v3.0.70 on 2026-10-08 and cli-v3.0.71 on 2026-10-13); on the desktop app, to desktop-v0.0.44 or later. ③ Leave your settings as they are: API Provider stays Anthropic, and Use custom base URL stays ticked with your address; for QCode that is https://api.qcode.cc/api, not /api/v1/messages, and without a trailing slash. ④ Send a message to confirm. What the release notes offer as the remedy is upgrading to a release that carries the fix; the workarounds users describe in the issue are not official, so they are not covered here.
On QCode
To call Claude from Cline on QCode, the docs give this setup: API Provider Anthropic, API Key your QCode key (starts with cr_), tick Use custom base URL and enter https://api.qcode.cc/api, Model claude-sonnet-5 (everyday) or claude-opus-5 (harder tasks). As tested on 2026-10-08, with the Base URL set to https://api.qcode.cc/api, requests to both /api/messages and /api/v1/messages return 200, so the address works whether the client appends /messages or /v1/messages. In North America and Europe you can use https://us.qcode.cc/api (Los Angeles) instead. This page covers only the 400; for the full setup, including GPT and Chinese models through OpenAI Compatible, see the Cline OpenAI-compatible guide. Billed per token; see /models for each model's price.
Frequently asked questions
Why does Cline 4.1.22 return a 400 with a custom base URL?
Because 4.1.22 started sending an option in Anthropic requests that only Anthropic's own API accepts. The 4.1.23 release notes say verbatim "4.1.22 started sending an option only Anthropic's own API accepts.", and SDK v0.0.91 names it the server-side refusal fallbacks option, which custom endpoints such as Azure AI Foundry rejected with a 400.
How do I fix it, and which version do I need?
Upgrade to 4.1.23 or later (released 2026-10-07). From 4.1.23 the option is no longer sent to custom addresses, so your custom base URL does not receive it. The Cline CLI fix is cli-v3.0.69 and the desktop fix is desktop-v0.0.44, both released 2026-10-07; the CLI has since shipped cli-v3.0.70 (2026-10-08) and cli-v3.0.71 (2026-10-13).
What is the exact error message?
The official release notes say only "a 400 error" and give no message text. A GitHub user report (issue #14816, endpoint on Azure AI Foundry) shows the message "fallbacks: Extra inputs are not permitted"; that is a user report, and your gateway may word it differently.
Is there a workaround without upgrading?
Not an official one. The 4.1.23 and SDK v0.0.91 release notes describe only the fix itself and list no setting to turn the option off; this page does not cover unofficial workarounds, so upgrading is the way to go.
Can I get around it by switching to OpenAI Compatible?
Not for Claude on QCode. QCode's docs state that OpenAI-compatible mode cannot use Claude and that a claude-* id returns model_not_available_on_endpoint; Claude needs the Anthropic provider with Base URL https://api.qcode.cc/api. GPT and Chinese models can use OpenAI Compatible (https://api.qcode.cc/openai/v1).
I upgraded and still get errors with QCode. What should I check first?
Check three things against QCode's docs: API Provider is Anthropic; the Base URL stops at /api, with no trailing slash and not /api/v1/messages; the key starts with cr_ and was copied in full. The docs note that a 401 usually means the path is correct and only auth failed. If the main domain is unstable, switch to a backup node such as https://us.qcode.cc/api.
Sources
Cause, affected versions and fix: the Releases page of Cline's GitHub repository (release notes for v4.1.22, v4.1.23, SDK v0.0.88 and v0.0.91, cli-v3.0.69, cli-v3.0.70, cli-v3.0.71, desktop-v0.0.44 and desktop-v0.0.45), crawled 2026-10-13. User report: Cline GitHub issue #14816, crawled the same day and used only to describe the symptom. QCode setup: the Cline page on docs.qcode.cc (updated 2026-09-25, last verified 2026-09-18, against VS Code extension 4.1.19) and the Endpoints & API Paths page, both crawled 2026-10-13; model availability was checked the same day against qcode.cc/models and the Claude Haiku 5.5 guide page.
Upgrade Cline and keep using Claude
In Cline pick the Anthropic provider, set Use custom base URL to https://api.qcode.cc/api and Model to claude-sonnet-5; billed per token, with each model's price on /models.
Related reading
Cline with OpenAI-compatible APIs: 2026 guide
The full setup: GPT and Chinese models via OpenAI Compatible, Claude via the Anthropic provider.
Claude Code gateway errors 2026: 400 and beta header fixes
400 and beta-header errors in Claude Code behind a gateway, matched to the versions that fix them.
BYOK AI coding tools: 16 with custom API support
Protocol, config location and Claude support for each tool.
Crypto payment guide
Nine coins, 56 networks, zero platform fee for AI coding API credits.
Versions and quotes on this page were checked on 2026-10-13 against Cline's official release notes and QCode's docs; for anything changed after that date, go by the official pages. The error text from the GitHub issue is a user report and does not represent every gateway's response. Model availability is whatever /models shows.