mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
The A2A protocol specification supports custom extension properties with namespace prefixes (e.g., x-provider-org, x-routing-hints) on AgentCards. However, Pydantic's TypedDict validation strips unknown fields during request parsing, causing these extension fields to be silently dropped. This commit recovers x- prefixed extension fields from the raw request body and merges them back into agent_card_params before storage. The fix applies to the create, update, and patch agent endpoints. Changes: - Add _extract_extension_fields() and _merge_extension_fields() helpers - Modify create_agent, update_agent, patch_agent to accept raw Request and merge extension fields before DB storage - Add 12 tests covering helper functions and endpoint integration Closes #27371 |
||
|---|---|---|
| .. | ||
| auth | ||
| __init__.py | ||
| test_a2a_endpoints.py | ||
| test_agent_header_isolation.py | ||
| test_agent_headers.py | ||
| test_agent_registry.py | ||
| test_endpoints.py | ||
| test_extension_fields.py | ||
| test_model_list_helpers.py | ||