Skip to content

Commit 649c41d

Browse files
committed
## Python SDK Changes:
* `open_router.images.generate()`: `error.status[413]` **Added**
1 parent abaad35 commit 649c41d

10 files changed

Lines changed: 67 additions & 26 deletions

File tree

‎.speakeasy/gen.lock‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
lockVersion: 2.0.0
22
id: c48cf606-fb42-4a45-9c23-8f0555307828
33
management:
4-
docChecksum: 650dff337a98bf070a3d52ab3a7ab1c3
4+
docChecksum: 50e8a290b50314df7023e7445cd94cb7
55
docVersion: 1.0.0
66
speakeasyVersion: 1.787.0
77
generationVersion: 2.914.0
8-
releaseVersion: 0.11.8
9-
configChecksum: a51ccbb5afd956309fcd066b2592f06a
8+
releaseVersion: 0.11.9
9+
configChecksum: 9c016c039411cba3aa46abf1ab1badb3
1010
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
1111
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
1212
published: true
1313
persistentEdits:
14-
generation_id: 5184830b-3a82-41c6-bf4b-e4b5d536132f
15-
pristine_commit_hash: 6261057d5344c7013ae79689331b8322cf7cc91f
16-
pristine_tree_hash: 5c34f8ea38ccc5bd114c8bf2a16d8045c5c53e52
14+
generation_id: 8e196ce1-4bb9-479a-8a36-6bbf4cf7d66f
15+
pristine_commit_hash: a316fdd152bcac88410dd9cf9e6908a4416ed3c8
16+
pristine_tree_hash: 6f1b53c0371fcec3591a93a8ac1967e4276cf63f
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -6386,8 +6386,8 @@ trackedFiles:
63866386
pristine_git_object: d164a1da79b0838bd68f0a6560a0317eb86e0226
63876387
docs/sdks/images/README.mdx:
63886388
id: 534a6c102c4f
6389-
last_write_checksum: sha1:fd7a87a3091a9cc65b1f6785fff8f3b278da1660
6390-
pristine_git_object: 77f3172dabafbaa192b258382074cb34cfd55a5e
6389+
last_write_checksum: sha1:eb919a70e20e9bde335ff1e8ae52ba0a309ca5c3
6390+
pristine_git_object: 8277c7710decc3ee152c7fe725c90bac9784800a
63916391
docs/sdks/models/README.mdx:
63926392
id: 58f1ca464e0b
63936393
last_write_checksum: sha1:2a8e7baeb6586e3b46d4da14c1e4701e4625ee7d
@@ -6442,8 +6442,8 @@ trackedFiles:
64426442
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
64436443
pyproject.toml:
64446444
id: 5d07e7d72637
6445-
last_write_checksum: sha1:3e14d3b854b2587843adcc288c3fb7a72eb4702a
6446-
pristine_git_object: bc961c19b4d009a656fba6ca0650d989217cbe22
6445+
last_write_checksum: sha1:238a3b1285d4733be3e0d5a000d543a456ef5394
6446+
pristine_git_object: 8d6f4efe9d7861f05cd73ed9fc603106d6f9238f
64476447
scripts/prepare_readme.py:
64486448
id: e0c5957a6035
64496449
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6470,8 +6470,8 @@ trackedFiles:
64706470
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
64716471
src/openrouter/_version.py:
64726472
id: d8d15ad6c586
6473-
last_write_checksum: sha1:25325f38ff9226e3d977f13708341c3ede65cc51
6474-
pristine_git_object: b995898c8db408d20edd2aab81a06d90085d7604
6473+
last_write_checksum: sha1:3af1feffc24d94b4b72fc4721954bc0e697b4259
6474+
pristine_git_object: a3f702d5d53068571a1198b71b220742e7f6214b
64756475
src/openrouter/analytics.py:
64766476
id: cb406b5aaabb
64776477
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -8774,8 +8774,8 @@ trackedFiles:
87748774
pristine_git_object: 89560b566073785535643e694c112bedbd3db13d
87758775
src/openrouter/images.py:
87768776
id: c4d7adf63ae0
8777-
last_write_checksum: sha1:17dfa465ebb0408aff811872149f6ecda426a050
8778-
pristine_git_object: 6f5c7bad3913610dbe97f5bd03837deff83faa6b
8777+
last_write_checksum: sha1:2237619daf56a48c3ee0c8980178d36443ca1b13
8778+
pristine_git_object: b7a120ad3562280aab790be56cbf482286fe40b4
87798779
src/openrouter/models/__init__.py:
87808780
id: ed73b93abb3f
87818781
last_write_checksum: sha1:932a790ae66ccd7d7022b39c659bcf72a664ebea
@@ -10721,6 +10721,8 @@ examples:
1072110721
application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
1072210722
"529":
1072310723
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
10724+
"413":
10725+
application/json: {"error": {"code": 413, "message": "Request payload too large"}}
1072410726
listImageModels:
1072510727
speakeasy-default-list-image-models:
1072610728
responses:
@@ -10758,4 +10760,6 @@ examples:
1075810760
"500":
1075910761
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1076010762
examplesVersion: 1.0.2
10761-
releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request.tools[].union(FusionServerTool_OpenRouter)` **Added**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.tools[].union(FusionServerTool_OpenRouter)` **Added**\n"
10763+
releaseNotes: |
10764+
## Python SDK Changes:
10765+
* `open_router.images.generate()`: `error.status[413]` **Added**

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ generation:
3636
documentation: mintlify
3737
preApplyUnionDiscriminators: true
3838
python:
39-
version: 0.11.8
39+
version: 0.11.9
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28324,6 +28324,16 @@ paths:
2832428324
schema:
2832528325
$ref: '#/components/schemas/NotFoundResponse'
2832628326
description: Not Found - Resource does not exist
28327+
'413':
28328+
content:
28329+
application/json:
28330+
example:
28331+
error:
28332+
code: 413
28333+
message: Request payload too large
28334+
schema:
28335+
$ref: '#/components/schemas/PayloadTooLargeResponse'
28336+
description: Payload Too Large - Request payload exceeds size limits
2832728337
'429':
2832828338
content:
2832928339
application/json:

‎.speakeasy/workflow.lock‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:7a4e4af7f34e5e5dc83b857eb62b94f52637b1a26b430d7e0ef087d52b7785e6
6-
sourceBlobDigest: sha256:48fc5a54f2206a06167402e7a65ffe98be97296dae660a3d62c5a3f9e30004e9
5+
sourceRevisionDigest: sha256:c731f8b098d442f39d564a1fedec657ac7d3843f65b420ea96129da64def2d56
6+
sourceBlobDigest: sha256:fd18c48e9365dbfc7d68e34b39776a45cfff3c27aaba929f037f6d0ffb8e2c3c
77
tags:
88
- latest
99
- 1.0.0
1010
targets:
1111
open-router:
1212
source: OpenRouter API
1313
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:7a4e4af7f34e5e5dc83b857eb62b94f52637b1a26b430d7e0ef087d52b7785e6
15-
sourceBlobDigest: sha256:48fc5a54f2206a06167402e7a65ffe98be97296dae660a3d62c5a3f9e30004e9
14+
sourceRevisionDigest: sha256:c731f8b098d442f39d564a1fedec657ac7d3843f65b420ea96129da64def2d56
15+
sourceBlobDigest: sha256:fd18c48e9365dbfc7d68e34b39776a45cfff3c27aaba929f037f6d0ffb8e2c3c
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:10ee60774c94f2b4646c4693a1daf788a657303a4bb0ea83bf5775d0a751a74b
17+
codeSamplesRevisionDigest: sha256:9f518db7f190fe719cb5f362d238ec42ada2152e6c1251f78b1cbfd106b239ca
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.787.0

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,14 @@ Based on:
188188
### Generated
189189
- [python v0.11.8] .
190190
### Releases
191-
- [PyPI v0.11.8] https://pypi.org/project/openrouter/0.11.8 - .
191+
- [PyPI v0.11.8] https://pypi.org/project/openrouter/0.11.8 - .
192+
193+
## 2026-07-08 07:00:39
194+
### Changes
195+
Based on:
196+
- OpenAPI Doc
197+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
198+
### Generated
199+
- [python v0.11.9] .
200+
### Releases
201+
- [PyPI v0.11.9] https://pypi.org/project/openrouter/0.11.9 - .

‎docs/sdks/images/README.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ with OpenRouter(
7676
| errors.PaymentRequiredResponseError | 402 | application/json |
7777
| errors.ForbiddenResponseError | 403 | application/json |
7878
| errors.NotFoundResponseError | 404 | application/json |
79+
| errors.PayloadTooLargeResponseError | 413 | application/json |
7980
| errors.TooManyRequestsResponseError | 429 | application/json |
8081
| errors.InternalServerResponseError | 500 | application/json |
8182
| errors.BadGatewayResponseError | 502 | application/json |

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openrouter"
3-
version = "0.11.8"
3+
version = "0.11.9"
44
description = "Official Python Client SDK for OpenRouter."
55
authors = [{ name = "OpenRouter" },]
66
readme = "README-PYPI.md"

‎src/openrouter/_version.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "openrouter"
6-
__version__: str = "0.11.8"
6+
__version__: str = "0.11.9"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.914.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.11.8 2.914.0 1.0.0 openrouter"
9+
__user_agent__: str = "speakeasy-sdk/python 0.11.9 2.914.0 1.0.0 openrouter"
1010

1111
try:
1212
if __package__ is not None:

‎src/openrouter/images.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,14 @@ def generate(
430430
errors.NotFoundResponseErrorData, http_res, http_res_text
431431
)
432432
raise errors.NotFoundResponseError(response_data, http_res, http_res_text)
433+
if utils.match_response(http_res, "413", "application/json"):
434+
http_res_text = utils.stream_to_text(http_res)
435+
response_data = unmarshal_json_response(
436+
errors.PayloadTooLargeResponseErrorData, http_res, http_res_text
437+
)
438+
raise errors.PayloadTooLargeResponseError(
439+
response_data, http_res, http_res_text
440+
)
433441
if utils.match_response(http_res, "429", "application/json"):
434442
http_res_text = utils.stream_to_text(http_res)
435443
response_data = unmarshal_json_response(
@@ -902,6 +910,14 @@ async def generate_async(
902910
errors.NotFoundResponseErrorData, http_res, http_res_text
903911
)
904912
raise errors.NotFoundResponseError(response_data, http_res, http_res_text)
913+
if utils.match_response(http_res, "413", "application/json"):
914+
http_res_text = await utils.stream_to_text_async(http_res)
915+
response_data = unmarshal_json_response(
916+
errors.PayloadTooLargeResponseErrorData, http_res, http_res_text
917+
)
918+
raise errors.PayloadTooLargeResponseError(
919+
response_data, http_res, http_res_text
920+
)
905921
if utils.match_response(http_res, "429", "application/json"):
906922
http_res_text = await utils.stream_to_text_async(http_res)
907923
response_data = unmarshal_json_response(

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)