Skip to content

Provider Management

Provider management commands use the swixter providers prefix.

List all available providers.

Terminal window
swixter providers list

Shows built-in providers and user-defined providers with their details:

Built-in providers:
anthropic Anthropic Claude API wire_api: responses
ollama Local Ollama wire_api: chat
custom OpenAI-compatible API wire_api: chat
User-defined providers:
my-provider Custom endpoint wire_api: chat

Define a custom provider.

Terminal window
swixter providers add <id>

The interactive prompt asks for:

  • Name: Display name
  • Base URL: API endpoint
  • Wire API: chat or responses
  • Default env_key: Environment variable for API key (e.g., OPENAI_API_KEY)

Example:

Terminal window
swixter providers add deepseek \
--name "DeepSeek" \
--base-url https://api.deepseek.com/v1 \
--wire-api chat \
--env-key DEEPSEEK_API_KEY

User-defined providers are stored in ~/.config/swixter/providers.json.

View details of a specific provider.

Terminal window
swixter providers show <id>

Delete a user-defined provider.

Terminal window
swixter providers remove <id>

Built-in providers cannot be removed.

TypeDescriptionCompatible Coders
chatOpenAI-compatible chat completions endpointCodex, Continue.dev
responsesAnthropic Responses APIClaude Code

When creating Codex profiles, only wire_api: "chat" providers are available. The Anthropic provider (wire_api: "responses") is filtered out.

Swixter ships with three built-in providers and supports user-defined custom providers.

The Anthropic provider connects to Anthropic’s Claude API using the Responses API protocol. It is only compatible with Claude Code.

FieldValue
Provider IDanthropic
Wire APIresponses
Default Base URLhttps://api.anthropic.com
Env KeyANTHROPIC_API_KEY
Terminal window
# Create a profile using Anthropic
swixter claude create my-profile \
--provider anthropic \
--api-key sk-ant-api03-... \
--model claude-sonnet-4-6

Get your API key from the Anthropic Console.

Model fields: Claude Code profiles can specify multiple model environment variables via --model (ANTHROPIC_MODEL), plus individual defaults for Haiku, Opus, and Sonnet. See Claude Code commands for details.

Auth token: An optional auth token is supported via --auth-token, which sets ANTHROPIC_AUTH_TOKEN.

Compatibility: Claude Code only. Not available for Codex (requires wire_api: "chat").

The Ollama provider connects to a local Ollama instance for running models locally. It uses wire_api: "chat" and is compatible with all coders.

FieldValue
Provider IDollama
Wire APIchat
Default Base URLhttp://localhost:11434/v1
Env KeyOLLAMA_API_KEY
Terminal window
# Create a profile using Ollama
swixter claude create local \
--provider ollama \
--base-url http://localhost:11434/v1 \
--model llama3

Setup: Install Ollama, pull a model (ollama pull llama3), then create a Swixter profile. Ollama runs on port 11434 by default; the API path is /v1 for OpenAI-compatible endpoints.

API key: Ollama does not require an API key. Leave it empty or set a placeholder — Swixter uses OLLAMA_API_KEY as the env variable name for compatibility.

Compatibility: Works with Claude Code, Codex, and Continue.dev. For Codex, the env_key defaults to OLLAMA_API_KEY but can be overridden with --env-key.

The built-in custom provider works with any OpenAI-compatible Chat Completions API. It is compatible with all coders.

FieldValue
Provider IDcustom
Wire APIchat
Default Base URLhttps://api.openai.com/v1
Env KeyOPENAI_API_KEY
Terminal window
# Create a profile using OpenAI
swixter claude create openai-profile \
--provider custom \
--api-key sk-... \
--base-url https://api.openai.com/v1 \
--model gpt-4o

Supported services: Any service with an OpenAI-compatible /v1/chat/completions endpoint works, including:

ServiceBase URL
OpenAIhttps://api.openai.com/v1
Groqhttps://api.groq.com/openai/v1
Together AIhttps://api.together.xyz/v1
DeepSeekhttps://api.deepseek.com/v1
Fireworkshttps://api.fireworks.ai/inference/v1
OpenRouterhttps://openrouter.ai/api/v1

Compatibility: Works with all coders. For Codex, customize the env_key with --env-key (e.g., --env-key GROQ_API_KEY).

You can define your own reusable providers for any API endpoint using swixter providers add.

Terminal window
swixter providers add my-api \
--name "My API" \
--base-url https://api.example.com/v1 \
--wire-api chat \
--env-key MY_API_KEY

User-defined providers are stored in ~/.config/swixter/providers.json and appear in the provider list when creating profiles. Providers with the same ID as a built-in provider take precedence, allowing you to override defaults.

Wire APIProtocolBest For
chatOpenAI Chat CompletionsCodex, Continue.dev, maximum compatibility
responsesAnthropic ResponsesClaude Code with Anthropic-compatible APIs

Choose chat for maximum compatibility across all coders.