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
31 changes: 17 additions & 14 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: 047dae6f1c573fb83b039c6d3a3d5c4a
docChecksum: 3dfbbc516fcd4f5af7d4444fc707f4a0
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.3.2
configChecksum: f443ed579ef3ee9e79562960bfa48a2d
releaseVersion: 1.3.3
configChecksum: 96722859d244c41fff7e97c2d850ef5a
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 513a22ea-a2f4-4c3f-9972-110621b2ead5
pristine_commit_hash: 969a580aa0d7b078db1982a7b999c02fff3da019
pristine_tree_hash: 2ed5d2c1104ccba9039c1ef21fa788c7863d4945
generation_id: 238eeb4e-1de5-4da0-bf88-48ebda54c506
pristine_commit_hash: 63231bb192e7d72aee3d28b1cf9e78eae6c1087e
pristine_tree_hash: 60835084ca22d26b5994989d72c24d0713e7fc50
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -9320,8 +9320,8 @@ trackedFiles:
pristine_git_object: 05cb8497207bd506ac4d84c53a5977e110114806
docs/sdks/batch/README.mdx:
id: e367aa4f4295
last_write_checksum: sha1:0860a61fc1089791f8bc3b741a4230ff87e473c1
pristine_git_object: 9a0bdf21a7f61fe9936d6bb8b562130ba12c4819
last_write_checksum: sha1:7e385b464cd4f95f6bbe7454e99a412041017ac7
pristine_git_object: e09a992dba03c02acc70e8df4dbd7e5157bb6eb4
docs/sdks/benchmarks/README.mdx:
id: 5b483a6770ba
last_write_checksum: sha1:885b70fcbd2be60f51a2f58e133fd6452eb21600
Expand Down Expand Up @@ -9456,8 +9456,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:3735ae6e432910838fe29341bcf4d13a8ed5809c
pristine_git_object: 25e10a347e4def78247790d9ad3b0c7814048354
last_write_checksum: sha1:578ab8b48f8c511ad6785a9ff61a39ba4acff610
pristine_git_object: a94d517e1b84972de76b090b37585fb80e5c8318
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -9484,8 +9484,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:fd4faa6b41e83fcacb9404545a36ba3ce59cd982
pristine_git_object: be3f2250d911815dbe1dfc52712dc385f9c8ca45
last_write_checksum: sha1:3903cafc0528515e036d3a9967f0729fa2479613
pristine_git_object: 65c46806afb993ee9cd58f78b4930c67cfb4ab74
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
Expand All @@ -9504,8 +9504,8 @@ trackedFiles:
pristine_git_object: 7a562e21c7e66c9db666ead83748b73adefe4278
src/openrouter/batch.py:
id: 148f61e34d5b
last_write_checksum: sha1:09ec1303708144530085fa2349289c58a184e207
pristine_git_object: be2ba7c053c7cbf59ce9a0f08b1a5b86ddba6489
last_write_checksum: sha1:f1108729998bfd8e84ac026a36ce1fa78c779bb2
pristine_git_object: ac75fd407c638445da32288b0d1b3d164a681863
src/openrouter/benchmarks.py:
id: 178d2ad8d706
last_write_checksum: sha1:15b8a7ea05a7550032afb15981958aa73b756881
Expand Down Expand Up @@ -17366,3 +17366,6 @@ examples:
"504":
application/json: {"error": {"code": 504, "message": "Vault request timed out"}}
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.batch.get_batches()`: `error.status[410]` **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.2
version: 1.3.3
additionalDependencies:
dev: {}
main: {}
Expand Down
10 changes: 10 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34091,6 +34091,16 @@ paths:
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'No batch exists for the given id.'
'410':
content:
application/json:
example:
error:
code: 410
message: 'Batch results have expired. OpenRouter deletes batch results 30 days after the batch is created.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'The batch results were deleted after the 30-day retention window.'
'429':
content:
application/json:
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.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:536bd4756c0b43f4dbd90dbf81f0e2fec5ec4fbc97da3fa15f7cd03c134f8b78
sourceBlobDigest: sha256:b362d4d614e6baa23c19c53c90e95c0e280eedb5bfa39c6d2fa4cfcb3155e418
sourceRevisionDigest: sha256:067d6e5e2e54a2de16af352c4ac3a09be3883e97c6b3a1c4fca980435a7c89a0
sourceBlobDigest: sha256:055a3b99945230c28460be38760423c9a3dc1370ac8a159ae16c70095cf6d8fc
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:536bd4756c0b43f4dbd90dbf81f0e2fec5ec4fbc97da3fa15f7cd03c134f8b78
sourceBlobDigest: sha256:b362d4d614e6baa23c19c53c90e95c0e280eedb5bfa39c6d2fa4cfcb3155e418
sourceRevisionDigest: sha256:067d6e5e2e54a2de16af352c4ac3a09be3883e97c6b3a1c4fca980435a7c89a0
sourceBlobDigest: sha256:055a3b99945230c28460be38760423c9a3dc1370ac8a159ae16c70095cf6d8fc
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:9e678282d9af33c41bd64ee327d5d34d9a1e38a4609e5a335b930d254765ab22
codeSamplesRevisionDigest: sha256:430cf82504eed6be5fd5d1408039ba2cc9121e78a02fb02d7944d88e799d13ee
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2789,4 +2789,14 @@ Based on:
### Generated
- [python v1.3.2] .
### Releases
- [PyPI v1.3.2] https://pypi.org/project/openrouter/1.3.2 - .
- [PyPI v1.3.2] https://pypi.org/project/openrouter/1.3.2 - .

## 2026-09-29 13:33:52
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.3] .
### Releases
- [PyPI v1.3.3] https://pypi.org/project/openrouter/1.3.3 - .
2 changes: 1 addition & 1 deletion docs/sdks/batch/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,6 @@ with OpenRouter(
| Error Type | Status Code | Content Type |
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| errors.BatchPaymentRequiredResponseError | 402 | application/json |
| errors.BatchErrorResponse | 401, 404, 429 | application/json |
| errors.BatchErrorResponse | 401, 404, 410, 429 | application/json |
| errors.BatchErrorResponse | 500, 502 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* |
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.2"
version = "1.3.3"
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.2"
__version__: str = "1.3.3"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.3.2 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.3.3 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
8 changes: 6 additions & 2 deletions src/openrouter/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,9 @@ def get_batches(
errors.BatchPaymentRequiredResponseErrorData, http_res
)
raise errors.BatchPaymentRequiredResponseError(response_data, http_res)
if utils.match_response(http_res, ["401", "404", "429"], "application/json"):
if utils.match_response(
http_res, ["401", "404", "410", "429"], "application/json"
):
response_data = unmarshal_json_response(
errors.BatchErrorResponseData, http_res
)
Expand Down Expand Up @@ -1157,7 +1159,9 @@ async def get_batches_async(
errors.BatchPaymentRequiredResponseErrorData, http_res
)
raise errors.BatchPaymentRequiredResponseError(response_data, http_res)
if utils.match_response(http_res, ["401", "404", "429"], "application/json"):
if utils.match_response(
http_res, ["401", "404", "410", "429"], "application/json"
):
response_data = unmarshal_json_response(
errors.BatchErrorResponseData, http_res
)
Expand Down
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.

Loading