diff --git a/mini_swe_runner.py b/mini_swe_runner.py index ffa28f769..6a3871d76 100644 --- a/mini_swe_runner.py +++ b/mini_swe_runner.py @@ -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 diff --git a/run_agent.py b/run_agent.py index 0bd785bab..d66e4099d 100644 --- a/run_agent.py +++ b/run_agent.py @@ -185,9 +185,10 @@ class AIAgent: self.base_url = base_url or OPENROUTER_BASE_URL 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." ) self.tool_progress_callback = tool_progress_callback self.clarify_callback = clarify_callback diff --git a/tests/test_run_agent.py b/tests/test_run_agent.py index ca53d8af5..2d3703933 100644 --- a/tests/test_run_agent.py +++ b/tests/test_run_agent.py @@ -285,7 +285,7 @@ class TestInit: patch("run_agent.check_toolset_requirements", return_value={}), patch("run_agent.OpenAI") as mock_openai, ): - with pytest.raises(ValueError, match="Anthropic /v1/messages is not supported yet"): + with pytest.raises(ValueError, match="not supported yet"): AIAgent( api_key="test-key-1234567890", base_url="https://api.anthropic.com/v1/messages",