You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Package type proliferation — unclear which type to use in create_media_buy #146
The library exports four types with "Package" in the name, and there's no documentation or naming convention that tells you which one to use where:
Type
What it actually is
PackageRequest
Input to create_media_buy (what the buyer sends)
Package
Output from CreateMediaBuySuccessResponse.packages
MediaBuyPackage
Output from GetMediaBuysResponse (delivery state)
AssignedPackage
Output from CreateMediaBuySuccessResponse (v2 pattern?)
When building create_media_buy, I tried MediaBuyPackage first (name suggests "a package in a media buy"), then AssignedPackage, and finally discovered Package was correct — after two Pydantic validation failures at runtime.
The Confusion
The names don't indicate directionality (input vs output) or lifecycle stage:
Package sounds generic/canonical — but it's specifically the response type for create_media_buy
MediaBuyPackage sounds like "a package within a media buy" — but it's the delivery/reporting variant
AssignedPackage sounds like what you get after assignment — but it's a different response shape
PackageRequest is the only one with a clear name
Suggested Improvements
Option A: Documentation — Add a type map to the README or a docstring on each type explaining where it's used:
classPackage(BaseModel):
"""Package as returned by create_media_buy. For creating media buys, use PackageRequest. For delivery reporting, see MediaBuyPackage. """
Option B: Naming (breaking, but clearer for next major version):
Current
Suggested
PackageRequest
PackageRequest (fine)
Package
PackageConfirmation or CreatedPackage
MediaBuyPackage
PackageDeliveryState or ActivePackage
AssignedPackage
PackageAssignment
Option C: Re-export with aliases — Keep generated names but add semantic aliases:
# In adcp/types/aliases.pyCreateMediaBuyPackage=Package# type used in CreateMediaBuySuccessResponse
Impact
This is the second-biggest friction point after the PricingOption RootModel issue (#145). Every new sales agent implementation will hit this trial-and-error cycle.
Activity
bokelley commentedon Mar 10, 2026
Moved upstream: adcontextprotocol/adcp#1374 — the type names come from the spec schemas, so naming improvements belong there.