feat: add universal creative format (multi-channel asset pool)#48
Open
feat: add universal creative format (multi-channel asset pool)#48
Conversation
Adds a 'universal' format similar to Google's Performance Max asset groups. Publishers receive a pool of assets and assemble placements themselves -- this is a submission container, not a generative format. Asset pools use repeatable_group from the adcp library, supporting: - headlines (1-15, 30 chars), long_headlines (0-5, 90 chars) - descriptions (1-5, 90 chars) - images_landscape/square/portrait (1-20 each) - logos_square/landscape (0-5 each) - videos_landscape/portrait (0-15), videos_square (0-5) - Individual: brand_name, cta, promoted_offerings, click_url, impression_tracker Also fixes: - _format_to_human_readable now includes repeatable group IDs for LLMs - assets_required backward compat excludes repeatable groups (old clients don't understand item_type=repeatable_group) - filter_formats has_asset_type handles repeatable groups via getattr Known limitation (deferred): validate_manifest_assets does not yet enforce required repeatable groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
validate_manifest_assets now handles Assets5 (repeatable_group) entries: - Required groups (headlines, descriptions, images_landscape, images_square) are checked for presence using asset_group_id - min_count and max_count are enforced on submitted lists - Each item in a group list is validated using the inner asset type (e.g. each headline item is validated as a text asset) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
universalformat modeled on Google's Performance Max asset groups: a multi-channel asset pool where publishers assemble placements themselvesrepeatable_groupassets from the adcp library for pooled assets (headlines 1-15, descriptions 1-5, images up to 20 each, videos up to 15 each, logos up to 5 each)output_format_ids, noaccepts_parameters;build_creativereturns the manifest as-isAsset structure
Required individual assets:
brand_name,click_urlRequired repeatable groups:
headlines(1-15, 30 chars),descriptions(1-5, 90 chars),images_landscape(1-20, 1.91:1),images_square(1-20, 1:1)Optional groups:
long_headlines,images_portrait,logos_square,logos_landscape,videos_landscape,videos_portrait,videos_squareOptional individual:
cta,promoted_offerings,impression_trackerFixes included
_format_to_human_readablenow surfaces repeatable group IDs to the LLM (was silently dropping them)assets_requiredbackward-compat field excludes repeatable groups (old 2.5.x clients don't understanditem_type=repeatable_group)filter_formatshas_asset_type()handles repeatable groups viagetattrKnown limitation (deferred to follow-up PR)
validate_manifest_assetsdoes not yet enforce required repeatable groups — it only validates individual assets. This means a creative manifest missing required groups likeheadlineswill not be rejected at validation time.Test plan
tests/integration/test_universal_format.py— 16 new tests covering discovery, schema compliance, asset structure, repeatable group counts, and build behavior🤖 Generated with Claude Code