litellm/tests/test_litellm/proxy/agent_endpoints
rajneeshaggarwal 4550024a3d feat(a2a): support x- prefixed extension fields in agent_card_params
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
2026-05-07 06:46:17 +00:00
..
auth style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
__init__.py [Feat] Agent Gateway - Allow tracking request / response in "Logs" Page (#17449) 2025-12-03 18:57:18 -08:00
test_a2a_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_agent_header_isolation.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_agent_headers.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_agent_registry.py fix(agents): PUT update_agent_in_db clears static_headers and extra_headers when omitted 2026-03-05 16:16:21 +05:30
test_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_extension_fields.py feat(a2a): support x- prefixed extension fields in agent_card_params 2026-05-07 06:46:17 +00:00
test_model_list_helpers.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00