BerriAI/litellm · error · AgentCardDiscoveryError
langgraph_platform discovery requires params.assistant_id
Error message
langgraph_platform discovery requires params.assistant_id
What it means
Validation when building A2A discovery paths for LangGraph Platform: params (or params.assistant_id) is missing, but LangGraph serves agent cards per assistant, so the assistant_id query parameter is mandatory.
Source
Thrown at litellm/proxy/a2a/discovery.py:69
def _normalize_base_url(base_url: str) -> str:
return base_url.rstrip("/")
def _build_langgraph_platform_paths(
params: dict[str, Any] | None,
) -> tuple[str, ...]:
"""Build the paths to try for LangGraph Platform discovery.
LangGraph serves the card at ``/.well-known/agent-card.json`` with the
``assistant_id`` carried as a query parameter. We still try the other
A2A path variants (with the same query string appended) so we degrade
gracefully if a deployment uses an older spec name.
"""
assistant_id: Final = (params or {}).get("assistant_id")
if not assistant_id:
raise AgentCardDiscoveryError("langgraph_platform discovery requires params.assistant_id")
query: Final = urlencode({"assistant_id": str(assistant_id)})
return tuple(f"{path}?{query}" for path in AGENT_CARD_WELL_KNOWN_PATHS)
def _paths_for_mode(mode: DiscoveryMode, params: dict[str, Any] | None) -> tuple[str, ...]:
if mode == DiscoveryMode.WELL_KNOWN_FALLBACK:
return AGENT_CARD_WELL_KNOWN_PATHS
if mode == DiscoveryMode.LANGGRAPH_PLATFORM:
return _build_langgraph_platform_paths(params)
raise AgentCardDiscoveryError(f"unsupported discovery_mode: {mode}")
async def fetch_well_known_card(
base_url: str,
*,
discovery_mode: DiscoveryMode = DiscoveryMode.WELL_KNOWN_FALLBACK,
params: dict[str, Any] | None = None,
timeout: float = DEFAULT_DISCOVERY_TIMEOUT_SECONDS,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Include params.assistant_id in the discovery request.
Example fix
params={'assistant_id': 'asst_...'} Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/a2a/discovery.py:69 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/5e688f9e3529323b.
Report an issue: GitHub.