Skip to content

[diffusion] refactor: scope model-specific API parameters - #35613

Merged
mickqian merged 11 commits into
sgl-project:mainfrom
mickqian:codex/longcat-docs-api
Aug 28, 2026
Merged

mickqian merged 11 commits into
sgl-project:mainfrom
mickqian:codex/longcat-docs-api

Conversation

@mickqian

@mickqian mickqian commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Model-specific diffusion controls should not accumulate in the shared OpenAI request or base sampling schemas. The current API also hardcodes Cosmos3, ERNIE-Image, and Ideogram fields in generic endpoints, while documented LTX-2.5 online controls are not forwarded at all.

LongCat-Image additionally needs its missing public cookbook/navigation coverage.

Modifications

  • Add the LongCat-Image deployment cookbook, navigation, README entry, and cookbook index card.
  • Keep LongCat, Cosmos3, ERNIE-Image, Ideogram 4, and LTX-2.5 request controls in their model-owned sampling parameter classes.
  • Extract only extensions declared by the active model and backed by fields on its sampling dataclass.
  • Move Cosmos3 aliases, sound-duration derivation, and action-field normalization out of the generic video endpoint and into Cosmos3SamplingParams lowering.
  • Forward the documented LTX-2.5 auto_duration and use_diffusion_decoder online controls.
  • Preserve root-level JSON, OpenAI SDK extra_body, video multipart extra_params, and legacy image extra_args; root-level fields retain precedence.
  • Document the extension contract in the OpenAI API guide and update the Cosmos3 and LTX-2.5 cookbooks.

Accuracy Tests

Not run locally, following the repository-local SGLang-Diffusion development guidance. This refactor does not change model computation or default sampling values.

Speed Tests and Profiling

Not applicable. The changes are request validation/lowering and documentation only.

Checklist

  • Format changed files with pre-commit.
  • Add unit coverage for protocol isolation, active-model filtering, aliases, root-level fields, nested compatibility, and precedence.
  • Update public API documentation and affected cookbooks.
  • Preserve existing request payload compatibility.
  • Follow the SGLang code style guidance.

CI States

Latest PR Test (Base): ✅ Run #33151263158
Latest PR Test (Extra): ❌ Run #33151262946
Latest PR Test (AMD ROCm 7.2): ⏳ Run #33151263073

@github-actions github-actions Bot added documentation Improvements or additions to documentation diffusion SGLang Diffusion labels Aug 20, 2026
@mickqian

Copy link
Copy Markdown
Collaborator Author

/tag-run-ci-label

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Aug 20, 2026
@mickqian mickqian changed the title [diffusion] docs: complete LongCat-Image public integration [diffusion] refactor: scope model-specific API parameters Aug 20, 2026
# Conflicts:
#	python/sglang/multimodal_gen/test/unit/test_video_api_profiling.py
# Conflicts:
#	python/sglang/multimodal_gen/configs/sample/longcat_image.py
# Conflicts:
#	python/sglang/multimodal_gen/configs/sample/cosmos3.py
#	python/sglang/multimodal_gen/runtime/entrypoints/openai/video_api.py
#	python/sglang/multimodal_gen/test/unit/test_cosmos3.py
@mickqian
mickqian merged commit 803b4fb into sgl-project:main Aug 28, 2026
129 of 143 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion documentation Improvements or additions to documentation run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant