chore: 🐝 Update SDK - Generate (spec change merged) 0.11.7 (#402)

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-07 21:50:31 +00:00
committed by GitHub
co-authored by speakeasybot speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent 2c673c0ca3
commit d81cd563db
41 changed files with 1163 additions and 147 deletions
+19 -3
View File
@@ -2366,10 +2366,10 @@ if TYPE_CHECKING:
ShellServerToolEnvironmentTypedDict,
)
from .speechrequest import (
ResponseFormatEnum,
SpeechRequest,
SpeechRequestProvider,
SpeechRequestProviderTypedDict,
SpeechRequestResponseFormat,
SpeechRequestTypedDict,
)
from .stopservertoolswhencondition import (
@@ -2443,10 +2443,14 @@ if TYPE_CHECKING:
STTRequest,
STTRequestProvider,
STTRequestProviderTypedDict,
STTRequestResponseFormat,
STTRequestTypedDict,
)
from .sttresponse import STTResponse, STTResponseTypedDict
from .sttsegment import STTSegment, STTSegmentTypedDict
from .stttimestampgranularity import STTTimestampGranularity
from .sttusage import STTUsage, STTUsageTypedDict
from .sttword import STTWord, STTWordTypedDict
from .subagentnestedtool import SubagentNestedTool, SubagentNestedToolTypedDict
from .subagentreasoning import (
SubagentReasoning,
@@ -4296,7 +4300,6 @@ __all__ = [
"ResetInterval",
"Response",
"ResponseFormat",
"ResponseFormatEnum",
"ResponseFormatTypedDict",
"ResponseHealingPlugin",
"ResponseHealingPluginID",
@@ -4334,11 +4337,17 @@ __all__ = [
"STTRequest",
"STTRequestProvider",
"STTRequestProviderTypedDict",
"STTRequestResponseFormat",
"STTRequestTypedDict",
"STTResponse",
"STTResponseTypedDict",
"STTSegment",
"STTSegmentTypedDict",
"STTTimestampGranularity",
"STTUsage",
"STTUsageTypedDict",
"STTWord",
"STTWordTypedDict",
"SearchContextSizeEnum",
"SearchModelsServerToolConfig",
"SearchModelsServerToolConfigTypedDict",
@@ -4384,6 +4393,7 @@ __all__ = [
"SpeechRequest",
"SpeechRequestProvider",
"SpeechRequestProviderTypedDict",
"SpeechRequestResponseFormat",
"SpeechRequestTypedDict",
"Speed",
"Stance",
@@ -6471,10 +6481,10 @@ _dynamic_imports: dict[str, str] = {
"ShellServerToolEngine": ".shellservertoolengine",
"ShellServerToolEnvironment": ".shellservertoolenvironment",
"ShellServerToolEnvironmentTypedDict": ".shellservertoolenvironment",
"ResponseFormatEnum": ".speechrequest",
"SpeechRequest": ".speechrequest",
"SpeechRequestProvider": ".speechrequest",
"SpeechRequestProviderTypedDict": ".speechrequest",
"SpeechRequestResponseFormat": ".speechrequest",
"SpeechRequestTypedDict": ".speechrequest",
"StopServerToolsWhenCondition": ".stopservertoolswhencondition",
"StopServerToolsWhenConditionTypedDict": ".stopservertoolswhencondition",
@@ -6524,11 +6534,17 @@ _dynamic_imports: dict[str, str] = {
"STTRequest": ".sttrequest",
"STTRequestProvider": ".sttrequest",
"STTRequestProviderTypedDict": ".sttrequest",
"STTRequestResponseFormat": ".sttrequest",
"STTRequestTypedDict": ".sttrequest",
"STTResponse": ".sttresponse",
"STTResponseTypedDict": ".sttresponse",
"STTSegment": ".sttsegment",
"STTSegmentTypedDict": ".sttsegment",
"STTTimestampGranularity": ".stttimestampgranularity",
"STTUsage": ".sttusage",
"STTUsageTypedDict": ".sttusage",
"STTWord": ".sttword",
"STTWordTypedDict": ".sttword",
"SubagentNestedTool": ".subagentnestedtool",
"SubagentNestedToolTypedDict": ".subagentnestedtool",
"SubagentReasoning": ".subagentreasoning",
+3 -3
View File
@@ -38,7 +38,7 @@ class SpeechRequestProvider(BaseModel):
return m
ResponseFormatEnum = Union[
SpeechRequestResponseFormat = Union[
Literal[
"mp3",
"pcm",
@@ -59,7 +59,7 @@ class SpeechRequestTypedDict(TypedDict):
r"""Voice identifier (provider-specific)."""
provider: NotRequired[SpeechRequestProviderTypedDict]
r"""Provider-specific passthrough configuration"""
response_format: NotRequired[ResponseFormatEnum]
response_format: NotRequired[SpeechRequestResponseFormat]
r"""Audio output format"""
speed: NotRequired[float]
r"""Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers."""
@@ -80,7 +80,7 @@ class SpeechRequest(BaseModel):
provider: Optional[SpeechRequestProvider] = None
r"""Provider-specific passthrough configuration"""
response_format: Optional[ResponseFormatEnum] = "pcm"
response_format: Optional[SpeechRequestResponseFormat] = "pcm"
r"""Audio output format"""
speed: Optional[float] = None
+32 -3
View File
@@ -3,9 +3,10 @@
from __future__ import annotations
from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict
from openrouter.types import BaseModel, UNSET_SENTINEL
from .stttimestampgranularity import STTTimestampGranularity
from openrouter.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr
from pydantic import model_serializer
from typing import Optional
from typing import List, Literal, Optional, Union
from typing_extensions import NotRequired, TypedDict
@@ -39,6 +40,16 @@ class STTRequestProvider(BaseModel):
return m
STTRequestResponseFormat = Union[
Literal[
"json",
"verbose_json",
],
UnrecognizedStr,
]
r"""Output format. \"json\" (default) returns { text, usage }. \"verbose_json\" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers."""
class STTRequestTypedDict(TypedDict):
r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio."""
@@ -50,8 +61,12 @@ class STTRequestTypedDict(TypedDict):
r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."""
provider: NotRequired[STTRequestProviderTypedDict]
r"""Provider-specific passthrough configuration"""
response_format: NotRequired[STTRequestResponseFormat]
r"""Output format. \"json\" (default) returns { text, usage }. \"verbose_json\" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers."""
temperature: NotRequired[float]
r"""Sampling temperature for transcription"""
timestamp_granularities: NotRequired[List[STTTimestampGranularity]]
r"""Timestamp detail levels to include when response_format is \"verbose_json\". \"segment\" returns segment-level timestamps; \"word\" additionally returns word-level timestamps in the words array. Ignored unless response_format is \"verbose_json\"."""
class STTRequest(BaseModel):
@@ -69,12 +84,26 @@ class STTRequest(BaseModel):
provider: Optional[STTRequestProvider] = None
r"""Provider-specific passthrough configuration"""
response_format: Optional[STTRequestResponseFormat] = None
r"""Output format. \"json\" (default) returns { text, usage }. \"verbose_json\" additionally returns task, language, duration, and segment-level timestamps; only supported by OpenAI-compatible providers."""
temperature: Optional[float] = None
r"""Sampling temperature for transcription"""
timestamp_granularities: Optional[List[STTTimestampGranularity]] = None
r"""Timestamp detail levels to include when response_format is \"verbose_json\". \"segment\" returns segment-level timestamps; \"word\" additionally returns word-level timestamps in the words array. Ignored unless response_format is \"verbose_json\"."""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["language", "provider", "temperature"])
optional_fields = set(
[
"language",
"provider",
"response_format",
"temperature",
"timestamp_granularities",
]
)
serialized = handler(self)
m = {}
+31 -2
View File
@@ -1,10 +1,12 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from .sttsegment import STTSegment, STTSegmentTypedDict
from .sttusage import STTUsage, STTUsageTypedDict
from .sttword import STTWord, STTWordTypedDict
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
@@ -13,8 +15,18 @@ class STTResponseTypedDict(TypedDict):
text: str
r"""The transcribed text"""
duration: NotRequired[float]
r"""Duration of the input audio in seconds, present when response_format is verbose_json"""
language: NotRequired[str]
r"""Detected or forced language, present when response_format is verbose_json"""
segments: NotRequired[List[STTSegmentTypedDict]]
r"""Timestamped transcript segments, present when response_format is verbose_json"""
task: NotRequired[str]
r"""The task performed, present when response_format is verbose_json"""
usage: NotRequired[STTUsageTypedDict]
r"""Aggregated usage statistics for the request"""
words: NotRequired[List[STTWordTypedDict]]
r"""Timestamped words, present when the provider returns word-level timestamps"""
class STTResponse(BaseModel):
@@ -23,12 +35,29 @@ class STTResponse(BaseModel):
text: str
r"""The transcribed text"""
duration: Optional[float] = None
r"""Duration of the input audio in seconds, present when response_format is verbose_json"""
language: Optional[str] = None
r"""Detected or forced language, present when response_format is verbose_json"""
segments: Optional[List[STTSegment]] = None
r"""Timestamped transcript segments, present when response_format is verbose_json"""
task: Optional[str] = None
r"""The task performed, present when response_format is verbose_json"""
usage: Optional[STTUsage] = None
r"""Aggregated usage statistics for the request"""
words: Optional[List[STTWord]] = None
r"""Timestamped words, present when the provider returns word-level timestamps"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["usage"])
optional_fields = set(
["duration", "language", "segments", "task", "usage", "words"]
)
serialized = handler(self)
m = {}
+91
View File
@@ -0,0 +1,91 @@
"""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 List, Optional
from typing_extensions import NotRequired, TypedDict
class STTSegmentTypedDict(TypedDict):
r"""A timestamped transcript segment, returned when response_format is verbose_json"""
end: float
r"""Segment end time in seconds"""
id: int
r"""Segment index within the transcript"""
start: float
r"""Segment start time in seconds"""
text: str
r"""Transcribed text of the segment"""
avg_logprob: NotRequired[float]
r"""Average log probability of the segment"""
compression_ratio: NotRequired[float]
r"""Compression ratio of the segment"""
no_speech_prob: NotRequired[float]
r"""Probability the segment contains no speech"""
seek: NotRequired[int]
r"""Seek offset of the segment"""
temperature: NotRequired[float]
r"""Temperature used for the segment"""
tokens: NotRequired[List[int]]
r"""Token IDs of the segment"""
class STTSegment(BaseModel):
r"""A timestamped transcript segment, returned when response_format is verbose_json"""
end: float
r"""Segment end time in seconds"""
id: int
r"""Segment index within the transcript"""
start: float
r"""Segment start time in seconds"""
text: str
r"""Transcribed text of the segment"""
avg_logprob: Optional[float] = None
r"""Average log probability of the segment"""
compression_ratio: Optional[float] = None
r"""Compression ratio of the segment"""
no_speech_prob: Optional[float] = None
r"""Probability the segment contains no speech"""
seek: Optional[int] = None
r"""Seek offset of the segment"""
temperature: Optional[float] = None
r"""Temperature used for the segment"""
tokens: Optional[List[int]] = None
r"""Token IDs of the segment"""
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(
[
"avg_logprob",
"compression_ratio",
"no_speech_prob",
"seek",
"temperature",
"tokens",
]
)
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
@@ -0,0 +1,15 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import UnrecognizedStr
from typing import Literal, Union
STTTimestampGranularity = Union[
Literal[
"word",
"segment",
],
UnrecognizedStr,
]
r"""A timestamp detail level for verbose_json transcription responses."""
+29
View File
@@ -0,0 +1,29 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel
from typing_extensions import TypedDict
class STTWordTypedDict(TypedDict):
r"""A timestamped word, returned when the provider includes word-level timestamps"""
end: float
r"""Word end time in seconds"""
start: float
r"""Word start time in seconds"""
word: str
r"""The transcribed word"""
class STTWord(BaseModel):
r"""A timestamped word, returned when the provider includes word-level timestamps"""
end: float
r"""Word end time in seconds"""
start: float
r"""Word start time in seconds"""
word: str
r"""The transcribed word"""