The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
refactor(a2a): return a normalized card copy instead of mutating the resolved card
milande0d8ceb25ea
diff --git a/litellm/a2a_protocol/card_resolver.py b/litellm/a2a_protocol/card_resolver.pyindex 47d6346b9a6..9b3e4ec13b9 100644--- a/litellm/a2a_protocol/card_resolver.py+++ b/litellm/a2a_protocol/card_resolver.py@@ -67,11 +67,13 @@ def normalize_agent_card_protocol_bindings(agent_card: "AgentCard") -> "AgentCarcase-sensitively against its uppercase TransportProtocol constants and failswith "no compatible transports found." for spec-adjacent casings."""- for interface in agent_card.supported_interfaces:+ normalized: Final = type(agent_card)()+ normalized.CopyFrom(agent_card)+ for interface in normalized.supported_interfaces:canonical: str | None = _CANONICAL_PROTOCOL_BINDINGS.get(interface.protocol_binding.lower())- if canonical is not None and canonical != interface.protocol_binding:+ if canonical is not None:interface.protocol_binding = canonical- return agent_card+ return normalizeddef get_agent_card_url(agent_card: "AgentCard") -> str | None: