Skip to content

Commit d7af2f2

Browse files
chore: 🐝 Update SDK - Generate (spec change merged) 1.3.226 (#1448)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
1 parent 8d638b8 commit d7af2f2

10 files changed

Lines changed: 83 additions & 28 deletions

File tree

‎.speakeasy/gen.lock‎

Lines changed: 20 additions & 17 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: fc5a1f7403ef9532e605cc0f6251c308
4+
docChecksum: 4babeec89624af04f991bf3ffbb2a71f
55
docVersion: 1.0.0
66
speakeasyVersion: 1.803.2
77
generationVersion: 2.950.13
8-
releaseVersion: 1.3.225
9-
configChecksum: 7551bf9f7f03c35bc42d6a2c4ea3a800
8+
releaseVersion: 1.3.226
9+
configChecksum: ba299176bf8c6e375318c81a4a1bb746
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: 4f596bff-694f-4d13-800a-b794f508bfd4
15-
pristine_commit_hash: d1f885a37b58693a05a2b3d76bcfb5a8a65ec060
16-
pristine_tree_hash: b1321830edb542133c698444e6c99e8459f500a8
14+
generation_id: 7408ab10-2e36-443c-9429-7ac4417ec808
15+
pristine_commit_hash: 5f14a95f56348614d20c90e04b87914d17522934
16+
pristine_tree_hash: 5d82834fdc0ef045b2663bb503fff84580d77910
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -12304,8 +12304,8 @@ trackedFiles:
1230412304
pristine_git_object: 04af1956ac221b8912203963d46e14848a9bef6e
1230512305
docs/sdks/guardrails/README.mdx:
1230612306
id: a0cd4218b8fa
12307-
last_write_checksum: sha1:4b3cea0eefb36eaf94af17748398f0f221a45784
12308-
pristine_git_object: a35a383273e85fd75d8b2161aa1dde6619fbda36
12307+
last_write_checksum: sha1:d5af5863ad27cfa25e66f238d58c53422282e73a
12308+
pristine_git_object: d20f08df58953fa2580431fcfb9daa50ada0bb10
1230912309
docs/sdks/images/README.mdx:
1231012310
id: 534a6c102c4f
1231112311
last_write_checksum: sha1:7d425634484b9e3150e3cdc11b2c9e8b8bd52d76
@@ -12388,8 +12388,8 @@ trackedFiles:
1238812388
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
1238912389
pyproject.toml:
1239012390
id: 5d07e7d72637
12391-
last_write_checksum: sha1:4a4f316516168b9dbbfc6f2f08dd6316da0a9f04
12392-
pristine_git_object: a3f11da90f8c1133f0c81fd73229f45392072876
12391+
last_write_checksum: sha1:ae20ef478ac334c757316ff2c14c159f88c72c16
12392+
pristine_git_object: 6503b096bfd61f095dee77bf17e5da282c877f0f
1239312393
scripts/prepare_readme.py:
1239412394
id: e0c5957a6035
1239512395
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -12416,8 +12416,8 @@ trackedFiles:
1241612416
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
1241712417
src/openrouter/_version.py:
1241812418
id: d8d15ad6c586
12419-
last_write_checksum: sha1:55d67b3465b122737a2126b61d5c78eaaedb347c
12420-
pristine_git_object: 38d93a7b16629138f0ca59189a9401b757039774
12419+
last_write_checksum: sha1:fbdf3b4ac61171b8927fc5824100c74fc2538753
12420+
pristine_git_object: 41968b1bcf02d9746d4daa9865a11d92b09a7f3c
1242112421
src/openrouter/alpha.py:
1242212422
id: 306c4d93308d
1242312423
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
@@ -16644,8 +16644,8 @@ trackedFiles:
1664416644
pristine_git_object: b2b812577f8ea24153dce094cbab1fb2b229e769
1664516645
src/openrouter/guardrails.py:
1664616646
id: 705839f34e66
16647-
last_write_checksum: sha1:d356c307b30fb5752149420e5e55ebf81aaaa5eb
16648-
pristine_git_object: 0507f7f86144e3e3890087104101e6810a674e81
16647+
last_write_checksum: sha1:69bf7403b0ab33a52b621377a3ee404f47f8983b
16648+
pristine_git_object: 40185bf0a77ee58202d27443ef8e288178114d50
1664916649
src/openrouter/httpclient.py:
1665016650
id: e9311185443d
1665116651
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
@@ -18038,6 +18038,8 @@ examples:
1803818038
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1803918039
"403":
1804018040
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
18041+
"400":
18042+
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1804118043
updateGuardrail:
1804218044
speakeasy-default-update-guardrail:
1804318045
parameters:
@@ -18076,6 +18078,8 @@ examples:
1807618078
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1807718079
"403":
1807818080
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
18081+
"400":
18082+
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
1807918083
listKeyAssignments:
1808018084
speakeasy-default-list-key-assignments:
1808118085
parameters:
@@ -22780,6 +22784,5 @@ examples:
2278022784
examplesVersion: 1.0.2
2278122785
releaseNotes: |
2278222786
## Python SDK Changes:
22783-
* `open_router.scim.list_organization_role_mappings()`: **Added**
22784-
* `open_router.scim.create_organization_role_mapping()`: **Added**
22785-
* `open_router.scim.delete_organization_role_mapping()`: **Added**
22787+
* `open_router.guardrails.delete()`: `error.status[400]` **Added**
22788+
* `open_router.guardrails.get()`: `error.status[400]` **Added**

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ generation:
3737
documentation: mintlify
3838
preApplyUnionDiscriminators: true
3939
python:
40-
version: 1.3.225
40+
version: 1.3.226
4141
additionalDependencies:
4242
dev:
4343
pytest: '>=8.3'

‎.speakeasy/out.openapi.yaml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50111,6 +50111,16 @@ paths:
5011150111
schema:
5011250112
$ref: '#/components/schemas/DeleteGuardrailResponse'
5011350113
description: 'Guardrail deleted successfully'
50114+
'400':
50115+
content:
50116+
application/json:
50117+
example:
50118+
error:
50119+
code: 400
50120+
message: 'Invalid request parameters'
50121+
schema:
50122+
$ref: '#/components/schemas/BadRequestResponse'
50123+
description: 'Bad Request - Invalid request parameters or malformed input'
5011450124
'401':
5011550125
content:
5011650126
application/json:
@@ -50194,6 +50204,16 @@ paths:
5019450204
schema:
5019550205
$ref: '#/components/schemas/GetGuardrailResponse'
5019650206
description: 'Guardrail details'
50207+
'400':
50208+
content:
50209+
application/json:
50210+
example:
50211+
error:
50212+
code: 400
50213+
message: 'Invalid request parameters'
50214+
schema:
50215+
$ref: '#/components/schemas/BadRequestResponse'
50216+
description: 'Bad Request - Invalid request parameters or malformed input'
5019750217
'401':
5019850218
content:
5019950219
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.803.2
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:6185f185b85e8cbf9b2f4a39828ae8d21e85d8c1c2ea2a198d979cd544ab3d74
6-
sourceBlobDigest: sha256:23ee9b5e5a1bfd0074fadb9f698f5cbb3542155243249bab3aaf5d8cf7841309
5+
sourceRevisionDigest: sha256:fa39c8edacf1998e475a5311bee64438788b79840819d50f2bb74869ff38e526
6+
sourceBlobDigest: sha256:a531bed493c48dd2329832b376d77845b9c1e6ad7587285ee94f995a84ce9f6f
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:6185f185b85e8cbf9b2f4a39828ae8d21e85d8c1c2ea2a198d979cd544ab3d74
15-
sourceBlobDigest: sha256:23ee9b5e5a1bfd0074fadb9f698f5cbb3542155243249bab3aaf5d8cf7841309
14+
sourceRevisionDigest: sha256:fa39c8edacf1998e475a5311bee64438788b79840819d50f2bb74869ff38e526
15+
sourceBlobDigest: sha256:a531bed493c48dd2329832b376d77845b9c1e6ad7587285ee94f995a84ce9f6f
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:8716e1847e73fdaa73c024a4295bbdaa85632657421799b41bf768bf9296fddc
17+
codeSamplesRevisionDigest: sha256:c990856095d95236bdad295c34e68dde689911cdc248866185d101ff64a0f21e
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.803.2

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5019,4 +5019,14 @@ Based on:
50195019
### Generated
50205020
- [python v1.3.225] .
50215021
### Releases
5022-
- [PyPI v1.3.225] https://pypi.org/project/openrouter/1.3.225 - .
5022+
- [PyPI v1.3.225] https://pypi.org/project/openrouter/1.3.225 - .
5023+
5024+
## 2026-12-02 00:33:53
5025+
### Changes
5026+
Based on:
5027+
- OpenAPI Doc
5028+
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
5029+
### Generated
5030+
- [python v1.3.226] .
5031+
### Releases
5032+
- [PyPI v1.3.226] https://pypi.org/project/openrouter/1.3.226 - .

‎docs/sdks/guardrails/README.mdx‎

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

201201
| Error Type | Status Code | Content Type |
202202
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
203+
| errors.BadRequestResponseError | 400 | application/json |
203204
| errors.UnauthorizedResponseError | 401 | application/json |
204205
| errors.ForbiddenResponseError | 403 | application/json |
205206
| errors.NotFoundResponseError | 404 | application/json |
@@ -249,6 +250,7 @@ with OpenRouter(
249250

250251
| Error Type | Status Code | Content Type |
251252
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
253+
| errors.BadRequestResponseError | 400 | application/json |
252254
| errors.UnauthorizedResponseError | 401 | application/json |
253255
| errors.ForbiddenResponseError | 403 | application/json |
254256
| 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.225"
3+
version = "1.3.226"
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.225"
6+
__version__: str = "1.3.226"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.950.13"
9-
__user_agent__: str = "speakeasy-sdk/python 1.3.225 2.950.13 1.0.0 openrouter"
9+
__user_agent__: str = "speakeasy-sdk/python 1.3.226 2.950.13 1.0.0 openrouter"
1010

1111
try:
1212
if __package__ is not None:

‎src/openrouter/guardrails.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,11 @@ def delete(
958958
response_data: Any = None
959959
if utils.match_response(http_res, "200", "application/json"):
960960
return unmarshal_json_response(components.DeleteGuardrailResponse, http_res)
961+
if utils.match_response(http_res, "400", "application/json"):
962+
response_data = unmarshal_json_response(
963+
errors.BadRequestResponseErrorData, http_res
964+
)
965+
raise errors.BadRequestResponseError(response_data, http_res)
961966
if utils.match_response(http_res, "401", "application/json"):
962967
response_data = unmarshal_json_response(
963968
errors.UnauthorizedResponseErrorData, http_res
@@ -1091,6 +1096,11 @@ async def delete_async(
10911096
response_data: Any = None
10921097
if utils.match_response(http_res, "200", "application/json"):
10931098
return unmarshal_json_response(components.DeleteGuardrailResponse, http_res)
1099+
if utils.match_response(http_res, "400", "application/json"):
1100+
response_data = unmarshal_json_response(
1101+
errors.BadRequestResponseErrorData, http_res
1102+
)
1103+
raise errors.BadRequestResponseError(response_data, http_res)
10941104
if utils.match_response(http_res, "401", "application/json"):
10951105
response_data = unmarshal_json_response(
10961106
errors.UnauthorizedResponseErrorData, http_res
@@ -1224,6 +1234,11 @@ def get(
12241234
response_data: Any = None
12251235
if utils.match_response(http_res, "200", "application/json"):
12261236
return unmarshal_json_response(components.GetGuardrailResponse, http_res)
1237+
if utils.match_response(http_res, "400", "application/json"):
1238+
response_data = unmarshal_json_response(
1239+
errors.BadRequestResponseErrorData, http_res
1240+
)
1241+
raise errors.BadRequestResponseError(response_data, http_res)
12271242
if utils.match_response(http_res, "401", "application/json"):
12281243
response_data = unmarshal_json_response(
12291244
errors.UnauthorizedResponseErrorData, http_res
@@ -1357,6 +1372,11 @@ async def get_async(
13571372
response_data: Any = None
13581373
if utils.match_response(http_res, "200", "application/json"):
13591374
return unmarshal_json_response(components.GetGuardrailResponse, http_res)
1375+
if utils.match_response(http_res, "400", "application/json"):
1376+
response_data = unmarshal_json_response(
1377+
errors.BadRequestResponseErrorData, http_res
1378+
)
1379+
raise errors.BadRequestResponseError(response_data, http_res)
13601380
if utils.match_response(http_res, "401", "application/json"):
13611381
response_data = unmarshal_json_response(
13621382
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)