mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(agent): fail fast on Anthropic native base URLs
This commit is contained in:
parent
de0829cec3
commit
0c0a2eb0a2
3 changed files with 30 additions and 0 deletions
|
|
@ -199,6 +199,13 @@ class MiniSWERunner:
|
|||
client_kwargs["base_url"] = base_url
|
||||
else:
|
||||
client_kwargs["base_url"] = "https://openrouter.ai/api/v1"
|
||||
|
||||
if base_url and "api.anthropic.com" in base_url.strip().lower():
|
||||
raise ValueError(
|
||||
"Anthropic /v1/messages is not supported yet. "
|
||||
"Hermes uses OpenAI-compatible /chat/completions. "
|
||||
"Use OpenRouter or leave base_url unset."
|
||||
)
|
||||
|
||||
# Handle API key - OpenRouter is the primary provider
|
||||
if api_key:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue