Commit Graph

3 Commits

Author SHA1 Message Date
fkrebs ac0459ffa5 feat: effort levels, fallback model, cost/rate-limit metadata
- 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
2026-05-22 16:46:06 +02:00
fkrebs 5f8a98772d fix: --verbose flag, rw credential mounts, correct MCP config schema
- 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
2026-05-22 16:34:06 +02:00
fkrebs 3a58fba521 Initial implementation of claude-max-bridge
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
2026-05-22 16:08:44 +02:00