Providers#
We support LLMs from several providers, including OpenAI, Anthropic, OpenRouter, Requesty, Deepseek, Azure, and any OpenAI-compatible server (e.g. ollama, llama-cpp-python).
You can also bring your own subscription instead of an API key: a ChatGPT Plus/Pro plan via OpenAI Subscription or a SuperGrok plan via Grok Subscription.
Important
A provider or subscription backend is not an agent harness. This page
configures model access inside the gptme runtime. For example,
openai-subscription uses ChatGPT subscription access from gptme; it does
not run the Codex CLI harness. Likewise, grok-subscription does not run
the Grok Build harness. See 🔁 Runtime Portability for the
workspace / harness / model / access distinction.
This page is an overview of how to get model access. To decide which model to use, see Models. For details, see:
Supported Providers — setup details for each built-in provider
Custom and Local Providers — Ollama, LM Studio, vLLM, and other OpenAI-compatible servers
Provider Integration Guide — add a new provider as a config entry, plugin package, or core PR
Tool Formats — how tools are presented to the model, and which format to choose
Selecting a provider and model#
To select a provider and model, run gptme with the -m/--model flag set to <provider>/<model>, for example:
gptme "hello" -m openai/gpt-5.6-sol
gptme "hello" -m openai-subscription/gpt-6-astra # uses your ChatGPT Plus/Pro subscription
gptme "hello" -m anthropic # will use provider default
gptme "hello" -m openrouter/x-ai/grok-4
gptme "hello" -m openrouter/deepseek/deepseek-v4-flash@together # pin to Together subprovider
gptme "hello" -m deepseek/deepseek-v4-flash
gptme "hello" -m xai/grok-4
gptme "hello" -m grok-subscription/grok-4.6 # uses your SuperGrok subscription
gptme "hello" -m gemini/gemini-2.5-flash
gptme "hello" -m groq/llama-3.3-70b-versatile
gptme "hello" -m gptme/claude-sonnet-4-6 # use the gptme managed service as router
gptme "hello" -m local/llama3.2:1b # uses a local OpenAI-compatible server (e.g. ollama)
gptme "hello" -m custom/model # use a custom provider plugin
You can list the models known to gptme using gptme '/models' - '/exit'.
Which tool format a model performs best with also varies by provider and model — see Tool Formats for how to choose one.
Supported providers#
Built-in providers, the model prefix to use, and how each one authenticates. Each links to its setup details on Supported Providers.
Provider |
Model prefix |
Authentication |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ChatGPT Plus/Pro sign-in with |
|
|
SuperGrok sign-in with |
|
|
|
|
|
|
Default models#
When you pass only a provider name (for example gptme -m anthropic), gptme
uses that provider’s default model. This table is generated at docs-build time
from the installed gptme, so it always reflects the current release. The summary
model is the cheaper model used for conversation titles and summaries.
$ gptme-util models recommended
+---------------------+--------------------------------------------+--------------------------------------------+
| Provider | Recommended model | Summary model |
+=====================+============================================+============================================+
| openai | openai/gpt-5.6-sol | openai/gpt-5-mini |
+---------------------+--------------------------------------------+--------------------------------------------+
| openai-subscription | openai-subscription/gpt-6-astra | |
+---------------------+--------------------------------------------+--------------------------------------------+
| anthropic | anthropic/claude-sonnet-4-6 | anthropic/claude-haiku-4-5 |
+---------------------+--------------------------------------------+--------------------------------------------+
| openrouter | openrouter/deepseek/deepseek-v4-flash-0731 | openrouter/deepseek/deepseek-v4-flash-0731 |
+---------------------+--------------------------------------------+--------------------------------------------+
| gptme | gptme/claude-sonnet-4-6 | |
+---------------------+--------------------------------------------+--------------------------------------------+
| gemini | gemini/gemini-3.1-pro-preview | gemini/gemini-2.5-flash |
+---------------------+--------------------------------------------+--------------------------------------------+
| groq | groq/llama-3.3-70b-versatile | |
+---------------------+--------------------------------------------+--------------------------------------------+
| xai | xai/grok-4.6 | xai/grok-4-1-fast |
+---------------------+--------------------------------------------+--------------------------------------------+
| grok-subscription | grok-subscription/grok-4.6 | |
+---------------------+--------------------------------------------+--------------------------------------------+
| deepseek | deepseek/deepseek-v4-flash | deepseek/deepseek-v4-flash |
+---------------------+--------------------------------------------+--------------------------------------------+
Subscriptions#
Several frontier models are reachable through a consumer subscription instead of a metered API key, which is usually the cheapest way to run gptme on a frontier model:
ChatGPT Plus/Pro (Codex) —
openai-subscription/gpt-6-astra(and the GPT-5.6 family). Authenticate once withgptme-auth openai-subscription.SuperGrok (Grok Build) —
grok-subscription/grok-4.6. Reuses the grok CLI’s login, orgptme-auth grok-subscription.Claude Max — not available: Anthropic does not permit third-party tools on the consumer subscription; use the
anthropicprovider with an API key.Cursor — not supported. Cursor exposes no sanctioned endpoint for using a personal subscription from third-party tools (its Cloud Agents API is separately metered and is not a chat-completions API). Unofficial proxies that reuse the Cursor CLI’s login state exist, but gptme does not integrate them.
See OpenAI Subscription and Grok Subscription for setup details.
Configuring credentials#
To configure provider credentials interactively, run /account inside gptme:
/account
/account setup
/account setup openrouter
/account setup openrouter starts browser-based OpenRouter sign-in using OAuth / PKCE, stores the resulting key in ~/.config/gptme/credentials.toml, and switches the default model to OpenRouter’s recommended default.
For providers without OAuth onboarding yet, /account setup <provider> prompts for the key without putting it in shell history and stores it in ~/.config/gptme/credentials.toml (or $XDG_CONFIG_HOME/gptme/credentials.toml if set). Supported manual providers currently include anthropic, openai, deepseek, gemini, groq, and xai.
Subscription sign-in (ChatGPT Plus/Pro and SuperGrok) is also offered in the first-run setup when gptme starts without any configured credentials.
You can still use the [env] section in the Global config file to store API keys using the same format as the environment variables:
OPENAI_API_KEY="your-api-key"ANTHROPIC_API_KEY="your-api-key"OPENROUTER_API_KEY="your-api-key"GEMINI_API_KEY="your-api-key"XAI_API_KEY="your-api-key"GROQ_API_KEY="your-api-key"DEEPSEEK_API_KEY="your-api-key"
Reasoning effort#
Reasoning models accept a named effort level that trades latency and cost for
more thinking. gptme exposes one knob, GPTME_THINKING_EFFORT, and maps it
to each provider’s parameter:
Provider |
Request parameter |
Accepted levels |
|---|---|---|
Anthropic |
|
|
OpenAI (Chat Completions) |
|
|
OpenAI (Responses API) |
|
same as above |
OpenRouter |
|
|
Moonshot Kimi K3 |
|
|
OpenAI Subscription (Codex) |
|
|
Which subset a specific model accepts (for example none on gpt-5.1+,
xhigh on gpt-5.2+) is enforced by the provider; gptme only rejects levels
the provider never accepts. Models without reasoning support ignore the
variable, so it is safe to leave set across model switches.
GPTME_THINKING_EFFORT=high gptme "prove this" -m openai/gpt-5.5
GPTME_THINKING_EFFORT=low gptme "rename the variable" -m openrouter/deepseek/deepseek-r1
Every assistant message records what happened, so session logs are not blind to effort:
metadata.reasoning_effort- the level that shaped the request (only set when one applied; absent means the provider default).metadata.usage.reasoning_tokens- reasoning tokens reported by the provider (OpenAI, OpenRouter, Codex). Anthropic bills thinking insideoutput_tokensand does not report it separately.
Custom, local, and plugin providers#
Any OpenAI-compatible server (Ollama, LM Studio, vLLM, a private proxy) can be
used with the local/ prefix or declared as a named [[providers]] entry
in your config — see Custom and Local Providers.
Third-party packages can also register providers through the gptme.providers
entry point, making them available right after installation:
pip install gptme-provider-minimax
gptme "hello" -m minimax/MiniMax-M3
See Provider Integration Guide to write one.