fix: add overlay to remove nullable from pagination offset params (#121)

This commit is contained in:
Matt Apperson
2026-04-14 12:48:15 -04:00
committed by GitHub
parent 2bba049182
commit b2386114cd
440 changed files with 36150 additions and 32168 deletions
@@ -0,0 +1,483 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from .contentpartimage import ContentPartImage, ContentPartImageTypedDict
from .frameimage import FrameImage, FrameImageTypedDict
from openrouter.types import BaseModel, Nullable, UnrecognizedStr
from openrouter.utils import validate_open_enum
import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Any, Dict, List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
AspectRatio = Union[
Literal[
"16:9",
"9:16",
"1:1",
"4:3",
"3:4",
"21:9",
"9:21",
],
UnrecognizedStr,
]
r"""Aspect ratio of the generated video"""
class OptionsTypedDict(TypedDict):
r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
oneai: NotRequired[Dict[str, Nullable[Any]]]
ai21: NotRequired[Dict[str, Nullable[Any]]]
aion_labs: NotRequired[Dict[str, Nullable[Any]]]
akashml: NotRequired[Dict[str, Nullable[Any]]]
alibaba: NotRequired[Dict[str, Nullable[Any]]]
amazon_bedrock: NotRequired[Dict[str, Nullable[Any]]]
amazon_nova: NotRequired[Dict[str, Nullable[Any]]]
ambient: NotRequired[Dict[str, Nullable[Any]]]
anthropic: NotRequired[Dict[str, Nullable[Any]]]
anyscale: NotRequired[Dict[str, Nullable[Any]]]
arcee_ai: NotRequired[Dict[str, Nullable[Any]]]
atlas_cloud: NotRequired[Dict[str, Nullable[Any]]]
atoma: NotRequired[Dict[str, Nullable[Any]]]
avian: NotRequired[Dict[str, Nullable[Any]]]
azure: NotRequired[Dict[str, Nullable[Any]]]
baseten: NotRequired[Dict[str, Nullable[Any]]]
black_forest_labs: NotRequired[Dict[str, Nullable[Any]]]
byteplus: NotRequired[Dict[str, Nullable[Any]]]
centml: NotRequired[Dict[str, Nullable[Any]]]
cerebras: NotRequired[Dict[str, Nullable[Any]]]
chutes: NotRequired[Dict[str, Nullable[Any]]]
cirrascale: NotRequired[Dict[str, Nullable[Any]]]
clarifai: NotRequired[Dict[str, Nullable[Any]]]
cloudflare: NotRequired[Dict[str, Nullable[Any]]]
cohere: NotRequired[Dict[str, Nullable[Any]]]
crofai: NotRequired[Dict[str, Nullable[Any]]]
crusoe: NotRequired[Dict[str, Nullable[Any]]]
deepinfra: NotRequired[Dict[str, Nullable[Any]]]
deepseek: NotRequired[Dict[str, Nullable[Any]]]
dekallm: NotRequired[Dict[str, Nullable[Any]]]
enfer: NotRequired[Dict[str, Nullable[Any]]]
fake_provider: NotRequired[Dict[str, Nullable[Any]]]
featherless: NotRequired[Dict[str, Nullable[Any]]]
fireworks: NotRequired[Dict[str, Nullable[Any]]]
friendli: NotRequired[Dict[str, Nullable[Any]]]
gmicloud: NotRequired[Dict[str, Nullable[Any]]]
google_ai_studio: NotRequired[Dict[str, Nullable[Any]]]
google_vertex: NotRequired[Dict[str, Nullable[Any]]]
gopomelo: NotRequired[Dict[str, Nullable[Any]]]
groq: NotRequired[Dict[str, Nullable[Any]]]
huggingface: NotRequired[Dict[str, Nullable[Any]]]
hyperbolic: NotRequired[Dict[str, Nullable[Any]]]
hyperbolic_quantized: NotRequired[Dict[str, Nullable[Any]]]
inception: NotRequired[Dict[str, Nullable[Any]]]
inceptron: NotRequired[Dict[str, Nullable[Any]]]
inference_net: NotRequired[Dict[str, Nullable[Any]]]
infermatic: NotRequired[Dict[str, Nullable[Any]]]
inflection: NotRequired[Dict[str, Nullable[Any]]]
inocloud: NotRequired[Dict[str, Nullable[Any]]]
io_net: NotRequired[Dict[str, Nullable[Any]]]
ionstream: NotRequired[Dict[str, Nullable[Any]]]
klusterai: NotRequired[Dict[str, Nullable[Any]]]
lambda_: NotRequired[Dict[str, Nullable[Any]]]
lepton: NotRequired[Dict[str, Nullable[Any]]]
liquid: NotRequired[Dict[str, Nullable[Any]]]
lynn: NotRequired[Dict[str, Nullable[Any]]]
lynn_private: NotRequired[Dict[str, Nullable[Any]]]
mancer: NotRequired[Dict[str, Nullable[Any]]]
mancer_old: NotRequired[Dict[str, Nullable[Any]]]
mara: NotRequired[Dict[str, Nullable[Any]]]
meta: NotRequired[Dict[str, Nullable[Any]]]
minimax: NotRequired[Dict[str, Nullable[Any]]]
mistral: NotRequired[Dict[str, Nullable[Any]]]
modal: NotRequired[Dict[str, Nullable[Any]]]
modelrun: NotRequired[Dict[str, Nullable[Any]]]
modular: NotRequired[Dict[str, Nullable[Any]]]
moonshotai: NotRequired[Dict[str, Nullable[Any]]]
morph: NotRequired[Dict[str, Nullable[Any]]]
ncompass: NotRequired[Dict[str, Nullable[Any]]]
nebius: NotRequired[Dict[str, Nullable[Any]]]
nextbit: NotRequired[Dict[str, Nullable[Any]]]
nineteen: NotRequired[Dict[str, Nullable[Any]]]
novita: NotRequired[Dict[str, Nullable[Any]]]
nvidia: NotRequired[Dict[str, Nullable[Any]]]
octoai: NotRequired[Dict[str, Nullable[Any]]]
open_inference: NotRequired[Dict[str, Nullable[Any]]]
openai: NotRequired[Dict[str, Nullable[Any]]]
parasail: NotRequired[Dict[str, Nullable[Any]]]
perplexity: NotRequired[Dict[str, Nullable[Any]]]
phala: NotRequired[Dict[str, Nullable[Any]]]
recraft: NotRequired[Dict[str, Nullable[Any]]]
recursal: NotRequired[Dict[str, Nullable[Any]]]
reflection: NotRequired[Dict[str, Nullable[Any]]]
reka: NotRequired[Dict[str, Nullable[Any]]]
relace: NotRequired[Dict[str, Nullable[Any]]]
replicate: NotRequired[Dict[str, Nullable[Any]]]
sambanova: NotRequired[Dict[str, Nullable[Any]]]
sambanova_cloaked: NotRequired[Dict[str, Nullable[Any]]]
seed: NotRequired[Dict[str, Nullable[Any]]]
sf_compute: NotRequired[Dict[str, Nullable[Any]]]
siliconflow: NotRequired[Dict[str, Nullable[Any]]]
sourceful: NotRequired[Dict[str, Nullable[Any]]]
stealth: NotRequired[Dict[str, Nullable[Any]]]
stepfun: NotRequired[Dict[str, Nullable[Any]]]
streamlake: NotRequired[Dict[str, Nullable[Any]]]
switchpoint: NotRequired[Dict[str, Nullable[Any]]]
targon: NotRequired[Dict[str, Nullable[Any]]]
together: NotRequired[Dict[str, Nullable[Any]]]
together_lite: NotRequired[Dict[str, Nullable[Any]]]
ubicloud: NotRequired[Dict[str, Nullable[Any]]]
upstage: NotRequired[Dict[str, Nullable[Any]]]
venice: NotRequired[Dict[str, Nullable[Any]]]
wandb: NotRequired[Dict[str, Nullable[Any]]]
xai: NotRequired[Dict[str, Nullable[Any]]]
xiaomi: NotRequired[Dict[str, Nullable[Any]]]
z_ai: NotRequired[Dict[str, Nullable[Any]]]
class Options(BaseModel):
r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
oneai: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="01ai")
] = None
ai21: Optional[Dict[str, Nullable[Any]]] = None
aion_labs: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="aion-labs")
] = None
akashml: Optional[Dict[str, Nullable[Any]]] = None
alibaba: Optional[Dict[str, Nullable[Any]]] = None
amazon_bedrock: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-bedrock")
] = None
amazon_nova: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="amazon-nova")
] = None
ambient: Optional[Dict[str, Nullable[Any]]] = None
anthropic: Optional[Dict[str, Nullable[Any]]] = None
anyscale: Optional[Dict[str, Nullable[Any]]] = None
arcee_ai: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="arcee-ai")
] = None
atlas_cloud: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="atlas-cloud")
] = None
atoma: Optional[Dict[str, Nullable[Any]]] = None
avian: Optional[Dict[str, Nullable[Any]]] = None
azure: Optional[Dict[str, Nullable[Any]]] = None
baseten: Optional[Dict[str, Nullable[Any]]] = None
black_forest_labs: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="black-forest-labs")
] = None
byteplus: Optional[Dict[str, Nullable[Any]]] = None
centml: Optional[Dict[str, Nullable[Any]]] = None
cerebras: Optional[Dict[str, Nullable[Any]]] = None
chutes: Optional[Dict[str, Nullable[Any]]] = None
cirrascale: Optional[Dict[str, Nullable[Any]]] = None
clarifai: Optional[Dict[str, Nullable[Any]]] = None
cloudflare: Optional[Dict[str, Nullable[Any]]] = None
cohere: Optional[Dict[str, Nullable[Any]]] = None
crofai: Optional[Dict[str, Nullable[Any]]] = None
crusoe: Optional[Dict[str, Nullable[Any]]] = None
deepinfra: Optional[Dict[str, Nullable[Any]]] = None
deepseek: Optional[Dict[str, Nullable[Any]]] = None
dekallm: Optional[Dict[str, Nullable[Any]]] = None
enfer: Optional[Dict[str, Nullable[Any]]] = None
fake_provider: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="fake-provider")
] = None
featherless: Optional[Dict[str, Nullable[Any]]] = None
fireworks: Optional[Dict[str, Nullable[Any]]] = None
friendli: Optional[Dict[str, Nullable[Any]]] = None
gmicloud: Optional[Dict[str, Nullable[Any]]] = None
google_ai_studio: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-ai-studio")
] = None
google_vertex: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="google-vertex")
] = None
gopomelo: Optional[Dict[str, Nullable[Any]]] = None
groq: Optional[Dict[str, Nullable[Any]]] = None
huggingface: Optional[Dict[str, Nullable[Any]]] = None
hyperbolic: Optional[Dict[str, Nullable[Any]]] = None
hyperbolic_quantized: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="hyperbolic-quantized")
] = None
inception: Optional[Dict[str, Nullable[Any]]] = None
inceptron: Optional[Dict[str, Nullable[Any]]] = None
inference_net: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="inference-net")
] = None
infermatic: Optional[Dict[str, Nullable[Any]]] = None
inflection: Optional[Dict[str, Nullable[Any]]] = None
inocloud: Optional[Dict[str, Nullable[Any]]] = None
io_net: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="io-net")
] = None
ionstream: Optional[Dict[str, Nullable[Any]]] = None
klusterai: Optional[Dict[str, Nullable[Any]]] = None
lambda_: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lambda")
] = None
lepton: Optional[Dict[str, Nullable[Any]]] = None
liquid: Optional[Dict[str, Nullable[Any]]] = None
lynn: Optional[Dict[str, Nullable[Any]]] = None
lynn_private: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="lynn-private")
] = None
mancer: Optional[Dict[str, Nullable[Any]]] = None
mancer_old: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="mancer-old")
] = None
mara: Optional[Dict[str, Nullable[Any]]] = None
meta: Optional[Dict[str, Nullable[Any]]] = None
minimax: Optional[Dict[str, Nullable[Any]]] = None
mistral: Optional[Dict[str, Nullable[Any]]] = None
modal: Optional[Dict[str, Nullable[Any]]] = None
modelrun: Optional[Dict[str, Nullable[Any]]] = None
modular: Optional[Dict[str, Nullable[Any]]] = None
moonshotai: Optional[Dict[str, Nullable[Any]]] = None
morph: Optional[Dict[str, Nullable[Any]]] = None
ncompass: Optional[Dict[str, Nullable[Any]]] = None
nebius: Optional[Dict[str, Nullable[Any]]] = None
nextbit: Optional[Dict[str, Nullable[Any]]] = None
nineteen: Optional[Dict[str, Nullable[Any]]] = None
novita: Optional[Dict[str, Nullable[Any]]] = None
nvidia: Optional[Dict[str, Nullable[Any]]] = None
octoai: Optional[Dict[str, Nullable[Any]]] = None
open_inference: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="open-inference")
] = None
openai: Optional[Dict[str, Nullable[Any]]] = None
parasail: Optional[Dict[str, Nullable[Any]]] = None
perplexity: Optional[Dict[str, Nullable[Any]]] = None
phala: Optional[Dict[str, Nullable[Any]]] = None
recraft: Optional[Dict[str, Nullable[Any]]] = None
recursal: Optional[Dict[str, Nullable[Any]]] = None
reflection: Optional[Dict[str, Nullable[Any]]] = None
reka: Optional[Dict[str, Nullable[Any]]] = None
relace: Optional[Dict[str, Nullable[Any]]] = None
replicate: Optional[Dict[str, Nullable[Any]]] = None
sambanova: Optional[Dict[str, Nullable[Any]]] = None
sambanova_cloaked: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sambanova-cloaked")
] = None
seed: Optional[Dict[str, Nullable[Any]]] = None
sf_compute: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="sf-compute")
] = None
siliconflow: Optional[Dict[str, Nullable[Any]]] = None
sourceful: Optional[Dict[str, Nullable[Any]]] = None
stealth: Optional[Dict[str, Nullable[Any]]] = None
stepfun: Optional[Dict[str, Nullable[Any]]] = None
streamlake: Optional[Dict[str, Nullable[Any]]] = None
switchpoint: Optional[Dict[str, Nullable[Any]]] = None
targon: Optional[Dict[str, Nullable[Any]]] = None
together: Optional[Dict[str, Nullable[Any]]] = None
together_lite: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="together-lite")
] = None
ubicloud: Optional[Dict[str, Nullable[Any]]] = None
upstage: Optional[Dict[str, Nullable[Any]]] = None
venice: Optional[Dict[str, Nullable[Any]]] = None
wandb: Optional[Dict[str, Nullable[Any]]] = None
xai: Optional[Dict[str, Nullable[Any]]] = None
xiaomi: Optional[Dict[str, Nullable[Any]]] = None
z_ai: Annotated[
Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="z-ai")
] = None
class ProviderTypedDict(TypedDict):
r"""Provider-specific passthrough configuration"""
options: NotRequired[OptionsTypedDict]
r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
class Provider(BaseModel):
r"""Provider-specific passthrough configuration"""
options: Optional[Options] = None
r"""Provider-specific options keyed by provider slug. The options for the matched provider are spread into the upstream request body."""
Resolution = Union[
Literal[
"480p",
"720p",
"1080p",
"1K",
"2K",
"4K",
],
UnrecognizedStr,
]
r"""Resolution of the generated video"""
class VideoGenerationRequestTypedDict(TypedDict):
model: str
prompt: str
aspect_ratio: NotRequired[AspectRatio]
r"""Aspect ratio of the generated video"""
duration: NotRequired[int]
r"""Duration of the generated video in seconds"""
frame_images: NotRequired[List[FrameImageTypedDict]]
r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
generate_audio: NotRequired[bool]
r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
input_references: NotRequired[List[ContentPartImageTypedDict]]
r"""Reference images to guide video generation"""
provider: NotRequired[ProviderTypedDict]
r"""Provider-specific passthrough configuration"""
resolution: NotRequired[Resolution]
r"""Resolution of the generated video"""
seed: NotRequired[int]
r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
size: NotRequired[str]
r"""Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio."""
class VideoGenerationRequest(BaseModel):
model: str
prompt: str
aspect_ratio: Annotated[
Optional[AspectRatio], PlainValidator(validate_open_enum(False))
] = None
r"""Aspect ratio of the generated video"""
duration: Optional[int] = None
r"""Duration of the generated video in seconds"""
frame_images: Optional[List[FrameImage]] = None
r"""Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame."""
generate_audio: Optional[bool] = None
r"""Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set."""
input_references: Optional[List[ContentPartImage]] = None
r"""Reference images to guide video generation"""
provider: Optional[Provider] = None
r"""Provider-specific passthrough configuration"""
resolution: Annotated[
Optional[Resolution], PlainValidator(validate_open_enum(False))
] = None
r"""Resolution of the generated video"""
seed: Optional[int] = None
r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
size: Optional[str] = None
r"""Exact pixel dimensions of the generated video in \"WIDTHxHEIGHT\" format (e.g. \"1280x720\"). Interchangeable with resolution + aspect_ratio."""