Skip to content

OAuth & subscription providers

Codex, Gemini CLI, Claude Code, KiloCLI, Copilot, MiniMax, and Qwen OAuth/subscription auth.

Most Revka providers authenticate with a plain API key. The providers on this page are different: they reuse a subscription you already pay for — a ChatGPT/Codex plan, a Gemini CLI login, a Claude Code subscription, a GitHub Copilot seat, or a MiniMax/Qwen OAuth account — instead of a per-token API key. There is no sk-... value to paste; Revka either drives an OAuth flow, reuses tokens another CLI already minted, or spawns an authenticated local binary.

Reach for these providers when you want your agent to bill against a flat-rate subscription rather than metered API usage, or when you already have one of these CLIs installed and authenticated and want Revka to ride on its credentials.

Auth profiles minted by the OAuth flows are stored separately from config.toml, cached in ~/.revka/auth-profiles.json, and keyed by provider plus a profile name. For the full revka auth command reference see revka models, providers & auth; for how credentials are stored at rest see Secrets, pairing & device auth.

There are three distinct mechanisms on this page:

MechanismProvidersHow Revka gets a token
Revka OAuth flowopenai-codex, GitHub Copilotrevka auth login (or device-code) runs an OAuth flow and caches the token
Reuse another CLI’s credentialsgemini-cli, claude-code, kilocli, Qwen CodeRevka spawns the authenticated binary, or reads its on-disk credential file
OAuth token env varsMiniMax, QwenYou supply an OAuth/refresh token via environment variables; Revka refreshes it

The subprocess providers (gemini-cli, claude-code, kilocli) never hold a key — they shell out to a binary that holds its own session. The token-env providers (MiniMax, Qwen) accept an OAuth access token or a refresh token that Revka rotates in-process.

The openai-codex provider (alias codex) talks to OpenAI’s Responses API at https://chatgpt.com/backend-api/codex/responses — a different surface from Chat Completions — using OAuth credentials from your ChatGPT/Codex subscription. It supports SSE streaming, reasoning-effort levels, and native tool calling, including pre-executed tool-call pass-through.

Terminal window
# Browser/redirect OAuth flow
revka auth login --provider openai-codex
# Headless host — device-code flow
revka auth login --provider openai-codex --device-code
# Reuse credentials the Codex CLI already minted
revka auth login --provider openai-codex --import ~/.codex/auth.json

--import defaults to ~/.codex/auth.json, so if you already use the Codex CLI you can adopt its login without re-authenticating. The browser flow opens a URL, captures the redirect, and caches the token in ~/.revka/auth-profiles.json. On a machine where the redirect can’t be captured, finish manually:

Terminal window
revka auth paste-redirect --provider openai-codex --input "<URL_OR_CODE>"

Access tokens refresh automatically in long-running deployments; force a refresh with revka auth refresh --provider openai-codex.

default_provider = "openai-codex"
default_model = "gpt-5.3-codex"
[runtime]
reasoning_effort = "medium" # minimal | low | medium | high | xhigh
SettingTypeMeaning
[runtime] reasoning_effortstringReasoning depth: minimal, low, medium, high, xhigh. Also settable via REVKA_CODEX_REASONING_EFFORT.
REVKA_CODEX_RESPONSES_URLenvOverride the Responses API endpoint.
REVKA_CODEX_BASE_URLenvOverride the base URL.

The gemini-cli provider spawns the gemini binary (Google’s Gemini CLI) as a child process and feeds it prompts over stdin. It reuses the CLI’s own credential store, so no Revka API key is required — the gemini binary must already be installed and logged in separately.

default_provider = "gemini-cli"
default_model = "gemini-2.5-pro"
SettingTypeMeaning
GEMINI_CLI_PATHenvPath to the gemini binary. Default: gemini from PATH.

If you’d rather hit the Gemini API directly (with full history and an API key, OAuth-token reuse, or Vertex AI), use the gemini provider instead — see Cloud API providers (Gemini, Bedrock, Azure).

The claude-code provider spawns the claude binary (Claude Code CLI) as a child process and feeds prompts over stdin, reusing Claude Code’s own authentication. No separate API key is needed; the claude binary must be installed and authenticated.

default_provider = "claude-code"
default_model = "claude-sonnet-4-6"
SettingTypeMeaning
CLAUDE_CODE_PATHenvPath to the claude binary. Default: claude from PATH.

Unlike Gemini CLI and KiloCLI, Claude Code forwards the full conversation (system prompt plus all prior turns) flattened into one labeled prompt — so multi-turn history is preserved. Temperature values outside 0.7/1.0 are silently clamped to the nearest supported value (only non-finite values error), whereas Gemini CLI and KiloCLI reject any unsupported temperature with an error. The per-request timeout is 120 seconds.

The kilocli provider (alias kilo) spawns the kilo binary (KiloCLI) — architecturally identical to the Claude Code provider. KiloCLI must be installed and authenticated separately.

default_provider = "kilocli"
default_model = "default"
SettingTypeMeaning
KILO_CLI_PATHenvPath to the kilo binary.

Same limits as the other subprocess providers: no multi-turn history, temperature 0.7/1.0 only, 120-second timeout.

The copilot provider (alias github-copilot) reaches GitHub Copilot inference at https://api.githubcopilot.com. It performs a GitHub device-code flow using VS Code’s OAuth client ID (Iv1.b507a08c87ecfe98), exchanges the result for a GitHub OAuth token, then mints short-lived Copilot API tokens. Tokens are cached and auto-refreshed.

default_provider = "copilot"
default_model = "gpt-4o"
api_key = "<github-oauth-token>"
SettingTypeMeaning
api_keystringThe GitHub OAuth token (not the short-lived Copilot key). This is the value stored in config or env.
Token cachepath~/.config/revka/copilot/ (containing api-key.json and access-token).

During the device-code flow Revka prints a URL and a user code for you to authorize in a browser.

MiniMax (Global and CN) supports automatic OAuth token resolution. Setting api_key = "minimax-oauth" is a placeholder that switches the provider into the OAuth path: it checks MINIMAX_OAUTH_TOKEN, then MINIMAX_API_KEY, and if needed calls the token-refresh endpoint with MINIMAX_OAUTH_REFRESH_TOKEN.

default_provider = "minimax-oauth"
api_key = "minimax-oauth"
Terminal window
export MINIMAX_OAUTH_TOKEN="<token>" # preferred: a direct OAuth token
# or, to auto-refresh:
export MINIMAX_OAUTH_REFRESH_TOKEN="<token>"
export MINIMAX_OAUTH_REGION="global" # global | cn
VariableMeaning
MINIMAX_OAUTH_TOKENDirect OAuth access token (checked first).
MINIMAX_API_KEYStandard API key fallback.
MINIMAX_OAUTH_REFRESH_TOKENRefresh token; Revka exchanges it for a fresh access token.
MINIMAX_OAUTH_REGIONglobal or cn — selects the token endpoint and base URL.
MINIMAX_OAUTH_CLIENT_IDOverride the default OAuth client id.

Region routing: Global tokens use https://api.minimax.io/oauth/token; CN tokens use https://api.minimaxi.com/oauth/token. The same region is inferred from the alias you choose (minimax/minimax-intl for Global, minimax-cn/minimaxi for CN) or from MINIMAX_OAUTH_REGION.

Alibaba Qwen (DashScope) has three sub-variants: a direct API key, OAuth token reuse from the Qwen Code CLI, or an explicit OAuth token. The qwen-code variant (api_key = "qwen-oauth") is the subscription path — analogous to openai-codex — for users with a Qwen Code CLI login.

# Direct API key
default_provider = "qwen"
# then: export DASHSCOPE_API_KEY=...
# OAuth / Qwen Code subscription
default_provider = "qwen-code"
api_key = "qwen-oauth"
VariableMeaning
DASHSCOPE_API_KEYDirect API key (for the non-OAuth variants).
QWEN_OAUTH_TOKENExplicit OAuth access token.
QWEN_OAUTH_REFRESH_TOKENEnables in-process auto-refresh when the cached token is expired.
QWEN_OAUTH_RESOURCE_URLEndpoint override carried from the OAuth session.
QWEN_OAUTH_CLIENT_IDOverride the default OAuth client.

If no explicit token is set, Revka auto-discovers credentials written by the Qwen Code CLI at ~/.qwen/oauth_creds.json. Region endpoints are separate:

RegionBase URL
CNdashscope.aliyuncs.com/compatible-mode/v1
Internationaldashscope-intl.aliyuncs.com/compatible-mode/v1
USdashscope-us.aliyuncs.com/compatible-mode/v1

For the broader China-region provider picture (GLM, Moonshot/Kimi, Doubao, and the full alias-to-region map), see China-region providers.

The OAuth-based providers above are managed with the revka auth command group. The most common flows:

Terminal window
revka auth login --provider openai-codex # start an OAuth login
revka auth login --provider openai-codex --device-code
revka auth login --provider gemini --profile work # named profile
revka auth status # active profile + token expiry per provider
revka auth use --provider openai-codex --profile work
revka auth refresh --provider openai-codex # force a token refresh
revka auth logout --provider openai-codex
CommandWhat it does
loginRun an OAuth login (--device-code for headless, --import <PATH> to adopt an existing auth.json).
paste-redirectFinish a login by pasting the redirect URL or raw code when capture failed.
paste-token / setup-tokenStore a subscription/setup token directly (used for Anthropic subscription auth).
refreshRefresh an access token from its stored refresh token.
useSwitch the active profile for a provider.
list / statusList stored profiles, or show the active profile and token expiry per provider.
logoutRemove a stored profile.

Profiles let you keep, for example, a personal and a work subscription side by side and switch between them with revka auth use. See revka models, providers & auth for the complete flag reference.