Skip to content

Python SDK (adcp 3.10.0) schema drift: MediaBuyStatus, AggregatedTotals, UpdateMediaBuySuccess out of sync with v3 schemas #288

@tescoboy

Description

@tescoboy

Summary

The adcp Python library (3.10.0) is auto-generated from a stale snapshot and is out of sync with the AdCP v3 JSON schemas at /schemas/3.0.1/. Extending SDK types via inheritance (per CLAUDE.md Pattern #1) does not guarantee spec compliance — implementations have to audit the live schemas separately and apply field-level overrides where the SDK lags.

This issue documents concrete drift discovered during a compliance pass, verified against the live schemas. Cross-posting from a downstream implementation repo.


Evidence

SDK version: adcp 3.10.0
Schema source: https://adcontextprotocol.org/schemas/v3/ ($id declares 3.0.1)

1. MediaBuyStatus: pending_activationpending_start + missing pending_creatives

SDK emits pending_activation. Live schema (enums/media-buy-status.json):

"enum": ["pending_creatives", "pending_start", "active", "paused", "completed", "rejected", "canceled"]

pending_activation does not appear. pending_creatives (required when creatives are unapproved) is absent from the SDK entirely.

Workaround: Override MediaBuyDeliveryData.status as a Literal of spec values; translate internal pending_activation → pending_start at emission time. Add pending_creatives as an override.

Note: the delivery-item response also allows pending, failed, and reporting_delayed — these are delivery-level statuses distinct from the top-level media-buy-status.json enum and may need separate handling.


2. AggregatedTotals.video_completionscompleted_views

SDK field: video_completions
Live schema (get-media-buy-delivery-response.json → aggregated_totals):

"completed_views": { "description": "Total audio/video completions across all media buys" }

No video_completions key exists in the schema. The rename happened upstream; SDK still has the old name.

Workaround: Subclass overrides model_dump to rename video_completions → completed_views on serialization.


3. AggregatedTotals missing spec fields

Live schema lists these on aggregated_totals:

Field In SDK?
impressions
spend
clicks
completed_views ✗ (SDK has video_completions)
views
conversions
conversion_value
roas
new_to_brand_rate

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions