Skip to content

Add ByteDance Seedance 4.5 image generation support#105

Merged
adambalogh merged 1 commit into
mainfrom
claude/kind-bardeen-czvb7d
Jun 23, 2026
Merged

Add ByteDance Seedance 4.5 image generation support#105
adambalogh merged 1 commit into
mainfrom
claude/kind-bardeen-czvb7d

Conversation

@adambalogh

Copy link
Copy Markdown
Contributor

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_5 model with ByteDance provider, API endpoint ep-20260624042612-7dxcv, and per-image pricing of $0.05

    • Add model name aliases: seedance-4.5, seedance-4-5, and the endpoint ID
  • llm_backend.py: Update generate_images() to handle Seedance-specific payload requirements

    • Detect Seedance endpoints by checking if api_name starts with ep-
    • Set response_format: "url" (instead of b64_json)
    • Add required parameters: sequential_image_generation: "disabled", watermark: false, size: "2K", stream: false
    • Omit n parameter (like Z.ai GLM-Image, Seedance doesn't document support)
  • test_image_generation.py: Add comprehensive test coverage

    • New test test_seedance_uses_url_format_and_extra_params() validates payload structure and response handling
    • Update test_single_image_charged_flat_price() to include Seedance in the model iteration
    • Fix docstring to reference Seedance instead of Z.ai GLM-Image
  • CLAUDE.md: Update documentation

    • Add seedance-4.5 to ByteDance image generation models list
    • Update references to include Seedance alongside Seedream in image generation description

Implementation 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

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
@adambalogh adambalogh marked this pull request as ready for review June 23, 2026 20:36
@adambalogh adambalogh merged commit 853881f into main Jun 23, 2026
8 checks passed
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