Bring your own key to Linear's coding agent, through Kaeso
Linear's cloud coding agent now takes your own key, and any gateway that speaks Anthropic Messages or OpenAI Responses. Point it at Kaeso to put its sessions under your own keys, limits, routes and request logs. Step by step.
- Published
- Reading time
- 5 min
- Author
- Kaeso Team

On November 12, Linear opened its cloud coding agent to your own key (opens in a new tab). Until then, every session ran on models Linear bought for you. Now an admin can connect the workspace's own Anthropic or OpenAI account, Amazon Bedrock, or a custom endpoint: any gateway that speaks the Anthropic Messages API or the OpenAI Responses API.
Kaeso speaks both. Point Linear at your install, and every request the agent makes goes through a project you control: billed to your provider keys at your rates, held to your limits, routed by your aliases and written to your request log.
What changes, and what doesn't01
Linear's agent, Linear Code, runs Claude Code or Codex in a sandbox. Bring your own key moves the model calls; the sandbox stays with Linear.
- Model usage
- On Linear credits
- Paid with Linear AI credits
- Through Kaeso
- Paid by your provider keys in Kaeso, at your rates
- Sandbox runtime
- On Linear credits
- Linear AI credits
- Through Kaeso
- Linear AI credits, unchanged
- Who calls the model
- On Linear credits
- Linear
- Through Kaeso
- Your Kaeso install, with your provider keys
- Limits and logs
- On Linear credits
- Linear's
- Through Kaeso
- Your project's limits, budgets and request log
| On Linear credits | Through Kaeso | |
|---|---|---|
| Model usage | Paid with Linear AI credits | Paid by your provider keys in Kaeso, at your rates |
| Sandbox runtime | Linear AI credits | Linear AI credits, unchanged |
| Who calls the model | Linear | Your Kaeso install, with your provider keys |
| Limits and logs | Linear's | Your project's limits, budgets and request log |
So the workspace still needs AI credits for the sandbox. Linear also needs an API key, not a ChatGPT or Claude subscription; behind Kaeso, that key is a Kaeso key. Bring your own key is on all of Linear's current plans, and only a workspace owner or admin can set it up. Members change nothing: they assign issues to the agent as before.
Before you start02
- A Kaeso install Linear can reach. The sandbox runs in Linear's cloud, so the install needs a public HTTPS address, such as
https://kaeso.example.com. An install on your laptop or behind a VPN won't do. Where to run Kaeso helps you choose a place. - A project for the agent, with the models it should use in its catalogue and provider keys for them. A project of its own keeps the agent's spending, limits and logs apart from your apps.
- Admin rights in Linear, and Linear Code, the cloud coding agent, turned on under Settings › AI & agents.
1. Create a key for Linear03
In the Kaeso console, open the project and choose API keys › Create key. Give it a name Linear's requests will be easy to find by, such as linear-agent. A service account of the project is a better owner than a person, so the key outlives anyone leaving the team.
Under Models and limits, choose the models the agent may call, and set a token budget for the day or the month (limits and budgets (opens in a new tab)). Copy the key: Kaeso shows it once.
Prefer a token budget over a spend budget here. Kaeso prices a request by its tokens and can't price server tools that the provider bills per call, such as web search. While any spend budget covers a request, Kaeso refuses one that uses such a tool, and coding agents search the web. A token budget lets these requests through.
2. Connect Kaeso in Linear04
In Linear, open Settings › Linear Code. Under Agent configuration, Agent chooses what powers Linear Code, such as Claude Code, and Model which model it runs. Below them, Inference has two rows, and each says who runs and pays for a family of models:
- Anthropic
- Covers
- Claude models
- Kaeso endpoint it needs
- Anthropic Messages,
POST /v1/messages
- OpenAI
- Covers
- OpenAI models
- Kaeso endpoint it needs
- OpenAI Responses,
POST /v1/responses
| Row | Covers | Kaeso endpoint it needs |
|---|---|---|
| Anthropic | Claude models | Anthropic Messages, POST /v1/messages |
| OpenAI | OpenAI models | OpenAI Responses, POST /v1/responses |
Both rows start on Linear credits, and each connection is shared by the whole workspace. Connect the row of the models your agent runs, or both.
For Claude models, in the Anthropic row:
- 01Open the menu that says Linear credits and choose API key. Add API key opens.
- 02Under Provider, choose Custom endpoint.
- 03Endpoint URL: your install's address, without a path, as the placeholder
https://api.anthropic.comis written. The agent adds/v1/messagesitself. - 04API key: the Kaeso key from step 1.
- 05Choose Test connection, then Save.
Endpoint URL https://kaeso.example.comAPI key sk-kso-…For OpenAI models, in the OpenAI row, do the same with your install's address and /v1, as OpenAI's own SDKs take it. The agent adds /responses. Use the same Kaeso key, or a second one if you want each family's usage apart.
Endpoint URL https://kaeso.example.com/v1API key sk-kso-…If Test connection fails with a 404, the path is joined differently than you entered it: add or remove /v1. A 401 means the key is wrong or expired, and a 403 that it lacks inference access. If you cancel the dialog, the row's models stay on Linear credits.
New sessions use the connection of their models, including sessions a Loop starts. Sessions already running keep the provider they started with, so keep a working key in a row as long as sessions on it may resume.
3. Check the first session05
Assign an issue to the agent and open the project's Request logs in Kaeso. Filter by the linear-agent key: every turn of the session is a request there, with its model, tokens, cost and time. Kaeso logs a request it refused too, with what it asked for, so a session that fails at once shows you why.
The log also tells you the exact model ids Linear sends. Linear picks the model under Model, on Auto unless you choose one, such as Claude Opus 5.5 or GPT-6 Sol. On Auto, a session may ask for a model of the other family, so connect both rows, or choose a model whose row you connected. Every id the agent asks for must be in the project's catalogue and allowed for the key; otherwise Kaeso answers 404, and the session ends. When a session fails like that, the refused request in the log names the id to add.
4. Route the agent's models06
Linear sends a fixed model id, and Kaeso decides what serves it. An alias (opens in a new tab) wins over a model of the same name, so you can create an alias named exactly as the model Linear asks for, and the list marks it Shadows a model. Then give it a route:
- A fallback chain. When Anthropic's API is overloaded or a key runs out of balance, the next step answers, such as another provider that serves the same model. Kaeso remembers a step that failed for a lasting reason and skips it on the following requests, so a long session doesn't wait on a dead provider each turn (alias routes (opens in a new tab)).
- Another provider's model. Kaeso translates between the formats, streams and tool calls included, so the alias the agent asks for can be served by another model in the catalogue (format translation (opens in a new tab)). Test such a route with real issues before you rely on it: a coding agent leans on its model's tool use more than most apps.
- A split. Send a share of the sessions to a second model to compare them on your own issues, with the request log as the record.
Changing a route changes the next request. You don't touch Linear's settings again.
Switch back07
To leave Kaeso, set the row in Inference back to Linear credits, or replace its key. New sessions then use Linear's models; ones that started on Kaeso still need the Kaeso key to resume. To cut the agent off at once, turn the key off in Kaeso under API keys.
Learn more08
- Coding tools (opens in a new tab): Claude Code and Codex against Kaeso on your own machine, with the same base URLs.
- Linear cloud coding agent (opens in a new tab): Linear's own documentation, with plans, billing and environments.
- Alias routes: Fallbacks, conditions and splits in Kaeso's route editor.
By Kaeso Team


