Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: 52e6fdf4210e93487c3774e6ec33dbcf
docChecksum: 94f7f50821324b3ac69922ce4af6ab21
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
releaseVersion: 1.3.213
configChecksum: 2e6d1442dfccfbbcb558ac1f94c48d3f
releaseVersion: 1.3.214
configChecksum: cc04b65c73201a982f0923c2e13e9b73
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: f10649c5-fc8b-4a72-a0ed-b412b3c29290
pristine_commit_hash: 4ab74749d9b83c6ae1502007c7cf8a93ff0d6e36
pristine_tree_hash: 0ab90787bd4ee9eeeeadd9e5f50574115663e863
generation_id: 4fd095ce-8400-4b40-816a-44b9e1d0cd44
pristine_commit_hash: 702894ff28e722dcfebcd7e6d07f69b9d5d89e53
pristine_tree_hash: 9717e3e8a0dc4ec7f959fd5044fcddf8f858b818
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -8272,8 +8272,8 @@ trackedFiles:
pristine_git_object: f1efb6365d56d846e102d1b665590f58a6899211
docs/components/speechoutputmodality.mdx:
id: a3a222faacda
last_write_checksum: sha1:911465c8337674c171ca63ddb45289a60e560cd0
pristine_git_object: e4cd60f7e5bfee0ce852d4c7c2bebb1b61e7e9cc
last_write_checksum: sha1:50b09597521fe00a0cee30215f067afceb147db1
pristine_git_object: 9f3cff040a0c6508592bf542e3b73877506abf06
docs/components/speechoutputmodalitytype.mdx:
id: bc216dcb8091
last_write_checksum: sha1:201cce4f72878e6efd47edf139626c1e02eab816
Expand Down Expand Up @@ -11912,8 +11912,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:3c16fd3e8fd333e1ebddb9a194c303bea6183979
pristine_git_object: b45fa349cb5830faf062951e48ffa239051bb235
last_write_checksum: sha1:d57054d460fc9f85987dd24e0f3a4d55a58da926
pristine_git_object: 8220da23d66529fbeb98bbaa2d2f8b082484e434
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -11940,8 +11940,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:8b0a5753f5cdf224362aa738e73a60a18b890c19
pristine_git_object: 6521f450b2867a860e0837785970a1b1e3050eb6
last_write_checksum: sha1:5756e41a8aaebec6963428fa44d19c1a0e6275f8
pristine_git_object: 99201b0e4f6b244050da1c7bc1f069c6a30a1c77
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
Expand Down Expand Up @@ -15388,8 +15388,8 @@ trackedFiles:
pristine_git_object: e25941ae3887aa19695261e2d3e3e512363a3503
src/openrouter/components/speechoutputmodality.py:
id: 3c5e674ca4df
last_write_checksum: sha1:10d6d66d75ebb5d03d334d7d0c256c3f3c9343d7
pristine_git_object: 40509b5004357d4359679a94cfff7a4272a4b3a2
last_write_checksum: sha1:e9a3e0911c1b6fedbcd885f1d22e2f301b5d06cb
pristine_git_object: 214b48d9188dec40058533040e252865b4d76e96
src/openrouter/components/speechrangeparameter.py:
id: 304a657ec76c
last_write_checksum: sha1:41173c24c432ae65c0db63825b601468e2edbe3a
Expand Down Expand Up @@ -22119,6 +22119,5 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).error.metadata.alignment.rejected.union(Array<AlignmentResponsesRejected>)[].union(tool_search_call)` **Added**
* `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).error.metadata.alignment.rejected.union(Array<AlignmentResponsesRejected>)[].union(tool_search_call)` **Added**
* `open_router.batch.get_results()`: `response.data[].response.body.union(OpenResponsesResult).error.metadata.alignment.rejected.union(Array<AlignmentResponsesRejected>)[].union(tool_search_call)` **Added**
* `open_router.tts.list_models()`: `response.data[].endpoints[].output_modalities[].languages` **Added**
* `open_router.tts.get_model()`: `response.endpoints[].output_modalities[].languages` **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.213
version: 1.3.214
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
9 changes: 9 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34997,6 +34997,15 @@ components:
- 'coral'
type: 'speech'
properties:
languages:
description: 'BCP 47 tags of the languages the provider documents for this output, for example `en`, `hi` or `pt-BR`. How the language is chosen (from the text, the voice, or a provider option) varies by provider. Absent: not described.'
example:
- 'en'
- 'fr'
- 'hi'
items:
type: 'string'
type: 'array'
supported_parameters:
$ref: '#/components/schemas/SpeechSupportedParameters'
type:
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c38fba950c92790fb387ad91e97bfdc7203c77c4b6b6b33ead216e478c0235b2
sourceBlobDigest: sha256:0fde833d5c39625cd69de36899aa9faf93ed757a45496c4bce66a0fcc31384db
sourceRevisionDigest: sha256:27093a19055b3646d74ec4944977fd2bb2088788f96d4af1f5cdb4bdadf6b305
sourceBlobDigest: sha256:5a9e3aa76034d33fca8232200a70aaa996fbc479fa76bf557ec0b33204886fe5
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:c38fba950c92790fb387ad91e97bfdc7203c77c4b6b6b33ead216e478c0235b2
sourceBlobDigest: sha256:0fde833d5c39625cd69de36899aa9faf93ed757a45496c4bce66a0fcc31384db
sourceRevisionDigest: sha256:27093a19055b3646d74ec4944977fd2bb2088788f96d4af1f5cdb4bdadf6b305
sourceBlobDigest: sha256:5a9e3aa76034d33fca8232200a70aaa996fbc479fa76bf557ec0b33204886fe5
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:595305a918a9351fde2ed01fdf22875d09885431eaa004007d2b51a76a8c3e1f
codeSamplesRevisionDigest: sha256:69d54f1d3127bb17747b7423159e833b1285350e9e05113ed299881aa9b98c31
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4899,4 +4899,14 @@ Based on:
### Generated
- [python v1.3.213] .
### Releases
- [PyPI v1.3.213] https://pypi.org/project/openrouter/1.3.213 - .
- [PyPI v1.3.213] https://pypi.org/project/openrouter/1.3.213 - .

## 2026-11-30 18:14:26
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.214] .
### Releases
- [PyPI v1.3.214] https://pypi.org/project/openrouter/1.3.214 - .
1 change: 1 addition & 0 deletions docs/components/speechoutputmodality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ title: "SpeechOutputModality"

| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `languages` | List[*str*] | ➖ | BCP 47 tags of the languages the provider documents for this output, for example `en`, `hi` or `pt-BR`. How the language is chosen (from the text, the voice, or a provider option) varies by provider. Absent: not described. | [<br/>"en",<br/>"fr",<br/>"hi"<br/>] |
| `supported_parameters` | [components.SpeechSupportedParameters](../components/speechsupportedparameters.mdx) | ✔️ | N/A | \{<br/>"instructions": \{<br/>"type": "unknown"<br/>},<br/>"response_format": \{<br/>"type": "enum",<br/>"values": [<br/>"mp3",<br/>"pcm"<br/>]<br/>},<br/>"speed": \{<br/>"max": 4,<br/>"min": 0.25,<br/>"type": "range"<br/>},<br/>"voice": \{<br/>"type": "enum",<br/>"values": [<br/>"alloy",<br/>"coral"<br/>]<br/>}<br/>} |
| `type` | [components.SpeechOutputModalityType](../components/speechoutputmodalitytype.mdx) | ✔️ | N/A | |
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
version = "1.3.213"
version = "1.3.214"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
Expand Down
4 changes: 2 additions & 2 deletions src/openrouter/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import importlib.metadata

__title__: str = "openrouter"
__version__: str = "1.3.213"
__version__: str = "1.3.214"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
__user_agent__: str = "speakeasy-sdk/python 1.3.213 2.950.13 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.3.214 2.950.13 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
28 changes: 25 additions & 3 deletions src/openrouter/components/speechoutputmodality.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
SpeechSupportedParameters,
SpeechSupportedParametersTypedDict,
)
from openrouter.types import BaseModel
from typing import Literal
from typing_extensions import TypedDict
from openrouter.types import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
from typing import List, Literal, Optional
from typing_extensions import NotRequired, TypedDict


SpeechOutputModalityType = Literal["speech",]
Expand All @@ -16,9 +17,30 @@
class SpeechOutputModalityTypedDict(TypedDict):
supported_parameters: SpeechSupportedParametersTypedDict
type: SpeechOutputModalityType
languages: NotRequired[List[str]]
r"""BCP 47 tags of the languages the provider documents for this output, for example `en`, `hi` or `pt-BR`. How the language is chosen (from the text, the voice, or a provider option) varies by provider. Absent: not described."""


class SpeechOutputModality(BaseModel):
supported_parameters: SpeechSupportedParameters

type: SpeechOutputModalityType

languages: Optional[List[str]] = None
r"""BCP 47 tags of the languages the provider documents for this output, for example `en`, `hi` or `pt-BR`. How the language is chosen (from the text, the voice, or a provider option) varies by provider. Absent: not described."""

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["languages"])
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
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.