Skip to content

Commit ac39a85

Browse files
github-actions[bot]speakeasybotspeakeasy-github[bot]
authored
chore: 🐝 Update SDK - Generate (spec change merged) 1.3.16 (#997)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
1 parent 0f9d932 commit ac39a85

10 files changed

Lines changed: 89 additions & 28 deletions

File tree

‎.speakeasy/gen.lock‎

Lines changed: 22 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: 5b5645754152ff09b11172a49069d153
4+
docChecksum: db5d16fc32dae841671e0c284a3e74b4
55
docVersion: 1.0.0
66
speakeasyVersion: 1.787.0
77
generationVersion: 2.914.0
8-
releaseVersion: 1.3.15
9-
configChecksum: 64e5d33409cb8b2e41ce76d9f58127b7
8+
releaseVersion: 1.3.16
9+
configChecksum: 8c445214e70cd25ef7c941d59d5d5269
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: a8c41ebc-8690-454b-a32d-89a7aadca90e
15-
pristine_commit_hash: 70518b7f2848dfcb8176d3b653cf5c596d096ca1
16-
pristine_tree_hash: b46c51cbc555cbd171020d2e39bc570b4ef8045f
14+
generation_id: 7e9fbdb9-c775-4bc8-8565-739609edbb94
15+
pristine_commit_hash: a664b930e07a08cb7d45bc35df0d7e1c96078ae9
16+
pristine_tree_hash: 2d585312bc84caf58e056ce8ea2c23f807ca82fb
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -9860,8 +9860,8 @@ trackedFiles:
98609860
pristine_git_object: d9aef34c11d538fe9d54a41f27a913181cc4f1f5
98619861
docs/sdks/generations/README.mdx:
98629862
id: a754fecc8514
9863-
last_write_checksum: sha1:a2a58bf659333ca8715d08271ce6510c831609d4
9864-
pristine_git_object: a3866532ac76cdf8a492e1bdb9c2a16d4496f6db
9863+
last_write_checksum: sha1:46ab209542cabc2de53c1ec07eebfdaf2601f48a
9864+
pristine_git_object: bc1a56cbb41c8f9114c81b547713632272184da6
98659865
docs/sdks/guardrails/README.mdx:
98669866
id: a0cd4218b8fa
98679867
last_write_checksum: sha1:5d726806705c8c06aa1df8ecbebfa04a0214d8d4
@@ -9948,8 +9948,8 @@ trackedFiles:
99489948
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
99499949
pyproject.toml:
99509950
id: 5d07e7d72637
9951-
last_write_checksum: sha1:31931f78679d1cd96c0b0cc7b330008d54b06958
9952-
pristine_git_object: c99a3a1da47f41fe0b1639b3ed43c357af380ae1
9951+
last_write_checksum: sha1:a7f8282814d3a962587a530ebfd6cb5f8a994f21
9952+
pristine_git_object: da03951c817d1f9bc2c89224110466660b263ffd
99539953
scripts/prepare_readme.py:
99549954
id: e0c5957a6035
99559955
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -9976,8 +9976,8 @@ trackedFiles:
99769976
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
99779977
src/openrouter/_version.py:
99789978
id: d8d15ad6c586
9979-
last_write_checksum: sha1:aac80623f707150bb796ba0790c175ea667a17b3
9980-
pristine_git_object: 6c499389544c3a128b2c99fc922d7c60e995504d
9979+
last_write_checksum: sha1:b88ba320acfa6e84395801080f1845a445b8573a
9980+
pristine_git_object: 04c07c48d8aafb0e60a892bde66c111fcf0ed5b3
99819981
src/openrouter/alpha.py:
99829982
id: 306c4d93308d
99839983
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
@@ -13532,8 +13532,8 @@ trackedFiles:
1353213532
pristine_git_object: 1c30715cccc28393152c3b3152d144e57ca60df1
1353313533
src/openrouter/generations.py:
1353413534
id: 70e1c21042bc
13535-
last_write_checksum: sha1:87220277fc41836ac3bba33ffc229097c23c3384
13536-
pristine_git_object: c520287c94d48268045fb97a4b06dd1c8d56e041
13535+
last_write_checksum: sha1:b4ae45620a9ad38402e72ed42abea516aeb3aa32
13536+
pristine_git_object: 5698c384a36929846530cae98f69ce83a0966217
1353713537
src/openrouter/guardrails.py:
1353813538
id: 705839f34e66
1353913539
last_write_checksum: sha1:1551845b6a9776480d99ef0fc1fca61e845f3de2
@@ -14525,6 +14525,8 @@ examples:
1452514525
application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
1452614526
"529":
1452714527
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
14528+
"400":
14529+
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1452814530
listModelsCount:
1452914531
speakeasy-default-list-models-count:
1453014532
responses:
@@ -15313,6 +15315,8 @@ examples:
1531315315
application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}}
1531415316
"529":
1531515317
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
15318+
"400":
15319+
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1531615320
listObservabilityDestinations:
1531715321
speakeasy-default-list-observability-destinations:
1531815322
parameters:
@@ -18220,4 +18224,7 @@ examples:
1822018224
"500":
1822118225
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1822218226
examplesVersion: 1.0.2
18223-
releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request.tools[].union(ChatDynamicServerTool)` **Added**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.tools[].union(ChatDynamicServerTool)` **Added**\n"
18227+
releaseNotes: |
18228+
## Python SDK Changes:
18229+
* `open_router.generations.get_generation()`: `error.status[400]` **Added**
18230+
* `open_router.generations.list_generation_content()`: `error.status[400]` **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: 1.3.15
39+
version: 1.3.16
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39053,7 +39053,8 @@ paths:
3905339053
schema:
3905439054
description: 'The generation ID'
3905539055
example: 'gen-1234567890'
39056-
minLength: 1
39056+
maxLength: 128
39057+
pattern: '^gen-[0-9A-Za-z-]+$'
3905739058
type: 'string'
3905839059
responses:
3905939060
'200':
@@ -39107,6 +39108,16 @@ paths:
3910739108
schema:
3910839109
$ref: '#/components/schemas/GenerationResponse'
3910939110
description: 'Returns the request metadata for this generation'
39111+
'400':
39112+
content:
39113+
application/json:
39114+
example:
39115+
error:
39116+
code: 400
39117+
message: 'Invalid request parameters'
39118+
schema:
39119+
$ref: '#/components/schemas/BadRequestResponse'
39120+
description: 'Bad Request - Invalid request parameters or malformed input'
3911039121
'401':
3911139122
content:
3911239123
application/json:
@@ -39205,7 +39216,8 @@ paths:
3920539216
schema:
3920639217
description: 'The generation ID'
3920739218
example: 'gen-1234567890'
39208-
minLength: 1
39219+
maxLength: 128
39220+
pattern: '^gen-[0-9A-Za-z-]+$'
3920939221
type: 'string'
3921039222
responses:
3921139223
'200':
@@ -39224,6 +39236,16 @@ paths:
3922439236
schema:
3922539237
$ref: '#/components/schemas/GenerationContentResponse'
3922639238
description: 'Returns the stored prompt and completion content, plus the failure error when the generation failed'
39239+
'400':
39240+
content:
39241+
application/json:
39242+
example:
39243+
error:
39244+
code: 400
39245+
message: 'Invalid request parameters'
39246+
schema:
39247+
$ref: '#/components/schemas/BadRequestResponse'
39248+
description: 'Bad Request - Invalid request parameters or malformed input'
3922739249
'401':
3922839250
content:
3922939251
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:b6db9aa1a9e75ccb2d2179b17865b0873b0b1617382f13501edcf02a9cc29efa
6-
sourceBlobDigest: sha256:6b70af11a76f6d6600beb51561fae1fd5556f7e2df695fa1e52c2546b2fc9a14
5+
sourceRevisionDigest: sha256:ce23790edfaffc0a537784d8535152708f0d3c5fc9789e7b173cc6a6525094ce
6+
sourceBlobDigest: sha256:f0cdcda8afd64f749176ada8505daea308dc590d5441fc1a8cd72aa3e37d054a
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:b6db9aa1a9e75ccb2d2179b17865b0873b0b1617382f13501edcf02a9cc29efa
15-
sourceBlobDigest: sha256:6b70af11a76f6d6600beb51561fae1fd5556f7e2df695fa1e52c2546b2fc9a14
14+
sourceRevisionDigest: sha256:ce23790edfaffc0a537784d8535152708f0d3c5fc9789e7b173cc6a6525094ce
15+
sourceBlobDigest: sha256:f0cdcda8afd64f749176ada8505daea308dc590d5441fc1a8cd72aa3e37d054a
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:d4884296e7d548f2e5fbde6b7c3a57ab8f33f3b70c0e5012721e0fc2d70ffbc1
17+
codeSamplesRevisionDigest: sha256:7478c6f034a1e48bf1a0829fdf24b40c068e4a192db9d38a424bb962fcc38d38
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
@@ -2919,4 +2919,14 @@ Based on:
29192919
### Generated
29202920
- [python v1.3.15] .
29212921
### Releases
2922-
- [PyPI v1.3.15] https://pypi.org/project/openrouter/1.3.15 - .
2922+
- [PyPI v1.3.15] https://pypi.org/project/openrouter/1.3.15 - .
2923+
2924+
## 2026-10-01 11:52:40
2925+
### Changes
2926+
Based on:
2927+
- OpenAPI Doc
2928+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
2929+
### Generated
2930+
- [python v1.3.16] .
2931+
### Releases
2932+
- [PyPI v1.3.16] https://pypi.org/project/openrouter/1.3.16 - .

‎docs/sdks/generations/README.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ with OpenRouter(
5656

5757
| Error Type | Status Code | Content Type |
5858
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
59+
| errors.BadRequestResponseError | 400 | application/json |
5960
| errors.UnauthorizedResponseError | 401 | application/json |
6061
| errors.PaymentRequiredResponseError | 402 | application/json |
6162
| errors.NotFoundResponseError | 404 | application/json |
@@ -109,6 +110,7 @@ with OpenRouter(
109110

110111
| Error Type | Status Code | Content Type |
111112
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
113+
| errors.BadRequestResponseError | 400 | application/json |
112114
| errors.UnauthorizedResponseError | 401 | application/json |
113115
| errors.ForbiddenResponseError | 403 | application/json |
114116
| errors.NotFoundResponseError | 404 | 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 = "1.3.15"
3+
version = "1.3.16"
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 = "1.3.15"
6+
__version__: str = "1.3.16"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.914.0"
9-
__user_agent__: str = "speakeasy-sdk/python 1.3.15 2.914.0 1.0.0 openrouter"
9+
__user_agent__: str = "speakeasy-sdk/python 1.3.16 2.914.0 1.0.0 openrouter"
1010

1111
try:
1212
if __package__ is not None:

‎src/openrouter/generations.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ def get_generation(
110110
response_data: Any = None
111111
if utils.match_response(http_res, "200", "application/json"):
112112
return unmarshal_json_response(components.GenerationResponse, http_res)
113+
if utils.match_response(http_res, "400", "application/json"):
114+
response_data = unmarshal_json_response(
115+
errors.BadRequestResponseErrorData, http_res
116+
)
117+
raise errors.BadRequestResponseError(response_data, http_res)
113118
if utils.match_response(http_res, "401", "application/json"):
114119
response_data = unmarshal_json_response(
115120
errors.UnauthorizedResponseErrorData, http_res
@@ -261,6 +266,11 @@ async def get_generation_async(
261266
response_data: Any = None
262267
if utils.match_response(http_res, "200", "application/json"):
263268
return unmarshal_json_response(components.GenerationResponse, http_res)
269+
if utils.match_response(http_res, "400", "application/json"):
270+
response_data = unmarshal_json_response(
271+
errors.BadRequestResponseErrorData, http_res
272+
)
273+
raise errors.BadRequestResponseError(response_data, http_res)
264274
if utils.match_response(http_res, "401", "application/json"):
265275
response_data = unmarshal_json_response(
266276
errors.UnauthorizedResponseErrorData, http_res
@@ -414,6 +424,11 @@ def list_generation_content(
414424
return unmarshal_json_response(
415425
components.GenerationContentResponse, http_res
416426
)
427+
if utils.match_response(http_res, "400", "application/json"):
428+
response_data = unmarshal_json_response(
429+
errors.BadRequestResponseErrorData, http_res
430+
)
431+
raise errors.BadRequestResponseError(response_data, http_res)
417432
if utils.match_response(http_res, "401", "application/json"):
418433
response_data = unmarshal_json_response(
419434
errors.UnauthorizedResponseErrorData, http_res
@@ -567,6 +582,11 @@ async def list_generation_content_async(
567582
return unmarshal_json_response(
568583
components.GenerationContentResponse, http_res
569584
)
585+
if utils.match_response(http_res, "400", "application/json"):
586+
response_data = unmarshal_json_response(
587+
errors.BadRequestResponseErrorData, http_res
588+
)
589+
raise errors.BadRequestResponseError(response_data, http_res)
570590
if utils.match_response(http_res, "401", "application/json"):
571591
response_data = unmarshal_json_response(
572592
errors.UnauthorizedResponseErrorData, http_res

‎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)