This guide provides concise setup instructions for common LLM providers. For complete documentation, see the full provider guide.
LLxprt Code supports two main ways to configure providers:
Many popular providers have built-in aliases for quick setup:
# Use the alias (recommended for supported providers)
/provider anthropic
/provider gemini
/provider qwen
/provider synthetic
# Then set your key and model
/key sk-your-api-key
/model your-model-nameFor providers without aliases, use the OpenAI protocol:
/provider openai
/baseurl https://provider-api-url/v1/
/key your-api-key
/model model-nameWhen you set a model, configure both context-limit (ephemeral) and max_tokens (model param):
- context-limit: The total tokens allowed for the entire request (prompt + output)
- max_tokens: The maximum tokens reserved for the model's response (output only)
- Effective prompt budget = context-limit − max_tokens − safety-margin
Important constraint: You cannot set context-limit + max_tokens to exceed the model's actual limit. For example:
- If a model supports 200k total context, you CANNOT set context-limit=200000 AND max_tokens=100000
- The system needs room for both your prompt AND the response within the limit
Safety margin: 256–2048 tokens (recommend 1024) to avoid last-second overflows from tool wrappers, system prompt, and LLXPRT.md.
Tip: If you see "would exceed the token context window" errors, lower max_tokens first or reduce LLXPRT.md size.
Examples:
- Large coding session: context-limit 121000, max_tokens 10000 → prompt budget ≈ 110k (minus safety).
- Writing mode: context-limit 190000, max_tokens 8000 → prompt budget ≈ 181k (minus safety).
Auth-variant note: Context windows often differ between API-key access and OAuth/subscription access for the same model. The numbers below name the variant where it matters. When in doubt, start lower and increase until you hit a provider limit error.
Reasoning tips: Interleaved-thinking models (e.g. MiniMax, Kimi) rely on prior reasoning tokens, so keep recent reasoning in context (
/set reasoning.stripFromContext none). When you need to manage a large window, trim older reasoning while surfacing recent thinking blocks (/set reasoning.stripFromContext allButLastorall).
Use your ChatGPT Plus or Pro subscription directly — no API key needed:
/auth codex enable
/provider codex
/model gpt-5.6-solThis uses OAuth to authenticate with your ChatGPT subscription.
- Context: 262,144 tokens (Codex OAuth)
- gpt-5.x reasoning models do NOT support temperature — use
/set reasoning.effortinstead - Reasoning effort:
minimal,low,medium,high,xhigh,max
/set context-limit 262144
/set modelparam max_tokens 8192
/set reasoning.effort highCommon models: gpt-5.6-sol (default), gpt-5.6-terra, gpt-5.6-luna, gpt-5.5
/provider anthropic
/key sk-ant-your-key
/model claude-opus-4-8/auth anthropic enableNote: OAuth is lazy — authentication happens when you first use the provider.
Common models: claude-opus-4-8, claude-sonnet-5, claude-sonnet-4-6, claude-haiku-4-5
Guidance:
- Default context-limit 200000 (Opus). Sonnet may support a larger window depending on your Anthropic plan; the very large (1M-class) windows are plan/credit-gated rather than always-on. Check Anthropic's documentation for your current limits.
- If you enable thinking, increase max_tokens as needed and keep ≥1k tokens of safety.
/set context-limit 200000
/set modelparam max_tokens 4096
/set reasoning.effort highProfile JSON:
{
"version": 1,
"provider": "anthropic",
"model": "claude-opus-4-8",
"modelParams": { "max_tokens": 4096 },
"ephemeralSettings": { "context-limit": 200000 }
}Environment variable: export ANTHROPIC_API_KEY=sk-ant-...
/provider gemini
/key your-gemini-key
/model gemini-2.5-pro/key save gemini your-gemini-keyNote: Set the key before your first request to that provider.
Important (Gemini "Login with Google" removed): Google has removed the free consumer "Login with Google" flow for the Gemini CLI entirely. Use a Gemini API key (
GEMINI_API_KEY) or Vertex AI credentials instead. See Google Cloud auth.
Common models: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite (stable). Preview models gemini-3-pro-preview and gemini-3-flash-preview are also selectable.
Guidance:
- Context-limit up to 1048576 (API key) for Gemini 2.5 models; lower if you see provider limit errors.
- Max output tokens: up to 65536
/set context-limit 1048576
/set modelparam max_tokens 4096Profile JSON:
{
"version": 1,
"provider": "gemini",
"model": "gemini-2.5-pro",
"modelParams": { "temperature": 0.7, "max_tokens": 4096 },
"ephemeralSettings": { "context-limit": 1048576 }
}Environment variable: export GEMINI_API_KEY=...
/provider qwen
/key your-dashscope-key
/model qwen3-coder-plusQwen is now API-key-only. Qwen's free OAuth tier ended 2026-04-15 and the OAuth provider has been removed. Use a DashScope API key (
DASHSCOPE_API_KEY) or an OpenRouter API key. See authentication for details.
Common models: qwen3-coder-plus, qwen3-coder
Guidance:
- Start with context-limit 200000; lower if you hit provider limits.
- This alias is for Qwen's own service. It is not used for Cerebras.
/set context-limit 200000
/set modelparam max_tokens 4096Profile JSON:
{
"version": 1,
"provider": "qwen",
"model": "qwen3-coder-plus",
"modelParams": { "temperature": 0.7, "max_tokens": 4096 },
"ephemeralSettings": { "context-limit": 200000 }
}/provider openai
/keyfile ~/.openai_key
/model gpt-5.6-solCommon models: gpt-5.6 (Sol alias), gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5
GPT-5.6+ models automatically use the Responses API on canonical OpenAI (api.openai.com); custom OpenAI-compatible base URLs stay on Chat Completions.
Guidance:
- Context: up to 1,048,576 tokens on the OpenAI API (vs. 262,144 via Codex OAuth — see the Codex section above)
- gpt-5.x reasoning models do NOT support temperature — use
/set reasoning.effortinstead - Reasoning effort:
minimal,low,medium,high,xhigh,max.maxis model/provider-specific; projectminimalmaps to wirenonefor GPT-5.6 Responses.
/set context-limit 400000 # adjust to your model's actual window (check provider docs)
/set modelparam max_tokens 8192
/set reasoning.effort highKimi ships the K3 frontier model with deep reasoning, multi-step tool orchestration, and native multimodal vision. There are two ways to reach it:
kimi-for-coding— the subscription-served model (Kimi Code subscription). Use thekimiprovider alias, which points at the/coding/v1endpoint. Thinking is always on.kimi-k3— the pay-per-token model on the raw Moonshot API (https://api.moonshot.ai/v1). Same K3 capabilities, billed per token.
Note: The
kimialias'sdefaultModeliskimi-for-coding(the subscription path). To use the pay-per-tokenkimi-k3on the Moonshot API, point the alias at the raw endpoint with/baseurl https://api.moonshot.ai/v1and/model kimi-k3.
/provider kimi
/keyfile ~/.kimi_key
/model kimi-for-coding/provider kimi
/baseurl https://api.moonshot.ai/v1
/keyfile ~/.moonshot_key
/model kimi-k3- Context: 1,000,000 tokens (1M)
- Max output: 131,072 tokens (default; up to 1,048,576 max)
- Architecture: Frontier MoE with always-on thinking
- Strengths: Deep reasoning, 200-300 sequential tool calls, native vision (images and video)
- Reasoning effort:
low/high/max(defaultmax). There is nomediumfor K3. Thinking is always on and cannot be disabled. - Vision: Native, but requires base64 or
ms://<file-id>inputs — public image URLs are not accepted.
/set context-limit 1000000
/set modelparam max_tokens 131072
/set reasoning.effort max
/set reasoning.enabled true
/set reasoning.includeInResponse trueProfile JSON (pay-per-token kimi-k3 on the Moonshot API):
{
"version": 1,
"provider": "kimi",
"model": "kimi-k3",
"modelParams": { "max_tokens": 131072 },
"ephemeralSettings": {
"context-limit": 1000000,
"base-url": "https://api.moonshot.ai/v1",
"reasoning.effort": "max",
"reasoning.enabled": true,
"reasoning.includeInResponse": true
}
}- Subscription (
kimi-for-coding) — flat-rate Kimi Code subscription plan; usage is covered by the subscription. - Pay-per-token (
kimi-k3on the Moonshot API) — $0.30 / 1M cached input tokens, $3.00 / 1M non-cached input tokens, $15.00 / 1M output tokens (flat).
Kimi K3 is also available through third-party providers:
# Via Synthetic
/provider synthetic
/keyfile ~/.synthetic_key
/model hf:moonshotai/Kimi-K3
# Via Chutes
/provider chutes-ai
/keyfile ~/.chutes_key
/model moonshotai/Kimi-K3/provider synthetic
/key your-synthetic-key
/model hf:zai-org/GLM-4.7Popular models: hf:zai-org/GLM-4.7, hf:moonshotai/Kimi-K3
Guidance:
- Context varies by model/runtime. Start with context-limit 200000 and adjust.
/set context-limit 200000
/set modelparam max_tokens 4096Profile JSON:
{
"version": 1,
"provider": "synthetic",
"model": "hf:zai-org/GLM-4.7",
"modelParams": { "temperature": 0.7, "max_tokens": 4096 },
"ephemeralSettings": { "context-limit": 200000 }
}/provider chutes-ai # Has built-in alias
# OR
/provider openai
/baseurl https://api.chutes.ai/v1/
/key your-chutes-key
/model zai-org/GLM-5-TEE/set context-limit 200000
/set modelparam max_tokens 4096/provider deepseek
/key your-deepseek-key
/model deepseek-v4-flash/provider zai
/key your-zai-key
/model glm-5/provider makora
/key your-makora-key
/model nvidia/Kimi-K2.6-NVFP4These providers use the OpenAI-compatible endpoint approach (most also have built-in aliases shown above).
/provider xai # Has built-in alias
# OR
/provider openai
/baseurl https://api.x.ai/v1/
/key your-xai-key
/model grok-4Profile JSON:
{
"version": 1,
"provider": "openai",
"model": "grok-4",
"modelParams": { "max_tokens": 4096, "temperature": 0.7 },
"ephemeralSettings": {
"context-limit": 200000,
"base-url": "https://api.x.ai/v1"
}
}/provider openrouter # Has built-in alias
# OR
/provider openai
/baseurl https://openrouter.ai/api/v1/
/key your-openrouter-key
/model nvidia/nemotron-nano-9b-v2Profile JSON:
{
"version": 1,
"provider": "openai",
"model": "nvidia/nemotron-nano-9b-v2",
"modelParams": { "max_tokens": 4096, "temperature": 0.7 },
"ephemeralSettings": {
"context-limit": 200000,
"base-url": "https://openrouter.ai/api/v1"
}
}/provider fireworks # Has built-in alias
# OR
/provider openai
/baseurl https://api.fireworks.ai/inference/v1/
/key your-fireworks-key
/model fireworks/minimax-m3/provider cerebras-code # Has built-in alias
# OR
/provider openai
/baseurl https://api.cerebras.ai/v1/
/key your-cerebras-key
/model qwen-3-coder-480b
# Recommended runtime tuning:
/set context-limit 131000
/set modelparam max_tokens 10000Notes:
- The Cerebras endpoint may limit context below a model's full window; budget room for completions.
- Effective prompt budget = context-limit − max_tokens − safety.
- The
/provider qwenalias is for Qwen's own service, not for Cerebras.
LiteLLM is an open-source AI gateway that provides a unified OpenAI-compatible interface to 100+ LLM providers (Azure OpenAI, AWS Bedrock, Vertex AI, Groq, Together, and more).
/provider litellm # Has built-in alias
/key your-litellm-key
/model anthropic/claude-sonnet-4-20250514Or without the alias:
/provider openai
/baseurl http://127.0.0.1:4000/v1/
/key your-litellm-key
/model gpt-4oContext and output limits depend on the underlying model routed through the proxy. Start with conservative defaults and adjust:
/set context-limit 128000
/set modelparam max_tokens 4096Profile JSON:
{
"version": 1,
"provider": "litellm",
"model": "anthropic/claude-sonnet-4-20250514",
"modelParams": { "max_tokens": 4096 },
"ephemeralSettings": { "context-limit": 200000 }
}Environment variable: export LITELLM_API_KEY=sk-...
For complete local-model guidance, see Using Local Models.
/provider lm-studio # Has built-in alias
# OR
/provider openai
/baseurl http://127.0.0.1:1234/v1/
/model your-local-model/provider llama-cpp # Has built-in alias
# OR
/provider openai
/baseurl http://localhost:8080/v1/
/model your-modelContext depends on your local runtime and model build. Start small and increase:
/set context-limit 32000
/set modelparam max_tokens 2048Ollama exposes an OpenAI-compatible endpoint. Use the openai provider with a local base URL (there is no separate local ollama alias; the built-in ollama-cloud alias is for the hosted ollama.com service):
/provider openai
/baseurl http://localhost:11434/v1/
/key dummy-key # Ollama may require a non-empty key
/model qwen2.5-coderFor the hosted Ollama Cloud service:
/provider ollama-cloud
/key your-ollama-key
/model kimi-k2.6Set directly with /key or load from file:
# Set key directly
/key sk-your-api-key
# Load from file (more secure)
/keyfile ~/.keys/your-provider.keyTwo providers support OAuth for authentication: Anthropic and Codex (ChatGPT).
# Enable OAuth provider (lazy authentication - happens on first use)
/auth anthropic enable
/auth codex enable
# Check OAuth status
/auth
# Logout from provider
/auth provider-name logoutSet keys in your shell environment (auto-detected):
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GEMINI_API_KEY="..."Save your provider setup for reuse:
# After configuring your provider
/profile save my-setup
# Load later
/profile load my-setup
# Use at startup
llxprt --profile-load my-setupSee Settings and Profiles for complete profile management
/provider- List all providers or switch to one/model- List available models or switch models/baseurl- Set custom API endpoint (for OpenAI-compatible providers)/key- Set API key for current session/keyfile- Load key from file/auth- OAuth authentication/profile save- Save current provider configuration
- Configure your provider using the examples above
- Save as profile for easy reuse:
/profile save my-config - Adjust model parameters like temperature:
/set modelparam temperature 0.7 - Learn about profiles: Settings and Profiles Guide
See complete CLI provider documentation for advanced configuration