"""Image Provider Configurations - Based on Latest 2025 API Documentation"""
from app.schemas.provider_config import ProviderConfig, ProviderModel, ProviderControl, ControlOption


# ============== OPENAI ==============
# Sources: https://platform.openai.com/docs/models/dall-e-3
# https://help.openai.com/en/articles/8555480-dall-e-3-api

OPENAI_CONFIG = ProviderConfig(
    id="openai",
    name="OpenAI",
    description="GPT-Image-1 and DALL-E 3 with automatic prompt enhancement",
    default_model="gpt-image-1",
    models=[
        ProviderModel(
            id="gpt-image-1",
            name="GPT Image 1",
            description="Latest OpenAI model with quality levels and transparency",
            controls=[
                ProviderControl(
                    name="quality",
                    label="Quality",
                    type="select",
                    default="high",
                    description="Generation quality (affects cost)",
                    options=[
                        ControlOption(value="low", label="Low ($0.02)"),
                        ControlOption(value="medium", label="Medium ($0.07)"),
                        ControlOption(value="high", label="High ($0.19)")
                    ]
                ),
                ProviderControl(
                    name="background",
                    label="Background",
                    type="select",
                    default="auto",
                    description="Background transparency control",
                    options=[
                        ControlOption(value="auto", label="Auto"),
                        ControlOption(value="transparent", label="Transparent"),
                        ControlOption(value="opaque", label="Opaque")
                    ]
                ),
                ProviderControl(
                    name="output_format",
                    label="Output Format",
                    type="select",
                    default="png",
                    options=[
                        ControlOption(value="png", label="PNG"),
                        ControlOption(value="jpeg", label="JPEG"),
                        ControlOption(value="webp", label="WebP")
                    ]
                ),
                ProviderControl(
                    name="output_compression",
                    label="Compression (JPEG/WebP)",
                    type="slider",
                    default=100,
                    min=0,
                    max=100,
                    step=5,
                    description="Lower = smaller file, lower quality"
                ),
                ProviderControl(
                    name="moderation",
                    label="Content Moderation",
                    type="select",
                    default="auto",
                    options=[
                        ControlOption(value="auto", label="Auto"),
                        ControlOption(value="low", label="Low (Less Restrictive)")
                    ]
                ),
                ProviderControl(
                    name="n",
                    label="Number of Images",
                    type="slider",
                    default=1,
                    min=1,
                    max=10,
                    step=1,
                    description="Generate multiple variations"
                )
            ]
        ),
        ProviderModel(
            id="dall-e-3",
            name="DALL-E 3",
            description="HD quality with style control (n=1 only per API limits)",
            controls=[
                ProviderControl(
                    name="quality",
                    label="Quality",
                    type="select",
                    default="hd",
                    description="Standard is faster, HD has better detail",
                    options=[
                        ControlOption(value="standard", label="Standard"),
                        ControlOption(value="hd", label="HD")
                    ]
                ),
                ProviderControl(
                    name="style",
                    label="Style",
                    type="select",
                    default="vivid",
                    description="Vivid = hyper-real, Natural = realistic",
                    options=[
                        ControlOption(value="vivid", label="Vivid (Hyper-real)"),
                        ControlOption(value="natural", label="Natural (Realistic)")
                    ]
                )
            ]
        ),
        ProviderModel(
            id="dall-e-2",
            name="DALL-E 2",
            description="Previous generation (legacy)"
        )
    ],
    common_controls=[
        ProviderControl(
            name="size",
            label="Size",
            type="select",
            default="1024x1024",
            description="Square images generate faster",
            options=[
                ControlOption(value="1024x1024", label="1024×1024 (Square)"),
                ControlOption(value="1024x1792", label="1024×1792 (Portrait)"),
                ControlOption(value="1792x1024", label="1792×1024 (Landscape)")
            ]
        )
    ],
    features=["auto_prompt_enhancement", "hd_quality", "style_control"]
)


# ============== STABILITY AI SD3.5 ==============
# Sources: https://platform.stability.ai/docs/api-reference
# https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-diffusion-3-5-large.html

STABILITY_CONFIG = ProviderConfig(
    id="stable-diffusion",
    name="Stability AI",
    description="SD 3.5 with typography and prompt understanding",
    default_model="sd3.5-large",
    models=[
        ProviderModel(
            id="sd3.5-large",
            name="SD 3.5 Large",
            description="Best quality, typography, complex prompts"
        ),
        ProviderModel(
            id="sd3.5-medium",
            name="SD 3.5 Medium",
            description="Faster, good quality"
        ),
        ProviderModel(
            id="sd3-large",
            name="SD 3 Large",
            description="Previous generation"
        ),
        ProviderModel(
            id="sd3-medium",
            name="SD 3 Medium",
            description="Previous generation medium"
        ),
        ProviderModel(
            id="sdxl-1.0",
            name="SDXL 1.0",
            description="Stable Diffusion XL"
        )
    ],
    common_controls=[
        ProviderControl(
            name="aspect_ratio",
            label="Aspect Ratio",
            type="select",
            default="1:1",
            options=[
                ControlOption(value="1:1", label="1:1 (Square)"),
                ControlOption(value="16:9", label="16:9 (Landscape)"),
                ControlOption(value="9:16", label="9:16 (Portrait)"),
                ControlOption(value="4:3", label="4:3"),
                ControlOption(value="3:4", label="3:4"),
                ControlOption(value="21:9", label="21:9 (Ultrawide)"),
                ControlOption(value="9:21", label="9:21")
            ]
        ),
        ProviderControl(
            name="negative_prompt",
            label="Negative Prompt",
            type="textarea",
            default="",
            description="What to avoid (max 10,000 chars)",
            required=False
        ),
        ProviderControl(
            name="seed",
            label="Seed",
            type="number",
            default=0,
            min=0,
            max=4294967294,
            description="0 = random, set value for reproducibility",
            required=False
        ),
        ProviderControl(
            name="cfg_scale",
            label="CFG Scale",
            type="slider",
            default=4.0,
            min=1.0,
            max=10.0,
            step=0.5,
            description="Prompt adherence strength"
        ),
        ProviderControl(
            name="style_preset",
            label="Style Preset",
            type="select",
            default="",
            required=False,
            options=[
                ControlOption(value="", label="None"),
                ControlOption(value="enhance", label="Enhance"),
                ControlOption(value="anime", label="Anime"),
                ControlOption(value="photographic", label="Photographic"),
                ControlOption(value="digital-art", label="Digital Art"),
                ControlOption(value="comic-book", label="Comic Book"),
                ControlOption(value="fantasy-art", label="Fantasy Art"),
                ControlOption(value="analog-film", label="Analog Film"),
                ControlOption(value="neon-punk", label="Neon Punk"),
                ControlOption(value="isometric", label="Isometric"),
                ControlOption(value="low-poly", label="Low Poly"),
                ControlOption(value="origami", label="Origami"),
                ControlOption(value="line-art", label="Line Art"),
                ControlOption(value="cinematic", label="Cinematic"),
                ControlOption(value="3d-model", label="3D Model"),
                ControlOption(value="pixel-art", label="Pixel Art"),
                ControlOption(value="tile-texture", label="Tile Texture")
            ]
        )
    ],
    features=["typography", "complex_prompts", "img2img", "negative_prompt"]
)


# ============== GOOGLE IMAGEN 4 ==============
# Sources: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/imagen/4-0-generate-001
# https://ai.google.dev/gemini-api/docs/imagen

IMAGEN_CONFIG = ProviderConfig(
    id="imagen",
    name="Google Imagen 4",
    description="Photorealistic generation with LLM prompt enhancement",
    default_model="imagen-4.0-generate-001",
    models=[
        ProviderModel(
            id="imagen-4.0-generate-001",
            name="Imagen 4.0",
            description="Standard - balanced quality and speed"
        ),
        ProviderModel(
            id="imagen-4.0-ultra-generate-001",
            name="Imagen 4.0 Ultra",
            description="Highest quality, supports 1K/2K sizes"
        ),
        ProviderModel(
            id="imagen-4.0-fast-generate-001",
            name="Imagen 4.0 Fast",
            description="Faster generation (disable enhancePrompt for complex prompts)"
        )
    ],
    common_controls=[
        ProviderControl(
            name="aspect_ratio",
            label="Aspect Ratio",
            type="select",
            default="1:1",
            options=[
                ControlOption(value="1:1", label="1:1 (Square)"),
                ControlOption(value="3:4", label="3:4 (Portrait)"),
                ControlOption(value="4:3", label="4:3 (Landscape)"),
                ControlOption(value="9:16", label="9:16 (Tall)"),
                ControlOption(value="16:9", label="16:9 (Wide)")
            ]
        ),
        ProviderControl(
            name="image_size",
            label="Image Size",
            type="select",
            default="1K",
            description="2K only available for Standard and Ultra models",
            options=[
                ControlOption(value="1K", label="1K (1024px)"),
                ControlOption(value="2K", label="2K (2048px)")
            ]
        ),
        ProviderControl(
            name="sample_count",
            label="Number of Images",
            type="slider",
            default=1,
            min=1,
            max=4,
            step=1
        ),
        ProviderControl(
            name="enhance_prompt",
            label="Enhance Prompt",
            type="checkbox",
            default=True,
            description="LLM-based prompt rewriting (enabled by default)"
        ),
        ProviderControl(
            name="safety_filter_level",
            label="Safety Filter",
            type="select",
            default="block_medium_and_above",
            required=False,
            options=[
                ControlOption(value="block_low_and_above", label="Strict"),
                ControlOption(value="block_medium_and_above", label="Medium"),
                ControlOption(value="block_only_high", label="Permissive")
            ]
        ),
        ProviderControl(
            name="person_generation",
            label="Person Generation",
            type="select",
            default="",
            required=False,
            options=[
                ControlOption(value="", label="Default"),
                ControlOption(value="allow_adult", label="Allow Adult Faces")
            ]
        )
    ],
    features=["photorealistic", "llm_enhancement", "safety_filters"]
)


# ============== LEONARDO AI ==============
# Sources: https://docs.leonardo.ai/reference/getuserself
# https://docs.leonardo.ai/docs/commonly-used-api-values

LEONARDO_CONFIG = ProviderConfig(
    id="leonardo",
    name="Leonardo AI",
    description="Alchemy V2, PhotoReal, and extensive SDXL models",
    default_model="de7d3faf-762f-48e0-b3b7-9d0ac3a3fcf3",
    models=[
        ProviderModel(
            id="de7d3faf-762f-48e0-b3b7-9d0ac3a3fcf3",
            name="Leonardo Phoenix 1.0",
            description="Latest flagship - versatile, high quality"
        ),
        ProviderModel(
            id="6b645e3a-d64f-4341-a6d8-7a3690fbf042",
            name="Leonardo Phoenix 0.9",
            description="Previous version"
        ),
        ProviderModel(
            id="e71a1c2f-4f80-4800-934f-2c68979d8cc8",
            name="Leonardo Anime XL",
            description="Anime and manga styles"
        ),
        ProviderModel(
            id="b24e16ff-06e3-43eb-8d33-4416c2d75876",
            name="Leonardo Lightning XL",
            description="Rapid generation"
        ),
        ProviderModel(
            id="aa77f04e-3eec-4034-9c07-d0f619684628",
            name="Leonardo Kino XL",
            description="Cinematic and film styles"
        ),
        ProviderModel(
            id="5c232a9e-9061-4777-980a-ddc8e65647c6",
            name="Leonardo Vision XL",
            description="Photorealistic generation"
        ),
        ProviderModel(
            id="1e60896f-3c26-4296-8ecc-53e2afecc132",
            name="Leonardo Diffusion XL",
            description="Versatile, works with concise prompts"
        ),
        ProviderModel(
            id="2067ae52-33fd-4a82-bb92-c2c55e7d2786",
            name="AlbedoBase XL",
            description="SDXL-based model"
        )
    ],
    common_controls=[
        ProviderControl(
            name="width",
            label="Width",
            type="select",
            default=1024,
            options=[
                ControlOption(value=512, label="512px"),
                ControlOption(value=768, label="768px"),
                ControlOption(value=1024, label="1024px"),
                ControlOption(value=1472, label="1472px")
            ]
        ),
        ProviderControl(
            name="height",
            label="Height",
            type="select",
            default=1024,
            options=[
                ControlOption(value=512, label="512px"),
                ControlOption(value=768, label="768px"),
                ControlOption(value=832, label="832px"),
                ControlOption(value=1024, label="1024px")
            ]
        ),
        ProviderControl(
            name="num_images",
            label="Number of Images",
            type="slider",
            default=1,
            min=1,
            max=8,
            step=1
        ),
        ProviderControl(
            name="alchemy",
            label="Alchemy V2",
            type="checkbox",
            default=False,
            description="Enable for SDXL models (improved quality)"
        ),
        ProviderControl(
            name="photo_real",
            label="PhotoReal Mode",
            type="checkbox",
            default=False,
            description="Photorealistic generation (doesn't require modelId)"
        ),
        ProviderControl(
            name="guidance_scale",
            label="Guidance Scale",
            type="slider",
            default=7.0,
            min=1.0,
            max=20.0,
            step=0.5,
            description="Recommended: 7"
        ),
        ProviderControl(
            name="preset_style",
            label="Preset Style",
            type="select",
            default="",
            required=False,
            options=[
                ControlOption(value="", label="None"),
                ControlOption(value="ANIME", label="Anime"),
                ControlOption(value="BOKEH", label="Bokeh"),
                ControlOption(value="CINEMATIC", label="Cinematic"),
                ControlOption(value="CINEMATIC_CLOSEUP", label="Cinematic Closeup"),
                ControlOption(value="CREATIVE", label="Creative"),
                ControlOption(value="DYNAMIC", label="Dynamic"),
                ControlOption(value="ENVIRONMENT", label="Environment"),
                ControlOption(value="FASHION", label="Fashion"),
                ControlOption(value="FILM", label="Film"),
                ControlOption(value="FOOD", label="Food"),
                ControlOption(value="HDR", label="HDR"),
                ControlOption(value="ILLUSTRATION", label="Illustration"),
                ControlOption(value="LEONARDO", label="Leonardo"),
                ControlOption(value="MACRO", label="Macro"),
                ControlOption(value="PHOTOGRAPHY", label="Photography"),
                ControlOption(value="PORTRAIT", label="Portrait"),
                ControlOption(value="RENDER_3D", label="3D Render"),
                ControlOption(value="STOCK_PHOTO", label="Stock Photo"),
                ControlOption(value="VIBRANT", label="Vibrant")
            ]
        ),
        ProviderControl(
            name="negative_prompt",
            label="Negative Prompt",
            type="textarea",
            default="",
            description="What to avoid",
            required=False
        ),
        ProviderControl(
            name="public",
            label="Make Public",
            type="checkbox",
            default=False,
            description="Share in Leonardo community"
        )
    ],
    features=["alchemy_v2", "photo_real", "extensive_styles", "img2img"]
)


# ============== FLUX 2 ==============
# Sources: https://docs.bfl.ml/quick_start/introduction
# https://blog.cloudflare.com/flux-2-workers-ai/

FLUX_CONFIG = ProviderConfig(
    id="flux",
    name="Flux 2",
    description="Frontier visual intelligence with multi-reference support",
    default_model="flux-2-pro",
    models=[
        ProviderModel(
            id="flux-2-pro",
            name="Flux 2 Pro",
            description="Production-grade, photorealistic, up to 10 reference images"
        ),
        ProviderModel(
            id="flux-2-flex",
            name="Flux 2 Flex",
            description="Developer-focused with exposed parameters"
        ),
        ProviderModel(
            id="flux-2-dev",
            name="Flux 2 Dev",
            description="Open-weight for developers and researchers"
        ),
        ProviderModel(
            id="flux-pro-1.1",
            name="Flux Pro 1.1 (Legacy)",
            description="Previous generation"
        )
    ],
    common_controls=[
        ProviderControl(
            name="width",
            label="Width",
            type="number",
            default=1024,
            min=256,
            max=1440,
            step=64,
            description="256-1440px supported"
        ),
        ProviderControl(
            name="height",
            label="Height",
            type="number",
            default=1024,
            min=256,
            max=1440,
            step=64,
            description="256-1440px supported"
        ),
        ProviderControl(
            name="steps",
            label="Inference Steps",
            type="slider",
            default=40,
            min=1,
            max=50,
            step=1,
            description="More steps = higher quality"
        ),
        ProviderControl(
            name="cfg_scale",
            label="CFG Scale",
            type="slider",
            default=2.5,
            min=1.5,
            max=5.0,
            step=0.1,
            description="Guidance strength (1.5-5)"
        ),
        ProviderControl(
            name="interval_guidance",
            label="Interval Guidance",
            type="slider",
            default=2,
            min=1,
            max=4,
            step=1,
            description="Advanced guidance control"
        )
    ],
    features=["multi_reference_up_to_10", "photorealistic", "typography"]
)


# ============== IDEOGRAM V2/V3 ==============
# Sources: https://developer.ideogram.ai/ideogram-api/api-overview
# https://docs.comfy.org/built-in-nodes/api-node/image/ideogram/ideogram-v2

IDEOGRAM_CONFIG = ProviderConfig(
    id="ideogram",
    name="Ideogram",
    description="Text rendering specialist with V3 model",
    default_model="V_3",
    models=[
        ProviderModel(
            id="V_3",
            name="Ideogram V3",
            description="Latest model (2025)"
        ),
        ProviderModel(
            id="V_2",
            name="Ideogram V2",
            description="Improved text and aesthetics"
        ),
        ProviderModel(
            id="V_2_TURBO",
            name="Ideogram V2 Turbo",
            description="Faster generation"
        )
    ],
    common_controls=[
        ProviderControl(
            name="aspect_ratio",
            label="Aspect Ratio",
            type="select",
            default="ASPECT_1_1",
            options=[
                ControlOption(value="ASPECT_1_1", label="1:1 (Square)"),
                ControlOption(value="ASPECT_16_9", label="16:9 (Landscape)"),
                ControlOption(value="ASPECT_9_16", label="9:16 (Portrait)"),
                ControlOption(value="ASPECT_4_3", label="4:3"),
                ControlOption(value="ASPECT_3_4", label="3:4"),
                ControlOption(value="ASPECT_3_2", label="3:2"),
                ControlOption(value="ASPECT_2_3", label="2:3")
            ]
        ),
        ProviderControl(
            name="style_type",
            label="Style Type",
            type="select",
            default="AUTO",
            options=[
                ControlOption(value="AUTO", label="Auto"),
                ControlOption(value="GENERAL", label="General"),
                ControlOption(value="REALISTIC", label="Realistic"),
                ControlOption(value="DESIGN", label="Design"),
                ControlOption(value="RENDER_3D", label="3D Render"),
                ControlOption(value="ANIME", label="Anime")
            ]
        ),
        ProviderControl(
            name="magic_prompt_option",
            label="Magic Prompt",
            type="select",
            default="AUTO",
            description="AI prompt enhancement",
            options=[
                ControlOption(value="AUTO", label="Auto"),
                ControlOption(value="ON", label="On"),
                ControlOption(value="OFF", label="Off")
            ]
        ),
        ProviderControl(
            name="num_images",
            label="Number of Images",
            type="slider",
            default=1,
            min=1,
            max=8,
            step=1
        ),
        ProviderControl(
            name="seed",
            label="Seed",
            type="number",
            default=0,
            min=0,
            max=2147483647,
            description="For reproducibility",
            required=False
        ),
        ProviderControl(
            name="negative_prompt",
            label="Negative Prompt",
            type="textarea",
            default="",
            description="What to exclude",
            required=False
        )
    ],
    features=["text_rendering", "magic_prompt", "style_control"]
)


# ============== BRIA AI ==============
# Sources: https://docs.bria.ai/
# https://bria-ai-api-docs.redoc.ly/

BRIA_CONFIG = ProviderConfig(
    id="bria",
    name="Bria AI",
    description="Bria 3.0 with 128-token prompts and ControlNet guidance",
    default_model="bria-3.0",
    models=[
        ProviderModel(
            id="bria-3.0",
            name="Bria 3.0",
            description="Latest - 4B params, transformer architecture"
        ),
        ProviderModel(
            id="base",
            name="Bria 2.3 Base (Legacy)",
            description="Previous generation"
        ),
        ProviderModel(
            id="fast",
            name="Bria 2.3 Fast (Legacy)",
            description="Faster legacy model"
        )
    ],
    common_controls=[
        ProviderControl(
            name="aspect_ratio",
            label="Aspect Ratio",
            type="select",
            default="1:1",
            options=[
                ControlOption(value="1:1", label="1:1 (Square)"),
                ControlOption(value="2:3", label="2:3"),
                ControlOption(value="3:2", label="3:2"),
                ControlOption(value="3:4", label="3:4"),
                ControlOption(value="4:3", label="4:3"),
                ControlOption(value="9:16", label="9:16"),
                ControlOption(value="16:9", label="16:9")
            ]
        ),
        ProviderControl(
            name="num_results",
            label="Number of Images",
            type="slider",
            default=1,
            min=1,
            max=4,
            step=1
        ),
        ProviderControl(
            name="guidance_method",
            label="Guidance Method",
            type="select",
            default="",
            required=False,
            description="ControlNet structural control",
            options=[
                ControlOption(value="", label="None"),
                ControlOption(value="canny", label="Canny Edge"),
                ControlOption(value="depth", label="Depth Map")
            ]
        ),
        ProviderControl(
            name="negative_prompt",
            label="Negative Prompt",
            type="textarea",
            default="",
            required=False
        ),
        ProviderControl(
            name="sync",
            label="Synchronous",
            type="checkbox",
            default=False,
            description="Wait for completion (false = async with polling)"
        )
    ],
    features=["controlnet", "async_generation", "ecommerce_suite"]
)


# ============== NANO BANANA (GEMINI) ==============

NANO_BANANA_CONFIG = ProviderConfig(
    id="nano-banana",
    name="Nano Banana",
    description="Gemini image generation with iterative editing",
    default_model="gemini-2.5-flash-image",
    models=[
        ProviderModel(
            id="gemini-2.5-flash-image",
            name="Gemini 2.5 Flash Image"
        ),
        ProviderModel(
            id="gemini-3-pro-image-preview",
            name="Gemini 3 Pro Image Preview"
        )
    ],
    common_controls=[
        ProviderControl(
            name="aspect_ratio",
            label="Aspect Ratio",
            type="select",
            default="1:1",
            options=[
                ControlOption(value="1:1", label="1:1"),
                ControlOption(value="2:3", label="2:3"),
                ControlOption(value="3:2", label="3:2"),
                ControlOption(value="3:4", label="3:4"),
                ControlOption(value="4:3", label="4:3"),
                ControlOption(value="9:16", label="9:16"),
                ControlOption(value="16:9", label="16:9"),
                ControlOption(value="21:9", label="21:9")
            ]
        ),
        ProviderControl(
            name="image_size",
            label="Resolution",
            type="select",
            default="2K",
            options=[
                ControlOption(value="1K", label="1K"),
                ControlOption(value="2K", label="2K"),
                ControlOption(value="4K", label="4K")
            ]
        )
    ],
    features=["iterative_editing", "text_rendering"]
)


# ============== RUNWAY GEN-4 IMAGE ==============
# Sources: https://docs.dev.runwayml.com/
# https://runwayml.com/news/introducing-runway-api-for-gen-4-images

RUNWAY_IMAGE_CONFIG = ProviderConfig(
    id="runway-image",
    name="Runway Gen-4 Image",
    description="Frontier image generation with reference image support",
    default_model="gen4_image",
    models=[
        ProviderModel(
            id="gen4_image",
            name="Gen-4 Image",
            description="Latest model with reference image support (up to 3 images)"
        )
    ],
    common_controls=[
        ProviderControl(
            name="ratio",
            label="Aspect Ratio",
            type="select",
            default="1360:768",
            description="Image dimensions",
            options=[
                ControlOption(value="1360:768", label="1360:768 (Landscape)"),
                ControlOption(value="1920:1080", label="1920:1080 (Full HD)"),
                ControlOption(value="1280:720", label="1280:720 (HD)"),
                ControlOption(value="768:1360", label="768:1360 (Portrait)"),
                ControlOption(value="1080:1920", label="1080:1920 (Portrait HD)"),
                ControlOption(value="1024:1024", label="1024:1024 (Square)")
            ]
        ),
        ProviderControl(
            name="seed",
            label="Seed",
            type="number",
            default=0,
            min=0,
            max=4294967295,
            description="For reproducible results (0 = random)",
            required=False
        )
    ],
    features=["reference_images_up_to_3", "high_fidelity", "content_moderation", "seed_control"]
)


# ============== MASTER DICTIONARY ==============

IMAGE_PROVIDER_CONFIGS = {
    "openai": OPENAI_CONFIG,
    "imagen": IMAGEN_CONFIG,
    "stable-diffusion": STABILITY_CONFIG,
    "leonardo": LEONARDO_CONFIG,
    "flux": FLUX_CONFIG,
    "ideogram": IDEOGRAM_CONFIG,
    "bria": BRIA_CONFIG,
    "nano-banana": NANO_BANANA_CONFIG,
    "runway-image": RUNWAY_IMAGE_CONFIG
}


def get_image_provider_configs() -> dict:
    """Get all image provider configs as JSON-serializable dict"""
    return {
        provider_id: config.model_dump(by_alias=True)
        for provider_id, config in IMAGE_PROVIDER_CONFIGS.items()
    }
