Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Add batch preview and HTML output support#31

Merged
bokelley merged 3 commits into
mainfrom
batch-html-preview
Nov 7, 2025
Merged

Add batch preview and HTML output support#31
bokelley merged 3 commits into
mainfrom
batch-html-preview

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Nov 7, 2025

Summary

Implements batch mode (1-50 creatives in single call) and HTML output format for preview_creative, as specified in ADCP PR #183. Batch mode enables 5-10x faster preview generation. HTML output eliminates S3 storage overhead by returning preview_html directly.

Changes

  • Batch mode: Process multiple creatives in one API call with partial success support
  • HTML output: Return preview_html directly (no storage/cleanup needed)
  • Backward compatible: Default behavior unchanged (output_format="url")
  • Per-request overrides: Individual batch requests can override default output_format

Testing

  • 32 integration tests passing (100%)
  • 7 new tests for HTML and batch modes
  • All existing tests updated for new response schema

🤖 Generated with Claude Code

bokelley and others added 3 commits November 7, 2025 07:17
Add batch mode (1-50 creatives in one call) and HTML output format to preview_creative tool, implementing the new ADCP spec from PR #183. Batch mode enables 5-10x faster preview generation for format showcases and campaign review grids. HTML output mode eliminates storage overhead by returning preview_html directly instead of uploading to S3. Maintains full backward compatibility with existing URL-based preview mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive documentation for new batch mode and HTML output features in examples/README.md, including:
- React example using batch preview with HTML output for format showcases
- When to use batch mode vs single mode
- When to use HTML output vs URL output
- Batch + HTML combined example with error handling
- Per-request output format override examples
- Batch mode response structure documentation
- HTML output response structure documentation

This addresses the original question about making grids work without persistence - batch mode with HTML output is the perfect solution.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Handle case where result.structured_content can be None by defaulting to empty dict. This fixes the CI failure:
- src/creative_agent/server.py:429:16: error: Unsupported right operand type for in ("dict[str, Any] | None")
- src/creative_agent/server.py:435:40: error: Value of type "dict[str, Any] | None" is not indexable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit f414ca2 into main Nov 7, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant