{"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_topology","feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","contains":"claims, sources, anecdotes, question_graph slice","slug":"claude-code-on-cloudflare-ai-gateway","urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/topology"},"how_to_use":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"graph_topology","name":"Cross-article graph","what":"Merged claims/sources across condition+stack slugs for one question.","urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/graph-topology?question=..."}},{"id":"question_graph","name":"Question graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output).","urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/question-graph","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/voxels","write":"https://miscsubjects.com/api/protocol/claim"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","why":"Every feature is auditable collective intelligence","how":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway/topology"},"imessage":null,"router":null,"related":[{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"graph_topology","what":"Merged claims/sources across condition+stack slugs for one question."},{"id":"question_graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output)."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."}],"not_medical_advice":true},"slug":"claude-code-on-cloudflare-ai-gateway","title":"Claude Code on Kimi, GLM or Grok through your own Cloudflare account","register":"essay","tags":["tooling","claude-code","kimi","glm"],"updated_at":"2026-07-26T05:37:26.060Z","body_excerpt":"A Claude Code turn that costs $0.0044 instead of $0.21, running Kimi K2.7 Code, billed by Cloudflare, with no Anthropic key and no Moonshot key in the configuration. That is the outcome this page produces. Follow the steps in order and it takes about twenty minutes.\n\nTwo reasons to want it. The money: the same work priced at $0.95 per million input tokens instead of $3 to $15, on one invoice you already receive. The obedience: open-weight models such as Kimi K2.7 Code and GLM-5.2 follow an explicit instruction more literally than Claude does, and if your work depends on instructions being followed exactly rather than improved upon, that difference is the point. Both reasons are quantified further down, with the arithmetic shown.\n\n## Evidence status\n\n**Observed** marks first-party measurements or runtime receipts from the named environment.\n**Derived** marks arithmetic calculated from cited inputs. **Specified** marks vendor or standards\ndocumentation. **Implemented** and **deployed** name code and live-state evidence, respectively.\n**Reproduced** means the stated procedure was rerun. **Externally attested** marks operator reports;\nthose reports show that an experience occurred, not that it is universal.\n\n## Every term on this page, defined\n\n| Term | What it means here |\n| --- | --- |\n| Claude Code | Anthropic's command-line coding agent. It reads and writes files, runs shell commands, and calls tools. It is a client program: the model it talks to is whatever address you configure. |\n| Anthropic Messages API | The request and response format Claude Code speaks: `POST /v1/messages` with a JSON body. Defined at [platform.claude.com/docs/en/api/messages](https://platform.claude.com/docs/en/api/messages). Full explanation: [What the Anthropic Messages API is](/a/what-is-the-anthropic-messages-api). |\n| Chat Completions | The request and response format most other providers speak: `POST /v1/chat/completions`. Different field names, different streaming events. Not interchangeable with the Messages API without translation. |\n| Cloudflare AI Gateway | A proxy in front of AI providers that adds logging, caching, rate limits, retries and billing. Setup: [How to create a Cloudflare AI Gateway](/a/cloudflare-ai-gateway-setup). |\n| Workers AI | Models Cloudflare hosts and bills directly, named `@cf/author/model`. Includes Kimi K2.7 Code and GLM-5.2. Details: [Workers AI for coding models](/a/workers-ai-coding-models). |\n| Unified Billing | Cloudflare pays the upstream provider and bills you, so no provider API key appears in your configuration. Arithmetic: [Cloudflare Unified Billing](/a/cloudflare-unified-billing). |\n| BYOK | Bring Your Own Keys. You store the provider's key in the gateway instead of sending it with each request. |\n| MCP | Model Context Protocol. How extra tools are attached to a coding agent. Reference: [MCP, from its own documents](/a/what-is-mcp). |\n| Tool search | A client setting that stops every MCP tool definition being sent in every request. Cost impact: [Why MCP tool schemas are most of your bill](/a/mcp-tool-search-cost). |\n| Translator | A program that accepts Anthropic Messages requests and converts them to Chat Completions, then converts the answer back. Also called a shim or a proxy. This page publishes one. |\n| Turn | One request-and-response cycle between Claude Code and a model. A single instruction from you usually costs several turns. |\n\n## The problem, stated exactly\n\nClaude Code sends `POST /v1/messages`. Cloudflare's AI Gateway has an endpoint that speaks that format, documented for Claude Code by Cloudflare itself, and it reaches Anthropic's models only.\n\nEvery other model in Cloudflare's catalogue — Kimi, GLM, Grok, DeepSeek, MiniMax — is listed as Chat Completions. Each model page in the catalogue states this in a field named `Request formats`.\n\n| Model | Request formats as catalogued | Reachable by Claude Code unmodified |\n| --- | --- | --- |\n| anthropic/claude-opus-5 | Anthropic Messages | yes |\n","ranking":"safety-first (interaction_risk/limitations), then quote-gated effective_weight","claims":[{"id":"c3","text":"Cloudflare documents Claude Code against its AI Gateway Anthropic endpoint, which exposes the same /v1/messages API the client expects.","tier":"system","weight":0.35,"section":"Cloudflare documents the Claude lane","slot":null,"interaction_risk":false,"status":"active","source_ids":["s3","s4"],"source_status":"sourced","why_material":"This is the only first-party path, and it covers Claude alone.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c4","text":"The gateway's Anthropic provider is a reverse proxy to api.anthropic.com and cannot route a /v1/messages request to a non-Anthropic model; the account REST endpoint /ai/v1/messages excludes Workers AI @cf/ models by documentation.","tier":"system","weight":0.35,"section":"Cloudflare documents the Claude lane","slot":null,"interaction_risk":false,"status":"active","source_ids":["s4","s5"],"source_status":"sourced","why_material":"Establishes precisely where the gap is.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c7","text":"Measured through one AI Gateway: a Kimi K2.7 Code turn cost $0.01089448 at 21,928 input tokens with MCP disabled, against $0.02852109 at 149,187 input tokens with one MCP server attached.","tier":"system","weight":0.35,"section":"What it costs","slot":null,"interaction_risk":false,"status":"active","source_ids":["s15","s16","s7"],"source_status":"sourced","why_material":"Gives the operator the actual lever: tool schemas, not conversation length.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c8","text":"Unified Billing is refused on a gateway with authentication off, returning HTTP 402 for catalogue models while Workers AI @cf/ models continue to work.","tier":"system","weight":0.35,"section":"Unified Billing","slot":null,"interaction_risk":false,"status":"active","source_ids":["s13","s14","s7"],"source_status":"sourced","why_material":"The failure presents as a model problem and is a gateway setting.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c11","text":"Rewriting tool_use identifiers in translation can break upstream tool parsing and make Claude Code end its turn mid-task with no error surfaced in the client.","tier":"system","weight":0.35,"section":"Nobody had written the translator","slot":null,"interaction_risk":false,"status":"active","source_ids":["s10"],"source_status":"sourced","why_material":"The most damaging translation defect is silent, not loud.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c14","text":"Unified Billing applies a 5% fee to purchased credits, passes provider inference pricing through without markup, and excludes Workers AI @cf/ models.","tier":"system","weight":0.35,"section":"What it costs","slot":null,"interaction_risk":false,"status":"active","source_ids":["s13"],"source_status":"sourced","why_material":"Sets what central billing actually costs and what it does not cover.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c27","text":"The translator is published as a single-file Cloudflare Worker under MIT with three secrets and a wire-capture tool, so the setup and every measurement in this article can be reproduced on another account.","tier":"system","weight":0.35,"section":"Run it yourself","slot":null,"interaction_risk":false,"status":"active","source_ids":["s32"],"source_status":"sourced","why_material":"A method nobody else can run is a claim, not a result.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.35,"quote_gated":false},{"id":"c6","text":"Cloudflare's /ai/v1/messages returns a true Anthropic envelope for anthropic/* models but answered minimax/m3 with an OpenAI chat.completion body, so accepting the request is not the same as answering in the schema.","tier":"mechanistic","weight":0.3,"section":"Cloudflare documents the Claude lane","slot":null,"interaction_risk":false,"status":"active","source_ids":["s7"],"source_status":"sourced","why_material":"A documented capability that does not hold in practice for every listed model.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c24","text":"ENABLE_TOOL_SEARCH=true works behind a custom ANTHROPIC_BASE_URL gateway on claude-cli 2.1.165, reducing a request from 856 tool definitions to 9 plus a ToolSearch tool, against documentation stating tool search is unavailable in that configuration.","tier":"mechanistic","weight":0.3,"section":"Keep the tool schemas out of every request","slot":null,"interaction_risk":false,"status":"active","source_ids":["s30","s31"],"source_status":"sourced","why_material":"It is the single largest cost lever and the docs say it does not work.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c26","text":"A non-Claude model drives the deferred-tool loop: Kimi K2.7 Code called ToolSearch to locate an MCP tool it had not been shown, invoked it, and returned its payload verbatim.","tier":"mechanistic","weight":0.3,"section":"Keep the tool schemas out of every request","slot":null,"interaction_risk":false,"status":"active","source_ids":["s31"],"source_status":"sourced","why_material":"Deferred tools are only a saving if the model actually searches for them.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c1","text":"Claude Code posts inference to /v1/messages?beta=true with two distinct model slots: a main call carrying the full tool list at max_tokens 32000, and a tool-free background call at max_tokens 1024.","tier":"system","weight":0.35,"section":"What the client sends","slot":null,"interaction_risk":false,"status":"active","source_ids":["s1","s2"],"source_status":"sourced","why_material":"Everything a gateway must implement follows from the captured request shape.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c2","text":"A gateway must stream responses and must forward the anthropic-beta header verbatim; /v1/messages/count_tokens is optional and its absence makes the client estimate context locally.","tier":"system","weight":0.35,"section":"What the client sends","slot":null,"interaction_risk":false,"status":"active","source_ids":["s2"],"source_status":"sourced","why_material":"These three rules decide whether a working gateway feels broken.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c5","text":"Kimi, GLM, Grok and DeepSeek are catalogued on Cloudflare as Chat Completions only, so Claude Code cannot reach them without format translation.","tier":"system","weight":0.35,"section":"Cloudflare documents the Claude lane","slot":null,"interaction_risk":false,"status":"active","source_ids":["s5","s6"],"source_status":"sourced","why_material":"This is the fact that makes a translator necessary rather than optional.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c9","text":"Disabling one MCP server cut input from 149,443 tokens to 21,928 and raised cached input from 64 tokens to 13,312 once the per-request attribution block was stripped.","tier":"system","weight":0.35,"section":"What it costs","slot":null,"interaction_risk":false,"status":"active","source_ids":["s7"],"source_status":"sourced","why_material":"Quantifies both the schema cost and the caching fix in one comparison.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c10","text":"No existing Anthropic-to-OpenAI shim targets Cloudflare Workers AI, and each of the four that run as Cloudflare Workers fails on a contract element Claude Code depends on.","tier":"system","weight":0.35,"section":"Nobody had written the translator","slot":null,"interaction_risk":false,"status":"active","source_ids":["s8","s9"],"source_status":"sourced","why_material":"Explains why this had to be built rather than installed.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c12","text":"Claude Code prepends a per-request attribution line to the system prompt which Anthropic strips positionally, defeating prefix caching on every other provider until it is removed.","tier":"system","weight":0.35,"section":"The attribution line","slot":null,"interaction_risk":false,"status":"active","source_ids":["s11","s2"],"source_status":"sourced","why_material":"Without this fix the cheapest model still pays full input price every turn.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c13","text":"The desktop client validates model names against an Anthropic-shaped allowlist, so a gateway model id such as kimi-k2.7-code is rejected before any request is sent.","tier":"system","weight":0.35,"section":"The build","slot":null,"interaction_risk":false,"status":"active","source_ids":["s12"],"source_status":"sourced","why_material":"Determines how model aliases must be named to be usable at all.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c15","text":"AI Gateway token permissions cannot be scoped to a single gateway, so any token with Run permission can send requests through every gateway on the account, including gateways holding stored provider keys.","tier":"system","weight":0.35,"section":"Unified Billing","slot":null,"interaction_risk":false,"status":"active","source_ids":["s14"],"source_status":"sourced","why_material":"A single credential is broader than the setup it was created for.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c16","text":"Anthropic states it does not endorse, maintain or audit third-party gateway products and does not support routing Claude Code to non-Claude models through any gateway.","tier":"system","weight":0.35,"section":"What still breaks","slot":null,"interaction_risk":false,"status":"active","source_ids":["s16"],"source_status":"sourced","why_material":"Sets the support boundary: unsupported configuration, not prohibited one.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c17","text":"Claude Code sends thinking: {type: adaptive} to models behind a custom base URL, producing 400s, empty responses or hangs, and its subagent and structured-output calls omit the field entirely, failing against endpoints that require it.","tier":"system","weight":0.35,"section":"What still breaks","slot":null,"interaction_risk":false,"status":"active","source_ids":["s17","s18"],"source_status":"sourced","why_material":"The single largest failure cluster for non-Claude backends.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c18","text":"Moonshot, Z.ai and DeepSeek each publish an Anthropic-format base URL with their own Claude Code instructions, giving a working route with no proxy and no Cloudflare billing.","tier":"system","weight":0.35,"section":"Every other route","slot":null,"interaction_risk":false,"status":"active","source_ids":["s19","s20","s21"],"source_status":"sourced","why_material":"The shortest alternative path, stated with what it gives up.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c19","text":"OpenRouter serves Claude Code's native protocol directly at https://openrouter.ai/api with no local proxy, and is also a first-class AI Gateway provider.","tier":"system","weight":0.35,"section":"Every other route","slot":null,"interaction_risk":false,"status":"active","source_ids":["s22"],"source_status":"sourced","why_material":"The lowest-effort multi-model route that still keeps Cloudflare in the path.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c20","text":"Cloudflare custom providers proxy any HTTPS base URL under custom-<slug>, so a vendor's own Anthropic endpoint can sit behind the gateway with observability and caching but without Unified Billing.","tier":"system","weight":0.35,"section":"Every other route","slot":null,"interaction_risk":false,"status":"active","source_ids":["s23"],"source_status":"sourced","why_material":"Covers the case where the vendor must keep the billing relationship.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c21","text":"llama.cpp, vLLM, Ollama and LM Studio all serve /v1/messages natively as of early 2026, so local models need no translation proxy.","tier":"system","weight":0.35,"section":"Every other route","slot":null,"interaction_risk":false,"status":"active","source_ids":["s24","s25","s26"],"source_status":"sourced","why_material":"Invalidates every guide that still recommends a proxy for local models.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c22","text":"On identical independent harnesses the open models sit one tier behind Claude: SWE-bench Verified 76.8 Opus 4.5, 72.8 GLM-5, 70.8 Kimi K2.5 on mini-SWE-agent 2.0.0; Terminal-Bench 2.1 with Claude Code 83.8 Fable 5 against 58.7 GLM-5.1.","tier":"system","weight":0.35,"section":"Do the models hold up","slot":null,"interaction_risk":false,"status":"active","source_ids":["s27","s28"],"source_status":"sourced","why_material":"Sets the honest quality expectation for the cheaper route.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c23","text":"Every vendor-reported benchmark score with an independent counterpart is higher than the independent measurement, by 4 to 13 points, without exception.","tier":"system","weight":0.35,"section":"Do the models hold up","slot":null,"interaction_risk":false,"status":"active","source_ids":["s27","s29"],"source_status":"sourced","why_material":"Tells the reader to read scaffold before score.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c25","text":"With the same MCP server attached, tool search cut measured input from 149,187 tokens and $0.02852109 per turn to 14,109 tokens and $0.00443075 — cheaper than running with no MCP server connected at all.","tier":"system","weight":0.35,"section":"What it costs","slot":null,"interaction_risk":false,"status":"active","source_ids":["s30","s31","s7"],"source_status":"sourced","why_material":"Turns the largest cost item into the smallest with one environment variable.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.22,"quote_gated":true},{"id":"c28","text":"Operators use Claude Code with cheaper or local backends through base-URL and model settings, but these reports establish workable configurations rather than universal quality or savings.","tier":"operator","section":"Every other route","interaction_risk":false,"status":"active","source_ids":["s33","s34","s36","s37"],"why_material":"Shows the practice exists while keeping anecdotal operator reports narrower than controlled benchmark evidence.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c29","text":"One operator published a working Claude Code configuration against a local llama-server with a 200k context setting; this is one externally attested setup, not a compatibility guarantee for every local runtime.","tier":"operator","section":"Every other route","interaction_risk":false,"status":"active","source_ids":["s34"],"why_material":"Narrowly records the local-runtime report without generalizing from one machine.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c30","text":"Operator evidence also runs in the other direction: one high-attention report describes moving from Kimi K3 back to Claude Opus 5, so lower price does not prove model substitution is acceptable for every task.","tier":"operator","section":"Do the models hold up","interaction_risk":false,"status":"active","source_ids":["s35"],"why_material":"Keeps the article from turning cost evidence into an unsupported universal model recommendation.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false}],"sources":[{"id":"s1","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Wire capture: what claude-cli 2.1.165 sends to an arbitrary ANTHROPIC_BASE_URL","quote":"POST /v1/messages?beta=true | model=<ANTHROPIC_MODEL> max_tokens=32000 tools=861 | system=[92, 62, 5681] cache_control=[none, ephemeral, ephemeral]","summary":"First-party capture, 2026-07-25: Claude Code pointed at a local logging server that answered in Anthropic format. Records the path with its query string, the two model slots (32000-token main call with tools, 1024-token background call without), the eight anthropic-beta values, and the three-block cache-marked system array.","claim_ids":["c1"],"link_status":"ok","quote_status":"unverified","hash":"be264ae0bf04553a4ed4e073dec9b6562f7d3d585baaf2b411e43d240064e4aa"},{"id":"s2","type":"publisher_documentation","url":"https://code.claude.com/docs/en/llm-gateway-protocol","title":"Claude Code gateway protocol reference","quote":"Forward the header verbatim; don't allowlist individual values, because the set changes with Claude Code releases.","summary":"Anthropic's contract for gateway authors: inference posts to /v1/messages?beta=true and must be matched on path; responses must stream or the client stalls; /v1/messages/count_tokens is optional and its absence makes the client estimate context locally; the system-prompt attribution strip is positional; gateway model discovery ignores ids that do not begin with claude or anthropic.","claim_ids":["c1","c12","c2"],"link_status":"ok","quote_status":"unverified","hash":"e329fc3e0001dc618f048a70748d4a53231c3352f07473a7ddec37f3a3da2b26"},{"id":"s3","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/integrations/coding-agents/claude-code/","title":"Cloudflare AI Gateway — Claude Code integration","quote":"The Anthropic endpoint exposes the same /v1/messages API that Claude Code expects.","summary":"Cloudflare's first-party guide: three environment variables (ANTHROPIC_BASE_URL at the gateway's anthropic provider, ANTHROPIC_API_KEY, and cf-aig-authorization via ANTHROPIC_CUSTOM_HEADERS), an authenticated gateway, and a gateway token with Run permission. Also documents Bedrock and Vertex variants.","claim_ids":["c3"],"link_status":"ok","quote_status":"unverified","hash":"9d01f4917060ddda80a1586f7a65589890b5303e58310bd56e78c5dc6dc41159"},{"id":"s4","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/usage/providers/anthropic/","title":"Cloudflare AI Gateway — Anthropic provider","quote":"https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/anthropic","summary":"The anthropic provider slug is a reverse proxy to api.anthropic.com, taking x-api-key and anthropic-version: 2023-06-01. It serves /v1/messages and cannot route that request to a non-Anthropic model.","claim_ids":["c3","c4"],"link_status":"ok","quote_status":"verified","hash":"69939bc9b617b0e6e1a3c38be58e7c213f8d675472b87caf231ade1ff349c93b"},{"id":"s5","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/usage/rest-api/","title":"Cloudflare AI Gateway — REST API","quote":"The /ai/v1/messages endpoint strictly uses Anthropic's API schema and supports routing to Anthropic and other third-party models. Workers AI models (@cf/) do not support this schema.","summary":"Four endpoints on the account AI surface: /ai/run, /ai/v1/chat/completions, /ai/v1/responses and /ai/v1/messages. Chat completions serves both Workers AI and third-party catalogue models; the Anthropic-schema endpoint excludes @cf/ models. Workers AI requests require the cf-aig-gateway-id header.","claim_ids":["c4","c5"],"link_status":"ok","quote_status":"unverified","hash":"09e2aec7f7360ff671559084bee22aea2af711bff389c4b99fdb8f40551cd4d1"},{"id":"s6","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai/models/moonshotai/kimi-k3/","title":"Cloudflare model catalogue — Request formats field","quote":"Request formats: Chat Completions","summary":"Every catalogue model page states which request formats it accepts. Kimi, Grok, DeepSeek and the Workers AI @cf/ models are Chat Completions only; anthropic/* and minimax/m3 list Anthropic Messages. This field is what decides whether Claude Code can reach a model without translation.","claim_ids":["c5"],"link_status":"ok","quote_status":"unverified","hash":"44506c2385e789db4fdf1e127ccc37cf90b531bda57742eaa8c9583c6cc3eb4c"},{"id":"s7","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Gateway log rows: measured cost, cached input and the Unified Billing 402","quote":"{\"errors\":[{\"message\":\"Gateway authentication is required to use unified billing. Enable authentication on your gateway or provide your own API key (BYOK).\",\"code\":2021}]}","summary":"First-party measurements read from the account's own AI Gateway logs, 2026-07-25. With an MCP server attached: GLM-5.2 149,443 input tokens, 64 cached, $0.20922644, 10.9s; Kimi K2.7 Code 149,187 input, $0.02852109. With MCP disabled: Kimi 21,928 input, 13,312 cached, $0.01089448, 2.8s. Also records the 402 returned when a catalogue model is routed through an unauthenticated gateway, and that minimax/m3 answers /ai/v1/messages with an OpenAI chat.completion body rather than an Anthropic envelope.","claim_ids":["c25","c6","c7","c8","c9"],"link_status":"ok","quote_status":"unverified","hash":"1836223c34e173731f4f9ae65dbf1e46355620492d123cf842770064c143166b"},{"id":"s8","type":"github","url":"https://github.com/luohy15/y-router","title":"y-router — archived Cloudflare Worker Anthropic-to-OpenAI proxy","quote":"docs: Archive project in favor of official OpenRouter integration","summary":"The best-known Cloudflare Worker shim, archived 2026-01-11. Source review also shows it drops max_tokens and returns fabricated usage numbers, so it should not be used as a starting point.","claim_ids":["c10"],"link_status":"ok","quote_status":"unverified","hash":"3d49cc44500bf4a3b9efb7a4c89af56b0eb5d4ff7b79cec8529ba1e1f5cc678b"},{"id":"s9","type":"github","url":"https://github.com/glidea/claude-worker-proxy","title":"claude-worker-proxy — the one active Cloudflare Worker shim","quote":"Anthropic Messages to OpenAI-compatible proxy running on Cloudflare Workers","summary":"Active and structurally sound, with three gaps that matter to Claude Code: tool arguments are emitted as one blob instead of incremental input_json_delta, there is no /v1/messages/count_tokens route, and image blocks are dropped. No Worker-native shim handles thinking blocks or cache_control.","claim_ids":["c10"],"link_status":"ok","quote_status":"unverified","hash":"7b3bcabb0b1d7c96496503d25b88b9fd7b91e5467b9cd804da137e6260eaac11"},{"id":"s10","type":"github","url":"https://github.com/BerriAI/litellm/issues/34522","title":"LiteLLM #34522 — Kimi K2 tool calls silently stop working after tool_use id normalization","quote":"Kimi K2 tool calls silently stop working on v1.91.3+ due to tool_use id normalization","summary":"Rewriting tool_use ids to satisfy Anthropic's character class breaks upstream parsers that derive call indexes from the original id form. The reported symptom is the worst kind: Claude Code ends its turn mid-task with no error surfaced anywhere in the client.","claim_ids":["c11"],"link_status":"ok","quote_status":"verified","hash":"81b33918f4027782b5e2d4a6b69c1b6d548085f03de51e3b29578760c13e6bb4"},{"id":"s11","type":"github","url":"https://github.com/anthropics/claude-code/issues/68900","title":"claude-code #68900 — per-request billing-header nonce breaks prompt caching on third-party providers","quote":"x-anthropic-billing-header: cc_version=2.1.177.01c; cc_entrypoint=sdk-cli; cch=<NONCE>;","summary":"The first system block of every request carries a value that changes per request, sitting in front of the whole cached prefix. Reported result: 0% cache hit on third-party providers, restored to roughly 99.7% once a proxy normalised the block away. CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC does not remove it; CLAUDE_CODE_ATTRIBUTION_HEADER=0 does.","claim_ids":["c12"],"link_status":"ok","quote_status":"unverified","hash":"b4c971d0c0c2c8ba5be925f5c4fe42ca85a8f65f05c2b662ba47deb836fb86e4"},{"id":"s12","type":"github","url":"https://github.com/anthropics/claude-code/issues/56990","title":"claude-code #56990 — desktop build rejects non-Anthropic model names","quote":"expected a gateway model route referencing an Anthropic model (e.g. claude-sonnet-4-5, anthropic/claude-*). Name routes to match the underlying model.","summary":"Client-side validation in the desktop app checks model names against an Anthropic-shaped allowlist, so a gateway model id such as kimi-k2.7-code is refused before any request is sent. Practical consequence: the names you type must look like Claude names while resolving to something else.","claim_ids":["c13"],"link_status":"ok","quote_status":"unverified","hash":"56a2c79f2330d3721e672d7f33c65131671365620b10a43ef24ce0171829cba2"},{"id":"s13","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/features/unified-billing/","title":"Cloudflare AI Gateway — Unified Billing","quote":"A 5% fee is applied to all credits purchased through Unified Billing. For example, a $100 credit purchase will result in a $105 charge. Inference pricing from providers is passed through with no markup.","summary":"Unified Billing lets the gateway supply the provider credential, so no Anthropic, Moonshot or xAI key appears in the client configuration. Workers AI models prefixed @cf/ are explicitly not billed through it, so a mixed setup produces two line items on one Cloudflare invoice.","claim_ids":["c14","c8"],"link_status":"ok","quote_status":"verified","hash":"9b16a41c3d1d3124b97cccf063c1e1e874e170e1afc4aaf0cfab6a830cb35b43"},{"id":"s14","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/configuration/authentication/","title":"Cloudflare AI Gateway — authenticated gateway and token scope","quote":"The AI Gateway Read, Run, and Edit permissions cannot be restricted to a single gateway — unlike R2, which supports per-bucket scoping. Any token with AI Gateway Run can send requests through every gateway in the account, including any configured with stored provider keys through Bring Your Own Keys (BYOK), consuming those credentials.","summary":"Authentication is per gateway: with it on, a request without cf-aig-authorization fails. The permission model is account-wide, so a Run token is not a per-gateway credential no matter how you scope the rest of your setup.","claim_ids":["c15","c8"],"link_status":"ok","quote_status":"unverified","hash":"6e59f1fed1a67c2bfebcc5dc8c5f02e0b9505a7c186ae21bc043742a4f1fd8e1"},{"id":"s15","type":"publisher_documentation","url":"https://developers.cloudflare.com/workers-ai/platform/pricing/","title":"Workers AI pricing","quote":"$0.011 per 1,000 Neurons","summary":"Workers AI bills in Neurons with 10,000 free per day on both Free and Paid plans, resetting at 00:00 UTC. Published per-million rates include Kimi K2.7 Code at $0.95 input / $0.19 cached input / $4.00 output, GLM-5.2 at $1.40 / $0.26 / $4.40, and GLM-4.7-Flash at $0.06 input / $0.40 output with no cached tier.","claim_ids":["c7"],"link_status":"ok","quote_status":"verified","hash":"2dcd0572f3aecb3ac1da111d1ba274fdbef180ed69a147508d3ef1638687cceb"},{"id":"s16","type":"publisher_documentation","url":"https://code.claude.com/docs/en/llm-gateway","title":"Claude Code — LLM gateway configuration","quote":"Anthropic doesn't endorse, maintain, or audit third-party gateway products, and doesn't support routing Claude Code to non-Claude models through any gateway.","summary":"Pointing the CLI at a gateway is a documented, first-class configuration; pointing it at a non-Claude model is outside what Anthropic supports. The word is support, not prohibit — no clause forbids it — but the client is a moving target and the operator absorbs every change.","claim_ids":["c16","c7"],"link_status":"ok","quote_status":"unverified","hash":"945ae8d2a0662dc9d5101101fc4a1e136e6d93cfbd2f43473f884abf5cc11290"},{"id":"s17","type":"github","url":"https://github.com/anthropics/claude-code/issues/68551","title":"claude-code #68551 — adaptive thinking sent to custom base-URL models","quote":"Claude Code sends thinking: {type: adaptive} to custom ANTHROPIC_BASE_URL models — gateways 400 / return empty / hang","summary":"The client treats unrecognised gateway aliases as current models and sends the thinking field to them. Reported symptoms across backends: HTTP 400, empty responses, and multi-minute hangs. A translator that drops the field entirely avoids the whole class.","claim_ids":["c17"],"link_status":"unchecked","quote_status":"unchecked","hash":"fb7d091568830a5909ed6187e732866bfe46dd56f16607cb1619045bafab2f24"},{"id":"s18","type":"github","url":"https://github.com/anthropics/claude-code/issues/69379","title":"claude-code #69379 — subagents 400 against a third-party Anthropic endpoint","quote":"API Error: 400 invalid thinking: only type=enabled is allowed for this model","summary":"Against Moonshot's Anthropic endpoint the main thread works while subagent and structured-output calls fail, because those requests omit the thinking field the model requires. The subagent transcript is two lines and zero tool uses. MAX_THINKING_TOKENS does not fix it.","claim_ids":["c17"],"link_status":"unchecked","quote_status":"unchecked","hash":"03b965084ef7fdf021a648bda08aacd34670acc22e4adbe4229f5bc574e38a74"},{"id":"s19","type":"publisher_documentation","url":"https://platform.kimi.ai/docs/guide/claude-code-kimi","title":"Moonshot — using Kimi in Claude Code","quote":"export ANTHROPIC_BASE_URL=\"https://api.moonshot.ai/anthropic\"","summary":"Moonshot's own Anthropic-format endpoint and Claude Code instructions. Model ids include kimi-k3 (1,048,576-token context) and kimi-k2.7-code. The page requires ENABLE_TOOL_SEARCH=false because the endpoint does not support that feature yet, and kimi-k2.7-code rejects requests with thinking disabled. The China endpoint is api.moonshot.cn/anthropic.","claim_ids":["c18"],"link_status":"unchecked","quote_status":"unchecked","hash":"7a43fdf1a52952eaa4396180d6cc2e4948ec69673da7bbf669e2076479129d35"},{"id":"s20","type":"publisher_documentation","url":"https://docs.z.ai/devpack/tool/claude","title":"Z.ai — GLM in Claude Code","quote":"\"ANTHROPIC_BASE_URL\": \"https://api.z.ai/api/anthropic\"","summary":"Z.ai publishes an Anthropic-format endpoint and a Claude Code settings block mapping the Opus and Sonnet slots to glm-5.2. The page contradicts itself on the haiku slot (glm-4.7 in prose, glm-4.5-air on a sibling page) and still claims verification against Claude Code 2.0.14.","claim_ids":["c18"],"link_status":"unchecked","quote_status":"unchecked","hash":"0b0cdda5d102246ff7d9681af076cf5072b47963848b1a489e57295f2fbaa5ec"},{"id":"s21","type":"publisher_documentation","url":"https://api-docs.deepseek.com/guides/anthropic_api","title":"DeepSeek — Anthropic API format","quote":"To meet the demand for using the Anthropic API ecosystem, our API has added support for the Anthropic API format, with the base_url being https://api.deepseek.com/anthropic","summary":"DeepSeek maps Claude Code's default model names for you: claude-opus* to deepseek-v4-pro, claude-haiku*/claude-sonnet* to deepseek-v4-flash. Documented limits: anthropic-beta and anthropic-version headers ignored, cache_control ignored everywhere, image and document blocks unsupported, thinking accepted but budget_tokens ignored.","claim_ids":["c18"],"link_status":"unchecked","quote_status":"unchecked","hash":"d5b6ee39a5cf9e1e5363a1b49002aff6ea51a59d3b3b345f1451bffdaf192ff8"},{"id":"s22","type":"publisher_documentation","url":"https://openrouter.ai/docs/guides/guides/claude-code-integration","title":"OpenRouter — Claude Code integration","quote":"When you set ANTHROPIC_BASE_URL to https://openrouter.ai/api, Claude Code speaks its native protocol directly to OpenRouter. No local proxy server is required.","summary":"An officially supported Anthropic-format endpoint in front of hundreds of models, with ANTHROPIC_API_KEY required to be explicitly empty. OpenRouter is also a first-class AI Gateway provider slug, which makes it the shortest documented path to many models with Cloudflare in the middle.","claim_ids":["c19"],"link_status":"unchecked","quote_status":"unchecked","hash":"8014c0b9191a5654f4f6b92b27fed75258317219c4ea368d5eaea6af487cf798"},{"id":"s23","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/configuration/custom-providers/","title":"Cloudflare AI Gateway — custom providers","quote":"Everything after custom-{slug}/ in your request URL is appended directly to the base_url to form the final upstream URL.","summary":"Register any HTTPS base URL as custom-<slug> and the gateway proxies arbitrary paths to it, so a vendor's own /anthropic/v1/messages can sit behind your gateway with its observability, caching and rate limits. Billing stays with the vendor; Unified Billing does not apply.","claim_ids":["c20"],"link_status":"unchecked","quote_status":"unchecked","hash":"23776d8f6a581b6ce8a79ff49566888c0a5dafd50fb15e25624f86cdfbae55b1"},{"id":"s24","type":"publisher_documentation","url":"https://docs.ollama.com/api/anthropic-compatibility","title":"Ollama — Anthropic API compatibility","quote":"API key is accepted but not validated.","summary":"Ollama serves /v1/messages natively from v0.14.0 (2026-01-10), so no proxy is needed for local models. Documented as not supported: /v1/messages/count_tokens, tool_choice, metadata, prompt caching via cache_control, the Batches API, citations, PDF document blocks and server-sent error events. The launch guidance recommends at least 32K context.","claim_ids":["c21"],"link_status":"unchecked","quote_status":"unchecked","hash":"7707b56a014aaa0e47dfd49deca0d493d5e1108c6fbc59d97f27564e65ca32b9"},{"id":"s25","type":"github","url":"https://github.com/ggml-org/llama.cpp/pull/17570","title":"llama.cpp #17570 — Anthropic Messages API in llama-server","quote":"While no strong claims of compatibility with the Anthropic API spec are made, in our experience it suffices to support many apps.","summary":"Merged 2025-11-28, giving llama-server a native /v1/messages endpoint including count_tokens. Tool use requires the --jinja flag. Measured in a related issue: a real Claude Code session opens at 9,617 prompt tokens on that endpoint and reaches 41,035 by the ninth request.","claim_ids":["c21"],"link_status":"unchecked","quote_status":"unchecked","hash":"81f73a58a94e760747f338499a34572b84e8150f99b463273a5233af9b217af6"},{"id":"s26","type":"publisher_documentation","url":"https://docs.vllm.ai/en/latest/serving/integrations/claude_code/","title":"vLLM — Claude Code integration","quote":"Claude Code requires a model with strong tool calling capabilities","summary":"vLLM serves the Anthropic Messages endpoint natively (merged 2025-10-22) and documents the practical traps: model names cannot contain a slash, and the client's per-request system-prompt hash can defeat prefix caching unless the server handles it or CLAUDE_CODE_ATTRIBUTION_HEADER is disabled.","claim_ids":["c21"],"link_status":"unchecked","quote_status":"unchecked","hash":"357b2ecab1bfc36797a80a10dda1dbc54ecf946c5ed6cbafb9ce143e659c81a5"},{"id":"s27","type":"independent_test","url":"https://www.swebench.com/","title":"SWE-bench Verified leaderboard","quote":"mini-SWE-agent 2.0.0 — glm-5 (high) 72.8","summary":"Same-harness comparison on the official board: Claude Opus 4.5 76.8, Claude Sonnet 4.5 71.4, GLM-5 72.8, Kimi K2.5 70.8, all on mini-SWE-agent 2.0.0 at one attempt. The newest submission on the board is from February 2026, so nothing released after that appears at all.","claim_ids":["c22","c23"],"link_status":"unchecked","quote_status":"unchecked","hash":"f2464b94e231d18157ed9a811659e9549d42797135be43e7083bafeb53ab2cb2"},{"id":"s28","type":"independent_test","url":"https://www.tbench.ai/leaderboard/terminal-bench/2.1","title":"Terminal-Bench 2.1 leaderboard","quote":"Claude Code + Fable 5 — 83.8 ± 1.2","summary":"With Claude Code itself as the harness: Fable 5 83.8, Opus 4.8 78.9, Sonnet 5 74.6, GLM-5.1 58.7. No Kimi model appears on 2.1 in any configuration, and there is no benchmark version where all of these models coexist.","claim_ids":["c22"],"link_status":"unchecked","quote_status":"unchecked","hash":"278b23a4b19aac29addbc6453d1f4c11335fc1878a46cee9dc849e6009b8ab45"},{"id":"s29","type":"publisher_documentation","url":"https://huggingface.co/moonshotai/Kimi-K2.6","title":"Kimi K2.6 model card — vendor-reported scores","quote":"SWE-bench Verified 80.2","summary":"Vendor scores are reported on in-house scaffolds: Kimi K2.6 claims 80.2 on SWE-bench Verified with a framework adapted from SWE-agent, averaged over ten runs. Every vendor number with an independent counterpart sits above it — GLM-4.6 68.2 self-reported against 55.4 on mini-SWE-agent, Kimi K2.5 76.8 against 70.8, Claude Opus 4.6 80.4 against 75.6. The direction is uniform, so scaffold is read before score.","claim_ids":["c23"],"link_status":"unchecked","quote_status":"unchecked","hash":"206283fa3979b0443b362f1718bb108ac109a04e5e26635ee613be324770c1e7"},{"id":"s30","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Tool-search capture: 856 tool definitions become 9","quote":"ENABLE_TOOL_SEARCH=false  tools=856   |   ENABLE_TOOL_SEARCH=true  tools=9  ['Agent','AskUserQuestion','Bash','Edit','Read','Skill','ToolSearch','Workflow','Write']","summary":"First-party capture, 2026-07-25, same session and same prompt against a local logging server. With tool search off the request carries every definition from the connected MCP server; with it on the client sends nine tools plus a ToolSearch tool and expands the rest on demand.","claim_ids":["c24","c25"],"link_status":"ok","quote_status":"unverified","hash":"bdbfd60193bd789e17470738ea92fba19ddd3fb5aefd1d8a0d6c08433ec28847"},{"id":"s31","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Gateway log rows with tool search on, and a non-Claude model using it","quote":"{\"now\":\"2026-07-25T18:35:56-07:00\",\"today\":\"2026-07-25\",\"time\":\"18:35:56\",\"zone\":\"America/Los_Angeles\",\"iso\":\"2026-07-25T18:35:56-07:00\"}","summary":"Measured through the account gateway on 2026-07-25: with the same MCP server attached and ENABLE_TOOL_SEARCH=true, Kimi K2.7 Code turns ran at 14,109 input tokens with 12,480 cached and $0.00443075, against 149,187 tokens and $0.02852109 with tool search off. The quote is the payload Kimi returned after calling ToolSearch to find an MCP tool it had never been shown and then invoking it.","claim_ids":["c24","c25","c26"],"link_status":"ok","quote_status":"unverified","hash":"6cefb5e3bc01ad034502811151f655608da968a8ca043fe43d18e06cbbccb656"},{"id":"s32","type":"github","url":"https://github.com/massoumicyrus/claude-code-cloudflare-gateway","title":"claude-code-cloudflare-gateway — the Worker from this article","quote":"Run Claude Code against Kimi, GLM, Grok or Claude through your own Cloudflare AI Gateway. One Worker, one bill, no provider keys.","summary":"Public MIT repository: the single-file Worker, wrangler config, the three secrets it needs, the model alias table, and tools/capture-gateway.mjs — the local Anthropic-compatible logger used for every wire measurement in this article, so the numbers can be re-derived on a newer CLI.","claim_ids":["c27"],"link_status":"ok","quote_status":"verified","hash":"ae1c5cf9003a19303c12d73298145893072d74439bcc8dc531f98ae2372b9200"},{"id":"s33","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1t1o43w/i_gave_claude_code_a_002call_coworker_and_stopped/","title":"I gave Claude Code a $0.02/call coworker and stopped hitting Pro limits","quote":"Was hitting my weekly Pro limit by Wednesday every single week. Tried compact, Sonnet for simple tasks, tighter prompts — nothing worked.","summary":"Anecdotal, r/ClaudeAI, 1,776 upvotes. The operator delegates bulk file reading and boilerplate to Kimi K2.5 through CLI scripts Claude calls via the Bash tool, with routing rules in CLAUDE.md, rather than switching the whole agent. Positive report on cost, and evidence that hitting subscription limits is the common trigger for looking at cheaper models.","claim_ids":["c28"],"link_status":"ok","quote_status":"verified","hash":"c3d856bcaaa9e23bd3324efb69487ba008297c3158a1f494a6351357bf73c43d"},{"id":"s34","type":"reddit","url":"https://old.reddit.com/r/LocalLLaMA/comments/1st3m8y/qwen_36_is_actually_useful_for_vibecoding_and_way/","title":"Qwen 3.6 is actually useful for vibe-coding, and way cheaper than Claude","quote":"Launched claude code, pointed it at my running Qwen, and, well, it vibe codes perfectly fine.","summary":"Anecdotal, r/LocalLLaMA. Points Claude Code at a local llama-server on a dual-3090 machine with 200k context and reports it working, publishing the exact env block: ANTHROPIC_AUTH_TOKEN, empty ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL to the local host. Confirms local runtimes now serve the Messages API without a proxy.","claim_ids":["c28","c29"],"link_status":"ok","quote_status":"verified","hash":"84376d6572e793f4d483ccd2d2d0f5627f134a5995b3d69387d005f147473c6c"},{"id":"s35","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1v6224v/from_kimi_k3_to_claude_opus_5/","title":"From Kimi K3 to Claude Opus 5","quote":"From Kimi K3 to Claude Opus 5","summary":"Anecdotal, r/ClaudeAI, 591 upvotes, posted the same day this page was written. The quote is the thread title: an operator moving in the opposite direction, from Kimi K3 back to Claude Opus 5. Counter-evidence to the cheaper-is-enough case, and the reason model choice per session matters more than picking one winner.","claim_ids":["c30"],"link_status":"ok","quote_status":"verified","hash":"52d3c50d186587c4d16f87a9c7f53bc0ce84d05e642b2edbc737105c9ec59f8f"},{"id":"s36","type":"x","url":"https://x.com/chongdashu/status/2016156608875602204","title":"Per-model settings file for switching Claude Code to Kimi","quote":"Want to use Kimi 2.5 in Claude Code? Step 1: create a file .claude/settings/kimi.json","summary":"Anecdotal, X. Publishes the settings-file pattern rather than exported shell variables: a .claude/settings/kimi.json holding ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL, launched with a shell function so one word switches model. An alternative to the env block on this page for anyone who keeps several backends.","claim_ids":["c28"],"link_status":"ok","quote_status":"unverified","hash":"6c55b4ffd8f9cecb7bc9690bb19f816197c4b7657392afa4dd89176f640b8a05"},{"id":"s37","type":"github","url":"https://github.com/Alorse/cc-compatible-models","title":"cc-compatible-models — community catalogue of Claude Code backends","quote":"Complete guide for using alternative AI models with Claude Code — including DeepSeek, Qwen, MiniMax, Kimi, GLM, MiMo, StepFun, and more. Pricing, configs, and coding plans.","summary":"Community-maintained list of providers that answer Claude Code, with the env block and price for each. Useful as a starting point for a provider not covered here, and evidence that the practice is widespread rather than exotic. Verify any figure in it against the vendor's own pricing page before relying on it.","claim_ids":["c28"],"link_status":"ok","quote_status":"verified","hash":"5cc909e00e579dbe9c7157d7e7c70f591bee70413ce97599439d9191887d11c5"}],"anecdotal_sources":[{"id":"s33","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1t1o43w/i_gave_claude_code_a_002call_coworker_and_stopped/","title":"I gave Claude Code a $0.02/call coworker and stopped hitting Pro limits","quote":"Was hitting my weekly Pro limit by Wednesday every single week. Tried compact, Sonnet for simple tasks, tighter prompts — nothing worked.","summary":"Anecdotal, r/ClaudeAI, 1,776 upvotes. The operator delegates bulk file reading and boilerplate to Kimi K2.5 through CLI scripts Claude calls via the Bash tool, with routing rules in CLAUDE.md, rather than switching the whole agent. Positive report on cost, and evidence that hitting subscription limits is the common trigger for looking at cheaper models.","claim_ids":["c28"],"link_status":"ok","quote_status":"verified","hash":"c3d856bcaaa9e23bd3324efb69487ba008297c3158a1f494a6351357bf73c43d"},{"id":"s34","type":"reddit","url":"https://old.reddit.com/r/LocalLLaMA/comments/1st3m8y/qwen_36_is_actually_useful_for_vibecoding_and_way/","title":"Qwen 3.6 is actually useful for vibe-coding, and way cheaper than Claude","quote":"Launched claude code, pointed it at my running Qwen, and, well, it vibe codes perfectly fine.","summary":"Anecdotal, r/LocalLLaMA. Points Claude Code at a local llama-server on a dual-3090 machine with 200k context and reports it working, publishing the exact env block: ANTHROPIC_AUTH_TOKEN, empty ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL to the local host. Confirms local runtimes now serve the Messages API without a proxy.","claim_ids":["c28","c29"],"link_status":"ok","quote_status":"verified","hash":"84376d6572e793f4d483ccd2d2d0f5627f134a5995b3d69387d005f147473c6c"},{"id":"s35","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1v6224v/from_kimi_k3_to_claude_opus_5/","title":"From Kimi K3 to Claude Opus 5","quote":"From Kimi K3 to Claude Opus 5","summary":"Anecdotal, r/ClaudeAI, 591 upvotes, posted the same day this page was written. The quote is the thread title: an operator moving in the opposite direction, from Kimi K3 back to Claude Opus 5. Counter-evidence to the cheaper-is-enough case, and the reason model choice per session matters more than picking one winner.","claim_ids":["c30"],"link_status":"ok","quote_status":"verified","hash":"52d3c50d186587c4d16f87a9c7f53bc0ce84d05e642b2edbc737105c9ec59f8f"},{"id":"s36","type":"x","url":"https://x.com/chongdashu/status/2016156608875602204","title":"Per-model settings file for switching Claude Code to Kimi","quote":"Want to use Kimi 2.5 in Claude Code? Step 1: create a file .claude/settings/kimi.json","summary":"Anecdotal, X. Publishes the settings-file pattern rather than exported shell variables: a .claude/settings/kimi.json holding ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL, launched with a shell function so one word switches model. An alternative to the env block on this page for anyone who keeps several backends.","claim_ids":["c28"],"link_status":"ok","quote_status":"unverified","hash":"6c55b4ffd8f9cecb7bc9690bb19f816197c4b7657392afa4dd89176f640b8a05"}],"scientific_sources":[],"user_reports":[],"related_articles":[],"question_graph":{"slug":"claude-code-on-cloudflare-ai-gateway","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"honesty":{"active_claims":30,"retracted_claims":0,"cut_claims":0,"challenges":0,"scrub_events":0,"note":"Retracted/cut claims stay on ledger but are excluded from ask unless ?include_inactive=1"},"counts":{"claims":30,"claims_total":30,"sources":37,"anecdotal":4,"scientific":0,"user_reports":0,"questions":0,"evidence_ingests":0}}