Recreates the PR #17 change (closed without merging, then asked for back after confirming a real ANTHROPIC_API_KEY would mean separate/duplicate billing rather than actually using the Pro/Max subscription). New POST /mcp endpoint (Streamable HTTP transport, stateless — fresh McpServer+transport per request) exposing one tool, ask_claude_code: runs the real `claude` binary against a prompt, billed against the subscription rather than API credits. Works specifically because it's the actual CLI making the request server-side. Read-only — no Edit/Write/git-push/ git-commit tools. Also removes litellm-config.yaml's "anthropic-claude" model entry: it only ever worked when the real claude CLI itself was the caller (proven earlier), so having it listed as a selectable model was actively misleading — Hermes picking it directly is exactly what produced the '401: Missing Anthropic API Key' confusion that led back to this bridge. The MCP tool is the actual working path now; general_settings.forward_client_headers_to_llm_api is also removed since nothing uses it anymore. Tested end-to-end locally again before pushing (built the image, ran it, full MCP handshake via curl) — real 'pong' from the real claude CLI.
31 lines
1.5 KiB
YAML
31 lines
1.5 KiB
YAML
model_list:
|
|
# General chat — OpenRouter's own auto-router picks the best underlying model per prompt.
|
|
- model_name: auto
|
|
litellm_params:
|
|
model: openrouter/openrouter/auto
|
|
api_key: os.environ/OPENROUTER_API_KEY
|
|
|
|
# Cheap/fast model used by the agent's own chat-vs-code-task classifier, not by users directly.
|
|
- model_name: router-classifier
|
|
litellm_params:
|
|
model: openrouter/openai/gpt-4o-mini
|
|
api_key: os.environ/OPENROUTER_API_KEY
|
|
|
|
# NOT included: an "anthropic-claude" model routing to Anthropic via the caller's
|
|
# forwarded OAuth header (general_settings.forward_client_headers_to_llm_api). It
|
|
# genuinely works — but ONLY when the real `claude` CLI binary is the caller (its
|
|
# request carries a header/fingerprint only that binary sends; a hand-built request,
|
|
# including Hermes selecting this model directly, gets a hard auth error from
|
|
# Anthropic). Having it selectable here caused exactly that confusion once already.
|
|
# The actual working path for "Hermes uses the Claude subscription" is the MCP bridge
|
|
# at claude-agent's /mcp (agent/src/mcpBridge.js) — it shells out to the real `claude`
|
|
# binary server-side instead of trying to make an arbitrary caller impersonate it.
|
|
|
|
litellm_settings:
|
|
# Callers (Hermes included) send provider-specific params like reasoning_effort that
|
|
# not every routed model/provider accepts — drop unsupported ones instead of erroring.
|
|
drop_params: true
|
|
|
|
general_settings:
|
|
master_key: os.environ/LITELLM_MASTER_KEY
|