simplify(compat): anthropic_adapter — drop 30 re-exports + 1 alias, repoint 22 caller files (32 sites), 38 test files (~125 sites)

This commit is contained in:
Teknium
2026-09-03 13:16:47 -07:00
parent 2031c819fe
commit d179f28307
60 changed files with 176 additions and 231 deletions
@@ -156,14 +156,14 @@ class TestCommandCodeAnthropicBearerAuth:
"""
def test_requires_bearer_auth_recognizes_commandcode(self):
from agent.anthropic_adapter import _requires_bearer_auth
from agent.anthropic_endpoints import _requires_bearer_auth
assert _requires_bearer_auth("https://api.commandcode.ai/provider/v1") is True
assert _requires_bearer_auth("https://api.commandcode.ai/provider/v1/models") is True
assert _requires_bearer_auth("https://api.commandcode.ai/anthropic") is True
def test_bearer_auth_does_not_affect_unrelated(self):
from agent.anthropic_adapter import _requires_bearer_auth
from agent.anthropic_endpoints import _requires_bearer_auth
# Native Anthropic still uses x-api-key
assert _requires_bearer_auth("https://api.anthropic.com") is False
@@ -171,7 +171,7 @@ class TestCommandCodeAnthropicBearerAuth:
assert _requires_bearer_auth("https://openrouter.ai/api/v1") is False
def test_bearer_auth_case_insensitive(self):
from agent.anthropic_adapter import _requires_bearer_auth
from agent.anthropic_endpoints import _requires_bearer_auth
assert _requires_bearer_auth("https://API.COMMANDCODE.AI/provider/v1") is True