Repository navigation
Conversation
Adds two tools on the existing schema-validated adapter (tools/schema_media.py), the same path used by wan_atlas_video and atlas_refresh_image: - wavespeed_image (image_generation): Seedream 5.5 generate and edit - wavespeed_video (video_generation): Wan 3.0 text-to-video and image-to-video Both use provider "wavespeed" and WAVESPEED_API_KEY. Model input schemas are pinned in tools/provider_contracts/wavespeed_models.json and every payload is validated before submission. The adapter gains a wavespeed branch for submit (POST /api/v3/<model>), polling (GET /api/v3/predictions/<id>/result) and output extraction; WaveSpeed envelopes with a non-200 code are treated as errors even when the HTTP status is 200. Submissions are never retried, and a polling timeout returns resume_job like the other schema-driven tools. Prices are not estimated: preflight reports quote_required and results carry cost_usd null. No selector changes; both tools are discovered through the registry. Docs: PROVIDERS.md section and mapping row, README key and provider tables, .env.example. Co-Authored-By: Claude Opus 5.5 <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
Adds WaveSpeed AI as a hosting provider for image and video generation, using the existing schema-validated adapter (
tools/schema_media.py) the same waywan_atlas_videoandatlas_refresh_imagedo. Two small tools are added:wavespeed_image(image_generation): Seedream 5.5 generate and multi-reference editwavespeed_video(video_generation): Wan 3.0 text-to-video and image-to-video with native audioBoth are found through the registry and need no selector changes. This is a smaller alternative to #245, scoped to the existing schema-driven adapter and two tools, so it can be reviewed and merged against current
mainon its own.Related issue
Refs #245
Changes
tools/schema_media.py:wavespeedbranch for submit (POST /api/v3/<model>), polling (GET /api/v3/predictions/<id>/result) and output extraction. Responses with a non-200codeare treated as errors even when the HTTP status is 200. Submissions are never retried, and a polling timeout returnsresume_jobas for the other schema-driven tools.tools/provider_contracts/wavespeed_models.json: request schemas for the four routes, taken from WaveSpeed's model catalogue (GET /api/v3/models). Every payload is validated against them before submission.tools/graphics/wavespeed_image.py,tools/video/wavespeed_video.py: providerwavespeed, envWAVESPEED_API_KEY.cost_status: quote_requiredand results carrycost_usd: null, as with the other schema-driven tools.docs/PROVIDERS.mdsection and mapping row, README key and provider tables,.env.example.Testing
make lint: passesmake test: 2934 passed, 17 skippedtests/tools/test_wavespeed_media.py(mocked HTTP, no network) covers contract and status behaviour, registry discovery, payloads for each route (local images sent as data URIs), schema rejection before submission, the full submit/poll/download path, resume without a second submission, error envelopes with HTTP 200, failed predictions, preflight cost not reported as free, and routing throughimage_selectorandvideo_selectorwithhosting_provider: "wavespeed".wavespeed_image.execute()produced the expected PNG. Video and edit routes were verified against the pinned schemas and mocked HTTP only.Checklist
make test-contracts/make test) where applicable.🤖 Generated with Claude Code