deeprelay setup
Configure coding agents to use deeprelay
Configure coding agents to use deeprelay
Synopsis
Configures a coding agent on this machine to send its model requests to deeprelay. Each subcommand edits that agent's own settings file, shows you the exact changes first, and can undo them later.
Setup never writes your API key into an agent's config. The key is fetched when needed by running deeprelay auth token. Claude Code and Pi run it directly. For Codex, OpenCode, Kimi Code, DeepSeek Harness and Aider, a line in your shell rc runs it to set an environment variable. Zed reads the key from your system keychain or from DEEPRELAY_API_KEY, and Continue reads it from ~/.continue/.env. Each subcommand's page says exactly where the key goes.
Agents
deeprelay setup claude-code: Claude Code, through its Anthropic-compatible/v1/messagesendpoint.deeprelay setup codex: Codex CLI, through its OpenAI-compatible/v1/responsesendpoint.deeprelay setup opencode: OpenCode, through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup pi: Pi, through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup zed: Zed's agent panel, through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup continue: Continue (VS Code and JetBrains), through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup aider: Aider, through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup kimi-code: Kimi Code, through its OpenAI-compatible/v1/chat/completionsendpoint.deeprelay setup deepseek-harness: DeepSeek Harness (the desktop app,dsh webanddsh --profile headless), through its Anthropic-compatible/v1/messagesendpoint.deeprelay setup deep-code: Deep Code. It writes nothing: Deep Code reads its key only from its settings file, so setup prints the block and steps for you to apply.
Backup models
Every subcommand that writes a config can also turn on backup models for your CLI key. With backup models on, if every provider for your model fails before the first token, deeprelay retries the request on the backup models in order.
- Off unless you say yes. On a terminal, after the config is written, setup asks
Turn on backup models for this key? […] [y/N]. Pressing Enter keeps them off.--yesonly answers the file-write prompt; it never turns backup models on. - Suggested list. On the flat plan, setup suggests up to three other models from the plan's roster, leaving out the models it just configured. On pay-as-you-go there is no suggestion: type up to three model ids separated by commas, or press Enter to skip.
- A list already on the key. Setup shows it and only replaces it after you say yes.
- Scripts. Pass
--fallback-models a,b,c(up to three, in order) or--no-fallback. With neither flag and no terminal, setup leaves the key alone and prints a one-line hint. - It edits the key, not the agent's config. Setup changes the key's backup list on the server, using your
deeprelay logincredentials in memory. Nothing about backup models goes into the agent's config, and the login key is never written anywhere. Every tool that uses the same key gets the same list. - Later edits apply straight away. Change the list in the dashboard or with
deeprelay api-keys update, and every agent picks it up without re-running setup.--fallback-model - Undo. The setup record notes the key id and the list before and after the change.
--removeasks whether to turn the key's backup models off too, warning that other harnesses may use the same key; the default keeps them.--remove --no-fallbackturns them off without asking.
Options
-h, --help help for setup
Options inherited from parent commands
--api-base string API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
--debug Enable debug logging to stderr
--no-preflight Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
-o, --output string Output format: table|json (default table on TTY, json otherwise) (default "table")
SEE ALSO
- deeprelay - deeprelay command-line interface
- deeprelay setup aider - Point Aider at deeprelay
- deeprelay setup claude-code - Point Claude Code at deeprelay (settings.json env + apiKeyHelper)
- deeprelay setup codex - Point Codex CLI at deeprelay (provider in config.toml, profile in deeprelay.config.toml)
- deeprelay setup continue - Point Continue at deeprelay
- deeprelay setup deep-code - Show how to point Deep Code at deeprelay (writes nothing)
- deeprelay setup deepseek-harness - Point DeepSeek Harness at deeprelay
- deeprelay setup kimi-code - Point Kimi Code at deeprelay
- deeprelay setup opencode - Point OpenCode at deeprelay
- deeprelay setup pi - Point Pi at deeprelay
- deeprelay setup zed - Point Zed at deeprelay