AI Providers
8 providers, each with its own C bridge. Switch with one config key. Streaming, thinking, tool use โ per-provider feature matrix below.
Overview
scorpiox code connects to AI backends through provider-specific C bridges. Each provider is a standalone translation layer โ it converts the internal message format to the provider's API, handles auth, streaming, and error recovery. Set SX_PROVIDER in scorpiox-env.txt to switch. All providers share the same tool interface.
Provider Details
Models
Features
Config Keys
Meta-provider that routes through scorpiox.net. API_BACKEND selects upstream: claude, gemini, gemini-internal, glm, llamacpp.
Models
Features
Config Keys
Native Claude Code CLI emulation. User-Agent: claude-cli/2.0.51. Beta flags: claude-code-20250219, oauth-2025-04-20, interleaved-thinking-2025-05-14.
Models
Features
Config Keys
OpenAI Codex via chatgpt.com backend-api. Always streams internally. Maps opus/sonnet/haiku to gpt-5.5/gpt-5.4/gpt-5.4-mini.
Models
Features
Config Keys
Generic OpenAI-compatible provider. Works with llama.cpp, Ollama, vLLM, etc. Translates Anthropic Messages API to OpenAI Chat Completions via scorpiox-openai binary.
Models
Features
Config Keys
Direct Anthropic API with x-api-key. Auth providers: official, antigravity (proxy with model mapping), zai (api.z.ai proxy), custom.
Models
Features
Config Keys
Google Gemini via Vertex AI with API key auth. Maps opusโgemini-3.1-pro-preview, sonnetโgemini-3-flash-preview, haikuโgemini-3.1-flash-lite-preview.
Models
Features
Config Keys
Google Gemini via cloudcode-pa API with SSE streaming. Failover: cloudcode-pa.googleapis.com, daily-cloudcode-pa.googleapis.com.
Models
Features
Config Keys
Claude models via Google cloudcode-pa API. Non-streaming (requestType: claude). Failover endpoints supported.
Feature Matrix
| Features | scorpiox | claude_code | codex | openai | anthropic | gemini_vertex | google_gemini | google_claude |
|---|---|---|---|---|---|---|---|---|
| function calling | โ | โ | โ | โ | โ | โ | โ | โ |
| http relay support | โ | โ | โ | โ | โ | โ | โ | โ |
| interleaved thinking | โ | โ | โ | โ | โ | โ | โ | โ |
| model name mapping | โ | โ | โ | โ | โ | โ | โ | โ |
| multi auth provider | โ | โ | โ | โ | โ | โ | โ | โ |
| multi backend | โ | โ | โ | โ | โ | โ | โ | โ |
| multi endpoint failover | โ | โ | โ | โ | โ | โ | โ | โ |
| proxy support | โ | โ | โ | โ | โ | โ | โ | โ |
| retry with backoff | โ | โ | โ | โ | โ | โ | โ | โ |
| sse parsing | โ | โ | โ | โ | โ | โ | โ | โ |
| streaming | โ | โ | โ | โ | โ | โ | โ | โ |
| thinking | โ | โ | โ | โ | โ | โ | โ | โ |
| token auto refresh | โ | โ | โ | โ | โ | โ | โ | โ |
| tool use | โ | โ | โ | โ | โ | โ | โ | โ |
| traffic logging | โ | โ | โ | โ | โ | โ | โ | โ |
Configuration
SX_PROVIDER=claude_code
# Model tier (mapped per-provider)
MODEL=opus
# Enable streaming + thinking
STREAMING=true
THINKING=true
THINKING_BUDGET=10000
# Provider-specific: Claude Code token source
CLAUDE_CODE_TOKEN_SOURCE=local
# Provider-specific: Anthropic API key
ANTHROPIC_API_KEY=sk-ant-...
# Provider-specific: OpenAI-compatible endpoint
OPENAI_BASE_URL=http://localhost:8080/v1
# Provider-specific: Vertex AI
VERTEX_API_KEY=AIza...
Switching Providers
SX_PROVIDER=codex
# Switch to local llama.cpp via OpenAI-compatible
SX_PROVIDER=openai
OPENAI_BASE_URL=http://localhost:8080/v1
OPENAI_MODEL=qwen2.5-coder-32b
# Switch to Gemini via Vertex AI
SX_PROVIDER=gemini_vertex
VERTEX_API_KEY=AIza...
# Switch to Google Gemini (Cloud Code)
SX_PROVIDER=google_gemini
GOOGLE_TOKEN_SOURCE=local
# Switch to Google Claude (Cloud Code)
SX_PROVIDER=google_claude
GOOGLE_TOKEN_SOURCE=local
Authentication
Used by: claude_code, codex, google_gemini, google_claude. Tokens are fetched automatically via helper binaries (scorpiox-claudecode-fetchtoken, scorpiox-codex-fetchtoken). Token sources: local, remote (SSH), TCP.
Used by: anthropic (x-api-key), gemini_vertex (query param), openai (Bearer). Set the key in scorpiox-env.txt and it's passed through on every request.
Used by: scorpiox. Sends Anthropic-style headers to the scorpiox.net router, which selects the upstream backend via API_BACKEND (claude, gemini, gemini-internal, glm, llamacpp).