-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Problem
When calling tools via A2A protocol, responses that include a message field fail Pydantic validation because the response models use extra='forbid'.
Reproduction
uvx adcp https://adcp-test-agent.fly.dev get_products '{"brief": "test campaign"}' --protocol a2a --auth "ci-test-token" --jsonError
Failed to parse response: Response doesn't match expected schema GetProductsResponse: 1 validation error for GetProductsResponse
message
Extra inputs are not permitted [type=extra_forbidden, input_value='No products matched your requirements.', input_type=str]
Comparison with TypeScript Client
The TypeScript client (@adcp/client) handles this gracefully - it extracts the message field separately and displays it as "Protocol Message":
npx @adcp/client https://adcp-test-agent.fly.dev get_products '{"brief": "test campaign"}' --protocol a2a --auth "ci-test-token"
# ✅ SUCCESS
# Protocol Message: No products matched your requirements.
# Response: { "products": [] }Suggested Fix
Either:
- Change response models to use
extra='ignore'instead ofextra='forbid' - Or extract known protocol-level fields (like
message) before validation
Environment
- adcp Python SDK: v2.16.0
- Target AdCP Spec: 2.5.0
Metadata
Metadata
Assignees
Labels
No labels