Custom Providers
Custom Providers
Section titled “Custom Providers”Custom providers let you define reusable configurations for any API endpoint.
Adding a Custom Provider
Section titled “Adding a Custom Provider”swixter providers add <id>The interactive prompt asks for name, base URL, wire API type, and default env_key.
Non-Interactive
Section titled “Non-Interactive”swixter providers add my-api \ --name "My API" \ --base-url https://api.example.com/v1 \ --wire-api chat \ --env-key MY_API_KEYManaging Custom Providers
Section titled “Managing Custom Providers”# List all (built-in + user-defined)swixter providers list
# Show detailsswixter providers show my-api
# Removeswixter providers remove my-apiProvider Schema
Section titled “Provider Schema”User-defined providers are stored in ~/.config/swixter/providers.json:
{ "providers": [ { "id": "my-api", "name": "My API", "baseUrl": "https://api.example.com/v1", "wireApi": "chat", "envKey": "MY_API_KEY" } ]}Overriding Built-in Providers
Section titled “Overriding Built-in Providers”User-defined providers with the same ID as a built-in provider take precedence. This lets you customize the default behavior:
# Override the custom provider's default base URLswixter providers add custom \ --name "OpenAI" \ --base-url https://my-proxy.example.com/v1 \ --wire-api chat \ --env-key OPENAI_API_KEYWire API Field
Section titled “Wire API Field”| Value | Protocol | Use Case |
|---|---|---|
chat | OpenAI Chat Completions | Codex, Continue.dev, most providers |
responses | Anthropic Responses | Claude Code with Anthropic |
Choose chat for maximum compatibility across all coders. Use responses only if you’re targeting Claude Code with an Anthropic-compatible API.
Using a Custom Provider
Section titled “Using a Custom Provider”Once created, your custom provider appears in the provider list when creating profiles:
swixter claude create my-profile# -> Select provider: ... my-apiOr skip the prompt:
swixter claude create my-profile --provider my-api --api-key xxx