Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
Python
Allow unauthenticated root probes
Alishahryar1f9fc61456357
diff --git a/api/routes.py b/api/routes.pyindex d56625da..63455de1 100644--- a/api/routes.py+++ b/api/routes.py@@ -207,8 +207,8 @@ async def root(@router.api_route("/", methods=["HEAD", "OPTIONS"])-async def probe_root(_auth=Depends(require_api_key)):- """Respond to compatibility probes for the root endpoint."""+async def probe_root():+ """Respond to unauthenticated local compatibility probes for the root endpoint."""return _probe_response("GET, HEAD, OPTIONS")diff --git a/tests/api/test_auth.py b/tests/api/test_auth.pyindex 99230a32..57ba066a 100644--- a/tests/api/test_auth.py+++ b/tests/api/test_auth.py@@ -73,3 +73,23 @@ def test_anthropic_auth_token_applies_to_models_endpoint():assert "data" in r.json()app.dependency_overrides.clear()+++def test_root_get_requires_auth_but_root_probes_are_public():+ client = TestClient(app)+ settings = Settings()+ settings.anthropic_auth_token = "root-token"+ app.dependency_overrides[get_settings] = lambda: settings++ response = client.get("/")+ assert response.status_code == 401++ head = client.head("/")+ assert head.status_code == 204+ assert head.headers["Allow"] == "GET, HEAD, OPTIONS"++ options = client.options("/")+ assert options.status_code == 204+ assert options.headers["Allow"] == "GET, HEAD, OPTIONS"++ app.dependency_overrides.clear()