chore: 🐝 Update SDK - Generate (spec change merged) 0.11.26 (#440)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-07-13 19:31:52 +00:00
committed by GitHub
co-authored by speakeasybot speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent 8016b15284
commit f24188c135
15 changed files with 260 additions and 67 deletions
+2 -2
View File
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
__version__: str = "0.11.25"
__version__: str = "0.11.26"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 0.11.25 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 0.11.26 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
+5
View File
@@ -2203,6 +2203,7 @@ if TYPE_CHECKING:
PreviewWebSearchUserLocationType,
PreviewWebSearchUserLocationTypedDict,
)
from .pricingoverride import PricingOverride, PricingOverrideTypedDict
from .promptcachebreakpoint import (
PromptCacheBreakpoint,
PromptCacheBreakpointMode,
@@ -4346,6 +4347,8 @@ __all__ = [
"PreviewWebSearchUserLocationTypedDict",
"PriceSource",
"Pricing",
"PricingOverride",
"PricingOverrideTypedDict",
"PricingTypedDict",
"PromptCacheBreakpoint",
"PromptCacheBreakpointMode",
@@ -6542,6 +6545,8 @@ _dynamic_imports: dict[str, str] = {
"PreviewWebSearchUserLocation": ".preview_websearchuserlocation",
"PreviewWebSearchUserLocationType": ".preview_websearchuserlocation",
"PreviewWebSearchUserLocationTypedDict": ".preview_websearchuserlocation",
"PricingOverride": ".pricingoverride",
"PricingOverrideTypedDict": ".pricingoverride",
"PromptCacheBreakpoint": ".promptcachebreakpoint",
"PromptCacheBreakpointMode": ".promptcachebreakpoint",
"PromptCacheBreakpointTypedDict": ".promptcachebreakpoint",
@@ -0,0 +1,83 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
from typing import Optional
from typing_extensions import NotRequired, TypedDict
class PricingOverrideTypedDict(TypedDict):
r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price."""
audio: NotRequired[str]
r"""Overridden price in USD per audio input token"""
completion: NotRequired[str]
r"""Overridden price in USD per token for completion (output) generation"""
input_audio_cache: NotRequired[str]
r"""Overridden price in USD per cached audio input token"""
input_cache_read: NotRequired[str]
r"""Overridden price in USD per cached input token (read)"""
input_cache_write: NotRequired[str]
r"""Overridden price in USD per cache-write token"""
input_cache_write_1h: NotRequired[str]
r"""Overridden price in USD per 1-hour cache-write token"""
min_prompt_tokens: NotRequired[float]
r"""Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold"""
prompt: NotRequired[str]
r"""Overridden price in USD per token for prompt (input) processing"""
class PricingOverride(BaseModel):
r"""A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price."""
audio: Optional[str] = None
r"""Overridden price in USD per audio input token"""
completion: Optional[str] = None
r"""Overridden price in USD per token for completion (output) generation"""
input_audio_cache: Optional[str] = None
r"""Overridden price in USD per cached audio input token"""
input_cache_read: Optional[str] = None
r"""Overridden price in USD per cached input token (read)"""
input_cache_write: Optional[str] = None
r"""Overridden price in USD per cache-write token"""
input_cache_write_1h: Optional[str] = None
r"""Overridden price in USD per 1-hour cache-write token"""
min_prompt_tokens: Optional[float] = None
r"""Condition: the entry applies when the total prompt tokens of a request are strictly greater than this threshold"""
prompt: Optional[str] = None
r"""Overridden price in USD per token for prompt (input) processing"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(
[
"audio",
"completion",
"input_audio_cache",
"input_cache_read",
"input_cache_write",
"input_cache_write_1h",
"min_prompt_tokens",
"prompt",
]
)
serialized = handler(self)
m = {}
for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))
if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val
return m
@@ -4,6 +4,7 @@ from __future__ import annotations
from .endpointstatus import EndpointStatus
from .parameter import Parameter
from .percentilestats import PercentileStats, PercentileStatsTypedDict
from .pricingoverride import PricingOverride, PricingOverrideTypedDict
from .providername import ProviderName
from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL, UnrecognizedStr
from pydantic import model_serializer
@@ -38,6 +39,8 @@ class PricingTypedDict(TypedDict):
r"""Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic."""
internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token"""
overrides: NotRequired[List[PricingOverrideTypedDict]]
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: NotRequired[str]
r"""Price in USD per request"""
web_search: NotRequired[str]
@@ -84,6 +87,9 @@ class Pricing(BaseModel):
internal_reasoning: Optional[str] = None
r"""Price in USD per internal reasoning token"""
overrides: Optional[List[PricingOverride]] = None
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: Optional[str] = None
r"""Price in USD per request"""
@@ -105,6 +111,7 @@ class Pricing(BaseModel):
"input_cache_write",
"input_cache_write_1h",
"internal_reasoning",
"overrides",
"request",
"web_search",
]
+8 -1
View File
@@ -1,9 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from .pricingoverride import PricingOverride, PricingOverrideTypedDict
from openrouter.types import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
from typing import Optional
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict
@@ -36,6 +37,8 @@ class PublicPricingTypedDict(TypedDict):
r"""Price per 1-hour cache-write token, in USD per token. Only present for providers that price an extended (1-hour) cache TTL separately, such as Anthropic."""
internal_reasoning: NotRequired[str]
r"""Price in USD per internal reasoning token"""
overrides: NotRequired[List[PricingOverrideTypedDict]]
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: NotRequired[str]
r"""Price in USD per request"""
web_search: NotRequired[str]
@@ -84,6 +87,9 @@ class PublicPricing(BaseModel):
internal_reasoning: Optional[str] = None
r"""Price in USD per internal reasoning token"""
overrides: Optional[List[PricingOverride]] = None
r"""Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions."""
request: Optional[str] = None
r"""Price in USD per request"""
@@ -105,6 +111,7 @@ class PublicPricing(BaseModel):
"input_cache_write",
"input_cache_write_1h",
"internal_reasoning",
"overrides",
"request",
"web_search",
]