Add ByteDance Seedance 4.5 image generation support#105
Merged
Conversation
Integrates the Seedance 4.5 model served via a ByteDance ModelArk deployment endpoint (ep-20260624042612-7dxcv). Unlike Seedream 4.0, this endpoint uses URL response format and requires seedance-specific params: sequential_image_generation, watermark, size, stream. Billed at $0.05/image. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qug7UqkDracJtsfTdSSr8
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 support for ByteDance's Seedance 4.5 image generation model via ModelArk deployment endpoints. Seedance uses a different request/response format than the existing Seedream model, requiring URL-based responses and additional parameters.
Changes
model_registry.py: Register
SEEDANCE_4_5model with ByteDance provider, API endpointep-20260624042612-7dxcv, and per-image pricing of $0.05seedance-4.5,seedance-4-5, and the endpoint IDllm_backend.py: Update
generate_images()to handle Seedance-specific payload requirementsapi_namestarts withep-response_format: "url"(instead ofb64_json)sequential_image_generation: "disabled",watermark: false,size: "2K",stream: falsenparameter (like Z.ai GLM-Image, Seedance doesn't document support)test_image_generation.py: Add comprehensive test coverage
test_seedance_uses_url_format_and_extra_params()validates payload structure and response handlingtest_single_image_charged_flat_price()to include Seedance in the model iterationCLAUDE.md: Update documentation
seedance-4.5to ByteDance image generation models listImplementation Details
Seedance deployment endpoints are identified by their
ep-prefix in the API name, allowing the code to apply Seedance-specific request formatting without requiring a new provider type. The URL response format and extra parameters are conditionally applied only to these endpoints, maintaining backward compatibility with existing Seedream (non-deployment) endpoints.https://claude.ai/code/session_016qug7UqkDracJtsfTdSSr8