image-e2e-testing

Runs local end-to-end tests for image-generation providers with response validation and cost reconciliation.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill image-e2e-testing-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: image-e2e-testing
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/image-e2e-testing
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill image-e2e-testing-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Onboarding a new image-generation provider requires verifying the full request path—authentication, routing, adapter behavior, image bytes, billing, and observability—before launch. This Skill guides you through running local end-to-end tests against the image API so routing, billing, and image output issues are caught before production. ## Core Features & Use Cases - Full-path local testing: Start cfw-image-api and dev-fs-logs, then exercise text-to-image, edits, streaming, capability, and error scenarios against a seeded model and endpoint. - Response and image validation: Parse responses with ImageGenerationResponseSchema, verify base64 image bytes, magic bytes, MIME types, dimensions, and streaming event ordering. - Cost reconciliation: Compare emitted SKU items and usage against pricing_versions.pricing_json and provider-reported costs, including edge cases like moderation refusals and rejected capabilities. - Use Case: After writing a new provider adapter, use this Skill to run the local test matrix, inspect dev-fs-logs for routing and billing evidence, and confirm the model appears correctly in the web app's image lane. ## Quick Start Ask the AI to run the image generation end-to-end tests for your new provider adapter and verify the billing evidence in dev-fs-logs.

Frequently Asked Questions about image-e2e-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run end-to-end tests for an image generation provider locally?▼

Start the local services with bun run dev cfw-image-api dev-fs-logs, seed the model and endpoint via the image-stage-endpoint skill, then run the cfw-image-api and image-generation package tests followed by real local requests covering text-to-image, edits, streaming, and error cases.

How do I validate image generation API responses?▼

Parse responses with ImageGenerationResponseSchema and stream events with the stream-events schema. Assert that b64_json decodes to a real image, magic bytes match the declared media_type, dimensions match requested capabilities, and streaming partials precede exactly one completed event.

How do I verify billing and cost for image generation requests?▼

Capture the generation ID, image count, and usage.cost for each scenario, then compare emitted SKU items against pricing_versions.pricing_json and the provider-reported cost. Confirm rejected capability requests are not charged and moderation refusals follow the intended policy.

What logs should I check after image API test requests?▼

Inspect services/dev-fs-logs/.logs/ for the request route, generation ID, model and endpoint selection, sanitized upstream request and response, adapter success or error, SKU items, and transaction finalization. A passing HTTP assertion alone is not sufficient evidence.

Does this skill cover production launch verification for image models?▼

No. Production verification and the pre-public featured-example gate are owned by the launch process documented in docs/runbooks/model-launch.md. This skill covers only local end-to-end testing, cost reconciliation, and the UI spot-check.