From ad439a25cc8a537a311628a4c3ccb56b896b91ec Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 5 Dec 2026 20:23:43 +0000 Subject: [PATCH] =?UTF-8?q?##=20Python=20SDK=20Changes:=20*=20`open=5Frout?= =?UTF-8?q?er.api=5Fkeys.create()`:=20=20=20*=20=20`request.external.api?= =?UTF-8?q?=5Fkey`=20**Removed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 29 +++++++++++++------------ .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 5 ----- .speakeasy/workflow.lock | 10 ++++----- RELEASES.md | 12 +++++++++- docs/operations/external.mdx | 1 - pyproject.toml | 2 +- src/openrouter/_version.py | 4 ++-- src/openrouter/operations/createkeys.py | 21 ------------------ uv.lock | 2 +- 10 files changed, 36 insertions(+), 52 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 21ca9205b..dbad6af08 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: 9336ad6491bbe7153e9b0296bb029533 + docChecksum: a25eeaf131ce93148f585b5cc1ad44af docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.250 - configChecksum: d65ff46c2fa1652f0b0e7bd7a6df6b9b + releaseVersion: 1.3.251 + configChecksum: f1e077ea7f90cd6ca18890152b1f8dfa repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: af7b3db1-d80c-40df-a390-c59a78529c72 - pristine_commit_hash: 2112637041bda9baeefb4e0b6d5a9c1af66fffea - pristine_tree_hash: a06ecda61df45545891d9b51cc1804ab0efc2e92 + generation_id: 919548fe-527d-4e84-8c02-e45d0065ba4d + pristine_commit_hash: 71cd618c24004be1ddf796b4622414c6cd93ef48 + pristine_tree_hash: 4b72469eb91b4063283b268bd967e39559eb1d79 features: python: acceptHeaders: 3.0.0 @@ -11120,8 +11120,8 @@ trackedFiles: pristine_git_object: a97ed140f693e92f2e9f1e2e59debea6c36bff5a docs/operations/external.mdx: id: d59b0279f5bf - last_write_checksum: sha1:affed3d5a7a7836b86f2a1d08b91d27dc3a339a9 - pristine_git_object: 6db632a69c936d370ba30706b7af866d46c86342 + last_write_checksum: sha1:ec716a319cd0987c2418a7df0b5212a375f51da5 + pristine_git_object: df4af8d7135b8ad97d080256ffa4bbe47c89af94 docs/operations/getanalyticsmetadata.mdx: id: 7c66572b759d last_write_checksum: sha1:44fd50ddc12b6437003661e942b56121a51bb4ee @@ -12688,8 +12688,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:cbce0619784254562f7fda9f37bb004d7e0a51ca - pristine_git_object: 54c562ba8b880e61fc7e7e5de14c6266794ab8b0 + last_write_checksum: sha1:fc298feab0b26a9657e5329af1f8fa778fbc9a0e + pristine_git_object: e75e56159f4bd9a3d54bb88116e37e987c80f5db scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -12716,8 +12716,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:8a34e57a9a7dcdb15b5c9821e84e3372b6177ffb - pristine_git_object: 36a5891bb87271b53c1efce413ce9482471328f8 + last_write_checksum: sha1:0b1419a49605f528b9f6c1da870648faaa983c7c + pristine_git_object: b22513c10f68759c4205c55155421a35bfa8e40d src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -17172,8 +17172,8 @@ trackedFiles: pristine_git_object: 8216a656ec1412a034878e257bd9de9e94fa8da1 src/openrouter/operations/createkeys.py: id: 64ad31fdaa6c - last_write_checksum: sha1:4370ffe2aeda35cc0be713c50869c6edf81f7f84 - pristine_git_object: dd410c70b6023cfd12e68e2f66b4b84b2af67b13 + last_write_checksum: sha1:0ac25050f33783146c7fedfa20a82ee9c1987ec9 + pristine_git_object: 14d21c0fd9ce09dce47c4fe776414df86f330bd3 src/openrouter/operations/createmodelavailabilitypolicy.py: id: e37901457787 last_write_checksum: sha1:2f023f2efe62eefdbf440cc1e220dd762868bdd6 @@ -23427,3 +23427,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: "## Python SDK Changes:\n* `open_router.api_keys.create()`: \n * `request.external.api_key` **Removed** (Breaking ⚠️)\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 441dc206a..518e7a1e9 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.250 + version: 1.3.251 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index d80ddc884..afc23f4db 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -56573,11 +56573,6 @@ paths: external: description: 'Optional partner-defined identity associated with the created API key.' properties: - api_key: - description: 'Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned.' - maxLength: 512 - minLength: 32 - type: 'string' user: description: 'Partner''s external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it.' example: 'partner-user-123' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9db27adff..246bb096e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9996cd1cc6ad28b3d31f6b876b8b26261168e8b1f3ead998ddcdc3278cc6e6bc - sourceBlobDigest: sha256:9817de9cd943f57f40006963683b9bf941b10a74108eb0cee365556b55f881a2 + sourceRevisionDigest: sha256:6d8cc61e3f15e064851c3b7820ef0d1a9ee56be98eb9d4d411f5889e211f9518 + sourceBlobDigest: sha256:4327c659aff940977cbf43f08d68abedace50d85fdede9e26d2403a7cf2f8326 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9996cd1cc6ad28b3d31f6b876b8b26261168e8b1f3ead998ddcdc3278cc6e6bc - sourceBlobDigest: sha256:9817de9cd943f57f40006963683b9bf941b10a74108eb0cee365556b55f881a2 + sourceRevisionDigest: sha256:6d8cc61e3f15e064851c3b7820ef0d1a9ee56be98eb9d4d411f5889e211f9518 + sourceBlobDigest: sha256:4327c659aff940977cbf43f08d68abedace50d85fdede9e26d2403a7cf2f8326 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:804130330e169a7ad0f768e448c60e2aa9abb5530fef9db149b4b13473b4d4de + codeSamplesRevisionDigest: sha256:220a0057b867a8f3012e5ea3fb402ecb93c3520eaa078adf56a3e2d93c2053d9 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 26d7ef0f1..d43d6fda8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5269,4 +5269,14 @@ Based on: ### Generated - [python v1.3.250] . ### Releases -- [PyPI v1.3.250] https://pypi.org/project/openrouter/1.3.250 - . \ No newline at end of file +- [PyPI v1.3.250] https://pypi.org/project/openrouter/1.3.250 - . + +## 2026-12-05 20:20:09 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.251] . +### Releases +- [PyPI v1.3.251] https://pypi.org/project/openrouter/1.3.251 - . \ No newline at end of file diff --git a/docs/operations/external.mdx b/docs/operations/external.mdx index 6db632a69..df4af8d71 100644 --- a/docs/operations/external.mdx +++ b/docs/operations/external.mdx @@ -9,5 +9,4 @@ Optional partner-defined identity associated with the created API key. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `api_key` | *Optional[str]* | ➖ | Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned. | | | `user` | *str* | ✔️ | Partner's external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it. | partner-user-123 | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 54c562ba8..e75e56159 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.250" +version = "1.3.251" 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 36a5891bb..b22513c10 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.250" +__version__: str = "1.3.251" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.250 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.251 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/operations/createkeys.py b/src/openrouter/operations/createkeys.py index dd410c70b..14d21c0fd 100644 --- a/src/openrouter/operations/createkeys.py +++ b/src/openrouter/operations/createkeys.py @@ -86,8 +86,6 @@ class ExternalTypedDict(TypedDict): user: str r"""Partner's external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it.""" - api_key: NotRequired[str] - r"""Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned.""" class External(BaseModel): @@ -96,25 +94,6 @@ class External(BaseModel): user: str r"""Partner's external user identifier for attribution: 1 to 512 characters after surrounding whitespace is trimmed, well-formed Unicode, no NUL. For organization keys outside HIPAA workspaces, the value is registered as an external user if it does not exist yet, and the key is linked to it.""" - api_key: Optional[str] = None - r"""Optional partner-supplied API key with a minimum length of 32 characters and sufficient entropy. Stored as a SHA-256 hash and never returned.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["api_key"]) - 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 - CreateKeysLimitReset = Union[ Literal[ diff --git a/uv.lock b/uv.lock index 8bf7cf60d..adfbddae1 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.250" +version = "1.3.251" source = { editable = "." } dependencies = [ { name = "httpcore" },