From 12cf6656709faca70f45f09c6f7e76d4c5aeacb0 Mon Sep 17 00:00:00 2001 From: christineschen Date: Wed, 29 Jul 2026 15:23:04 +0000 Subject: [PATCH 1/2] chore(gen): use BYOK/TTS/STT initialisms in generated symbol names --- .speakeasy/gen.lock | 47 +++++++++++++++++++------------------- .speakeasy/gen.yaml | 9 +++++++- .speakeasy/workflow.lock | 2 +- docs/sdks/byok/README.mdx | 2 +- docs/sdks/stt/README.mdx | 2 +- docs/sdks/tts/README.mdx | 2 +- pyproject.toml | 2 +- src/openrouter/_version.py | 4 ++-- src/openrouter/byok.py | 2 +- src/openrouter/sdk.py | 18 +++++++-------- src/openrouter/stt.py | 2 +- src/openrouter/tts.py | 2 +- uv.lock | 4 ++-- 13 files changed, 52 insertions(+), 46 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b8698a21..18ed12d6 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.13 - configChecksum: 88ec6fe9bd229f08276aa4317354d590 + releaseVersion: 1.1.14 + configChecksum: 7a02a12bd407adad9710f4b3c0dbf2d0 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: a3ac8261-d0d7-452a-9d8e-70b44e95972a - pristine_commit_hash: 320557cfe72f3805621c879a9de1f50ee75710bf - pristine_tree_hash: e1eef35e9fa65278ee9b4e4b7697eea357de7268 + generation_id: 7f5ae0cc-e2a5-4a76-b1b1-a3686ff578fd + pristine_commit_hash: a54e1843a2691c4f8a4ff4758afdffdeba7856c4 + pristine_tree_hash: 4456975f6d3b002ba0d148adbf2a1f76485f5f35 features: python: acceptHeaders: 3.0.0 @@ -6826,8 +6826,8 @@ trackedFiles: pristine_git_object: 3b452fc5a627e83c4d3ac6282add1193ea1f2bc0 docs/sdks/byok/README.mdx: id: 17792f3b180d - last_write_checksum: sha1:e2871404d5619b9a2adbdf02be1dd26e7e2bcd5e - pristine_git_object: 4cc46421714dbd2c155d4df6db12cd612c876f49 + last_write_checksum: sha1:2ba79baccc659bbdce058ce833af31da689f7b02 + pristine_git_object: dbbd72608c5b05c2c44c7e33ab9f44ef3cf7ec76 docs/sdks/chat/README.mdx: id: 1dd859c23fe1 last_write_checksum: sha1:ef65bc7054bb9c30f77091fe6e3b437afbe0ea97 @@ -6902,12 +6902,12 @@ trackedFiles: pristine_git_object: 356232d47db82bebc0de98789226f8246dce647e docs/sdks/stt/README.mdx: id: 190b0dc9a5d1 - last_write_checksum: sha1:a8e68ac2b0bb8640e01d962177b42ab47b24898b - pristine_git_object: 003f85994a515547fe80dcc316ccc19d81c5322d + last_write_checksum: sha1:0280bf119668798bf78f662fd41364b573c7fe53 + pristine_git_object: 9d4c7d757474f113855db5b61136b5add011b144 docs/sdks/tts/README.mdx: id: cd1132543884 - last_write_checksum: sha1:748da68a8d8e057dabb7af4297b5d8adf737f8b0 - pristine_git_object: f02ae88383dec340e4cd0f20d82363155bc08852 + last_write_checksum: sha1:3bb682aabb538bc13fbbed0e7c8dab286ac2e378 + pristine_git_object: c9efe9dc9ed2dc112cc5e304c0e3d25cf0665b2b docs/sdks/videogeneration/README.mdx: id: 9a8fa04c3872 last_write_checksum: sha1:9309c04448f4c1b19add066a36d53ddb0223b49e @@ -6922,8 +6922,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:b081ccece9d496acc6c4d7d86cbf51f860209c33 - pristine_git_object: 907de0161af7a4407b8b791ca14e088dc97d7977 + last_write_checksum: sha1:ac37c31e9dbc6f587cd51437e2106cccaff80954 + pristine_git_object: 948b23ed9da20606fd1d4998523e137dcc4ad434 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -6950,8 +6950,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:df58acfa72145e3100f5c3a8707c3acda291f888 - pristine_git_object: 18c2e2b4b20740c74dc07f3b2c993098ca2de95c + last_write_checksum: sha1:707448bafc2810674f0df17ff50e48540b9ed587 + pristine_git_object: 94318b0151291065184cb13c1ad612d116b0cf30 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 @@ -6982,8 +6982,8 @@ trackedFiles: pristine_git_object: fd5f02fb9ad711afeb16e91331097d06bc6ae02d src/openrouter/byok.py: id: bec352462ae1 - last_write_checksum: sha1:b6e23eeb00a67208ad47b0ea77d56e92933af2b7 - pristine_git_object: afa29b7f2224546b46df7a7ccb1e51b1f748cfe0 + last_write_checksum: sha1:fd64fc0dbaec3e03966737417cfb02b61e13011d + pristine_git_object: 63fab85e63ac2d40fb05e71c47a3f3a14d9620a3 src/openrouter/chat.py: id: 723fdce15c1d last_write_checksum: sha1:5b20d502606ce07fae75208e58eda2cf554e48f9 @@ -9826,20 +9826,20 @@ trackedFiles: pristine_git_object: 0376b684fe0a28516ea79f0d036668163fc9ed4d src/openrouter/sdk.py: id: ee9846c4c9c5 - last_write_checksum: sha1:9429894fe86233cd237e03bb32c69f319e5934bd - pristine_git_object: 6472a1b8c7f71d13fb3fbd1e4cdb3771f9ef13df + last_write_checksum: sha1:cfd9ed072cc69753aeb8142c70a6b54d5be69514 + pristine_git_object: 9fdcc2fce0bff737021a66cb2c2548473036a973 src/openrouter/sdkconfiguration.py: id: 55773bb98d7c last_write_checksum: sha1:c01826125c31a8b8bc99d9d679782c8758fae001 pristine_git_object: 26433165a0b1c25d7bd3115b9b129b18f2dc9387 src/openrouter/stt.py: id: fc0c2f669423 - last_write_checksum: sha1:22247925e3c44234947eadbd409603292d4f9efe - pristine_git_object: 4bcc6d0314a17f48bc9735e2720e5b0b5f4bca22 + last_write_checksum: sha1:155645ebde81f259a2b94811dd8d5581ccb970ac + pristine_git_object: 01f61f8dcefb140225a8919a0ad5416c4ce9262d src/openrouter/tts.py: id: 5055d4b95f1d - last_write_checksum: sha1:1561bf5c436e6912dfde6bfec7516aa85e24db9c - pristine_git_object: 5ccc4b9bad1c3db1c901d7df2d7f8d7e2d12df57 + last_write_checksum: sha1:1f2d3c8d7451dda9bc3c75c7107caefbeb77e42f + pristine_git_object: dd3445ae2714c97f93157031fba6935dcc59046a src/openrouter/types/__init__.py: id: 5eab536205b7 last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 @@ -11529,4 +11529,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.files.list()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n * `error` **Changed**\n* `open_router.files.upload()`: \n * `request.provider` **Added**\n * `response` **Changed** (Breaking ⚠️)\n * `error` **Changed**\n* `open_router.files.delete()`: \n * `request.provider` **Added**\n * `response` **Changed** (Breaking ⚠️)\n * `error` **Changed**\n* `open_router.files.retrieve()`: \n * `request.provider` **Added**\n * `response` **Changed** (Breaking ⚠️)\n * `error` **Changed**\n* `open_router.files.download()`: \n * `request.provider` **Added**\n * `error` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 385dd2a5..3d2ac01a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.13 + version: 1.1.14 additionalDependencies: dev: {} main: {} @@ -53,6 +53,13 @@ python: bodyVariantOverloads: false clientServerStatusCodesAsErrors: true constFieldCasing: upper + customCasings: + byok: + initialism: true + stt: + initialism: true + tts: + initialism: true defaultErrorName: OpenRouterDefaultError description: Official Python Client SDK for OpenRouter. enableCustomCodeRegions: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 06feb9f6..d65e02d2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -14,7 +14,7 @@ targets: sourceRevisionDigest: sha256:aa12cc112c23a77dfc1e10bf22756b6bd1975957da8bea3f11fafcefd3359811 sourceBlobDigest: sha256:6bdf84189b2aa0a695d778dc3d73a700de1fef130cdc93b96935bfba582cfb91 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:a787dfbbc918360e86780e75413b597b8ff9d2118d77c0fbe692b645362f2979 + codeSamplesRevisionDigest: sha256:4550dde76c09e071ab03cd17f7085561f8392ef4184e3d43eb35d98827f95518 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/docs/sdks/byok/README.mdx b/docs/sdks/byok/README.mdx index 4cc46421..dbbd7260 100644 --- a/docs/sdks/byok/README.mdx +++ b/docs/sdks/byok/README.mdx @@ -1,5 +1,5 @@ --- -title: "Byok" +title: "BYOK" description: "BYOK endpoints" --- diff --git a/docs/sdks/stt/README.mdx b/docs/sdks/stt/README.mdx index 003f8599..9d4c7d75 100644 --- a/docs/sdks/stt/README.mdx +++ b/docs/sdks/stt/README.mdx @@ -1,5 +1,5 @@ --- -title: "Stt" +title: "STT" description: "Speech-to-text endpoints" --- diff --git a/docs/sdks/tts/README.mdx b/docs/sdks/tts/README.mdx index f02ae883..c9efe9dc 100644 --- a/docs/sdks/tts/README.mdx +++ b/docs/sdks/tts/README.mdx @@ -1,5 +1,5 @@ --- -title: "Tts" +title: "TTS" description: "Text-to-speech endpoints" --- diff --git a/pyproject.toml b/pyproject.toml index 907de016..948b23ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.13" +version = "1.1.14" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 18c2e2b4..94318b01 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.1.13" +__version__: str = "1.1.14" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.13 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.14 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/byok.py b/src/openrouter/byok.py index afa29b7f..63fab85e 100644 --- a/src/openrouter/byok.py +++ b/src/openrouter/byok.py @@ -10,7 +10,7 @@ from typing import Any, Awaitable, Dict, Iterable, List, Mapping, Optional, Union -class Byok(BaseSDK): +class BYOK(BaseSDK): r"""BYOK endpoints""" def list( diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py index 6472a1b8..9fdcc2fc 100644 --- a/src/openrouter/sdk.py +++ b/src/openrouter/sdk.py @@ -20,7 +20,7 @@ from openrouter.api_keys import APIKeys from openrouter.benchmarks import Benchmarks from openrouter.beta import Beta - from openrouter.byok import Byok + from openrouter.byok import BYOK from openrouter.chat import Chat from openrouter.classifications import Classifications from openrouter.credits import Credits @@ -39,8 +39,8 @@ from openrouter.providers import Providers from openrouter.rerank import Rerank from openrouter.responses import Responses - from openrouter.stt import Stt - from openrouter.tts import Tts + from openrouter.stt import STT + from openrouter.tts import TTS from openrouter.video_generation import VideoGeneration from openrouter.workspaces import Workspaces @@ -53,15 +53,15 @@ class OpenRouter(BaseSDK): analytics: "Analytics" r"""Analytics and usage endpoints""" beta: "Beta" - tts: "Tts" + tts: "TTS" r"""Text-to-speech endpoints""" - stt: "Stt" + stt: "STT" r"""Speech-to-text endpoints""" o_auth: "OAuth" r"""OAuth authentication endpoints""" benchmarks: "Benchmarks" r"""Benchmarks endpoints""" - byok: "Byok" + byok: "BYOK" r"""BYOK endpoints""" chat: "Chat" classifications: "Classifications" @@ -105,11 +105,11 @@ class OpenRouter(BaseSDK): _sub_sdk_map = { "analytics": ("openrouter.analytics", "Analytics"), "beta": ("openrouter.beta", "Beta"), - "tts": ("openrouter.tts", "Tts"), - "stt": ("openrouter.stt", "Stt"), + "tts": ("openrouter.tts", "TTS"), + "stt": ("openrouter.stt", "STT"), "o_auth": ("openrouter.oauth", "OAuth"), "benchmarks": ("openrouter.benchmarks", "Benchmarks"), - "byok": ("openrouter.byok", "Byok"), + "byok": ("openrouter.byok", "BYOK"), "chat": ("openrouter.chat", "Chat"), "classifications": ("openrouter.classifications", "Classifications"), "credits": ("openrouter.credits", "Credits"), diff --git a/src/openrouter/stt.py b/src/openrouter/stt.py index 4bcc6d03..01f61f8d 100644 --- a/src/openrouter/stt.py +++ b/src/openrouter/stt.py @@ -9,7 +9,7 @@ from typing import Any, Iterable, List, Mapping, Optional, Union -class Stt(BaseSDK): +class STT(BaseSDK): r"""Speech-to-text endpoints""" def create_transcription( diff --git a/src/openrouter/tts.py b/src/openrouter/tts.py index 5ccc4b9b..dd3445ae 100644 --- a/src/openrouter/tts.py +++ b/src/openrouter/tts.py @@ -10,7 +10,7 @@ from typing import Any, Mapping, Optional, Union -class Tts(BaseSDK): +class TTS(BaseSDK): r"""Text-to-speech endpoints""" def create_speech( diff --git a/uv.lock b/uv.lock index 5e380a2d..fe87a195 100644 --- a/uv.lock +++ b/uv.lock @@ -75,7 +75,7 @@ name = "exceptiongroup" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } wheels = [ @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.13" +version = "1.1.14" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 8d6d84c0a6bae475df405e4e03137ff104b6c786 Mon Sep 17 00:00:00 2001 From: "christine.chen" Date: Thu, 30 Jul 2026 18:43:26 +0000 Subject: [PATCH 2/2] chore: drop incidental uv.lock marker change --- uv.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uv.lock b/uv.lock index f0b83672..26655c82 100644 --- a/uv.lock +++ b/uv.lock @@ -75,7 +75,7 @@ name = "exceptiongroup" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } wheels = [