- Temperature→effort mapping (0-0.2→low, 0.2-0.4→medium, 0.4-0.7→high,
0.7-0.9→xhigh, >=0.9→max); overridable via extra_body.effort
- --fallback-model support via extra_body.fallback_model
- Real cost reporting: x_claude_cost_usd in response JSON (from CLI
total_cost_usd field); x_claude_rate_limit with utilization + resetsAt
- Model aliases: sonnet, opus, haiku passed directly to --model flag
- rate_limit_event parsed and forwarded in done event
- Add --verbose (required for --output-format stream-json)
- Fix --mcp-config value: {"mcpServers":{}} (schema rejects plain {})
- Add --strict-mcp-config to prevent any MCP server from loading
- .claude dir and .claude.json mounted rw so CLI can refresh OAuth token
OpenAI-compatible FastAPI server wrapping the Claude Code CLI.
Translates /v1/chat/completions requests into claude --print subprocess
calls using stream-json input/output for multi-turn support and real
streaming deltas.
Features:
- Full multi-turn conversation support via --input-format stream-json
- Real-time streaming with --include-partial-messages delta tracking
- Rate limit (429) and auth error (401) detection from CLI stderr
- Configurable timeout, graceful subprocess cleanup on disconnect
- /v1/models endpoint and /health check