mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
test(e2e): pin the a2a bridge agent's Anthropic key so message/send works (#34512)
The a2a completion-bridge tests registered the agent with only
custom_llm_provider and model, so the bridge's litellm.acompletion had no
api_key and relied on the gateway resolving ANTHROPIC_API_KEY from its ambient
env. When that env var is absent, POST /a2a/{id} returns 500 with
"Missing Anthropic API Key" and every message/send test (completion bridge,
pinned v0.3/v1.0 message shapes, semver serves) fails while the
register/discovery/rejection tests still pass.
Give A2ABridgeParams an optional api_key and register the bridge agent with
api_key="os.environ/ANTHROPIC_API_KEY", matching how the rest of the suite
wires anthropic-backed models (e.g. the ratelimit redis tests). The agent now
carries its provider key explicitly instead of depending on ambient gateway env.
This commit is contained in:
parent
5e98e8f196
commit
0d483a7df9
2 changed files with 6 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ class A2ABridgeParams(BaseModel):
|
|||
|
||||
custom_llm_provider: str
|
||||
model: str
|
||||
api_key: str | None = None
|
||||
|
||||
|
||||
class AgentRegisterBody(BaseModel):
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@ from e2e_config import unique_marker
|
|||
from e2e_http import Result, UnknownApiError, unwrap
|
||||
from lifecycle import ResourceManager
|
||||
|
||||
BRIDGE = A2ABridgeParams(custom_llm_provider="anthropic", model="claude-haiku-4-5")
|
||||
BRIDGE = A2ABridgeParams(
|
||||
custom_llm_provider="anthropic",
|
||||
model="claude-haiku-4-5",
|
||||
api_key="os.environ/ANTHROPIC_API_KEY",
|
||||
)
|
||||
|
||||
MOVEHOME_AGENT_CARD_URL = "https://movehome.org/.well-known/agent.json"
|
||||
MOVEHOME_ORIGIN = "https://movehome.org"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue