Coding Agents
Claude Code
Route Claude Code through the Inference.net gateway with inf claude.
inf claude routes Claude Code through https://api.inference.net using its native Anthropic protocol. Claude Code appends /v1/messages itself, so the base URL has no /v1 suffix. Claude Code assumes a 200K context window for model ids it does not recognize, so inf also writes CLAUDE_CODE_MAX_CONTEXT_TOKENS with the real window.
Config file
inf writes fields in ~/.claude/settings.json (JSON). If CLAUDE_CONFIG_DIR is set, inf uses that directory. inf owns fields, not the whole file.
inf claude on
inf claude on| Flag | Required | Description | Default |
|---|---|---|---|
--main <alias> | No | Main slot (model) | kimi-k3-fast |
--opus <alias> | No | Opus slot | kimi-k3-fast |
--sonnet <alias> | No | Sonnet slot | kimi-k3-fast |
--haiku <alias> | No | Haiku slot | deepseek-v4-flash-0731 |
--fable <alias> | No | Fable slot | kimi-k3-fast |
--subagents <alias> | No | Subagents slot | deepseek-v4-flash-0731 |
See Model mapping for supported aliases and limits.
What gets written
| Path | Value |
|---|---|
model | Main alias |
env.ANTHROPIC_BASE_URL | https://api.inference.net |
env.ANTHROPIC_AUTH_TOKEN | gateway key (secret) |
env.CLAUDE_CODE_MAX_CONTEXT_TOKENS | smallest context window across the six slots |
env.ANTHROPIC_DEFAULT_OPUS_MODEL | Opus alias |
env.ANTHROPIC_DEFAULT_SONNET_MODEL | Sonnet alias |
env.ANTHROPIC_DEFAULT_HAIKU_MODEL | Haiku alias |
env.ANTHROPIC_DEFAULT_FABLE_MODEL | Fable alias |
env.CLAUDE_CODE_SUBAGENT_MODEL | Subagents alias |
inf claude status
inf claude statusClaude Code — connected
Gateway https://api.inference.net
Models main=kimi-k3-fast, opus=kimi-k3-fast, sonnet=kimi-k3-fast, haiku=deepseek-v4-flash-0731, fable=kimi-k3-fast, subagents=deepseek-v4-flash-0731
Config /Users/you/.claude/settings.jsonDrift warnings print after this block when an owned field is modified or missing.
inf claude status --jsoninf claude off
inf claude offoff restores unchanged owned fields. It keeps fields that you edited after on.
Examples
Use GLM for the Opus and Sonnet slots:
inf claude on --opus glm-5.2-fast --sonnet glm-5.2-fastRestart Claude Code after on or off. See Troubleshooting for drift, recovery, and key revocation.