Skip to content

Authentication & Models ​

Codeg ships no model of its own. Every agent brings its own credentials — a subscription you already pay for, a provider API key, or a compatible endpoint — and talks to its own models. This page is about getting an agent authenticated so it can run, and choosing which model it uses once it can.

You do this per agent, in Settings → Agents: open an agent and its detail pane shows the sign-in options that apply to it — Per-Agent Setup goes through every pane. A separate Model Providers pane holds reusable credentials for the agents that support them. Enabling an agent and confirming it's healthy come first — see Working with Agents — and Supported Agents is the roster this all applies to.

How agents authenticate ​

Because each agent authenticates its own way, its detail pane offers only the options that make sense for it — usually a single auth mode dropdown. Across the roster, those options come in three shapes:

  • The agent's own account — sign in with the subscription or plan you already have (Anthropic, ChatGPT, Google, and so on). Codeg reuses the agent's own login; you don't hand it a key.
  • A provider API key and endpoint — type an API URL and key straight into the agent's card to bill against an API account or a compatible gateway. This is the Custom Endpoint option.
  • A saved Model Provider — point the agent at a reusable credential you've stored once. Available for Claude Code, Codex, and Gemini.

These are mutually exclusive: an agent uses one at a time, and switching the auth mode swaps between them. The next three sections take each in turn.

Several agents use their native sign-in rather than Codeg's auth-mode picker: Kiro CLI, TRAE CLI, Command Code, ZCode and MiniMax Code. Their setup instructions are below.

Sign in with a subscription ​

The simplest path is to use the agent's own subscription — the plan you'd use from its CLI. For most agents that means logging in through the agent's own tool once, in a terminal; Codeg then reuses that login and stores nothing extra:

  • Claude Code — choose Official Subscription and Codeg uses your existing claude login. No key required.
  • Gemini — choose Google Login and complete Google's sign-in by running gemini in a terminal first.
  • Kimi Code, CodeBuddy — run the agent's own login in a terminal (kimi login, codebuddy) and Codeg picks it up. Kimi Code has a pane of its own for the API-key route. → Kimi Code
  • Kiro CLI, TRAE CLI, Command Code — run the agent's own login once in a terminal: kiro-cli login, traecli login (your enterprise SSO) or command-code login; TRAE CLI's and Command Code's panes show the command with a copy button. For a server or a container, each takes a credential instead: Kiro's API key (KIRO_API_KEY), TRAE CLI's Personal access token, which Codeg signs in with whenever a session starts, and Command Code's API key (COMMAND_CODE_API_KEY), which outranks the login. → Per-Agent Setup
  • MiniMax Code — run mcode login, or mcode login --region global for a global account, on the backend machine. Existing bring-your-own-key providers need no separate MiniMax login. Configure endpoints and keys in MiniMax Code itself. → MiniMax Code
  • ZCode — sign in to the official ZCode itself; the bridge Codeg runs reuses that login, and Codeg copies nothing. GLM Coding Plan accounts work, and since 0.41.2 so does a Coding Plan API key, saved in the desktop app or given to the bridge with its setup command. Start Plan models needed a captcha only the desktop app can solve, so bridges before Codeg 0.42.3 declined them. → ZCode
  • Grok and Cursor each have an Authentication method picker of their own:
    • Grok — Official Subscription (SuperGrok or X Premium+ via grok login; nothing stored), XAI API key (a key from the xAI console, for headless runs), or Custom endpoint (a custom model with its own base URL and key, which becomes Grok's default).
    • Cursor — official subscription, where Codeg shows you the cursor-agent login command to run (a browser window opens) and reports Logged in once you refresh, or a Cursor API key from the Cursor dashboard for headless and server machines. Note that key is a Cursor account key — cursor-agent only talks to Cursor's own backend, so it isn't a route to a third-party endpoint. Codeg writes both into ~/.cursor/cli-config.json, shared with the CLI. Since 0.31.2 Codeg also checks that a stored login still works rather than trusting the CLI's word. → Cursor

The integrated terminal (⌘J) is right there for those one-time logins.

Codex is the exception — it signs in inside Codeg. Pick Official Subscription and click Log in with ChatGPT: Codeg shows a code and a verification link, you approve it in your browser, and the pane confirms with a green Account logged in. Click again anytime to re-login or switch accounts.

Connect with an API key or custom endpoint ​

Prefer to pay per API call, or route through an OpenAI/Anthropic/Gemini-compatible gateway? Choose Custom Endpoint in the agent's auth mode and fill in:

  • API URL — the base URL of your provider or gateway.
  • API Key — your key, masked with a show/hide toggle.
  • Model — the model id to request, where the agent expects one.

Codeg hands these to the agent when it launches. Most agents accept this route, and the exact fields shown follow whatever that agent understands. Kiro CLI, ZCode, TRAE CLI, Command Code and MiniMax Code don't offer it: the first four talk to their own service (TRAE CLI's pane can point it at your organization's own TRAE deployment instead), while MiniMax Code keeps provider setup in its own CLI.

Save and reuse a Model Provider ​

If you switch between endpoints, or want one credential shared across sessions, save it as a Model Provider instead of retyping it. This is available for Claude Code, Codex, and Gemini — the three whose CLIs cleanly accept a base-URL-and-key override.

  1. Go to Settings → Model Providers → Add Provider.
  2. Give it a name, an API URL, an API Key, the agent type it's for, and a model. A Claude Code provider gets Claude Code's model slots instead of the single model — a main and a reasoning model, a default for each tier (Haiku, Sonnet, Opus, and since 0.32.3 Fable), and a custom entry for the model picker.
  3. Open that agent in Settings → Agents, set its auth mode to Model Provider, and select the one you saved.

Once bound, the agent's API fields show read-only, filled from the provider — and for Claude Code the provider speaks for every model slot: one it fills is set on the agent, one it leaves empty is cleared, so nothing from an earlier setup lingers underneath. On Claude Code, switching the auth mode away from Model Provider and back keeps the provider you'd picked — until 0.32.3 it rebound to your oldest one and saved its model. Edit a provider later and Codeg flags any running sessions that need to reconnect to pick up the change.

Custom Endpoint vs. Model Provider

They configure the same thing — a base URL, a key, and a model — but differ in reach. Custom Endpoint is typed inline on one agent; a Model Provider is a named record you set up once and reuse. If you only ever use one endpoint for one agent, Custom Endpoint is simpler; if you juggle several, save them as providers. (An agent's type is fixed once a provider is created.)

Fetch models from your provider ​

Since 0.41.1, supported model fields offer Fetch models after you enter an API URL and key. Choose from the returned list, search it, refresh it, or retry a failed request. This is available in Claude Code and Gemini endpoint/provider settings, OpenCode's provider editor, and supported model lists such as Cline, Pi and Grok. Model IDs can still be entered manually where the field allows it.

For Claude Code, Extra models in /model adds entries to the picker for sessions Codeg starts. Organization-managed model lists and Claude's availableModels still take precedence.

For Codex, use Model list source in its model section: Codex built-in or From the provider. The provider route supports a native Codex catalog or an OpenAI-style model list, with an optional List URL. Check the displayed destination host before fetching: the provider key is sent there. Choose the models to expose, apply the selection, then save the settings.

A native catalog picks up new models on refresh, except models you explicitly removed; if the provider later omits a model, the native catalog drops it. An OpenAI-style list is an allowlist: new IDs wait for you to select them in Choose models, while a selected ID stays available when a later response omits it, using its last-seen details. Background refresh retains the last working list on failure and shows the error alongside Refresh now. → Codex model management

Choose a model ​

Which models you can pick comes from the agent, not Codeg. Once an agent connects, the model list on the composer's settings button shows exactly what that agent offers for the way you signed in — so the choices differ from one agent to the next. A long list gets a search box, and the model the agent recommends is marked. Pick one there and it takes effect for the conversation.

  • Each conversation keeps its own model. Since 0.48.0 a model you pick in a conversation stays with that conversation, across reconnects, and doesn't change any other conversation's. A pick made in a new conversation, before its first message, is also what Codeg preselects the next time you start a session with that agent on this device. → Start a session
  • Codex lists each model's reasoning-effort range. Since 0.48.0, where an agent's models support different effort levels, the model list shows each one's range beside it — Low–Xhigh, Low–Ultra — and leaves it out when they're all the same, as Claude Code's are.
  • There's no per-folder model default — the model is chosen at the session level. (A folder default sets the agent, not the model.)
  • Reopened Claude Code history reads a 1M window where the model has one. Since 0.35.0 the context ring of a Claude Code conversation you reopen measures against 1M for the models that have it natively — Opus 4.7 and later, Sonnet 5 and later, Haiku 5.5, Fable and Mythos — instead of 200K. The window isn't stored, so older conversations pick it up the next time they're read. The same release made Claude Haiku 5.5 the suggested Haiku model, on Claude Code's pane and in the model provider dialogs.
  • A Claude Code conversation saved on a (1M context) entry keeps working. Since Claude Code 2.1.285, a gateway behind a custom API address lists the plain models only — they use their 1M window by default — and some accounts lost the separate Opus (1M context) entry earlier. A conversation set to such an entry carries on with its plain twin rather than falling back to the default model. If your gateway stops at 200K, Claude Code's own advice is /autocompact 200k.
  • A saved Fable pick survives Claude Code 2.1.287. That version, bundled with adapter 0.86.0 since Codeg 0.34.0, renamed its Fable entry from claude-fable-5-1 to fable, so the Fable pick Codeg had saved matched nothing and every connect fell back to the default model. Codeg now carries the pick over to the one entry that names the same model — by its name, Fable 5.1, by the start of its description, or by the id a Default Fable Model slot pins — for as long as an entry still names that version; a (1M context) Fable pick follows the same way. If no entry names it, or more than one does, nothing is carried over this way — see the next point for a newer Fable — and failing that the session runs on Claude Code's default. The saved pick itself isn't rewritten — choosing Fable again saves the new id.
  • Fable 5.1 becomes Fable 5.2. Since 0.42.2 (Claude Code 2.1.321) the Fable entry is Fable 5.2. Through an API gateway, where no entry names 5.1 any more, a saved Fable 5.1 pick moves to that entry instead of falling back to the default model — but only to the one Fable entry naming a newer version, and never to a model you've pinned in a Default Fable Model slot. With a claude.ai login that still lists Fable 5.1, the pick stays on 5.1.
  • A model is captioned the way its own agent names it. Since 0.31.0 Codeg records the id/name pairs an agent's model picker advertises, so the reply footer, the session details and the sidebar's hover chip read Qwen3.8-Flash where the transcript itself only records an account-internal id like qfmodel.

Reasoning effort is set in the composer, per session — with a few agent panes adding something the composer can't express:

  • Grok keeps a settings-pane dropdown, from low up to Max, written into Grok's own config.
  • Claude Code and Codex had one until 0.30.0, when both were deleted. They read as the knob that decides how hard a turn thinks while the composer's per-session picker is what actually governs it, so the two could disagree with nothing on screen to say which won. An effortLevel already written into a config file is left alone rather than cleaned up.
  • Pi works like Kimi Code rather than like Grok: because pi only sends an effort for a model that declares one, its pane is where you declare it — a switch, which of pi's seven levels your model accepts, and the value each is sent as. Since 0.32.3 those levels run up to Max, and the pane says what pi will actually run the selected model at. → Pi: reasoning on a custom provider · What each model can think at
  • Kimi Code works the other way round: its pane declares which levels exist and the composer's Thinking picker offers them. → Kimi Code
  • Cursor treats effort as one of its model's knobs — on its settings pane for the model a session starts on, and as a setting of its own once a session is running. → Cursor's families and knobs
  • Kiro CLI offers Thinking and Reasoning effort only for a model that supports them, as settings Codeg builds from what Kiro reports. → Kiro CLI

Where credentials are stored ​

Codeg keeps agent credentials where the agents themselves do — nothing is uploaded to Codeg:

  • The agent's own native config. A subscription login or key handled by the agent's CLI stays in that agent's files — ~/.codex/auth.json, ~/.hermes/.env, ~/.grok/auth.json, Kiro's ~/.kiro, TRAE CLI's ~/.trae, Command Code's ~/.commandcode/auth.json, and so on — exactly where the agent's own tool keeps it. ZCode's sign-in stays inside the ZCode app, and a key given to its bridge's setup command in ~/.zcode/v2/acp-accounts.json.
  • Codeg's local database. Keys you type into Codeg's UI — Custom Endpoint keys, saved Model Providers, and the key or token on Kiro CLI's, TRAE CLI's or Command Code's pane — are stored locally by Codeg and injected as environment variables when the agent launches. Like the agents' own config files, they aren't encrypted at rest, and the masked display is only cosmetic — so treat access to your machine as the boundary.

This is separate from git account tokens, which are kept in your OS keyring. → git accounts

Next steps ​

Released under the Apache-2.0 License.