Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

  • Fix schema validation failures for v2 server responses
  • Add normalization before validation in TaskExecutor
  • V2 pricing fields (rate, is_fixed, price_guidance.floor) are now converted to v3 format (fixed_price, floor_price) before schema validation

Problem

When calling get_products against v2 servers (like test-agent.adcontextprotocol.org), schema validation was failing with errors like:

Schema validation: products.0.pricing_options.0: Invalid input

The root cause was that validation ran BEFORE the v2→v3 normalization that happens in SingleAgentClient.normalizeResponseToV3().

Solution

Added normalizeResponseForValidation() method in TaskExecutor that normalizes responses before schema validation. This reuses the existing normalizeGetProductsResponse() utility from pricing-adapter.ts.

Test plan

  • All 38 pricing adapter tests pass
  • All 27 response validator tests pass
  • Build succeeds
  • Manual test against test-agent.adcontextprotocol.org

🤖 Generated with Claude Code

When servers return v2-style pricing options (rate, is_fixed,
price_guidance.floor), schema validation was failing because it
expected v3 fields (fixed_price, floor_price).

This fix adds normalization before validation in TaskExecutor,
ensuring v2 server responses pass validation against v3 schemas.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley force-pushed the bokelley/adcp-v3-upgrade branch from be6210d to f6fe90e Compare January 26, 2026 20:40
@bokelley bokelley merged commit 7365296 into main Jan 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants