Skip to content

chore(aio): multimodal passthrough e2e test - #58

Merged
carlos-marchal-ph merged 1 commit into
mainfrom
chore(aio)/multimodal-passthrough-e2e-test
Jul 24, 2026
Merged

chore(aio): multimodal passthrough e2e test#58
carlos-marchal-ph merged 1 commit into
mainfrom
chore(aio)/multimodal-passthrough-e2e-test

Conversation

@carlos-marchal-ph

Copy link
Copy Markdown
Contributor

Changes

Adds scripts/test_multimodal_passthrough.py, an e2e test for posthog-python's multimodal passthrough path (Posthog(_enable_multimodal_capture=True)). It makes real provider calls covering five cases — OpenAI audio in/out, OpenAI vision, Anthropic vision, Gemini video, and a deliberately >1MB WAV-output event — plus an opt-in Gemini image-generation case (--with-imagegen, needs a paid-tier key). It then polls local ClickHouse's ai_events table and asserts the media arrived unredacted, either inline as base64 or offloaded to blob storage as a phaiblob:// URI of the original byte size.

Bumps posthog to >=7.29.0, the release that ships multimodal capture, so the test runs against the published SDK.

How to test

op run --env-file=.env -- uv run scripts/test_multimodal_passthrough.py

Needs OPENAI_API_KEY, GEMINI_API_KEY, ANTHROPIC_API_KEY, a local PostHog stack on :8010, and ClickHouse on :8123 (or --skip-verify to only exercise capture).

🤖 Agent context

Reviewed and PR'd by Claude Code on Carlos's behalf. Verified the released 7.29.0 exposes everything the script uses (_enable_multimodal_capture, AI lane internals, posthog.ai provider wrappers). Stray untracked build artifacts (dist/, node/) were excluded.

@carlos-marchal-ph
carlos-marchal-ph requested a review from a team July 24, 2026 15:29
@carlos-marchal-ph carlos-marchal-ph self-assigned this Jul 24, 2026
@carlos-marchal-ph
carlos-marchal-ph merged commit 4a57684 into main Jul 24, 2026
10 checks passed
@carlos-marchal-ph
carlos-marchal-ph deleted the chore(aio)/multimodal-passthrough-e2e-test branch July 24, 2026 15:30
@carlos-marchal-ph
carlos-marchal-ph removed the request for review from a team July 24, 2026 15:30

label = f"multimodal-e2e-{uuid.uuid4().hex[:8]}"
print(f"Batch label: {label}")
print(f"Target: {args.host} (key {api_key[:9]}...)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants