Module adcp.types.domains.sponsored_intelligence

Types the AdCP sponsored_intelligence schemas declare.

Importing from the domain says which variant you mean, where the flat adcp.types namespace can only bind one class per name:

from adcp.types.domains.sponsored_intelligence import <Type>

A type this domain declares in more than one schema is not here: import it from its own schema's module, adcp.types.domains.sponsored_intelligence.<schema>. Nothing here is renamed.

Auto-generated from the generated domain tree. DO NOT EDIT MANUALLY. Generation date: 2026-10-04 18:45:11 UTC

Sub-modules

adcp.types.domains.sponsored_intelligence.si_capabilities
adcp.types.domains.sponsored_intelligence.si_context_use
adcp.types.domains.sponsored_intelligence.si_get_offering_request
adcp.types.domains.sponsored_intelligence.si_get_offering_response
adcp.types.domains.sponsored_intelligence.si_identity
adcp.types.domains.sponsored_intelligence.si_initiate_session_request
adcp.types.domains.sponsored_intelligence.si_initiate_session_response
adcp.types.domains.sponsored_intelligence.si_send_message_request
adcp.types.domains.sponsored_intelligence.si_send_message_response
adcp.types.domains.sponsored_intelligence.si_sponsored_context
adcp.types.domains.sponsored_intelligence.si_sponsored_context_receipt
adcp.types.domains.sponsored_intelligence.si_terminate_session_request
adcp.types.domains.sponsored_intelligence.si_terminate_session_response
adcp.types.domains.sponsored_intelligence.si_ui_element

Classes

class A2ui (**data: Any)
Expand source code
class A2ui(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    supported: Annotated[
        StrictBool | None, Field(description='Supports A2UI surface rendering')
    ] = False
    catalogs: Annotated[
        list[str] | None,
        Field(description="Supported A2UI component catalogs (e.g., 'si-standard', 'standard')"),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var catalogs : list[str] | None
var model_config
var supported : bool | None

Inherited members

class Account (**data: Any)
Expand source code
class Account(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    account_id: Annotated[
        str, Field(description='Seller-assigned account identifier for the paying principal.')
    ]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var account_id : str
var model_config

Inherited members

class AcpHandoff (**data: Any)
Expand source code
class AcpHandoff(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    checkout_url: Annotated[
        AnyUrl | None,
        Field(
            description="Brand's ACP checkout endpoint. Hosts MUST validate this is HTTPS before opening."
        ),
    ] = None
    checkout_token: Annotated[
        str | None,
        Field(
            description='Opaque token for the checkout flow. The host passes this to the checkout endpoint to correlate the SI session with the transaction.'
        ),
    ] = None
    payload: Annotated[
        dict[str, Any] | None,
        Field(
            description='Rich checkout context to pass to the ACP endpoint (product details, applied offers, pricing). Alternative to checkout_token for integrations that need structured data.'
        ),
    ] = None
    expires_at: Annotated[
        AwareDatetime | None,
        Field(
            description='When this handoff data expires. Hosts should initiate checkout before this time.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var checkout_token : str | None
var checkout_url : pydantic.networks.AnyUrl | None
var expires_at : pydantic.types.AwareDatetime | None
var model_config
var payload : dict[str, typing.Any] | None

Inherited members

class ActionResponse (**data: Any)
Expand source code
class ActionResponse(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    action: Annotated[str | None, Field(description='The action that was triggered')] = None
    payload: Annotated[
        dict[str, Any] | None, Field(description='Action-specific response data')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var action : str | None
var model_config
var payload : dict[str, typing.Any] | None

Inherited members

class Avatar (**data: Any)
Expand source code
class Avatar(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    provider: Annotated[
        str | None, Field(description='Avatar provider (d-id, heygen, synthesia, etc.)')
    ] = None
    avatar_id: Annotated[str | None, Field(description='Brand avatar identifier')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var avatar_id : str | None
var model_config
var provider : str | None

Inherited members

class Commerce (**data: Any)
Expand source code
class Commerce(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    acp_checkout: Annotated[
        StrictBool | None,
        Field(description='Supports ACP (Agentic Commerce Protocol) checkout handoff'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var acp_checkout : bool | None
var model_config

Inherited members

class Components (**data: Any)
Expand source code
class Components(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    standard: Annotated[
        list[StandardEnum] | None,
        Field(description='Standard components that all SI hosts must render'),
    ] = None
    extensions: Annotated[
        dict[str, Any] | None,
        Field(description='Platform-specific extensions (chatgpt_apps_sdk, maps, forms, etc.)'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var extensions : dict[str, typing.Any] | None
var model_config
var standard : list[StandardEnum] | None

Inherited members

class ConsentScopeEnum (*args, **kwds)
Expand source code
class ConsentScopeEnum(StrEnum):
    name = 'name'
    email = 'email'
    shipping_address = 'shipping_address'
    phone = 'phone'
    locale = 'locale'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var email
var locale
var name
var phone
var shipping_address
class ContextForCheckout (**data: Any)
Expand source code
class ContextForCheckout(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    conversation_summary: Annotated[
        str | None, Field(description='Summary of the conversation leading to purchase')
    ] = None
    applied_offers: Annotated[
        list[str] | None, Field(description='Offer IDs that were applied during the conversation')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var applied_offers : list[str] | None
var conversation_summary : str | None
var model_config

Inherited members

class DeclaredBy (**data: Any)
Expand source code
class DeclaredBy(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    agent_url: Annotated[
        AnyUrl | None, Field(description='HTTPS URL of the declaring agent or service.')
    ] = None
    role: Annotated[Role, Field(description='Role of the declaring party.')]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var agent_url : pydantic.networks.AnyUrl | None
var model_config
var role : Role

Inherited members

class DisclosureCommitment (**data: Any)
Expand source code
class DisclosureCommitment(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    status: Annotated[
        Status46,
        Field(
            description="Host commitment status for the disclosure obligation. Use accepted when the declaration requires disclosure and the host will satisfy it; use not_required only when the declaration's disclosure_obligation.required is false. A host that will not satisfy a required disclosure rejects the sponsored context."
        ),
    ]
    label_text: Annotated[
        str | None,
        Field(
            description='Disclosure label text the host committed to render, if different from or copied from the declaration.'
        ),
    ] = None
    notes: Annotated[
        str | None, Field(description='Optional host explanation for the disclosure commitment.')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var label_text : str | None
var model_config
var notes : str | None
var status : Status46

Inherited members

class DisclosureObligation (**data: Any)
Expand source code
class DisclosureObligation(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    required: Annotated[
        StrictBool,
        Field(
            description='Whether the declaring party requires disclosure for this sponsored context.'
        ),
    ]
    label_text: Annotated[
        str | None,
        Field(
            description='Disclosure label text the host should render when disclosure is required.'
        ),
    ] = None
    timing: Annotated[
        Timing | None,
        Field(
            description="When the disclosure must be presented relative to the sponsored context's influence."
        ),
    ] = None
    proximity: Annotated[
        Proximity | None,
        Field(description='Where the disclosure should appear relative to the affected output.'),
    ] = None
    jurisdictions: Annotated[
        list[Jurisdiction] | None,
        Field(
            description='Jurisdictions where this declared disclosure obligation applies.',
            min_length=1,
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var jurisdictions : list[Jurisdiction] | None
var label_text : str | None
var model_config
var proximity : Proximity | None
var required : bool
var timing : Timing | None

Inherited members

class FollowUp (**data: Any)
Expand source code
class FollowUp(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    action: Action | None = None
    data: Annotated[dict[str, Any] | None, Field(description='Data for follow-up action')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var action : Action | None
var data : dict[str, typing.Any] | None
var model_config

Inherited members

class Handoff (**data: Any)
Expand source code
class Handoff(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    type: Annotated[
        Type | None,
        Field(
            description='Type of handoff: transaction (ready for ACP checkout) or complete (conversation done)'
        ),
    ] = None
    intent: Annotated[
        Intent | None,
        Field(description='For transaction handoffs: what the user wants to purchase'),
    ] = None
    context_for_checkout: Annotated[
        ContextForCheckout | None, Field(description='Context to pass to ACP for seamless checkout')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_for_checkout : ContextForCheckout | None
var intent : Intent | None
var model_config
var type : Type | None

Inherited members

class HostReceipt (**data: Any)
Expand source code
class HostReceipt(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    status: Annotated[
        Status,
        Field(description='Whether the host accepted the declared sponsored context for use.'),
    ]
    accepted_context_use: Annotated[
        si_context_use.SiContextUse | None,
        Field(
            description="Use mode the host accepted. When host_receipt.status is accepted, this MUST match the declaration's context_use; a host that cannot honor the declared use mode rejects the sponsored context instead of down-scoping it."
        ),
    ] = None
    received_at: Annotated[
        AwareDatetime, Field(description='When the host received the sponsored context.')
    ]
    host_surface: Annotated[
        str | None,
        Field(
            description='Host-defined surface or placement where the context was accepted, such as an assistant session, search result page, or comparison module.'
        ),
    ] = None
    disclosure_commitment: Annotated[
        DisclosureCommitment | None,
        Field(
            description='How the host committed to handle the declared disclosure obligation. Required when host_receipt.status is accepted.'
        ),
    ] = None
    rejection_reason: Annotated[
        str | None,
        Field(
            description='Optional explanation when status is rejected, for example unsupported context_use or inability to satisfy the disclosure obligation.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var accepted_context_use : SiContextUse | None
var disclosure_commitment : DisclosureCommitment | None
var host_surface : str | None
var model_config
var received_at : pydantic.types.AwareDatetime
var rejection_reason : str | None
var status : Status

Inherited members

class Intent (**data: Any)
Expand source code
class Intent(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    action: Annotated[str | None, Field(description="The commerce action (e.g., 'purchase')")] = (
        None
    )
    product: Annotated[dict[str, Any] | None, Field(description='Product details for checkout')] = (
        None
    )
    price: Annotated[Price | None, Field(description='Price information')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var action : str | None
var model_config
var price : Price | None
var product : dict[str, typing.Any] | None

Inherited members

class Jurisdiction (**data: Any)
Expand source code
class Jurisdiction(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    country: Annotated[str, Field(description='ISO 3166-1 alpha-2 country code.')]
    region: Annotated[str | None, Field(description='Optional sub-national region code.')] = None
    regulation: Annotated[str, Field(description='Regulation or policy identifier.')]

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var country : str
var model_config
var region : str | None
var regulation : str

Inherited members

class MatchingProduct (**data: Any)
Expand source code
class MatchingProduct(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    product_id: Annotated[str, Field(description='Product identifier')]
    name: Annotated[str, Field(description='Product name')]
    price: Annotated[str | None, Field(description="Display price (e.g., '$129', '$89.99')")] = None
    original_price: Annotated[str | None, Field(description='Original price if on sale')] = None
    image_url: Annotated[AnyUrl | None, Field(description='Product image')] = None
    availability_summary: Annotated[
        str | None,
        Field(
            description="Brief availability info (e.g., 'In stock', 'Size 14 available', '3 left')"
        ),
    ] = None
    availability_status: Annotated[
        offering_availability_status.OfferingAvailabilityStatus | None,
        Field(
            description='Machine-readable availability state for this product. Structured counterpart to availability_summary.'
        ),
    ] = None
    url: Annotated[AnyUrl | None, Field(description='Product detail page URL')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var availability_status : OfferingAvailabilityStatus | None
var availability_summary : str | None
var image_url : pydantic.networks.AnyUrl | None
var model_config
var name : str
var original_price : str | None
var price : str | None
var product_id : str
var url : pydantic.networks.AnyUrl | None

Inherited members

class Modalities (**data: Any)
Expand source code
class Modalities(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    conversational: Annotated[
        StrictBool | None, Field(description='Pure text exchange - the baseline modality')
    ] = True
    voice: Annotated[
        StrictBool | Voice | None, Field(description='Audio-based interaction using brand voice')
    ] = None
    video: Annotated[
        StrictBool | Video | None, Field(description='Brand video content playback')
    ] = None
    avatar: Annotated[
        StrictBool | Avatar | None, Field(description='Animated video presence with brand avatar')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var avatar : bool | Avatar | None
var conversational : bool | None
var model_config
var video : bool | Video | None
var voice : bool | Voice | None

Inherited members

class Offering (**data: Any)
Expand source code
class Offering(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    offering_id: Annotated[str | None, Field(description='Offering identifier')] = None
    title: Annotated[str | None, Field(description='Offering title')] = None
    summary: Annotated[str | None, Field(description='Brief summary of the offering')] = None
    tagline: Annotated[str | None, Field(description='Short promotional tagline')] = None
    expires_at: Annotated[AwareDatetime | None, Field(description='When this offering expires')] = (
        None
    )
    availability_status: Annotated[
        offering_availability_status.OfferingAvailabilityStatus | None,
        Field(
            description="Machine-readable availability state for the offering. Optional; when omitted, derive availability from the top-level 'available' boolean and 'unavailable_reason'."
        ),
    ] = None
    price_hint: Annotated[
        str | None, Field(description="Price indication (e.g., 'from $199', '50% off')")
    ] = None
    image_url: Annotated[AnyUrl | None, Field(description='Hero image for the offering')] = None
    landing_url: Annotated[AnyUrl | None, Field(description='Landing page URL')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var availability_status : OfferingAvailabilityStatus | None
var expires_at : pydantic.types.AwareDatetime | None
var image_url : pydantic.networks.AnyUrl | None
var landing_url : pydantic.networks.AnyUrl | None
var model_config
var offering_id : str | None
var price_hint : str | None
var summary : str | None
var tagline : str | None
var title : str | None

Inherited members

class PayingPrincipal (**data: Any)
Expand source code
class PayingPrincipal(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    brand: Annotated[
        brand_ref.BrandReference,
        Field(description='Brand economically accountable for the sponsored context.'),
    ]
    account: Annotated[
        Account | None,
        Field(
            description='Optional seller-assigned account context for the paying principal. This intentionally carries only an account_id so the canonical economic principal remains paying_principal.brand.'
        ),
    ] = None
    operator: Annotated[
        str | None,
        Field(
            description='Domain of the operator acting for the paying principal, when different from the brand domain.',
            pattern='^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$',
        ),
    ] = None
    display_name: Annotated[
        str | None,
        Field(
            description='Human-readable label for disclosure rendering. The canonical identity remains the brand/account reference.'
        ),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var account : Account | None
var brand : BrandReference
var display_name : str | None
var model_config
var operator : str | None

Inherited members

class Price (**data: Any)
Expand source code
class Price(AdCPBaseModel):
    amount: StrictFloat | None = None
    currency: str | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var amount : float | None
var currency : str | None
var model_config

Inherited members

class PrivacyPolicyAcknowledged (**data: Any)
Expand source code
class PrivacyPolicyAcknowledged(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    brand_policy_url: Annotated[
        AnyUrl | None, Field(description="URL to brand's privacy policy")
    ] = None
    brand_policy_version: Annotated[
        str | None, Field(description='Version of policy acknowledged')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var brand_policy_url : pydantic.networks.AnyUrl | None
var brand_policy_version : str | None
var model_config

Inherited members

class Proximity (*args, **kwds)
Expand source code
class Proximity(StrEnum):
    session_level = 'session_level'
    near_rendered_unit = 'near_rendered_unit'
    near_influenced_output = 'near_influenced_output'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var near_influenced_output
var near_rendered_unit
var session_level
class Reason (*args, **kwds)
Expand source code
class Reason(StrEnum):
    handoff_transaction = 'handoff_transaction'
    handoff_complete = 'handoff_complete'
    user_exit = 'user_exit'
    session_timeout = 'session_timeout'
    host_terminated = 'host_terminated'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var handoff_complete
var handoff_transaction
var host_terminated
var session_timeout
var user_exit
class Role (*args, **kwds)
Expand source code
class Role(StrEnum):
    brand_agent = 'brand_agent'
    seller = 'seller'
    network = 'network'
    platform = 'platform'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var brand_agent
var network
var platform
var seller
class ShippingAddress (**data: Any)
Expand source code
class ShippingAddress(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    street: str | None = None
    city: str | None = None
    state: str | None = None
    postal_code: str | None = None
    country: str | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var city : str | None
var country : str | None
var model_config
var postal_code : str | None
var state : str | None
var street : str | None

Inherited members

class SiCapabilities (**data: Any)
Expand source code
class SiCapabilities(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    modalities: Annotated[
        Modalities | None, Field(description='Interaction modalities supported')
    ] = None
    components: Annotated[Components | None, Field(description='Visual components supported')] = (
        None
    )
    commerce: Annotated[Commerce | None, Field(description='Commerce capabilities')] = None
    a2ui: Annotated[A2ui | None, Field(description='A2UI (Agent-to-UI) capabilities')] = None
    mcp_apps: Annotated[
        StrictBool | None,
        Field(description='Supports MCP Apps for rendering A2UI surfaces in iframes'),
    ] = False

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var a2ui : A2ui | None
var commerce : Commerce | None
var components : Components | None
var mcp_apps : bool | None
var modalities : Modalities | None
var model_config

Inherited members

class SiContextUse (*args, **kwds)
Expand source code
class SiContextUse(StrEnum):
    presentation_only = 'presentation_only'
    comparison_set = 'comparison_set'
    reasoning_context = 'reasoning_context'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var comparison_set
var presentation_only
var reasoning_context
class SiGetOfferingRequest (**data: Any)
Expand source code
class SiGetOfferingRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    offering_id: Annotated[
        str, Field(description='Offering identifier from the catalog to get details for')
    ]
    intent: Annotated[
        str | None,
        Field(
            description="Optional natural language description of user intent for personalized results (e.g., 'mens size 14 near Cincinnati'). Must be anonymous - no PII."
        ),
    ] = None
    context: context_1.ContextObject | None = None
    include_products: Annotated[
        StrictBool | None, Field(description='Whether to include matching products in the response')
    ] = False
    product_limit: Annotated[
        SchemaInt | None,
        Field(description='Maximum number of matching products to return', ge=1, le=50),
    ] = 5
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : ContextObject | None
var ext : ExtensionObject | None
var include_products : bool | None
var intent : str | None
var model_config
var offering_id : str
var product_limit : int | None

Inherited members

class SiGetOfferingResponse (**data: Any)
Expand source code
class SiGetOfferingResponse(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    available: Annotated[
        StrictBool, Field(description='Whether the offering is currently available')
    ]
    offering_token: Annotated[
        str | None,
        Field(
            description="Token to pass to si_initiate_session for session continuity. Brand stores the full query context server-side (products shown, order, context) so they can resolve references like 'the second one' when the session starts."
        ),
    ] = None
    ttl_seconds: Annotated[
        SchemaInt | None,
        Field(
            description='How long this offering information is valid (seconds). Host should re-fetch after TTL expires.',
            ge=0,
        ),
    ] = None
    checked_at: Annotated[
        AwareDatetime | None, Field(description='When this offering information was retrieved')
    ] = None
    offering: Annotated[Offering | None, Field(description='Offering details')] = None
    matching_products: Annotated[
        list[MatchingProduct] | None,
        Field(
            description='Products matching the request context. Only included if include_products was true.'
        ),
    ] = None
    sponsored_context: Annotated[
        si_sponsored_context.SiSponsoredContext | None,
        Field(
            description='Declaration for the sponsored context carried by this offering response. When present, it applies to the returned offering and matching_products package as a whole unless a future extension narrows the declaration to individual items. Hosts MUST either honor the declared context_use and disclosure_obligation or reject the context before using it.'
        ),
    ] = None
    total_matching: Annotated[
        SchemaInt | None,
        Field(
            description='Total number of products matching the context (may be more than returned in matching_products)',
            ge=0,
        ),
    ] = None
    unavailable_reason: Annotated[
        str | None,
        Field(
            description="If not available, why (e.g., 'expired', 'sold_out', 'region_restricted')"
        ),
    ] = None
    alternative_offering_ids: Annotated[
        list[str] | None,
        Field(description='Alternative offerings to consider if this one is unavailable'),
    ] = None
    errors: Annotated[
        list[error.Error] | None, Field(description='Errors during offering lookup')
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var alternative_offering_ids : list[str] | None
var available : bool
var checked_at : pydantic.types.AwareDatetime | None
var context : ContextObject | None
var errors : list[Error] | None
var ext : ExtensionObject | None
var matching_products : list[MatchingProduct] | None
var model_config
var offering : Offering | None
var offering_token : str | None
var sponsored_context : SiSponsoredContext | None
var total_matching : int | None
var ttl_seconds : int | None
var unavailable_reason : str | None

Inherited members

class SiIdentity (**data: Any)
Expand source code
class SiIdentity(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    consent_granted: Annotated[
        StrictBool, Field(description='Whether user consented to share identity')
    ]
    consent_timestamp: Annotated[
        AwareDatetime | None, Field(description='When consent was granted (ISO 8601)')
    ] = None
    consent_scope: Annotated[
        list[ConsentScopeEnum] | None, Field(description='What data was consented to share')
    ] = None
    privacy_policy_acknowledged: Annotated[
        PrivacyPolicyAcknowledged | None, Field(description='Brand privacy policy acknowledgment')
    ] = None
    user: Annotated[
        User | None, Field(description='User data (only present if consent_granted is true)')
    ] = None
    anonymous_session_id: Annotated[
        str | None,
        Field(description='Session ID for anonymous users (when consent_granted is false)'),
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var anonymous_session_id : str | None
var consent_granted : bool
var consent_scope : list[ConsentScopeEnum] | None
var consent_timestamp : pydantic.types.AwareDatetime | None
var model_config
var privacy_policy_acknowledged : PrivacyPolicyAcknowledged | None
var user : User | None

Inherited members

class SiInitiateSessionRequest (**data: Any)
Expand source code
class SiInitiateSessionRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    intent: Annotated[
        str,
        Field(
            description='Natural language description of user intent — the conversation handoff from the host describing what the user needs from the brand agent'
        ),
    ]
    context: context_1.ContextObject | None = None
    identity: si_identity.SiIdentity
    media_buy_id: Annotated[
        str | None, Field(description='AdCP media buy ID if session was triggered by advertising')
    ] = None
    placement: Annotated[
        str | None,
        Field(
            description="Where this session was triggered (e.g., 'chatgpt_search', 'claude_chat')"
        ),
    ] = None
    offering_id: Annotated[
        str | None, Field(description='Brand-specific offering identifier to apply')
    ] = None
    supported_capabilities: Annotated[
        si_capabilities.SiCapabilities | None,
        Field(description='What capabilities the host supports'),
    ] = None
    offering_token: Annotated[
        str | None,
        Field(
            description="Token from si_get_offering response for session continuity. Brand uses this to recall what products were shown to the user, enabling natural references like 'the second one' or 'that blue shoe'."
        ),
    ] = None
    sponsored_context_receipt: Annotated[
        si_sponsored_context_receipt.SiSponsoredContextReceipt | None,
        Field(
            description='Host receipt for sponsored context accepted from a prior si_get_offering response or other pre-session context package. This records the accepted context_use, disclosure commitment, paying_principal, and host receipt for audit.'
        ),
    ] = None
    idempotency_key: Annotated[
        str,
        Field(
            description='Client-generated unique key for this request. Prevents duplicate session creation on retries. MUST be unique per (seller, request) pair to prevent cross-seller correlation. Use a fresh UUID v4 for each request.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : ContextObject | None
var ext : ExtensionObject | None
var idempotency_key : str
var identity : SiIdentity
var intent : str
var media_buy_id : str | None
var model_config
var offering_id : str | None
var offering_token : str | None
var placement : str | None
var sponsored_context_receipt : SiSponsoredContextReceipt | None
var supported_capabilities : SiCapabilities | None

Inherited members

class SiInitiateSessionResponse (**data: Any)
Expand source code
class SiInitiateSessionResponse(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    session_id: Annotated[
        str, Field(description='Unique session identifier for subsequent messages')
    ]
    response: Annotated[Response | None, Field(description="Brand agent's initial response")] = None
    negotiated_capabilities: Annotated[
        si_capabilities.SiCapabilities | None,
        Field(description='Intersection of brand and host capabilities for this session'),
    ] = None
    sponsored_context: Annotated[
        si_sponsored_context.SiSponsoredContext | None,
        Field(
            description='Declaration for sponsored context carried by the initial brand-agent response. Hosts MUST either honor the declared context_use and disclosure_obligation or reject the context before presenting, comparing, or otherwise using it.'
        ),
    ] = None
    session_status: Annotated[
        si_session_status.SiSessionStatus,
        Field(
            description='Current session lifecycle state. Returned in initiation, message, and termination responses.'
        ),
    ]
    session_ttl_seconds: Annotated[
        SchemaInt | None,
        Field(
            description='Session inactivity timeout in seconds. After this duration without a message, the brand agent may terminate the session. Hosts SHOULD warn users before timeout when possible.',
            ge=1,
        ),
    ] = None
    errors: Annotated[
        list[error.Error] | None, Field(description='Errors during session initiation')
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : ContextObject | None
var errors : list[Error] | None
var ext : ExtensionObject | None
var model_config
var negotiated_capabilities : SiCapabilities | None
var response : Response | None
var session_id : str
var session_status : SiSessionStatus
var session_ttl_seconds : int | None
var sponsored_context : SiSponsoredContext | None

Inherited members

class SiSendMessageRequest (**data: Any)
Expand source code
class SiSendMessageRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    idempotency_key: Annotated[
        str,
        Field(
            description='Client-generated unique key for at-most-once execution. Each conversational turn is a distinct mutation of session transcript — without this key, a timeout-and-retry produces a duplicate turn and a duplicate model response. MUST be unique per (seller, request) pair. Use a fresh UUID v4 for each user turn.',
            max_length=255,
            min_length=16,
            pattern='^[A-Za-z0-9_.:-]{16,255}$',
        ),
    ]
    session_id: Annotated[str, Field(description='Active session identifier')]
    message: Annotated[str | None, Field(description="User's message to the brand agent")] = None
    action_response: Annotated[
        ActionResponse | None,
        Field(description='Response to a previous action_button (e.g., user clicked checkout)'),
    ] = None
    sponsored_context_receipt: Annotated[
        si_sponsored_context_receipt.SiSponsoredContextReceipt | None,
        Field(
            description="Host receipt for sponsored context accepted from a prior SI response in this session. This gives the brand/seller an audit-visible record of the host's accepted use mode and disclosure commitment for that context."
        ),
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

    @model_validator(mode='after')
    def _require_schema_required_group(self) -> SiSendMessageRequest:
        # ``required`` asks whether the caller supplied the field, which is what
        # model_fields_set answers. An explicit null is a supplied value — on a
        # mutation input it is the command to clear — and a default the caller
        # never sent is not.
        for group in (('message',), ('action_response',),):
            if all(name in self.model_fields_set for name in group):
                return self
        raise ValueError(
            'SiSendMessageRequest requires at least one of these field groups: message | action_response'
        )

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var action_response : ActionResponse | None
var context : ContextObject | None
var ext : ExtensionObject | None
var idempotency_key : str
var message : str | None
var model_config
var session_id : str
var sponsored_context_receipt : SiSponsoredContextReceipt | None

Inherited members

class SiSendMessageResponse (**data: Any)
Expand source code
class SiSendMessageResponse(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    session_id: Annotated[str, Field(description='Session identifier')]
    response: Annotated[Response | None, Field(description="Brand agent's response")] = None
    mcp_resource_uri: Annotated[
        str | None,
        Field(
            description='MCP resource URI for hosts with MCP Apps support (e.g., ui://si/session-abc123)'
        ),
    ] = None
    sponsored_context: Annotated[
        si_sponsored_context.SiSponsoredContext | None,
        Field(
            description='Declaration for sponsored context carried by this brand-agent response. Hosts MUST either honor the declared context_use and disclosure_obligation or reject the context before presenting, comparing, or otherwise using it.'
        ),
    ] = None
    session_status: Annotated[
        si_session_status.SiSessionStatus,
        Field(
            description='Current session status. On a successful response, one of: active, pending_handoff, or complete. Terminated sessions return error codes (SESSION_NOT_FOUND or SESSION_TERMINATED) instead of a success response.'
        ),
    ]
    handoff: Annotated[
        Handoff | None, Field(description='Handoff request when session_status is pending_handoff')
    ] = None
    errors: list[error.Error] | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : ContextObject | None
var errors : list[Error] | None
var ext : ExtensionObject | None
var handoff : Handoff | None
var mcp_resource_uri : str | None
var model_config
var response : Response | None
var session_id : str
var session_status : SiSessionStatus
var sponsored_context : SiSponsoredContext | None

Inherited members

class SiSponsoredContext (**data: Any)
Expand source code
class SiSponsoredContext(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    paying_principal: Annotated[
        PayingPrincipal,
        Field(
            description="Economic accountability fact: the brand that funded or sponsored this context, with optional account/operator context. This identifies who paid for the sponsored context; it is distinct from the host's later receipt and use commitment."
        ),
    ]
    context_use: Annotated[
        si_context_use.SiContextUse,
        Field(description='Declared host-side use mode for this sponsored context.'),
    ]
    disclosure_obligation: Annotated[
        DisclosureObligation,
        Field(
            description='Disclosure obligation the receiving host must either accept and satisfy or reject before using this sponsored context. This is a declared obligation and audit input, not a protocol-level legal determination.'
        ),
    ]
    declared_at: Annotated[
        AwareDatetime | None, Field(description='When this sponsored-context declaration was made.')
    ] = None
    declared_by: Annotated[
        DeclaredBy | None, Field(description='Agent or service that attached the declaration.')
    ] = None
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context_use : SiContextUse
var declared_at : pydantic.types.AwareDatetime | None
var declared_by : DeclaredBy | None
var disclosure_obligation : DisclosureObligation
var ext : ExtensionObject | None
var model_config
var paying_principal : PayingPrincipal

Inherited members

class SiSponsoredContextReceipt (**data: Any)
Expand source code
class SiSponsoredContextReceipt(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    sponsored_context: Annotated[
        si_sponsored_context.SiSponsoredContext,
        Field(
            description='The sponsored-context declaration the host received and is accepting or rejecting.'
        ),
    ]
    host_receipt: Annotated[
        HostReceipt,
        Field(
            description='Receiving-surface accountability fact: the use mode the host accepted and committed to honor for this sponsored context.'
        ),
    ]
    ext: ext_1.ExtensionObject | None = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var ext : ExtensionObject | None
var host_receipt : HostReceipt
var model_config
var sponsored_context : SiSponsoredContext

Inherited members

class SiTerminateSessionRequest (**data: Any)
Expand source code
class SiTerminateSessionRequest(AdcpRequest, AdcpVersionEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    session_id: Annotated[str, Field(description='Session identifier to terminate')]
    reason: Annotated[Reason, Field(description='Reason for termination')]
    termination_context: Annotated[
        TerminationContext | None, Field(description='Context for the termination')
    ] = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The request message of a task in the pinned bundle's task registry.

A consumer holding one can resolve its account, decide at-most-once, echo its context and negotiate version – the whole transport-boundary job – before knowing which tool it is. issubclass(model, AdcpRequest) is the registration-time proof that a model is spec-derived rather than a hand-written parallel: a field test passes for a forged model, descent does not.

Each accessor returns the field's value, or None when this tool's schema declares no such field. Only 49 of the 87 request schemas declare an account and only 43 an idempotency_key, so asking the request is what replaces getattr(req, "account", None) against Any at the boundary.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var context : ContextObject | None
var ext : ExtensionObject | None
var model_config
var reason : Reason
var session_id : str
var termination_context : TerminationContext | None

Inherited members

class SiTerminateSessionResponse (**data: Any)
Expand source code
class SiTerminateSessionResponse(AdcpResponse, AdcpVersionEnvelope, ProtocolEnvelope):
    model_config = ConfigDict(
        extra='allow',
    )
    session_id: Annotated[str, Field(description='Terminated session identifier')]
    terminated: Annotated[
        StrictBool, Field(description='Whether session was successfully terminated')
    ]
    session_status: Annotated[
        si_session_status.SiSessionStatus | None,
        Field(
            description="Resulting session state. 'complete' for handoff_transaction/handoff_complete, 'terminated' for user_exit/session_timeout/host_terminated."
        ),
    ] = None
    acp_handoff: Annotated[
        AcpHandoff | None,
        Field(description='ACP checkout handoff data. Present when reason is handoff_transaction.'),
    ] = None
    follow_up: Annotated[FollowUp | None, Field(description='Suggested follow-up actions')] = None
    errors: list[error.Error] | None = None
    context: context_1.ContextObject | None = None
    ext: ext_1.ExtensionObject | None = None

The response message of a task in the pinned bundle's task registry.

A consumer holding one can route on task state, pick up an async task_id, split envelope from payload and log uniformly, before knowing which tool answered. Which makes one generic poll-to-terminal loop possible for all 77 tasks, where today each arm has no common type at all.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var acp_handoff : AcpHandoff | None
var context : ContextObject | None
var errors : list[Error] | None
var ext : ExtensionObject | None
var follow_up : FollowUp | None
var model_config
var session_id : str
var session_status : SiSessionStatus | None
var terminated : bool

Inherited members

class SiUiElement (**data: Any)
Expand source code
class SiUiElement(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    type: Annotated[Type, Field(description='Component type')]
    data: Annotated[dict[str, Any] | None, Field(description='Component-specific data')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var data : dict[str, typing.Any] | None
var model_config
var type : Type

Inherited members

class StandardEnum (*args, **kwds)
Expand source code
class StandardEnum(StrEnum):
    text = 'text'
    link = 'link'
    image = 'image'
    product_card = 'product_card'
    carousel = 'carousel'
    action_button = 'action_button'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var action_button
var carousel
var image
var product_card
var text
class Status (*args, **kwds)
Expand source code
class Status(StrEnum):
    accepted = 'accepted'
    rejected = 'rejected'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var accepted
var rejected
class Status46 (*args, **kwds)
Expand source code
class Status46(StrEnum):
    accepted = 'accepted'
    not_required = 'not_required'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var accepted
var not_required
class TerminationContext (**data: Any)
Expand source code
class TerminationContext(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    summary: Annotated[str | None, Field(description='Summary of the conversation')] = None
    transaction_intent: Annotated[
        TransactionIntent | None,
        Field(description='For handoff_transaction - what user wants to buy'),
    ] = None
    cause: Annotated[
        str | None, Field(description='For host_terminated - why host ended session')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var cause : str | None
var model_config
var summary : str | None
var transaction_intent : TransactionIntent | None

Inherited members

class Timing (*args, **kwds)
Expand source code
class Timing(StrEnum):
    before_use = 'before_use'
    at_first_influenced_output = 'at_first_influenced_output'
    near_each_influenced_output = 'near_each_influenced_output'

Enum where members are also (and must be) strings

Ancestors

  • enum.StrEnum
  • builtins.str
  • enum.ReprEnum
  • enum.Enum

Class variables

var at_first_influenced_output
var before_use
var near_each_influenced_output
class TransactionIntent (**data: Any)
Expand source code
class TransactionIntent(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    action: Action | None = None
    product: Annotated[dict[str, Any] | None, Field(description='Product/service details')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var action : Action | None
var model_config
var product : dict[str, typing.Any] | None

Inherited members

class User (**data: Any)
Expand source code
class User(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    email: Annotated[EmailStr | None, Field(description="User's email address")] = None
    name: Annotated[str | None, Field(description="User's display name")] = None
    locale: Annotated[str | None, Field(description="User's locale (e.g., en-US)")] = None
    phone: Annotated[str | None, Field(description="User's phone number")] = None
    shipping_address: Annotated[
        ShippingAddress | None, Field(description="User's shipping address for accurate pricing")
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var email : pydantic.networks.EmailStr | None
var locale : str | None
var model_config
var name : str | None
var phone : str | None
var shipping_address : ShippingAddress | None

Inherited members

class Video (**data: Any)
Expand source code
class Video(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    formats: Annotated[
        list[str] | None, Field(description='Supported video formats (mp4, webm, etc.)')
    ] = None
    max_duration_seconds: Annotated[
        SchemaInt | None, Field(description='Maximum video duration')
    ] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var formats : list[str] | None
var max_duration_seconds : int | None
var model_config

Inherited members

class Voice (**data: Any)
Expand source code
class Voice(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    provider: Annotated[
        str | None, Field(description='TTS provider (elevenlabs, openai, etc.)')
    ] = None
    voice_id: Annotated[str | None, Field(description='Brand voice identifier')] = None

Base model for AdCP types with spec-compliant serialization.

Defaults to extra='ignore' so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.

Important

The env var is resolved once at module import time. Set it in your shell or CI environment before import adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import has no effect on already-imported model classes (they captured the policy at class-body evaluation).

Consumers who want per-model strict validation can override model_config on their subclass.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var provider : str | None
var voice_id : str | None

Inherited members