Coding agents
A coding agent that lets you change its model provider works with the Model API: give it our address and a Model API key. Each page below sets one agent up by hand, by editing its own settings. Every setup names the model auto, which picks a model of the catalogue for the conversation (see Model choice auto).
| Agent | Protocol | Where the setup lives |
|---|---|---|
| Claude Code | Anthropic Messages, POST /v1/messages | env in ~/.claude/settings.json or the shell |
| Codex | OpenAI Responses, POST /v1/responses | ~/.codex/config.toml |
| OpenCode | OpenAI Chat Completions, POST /v1/chat/completions | ~/.config/opencode/opencode.json |
| Cursor | OpenAI Chat Completions, POST /v1/chat/completions | Cursor Settings, Models |
Any other agent that speaks one of these protocols takes the same address: https://api.samreshuuu.ru/v1 for the OpenAI protocols, https://api.samreshuuu.ru without a path for Anthropic Messages.
Before you start
- Top up the organization balance: every call of the agent is paid from it at the price of the host that answered.
- In the console, open API keys, keep Model API key in the Access field and create the key. The secret is shown once.
Check that the key works before you change an agent:
What each agent gets
- Tools: the agent's own tools (files, shell, search in the project) travel as tool calls of its protocol. The agent runs them; the model calls them.
- Reasoning: the level the agent asks for reaches the model, brought to the nearest level its host takes (see reasoning).
- Cache: each agent names its session, and its calls stay in one cache.
- Cost: every call shows up in the call log of the console with its model, host and cost. The agents count a price of their own and do not show what the balance was charged.
Frequently asked questions
Which model should a coding agent use?
auto. It picks a model of the catalogue that takes tools and whose window holds the conversation, and keeps it for the conversation so the cache holds. Any id from the Models page works in its place.
Which key does a coding agent need?
A Model API key sk-org-… from the developer console (https://console.samreshuuu.ru). Calls are paid from the organization balance; no plan is needed for that.