fix(agent): update error message for unsupported Anthropic API endpoints to clarify usage of OpenRouter

This commit is contained in:
teknium1
2026-02-27 23:23:31 -08:00
parent 2bc9508b7c
commit 50cb4d5fc7
3 changed files with 9 additions and 7 deletions

View File

@@ -202,9 +202,10 @@ class MiniSWERunner:
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."
"Anthropic's native /v1/messages API is not supported yet (planned for a future release). "
"Hermes currently requires OpenAI-compatible /chat/completions endpoints. "
"To use Claude models now, route through OpenRouter (OPENROUTER_API_KEY) "
"or any OpenAI-compatible proxy that wraps the Anthropic API."
)
# Handle API key - OpenRouter is the primary provider