diff --git a/litellm/proxy/a2a/discovery.py b/litellm/proxy/a2a/discovery.py index a28e980818d..c7ac8dc0bee 100644 --- a/litellm/proxy/a2a/discovery.py +++ b/litellm/proxy/a2a/discovery.py @@ -119,7 +119,12 @@ async def fetch_well_known_card( # redirect hop. Even though the discovery endpoint is admin-only, # we don't want a compromised admin key to be able to probe # internal infrastructure through this fetcher. - response = await async_safe_get(client, url, headers=headers) + # Pass ``headers or {}`` because ``async_safe_get`` (in the + # URL-validation path) uses ``kwargs.pop("headers", {})`` which + # returns ``None`` when the key is present-but-None, then crashes + # on ``{**None, "Host": ...}``. Default the kwarg to an empty + # dict so production (``user_url_validation=True``) doesn't 500. + response = await async_safe_get(client, url, headers=headers or {}) except SSRFError as exc: last_error = f"{url}: {exc!s}" verbose_proxy_logger.debug( diff --git a/litellm/proxy/agent_endpoints/endpoints.py b/litellm/proxy/agent_endpoints/endpoints.py index 991836bc903..082e314b08d 100644 --- a/litellm/proxy/agent_endpoints/endpoints.py +++ b/litellm/proxy/agent_endpoints/endpoints.py @@ -52,11 +52,16 @@ def _build_merged_agent_card( ) -> Dict[str, Any]: """Apply the LiteLLM-fronting merge to ``upstream_card`` for ``agent_id``.""" proxy_base = _proxy_base_url(http_request) + # Prefer a card-supplied ``name`` (the discovery UI exposes an editable + # "Name (shown to API clients)" field that flows into + # ``agent_card_params.name``) over the internal ``agent_name`` identifier. + # Fall back to ``agent_name`` only when the card itself has no name. + card_name = upstream_card.get("name") if upstream_card else None return merge_agent_card( upstream_card, proxy_url=f"{proxy_base}/a2a/{agent_id}", proxy_base_url=proxy_base, - name=agent_name, + name=card_name or agent_name, ) diff --git a/ui/litellm-dashboard/src/components/agents/agent_info.tsx b/ui/litellm-dashboard/src/components/agents/agent_info.tsx index 586a341737f..1e4280d3613 100644 --- a/ui/litellm-dashboard/src/components/agents/agent_info.tsx +++ b/ui/litellm-dashboard/src/components/agents/agent_info.tsx @@ -131,6 +131,7 @@ const AgentInfoView: React.FC = ({ const fieldsToSet: Record = { name: selected_card.name, description: selected_card.description, + url: selection.upstream_url, streaming: Boolean(selected_card.capabilities?.streaming), skills, iconUrl: selected_card.iconUrl,