Coding agents and desktop clients
Point Continue at TokenTriage
Per model, and both need the /v1.
apiBase is the setting, it is per model, and it lives in a file. Both providers want the /v1.
# ~/.continue/config.yaml
name: Local gateway
version: 0.0.1
schema: v1
models:
- name: Through TokenTriage
provider: openai
model: gpt-4o
apiKey: unused
apiBase: http://127.0.0.1:8787/v1
requestOptions: { headers: { x-tt-agent: continue } }- The setting
apiBase (per model, in ~/.continue/config.yaml)- The base URL
http://127.0.0.1:8787/v1 — and provider: anthropic wants the same /v1
How to tell it worked
Send one chat turn from Continue, then read the ledger. The first command tells you whether the path matched. The second proves your header arrived.
tokentriage top --by model --since 1h
tokentriage top --by agent --since 1hWhat you should see
MODEL gpt-4o 1 · AGENT continue 1 — an (unknown) row is a call that missed the /v1
How sure we are
Follows from the wire
It speaks a dialect we accept, so it works by the same contract every such client uses. Nothing tests this one specifically.
Verified against config.yaml schema v1 · Continue CLI 1.5.47 on
The gotcha
A bare root leaves Continue fine and never gets costed
Drop the /v1 and Continue sends /chat/completions. No dialect matches it, so TokenTriage relays the path as written and your upstream answers — a real one 404s, and the CLI shows 404 page not found. What is constant is the row: an empty dialect, an empty model, an empty pricing_key, and tokentriage top --by model filing it under (unknown).
apiBase: http://127.0.0.1:8787/v1 # on BOTH providers, anthropic included
# what Continue POSTs · observed, CLI 1.5.47, 2026-08-25 · LAB RUN · MOCK UPSTREAM
openai …:8787 -> /chat/completions no dialect matches this
openai …:8787/v1 -> /v1/chat/completions the OpenAI chat path
anthropic …:8787 -> /messages no dialect matches this
anthropic …:8787/v1 -> /v1/messages the Anthropic messages path“apiBase: http://<my endpoint>:11434 # if running a remote instance of Ollama”
docs.continue.dev · the ollama provider page · read 2026-08-25
What you get now
What the ledger holds once the editor is talking.
Three things that switch on with the first turn Continue sends. Each links the page that evidences it. Read those before you believe this one.
The agent name rides on the row
Continue sends a per-model header map, so requestOptions.headers puts x-tt-agent on every row. TokenTriage groups by it. The upstream never sees the header; the gateway consumes it.
What a row carriesA default chat turn is nine tools
Continue ships nine tools on an ordinary turn, so its rows land as step_class tool_loop at complexity MEDIUM. That shape is what a coding agent costs. You see it before you route.
What the signals feedBudgets around an editor, not inside it
TokenTriage mints keys and attaches budgets to tenancy nodes, so one developer’s editor has a ceiling. Keys are stored as hashes. The store is a SQLite file on your machine.
Keys, budgets and tenancy
- 8 configurations
- four base URLs, two providers, every path recorded
- 2 providers
- openai and anthropic, and both take the same /v1
- 9 tools per turn
- what Continue sends before you ask it for anything
- 0 environment variables
- an IDE extension reads none of yours, by Continue’s own FAQ
What it will not do
Six things to know before you trust the number.
Three are about Continue, two are about the gateway, and one is about our own evidence. Read the last one first. It is the honest boundary.
Continue’s own docs do not answer the /v1 question
Continue’s Anthropic page shows no apiBase. The wire settled it instead: eight configurations, four base URLs, two providers, every path recorded. And the self-hosting guide names baseUrl, a key that does not exist.
The two paths, matched exactlyA bare root still reaches your upstream
Continue’s request is forwarded with the path exactly as written, so it reaches the upstream and answers. Parsing, costing, routing and caching run on a registered path only. The row stays uncosted.
No environment variable will reach the extension
apiBase is a config key, not an environment variable, so tokentriage wrap has no way in. Continue’s FAQ says IDE extensions cannot read your shell variables at all. Use a .env file instead.
Which headers do the groupingNothing rescues a failed call
TokenTriage does not retry, does not hedge and runs no health probe. A failing upstream returns its failure to Continue, and Continue surfaces it into the editor mid-edit. Cooldown is passive.
What routing will and will not doContinue was acquired by Cursor
continue.dev said so on 2026-08-25; Cursor has published nothing. Against the GitHub API that day the repository was neither archived nor disabled, with commits through 2026-07-21. The longevity risk changed. The setting did not.
The chip covers the wire, not the editor
Continue’s headless CLI drove a real gateway and wrote these rows, failure case included. Nobody launched the VS Code extension. A scripted run is not a person, and a CLI is not an editor.
Write the file, then read the ledger.
The change is one line in one file. The reading tells you whether it matched. If your rows say (unknown), the /v1 is missing.
Names and trademarks
These are independent integrations. No product named here has endorsed, reviewed or sponsored TokenTriage; every name is its owner's trademark, used only to say what works with what.