"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .imagegenerationservertoolconfig_union import ImageGenerationServerToolConfigUnion
from openrouter.types import BaseModel
import pydantic
from pydantic import ConfigDict
from typing import Dict, Optional
from typing_extensions import NotRequired, TypedDict


class ImageGenerationServerToolConfigTypedDict(TypedDict):
    r"""Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field."""

    model: NotRequired[str]
    r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\"."""


class ImageGenerationServerToolConfig(BaseModel):
    r"""Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field."""

    model_config = ConfigDict(
        populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
    )
    __pydantic_extra__: Dict[str, ImageGenerationServerToolConfigUnion] = (
        pydantic.Field(init=False)
    )

    model: Optional[str] = None
    r"""Which image generation model to use (e.g. \"openai/gpt-5-image\"). Defaults to \"openai/gpt-5-image\"."""

    @property
    def additional_properties(self):
        return self.__pydantic_extra__

    @additional_properties.setter
    def additional_properties(self, value):
        self.__pydantic_extra__ = value  # pyright: ignore[reportIncompatibleVariableOverride]
