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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user