feat: add Stability AI SD3.5 provider for permissive image generation#25
Merged
realityinspector merged 1 commit intomainfrom Mar 16, 2026
Merged
feat: add Stability AI SD3.5 provider for permissive image generation#25realityinspector merged 1 commit intomainfrom
realityinspector merged 1 commit intomainfrom
Conversation
Add Stability AI as a new provider for image generation, enabling the permissive/free-distillable pipeline to generate images using SD3.5 Large which allows downstream distillation. - Create StabilityProvider with SD3.5 REST API integration - Register stability-ai/sd3.5-large in image model registry - Add STABILITY to ProviderType enum and Settings - Add stability-ai/ to PERMISSIVE_PREFIXES in model policy - Update FREE_DISTILLABLE preset with SD3.5 image model - Wire Stability provider into LLM router with fallback to OpenRouter
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
Changes
app/core/providers/stability.py— Stability AI REST API client (multipart/form-data tov2beta/stable-image/generate/sd3)app/config.py— AddSTABILITYtoProviderType,STABILITY_API_KEYto Settings,STABILITY_IMAGEto VerifiedModels, update FREE_DISTILLABLE preset withimage_model: "stability-ai/sd3.5-large"app/core/model_policy.py— Addstability-ai/toPERMISSIVE_PREFIXES, handle inderive_model_providerapp/core/model_capabilities.py— AddSTABILITYtoImageModelType, registerstability-ai/sd3.5-largein image model registry, addis_stability_model()helperapp/core/providers/__init__.py— ExportStabilityProviderapp/core/llm_router.py— Initialize Stability provider, route permissive mode to Stability for images, fallback to OpenRouter FLUX on failureConfiguration
Requires
STABILITY_API_KEYenv var (already set on Railway).Test plan
STABILITY_API_KEYis set in Railway environment