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
37 changes: 20 additions & 17 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: fc5a1f7403ef9532e605cc0f6251c308
docChecksum: 4babeec89624af04f991bf3ffbb2a71f
docVersion: 1.0.0
speakeasyVersion: 1.803.2
generationVersion: 2.950.13
releaseVersion: 1.3.225
configChecksum: 7551bf9f7f03c35bc42d6a2c4ea3a800
releaseVersion: 1.3.226
configChecksum: ba299176bf8c6e375318c81a4a1bb746
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 4f596bff-694f-4d13-800a-b794f508bfd4
pristine_commit_hash: d1f885a37b58693a05a2b3d76bcfb5a8a65ec060
pristine_tree_hash: b1321830edb542133c698444e6c99e8459f500a8
generation_id: 7408ab10-2e36-443c-9429-7ac4417ec808
pristine_commit_hash: 5f14a95f56348614d20c90e04b87914d17522934
pristine_tree_hash: 5d82834fdc0ef045b2663bb503fff84580d77910
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -12304,8 +12304,8 @@ trackedFiles:
pristine_git_object: 04af1956ac221b8912203963d46e14848a9bef6e
docs/sdks/guardrails/README.mdx:
id: a0cd4218b8fa
last_write_checksum: sha1:4b3cea0eefb36eaf94af17748398f0f221a45784
pristine_git_object: a35a383273e85fd75d8b2161aa1dde6619fbda36
last_write_checksum: sha1:d5af5863ad27cfa25e66f238d58c53422282e73a
pristine_git_object: d20f08df58953fa2580431fcfb9daa50ada0bb10
docs/sdks/images/README.mdx:
id: 534a6c102c4f
last_write_checksum: sha1:7d425634484b9e3150e3cdc11b2c9e8b8bd52d76
Expand Down Expand Up @@ -12388,8 +12388,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:4a4f316516168b9dbbfc6f2f08dd6316da0a9f04
pristine_git_object: a3f11da90f8c1133f0c81fd73229f45392072876
last_write_checksum: sha1:ae20ef478ac334c757316ff2c14c159f88c72c16
pristine_git_object: 6503b096bfd61f095dee77bf17e5da282c877f0f
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -12416,8 +12416,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:55d67b3465b122737a2126b61d5c78eaaedb347c
pristine_git_object: 38d93a7b16629138f0ca59189a9401b757039774
last_write_checksum: sha1:fbdf3b4ac61171b8927fc5824100c74fc2538753
pristine_git_object: 41968b1bcf02d9746d4daa9865a11d92b09a7f3c
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766
Expand Down Expand Up @@ -16644,8 +16644,8 @@ trackedFiles:
pristine_git_object: b2b812577f8ea24153dce094cbab1fb2b229e769
src/openrouter/guardrails.py:
id: 705839f34e66
last_write_checksum: sha1:d356c307b30fb5752149420e5e55ebf81aaaa5eb
pristine_git_object: 0507f7f86144e3e3890087104101e6810a674e81
last_write_checksum: sha1:69bf7403b0ab33a52b621377a3ee404f47f8983b
pristine_git_object: 40185bf0a77ee58202d27443ef8e288178114d50
src/openrouter/httpclient.py:
id: e9311185443d
last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7
Expand Down Expand Up @@ -18038,6 +18038,8 @@ examples:
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
"403":
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
updateGuardrail:
speakeasy-default-update-guardrail:
parameters:
Expand Down Expand Up @@ -18076,6 +18078,8 @@ examples:
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
"403":
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
"400":
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
listKeyAssignments:
speakeasy-default-list-key-assignments:
parameters:
Expand Down Expand Up @@ -22780,6 +22784,5 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.scim.list_organization_role_mappings()`: **Added**
* `open_router.scim.create_organization_role_mapping()`: **Added**
* `open_router.scim.delete_organization_role_mapping()`: **Added**
* `open_router.guardrails.delete()`: `error.status[400]` **Added**
* `open_router.guardrails.get()`: `error.status[400]` **Added**
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.3.225
version: 1.3.226
additionalDependencies:
dev:
pytest: '>=8.3'
Expand Down
20 changes: 20 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50111,6 +50111,16 @@ paths:
schema:
$ref: '#/components/schemas/DeleteGuardrailResponse'
description: 'Guardrail deleted successfully'
'400':
content:
application/json:
example:
error:
code: 400
message: 'Invalid request parameters'
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: 'Bad Request - Invalid request parameters or malformed input'
'401':
content:
application/json:
Expand Down Expand Up @@ -50194,6 +50204,16 @@ paths:
schema:
$ref: '#/components/schemas/GetGuardrailResponse'
description: 'Guardrail details'
'400':
content:
application/json:
example:
error:
code: 400
message: 'Invalid request parameters'
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: 'Bad Request - Invalid request parameters or malformed input'
'401':
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.803.2
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6185f185b85e8cbf9b2f4a39828ae8d21e85d8c1c2ea2a198d979cd544ab3d74
sourceBlobDigest: sha256:23ee9b5e5a1bfd0074fadb9f698f5cbb3542155243249bab3aaf5d8cf7841309
sourceRevisionDigest: sha256:fa39c8edacf1998e475a5311bee64438788b79840819d50f2bb74869ff38e526
sourceBlobDigest: sha256:a531bed493c48dd2329832b376d77845b9c1e6ad7587285ee94f995a84ce9f6f
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6185f185b85e8cbf9b2f4a39828ae8d21e85d8c1c2ea2a198d979cd544ab3d74
sourceBlobDigest: sha256:23ee9b5e5a1bfd0074fadb9f698f5cbb3542155243249bab3aaf5d8cf7841309
sourceRevisionDigest: sha256:fa39c8edacf1998e475a5311bee64438788b79840819d50f2bb74869ff38e526
sourceBlobDigest: sha256:a531bed493c48dd2329832b376d77845b9c1e6ad7587285ee94f995a84ce9f6f
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:8716e1847e73fdaa73c024a4295bbdaa85632657421799b41bf768bf9296fddc
codeSamplesRevisionDigest: sha256:c990856095d95236bdad295c34e68dde689911cdc248866185d101ff64a0f21e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.803.2
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5019,4 +5019,14 @@ Based on:
### Generated
- [python v1.3.225] .
### Releases
- [PyPI v1.3.225] https://pypi.org/project/openrouter/1.3.225 - .
- [PyPI v1.3.225] https://pypi.org/project/openrouter/1.3.225 - .

## 2026-12-02 00:33:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.226] .
### Releases
- [PyPI v1.3.226] https://pypi.org/project/openrouter/1.3.226 - .
2 changes: 2 additions & 0 deletions docs/sdks/guardrails/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ with OpenRouter(

| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
Expand Down Expand Up @@ -249,6 +250,7 @@ with OpenRouter(

| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
Expand Down
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.225"
version = "1.3.226"
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.225"
__version__: str = "1.3.226"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.950.13"
__user_agent__: str = "speakeasy-sdk/python 1.3.225 2.950.13 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.3.226 2.950.13 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
20 changes: 20 additions & 0 deletions src/openrouter/guardrails.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,11 @@ def delete(
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(components.DeleteGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
)
raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
Expand Down Expand Up @@ -1091,6 +1096,11 @@ async def delete_async(
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(components.DeleteGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
)
raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
Expand Down Expand Up @@ -1224,6 +1234,11 @@ def get(
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(components.GetGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
)
raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, http_res
Expand Down Expand Up @@ -1357,6 +1372,11 @@ async def get_async(
response_data: Any = None
if utils.match_response(http_res, "200", "application/json"):
return unmarshal_json_response(components.GetGuardrailResponse, http_res)
if utils.match_response(http_res, "400", "application/json"):
response_data = unmarshal_json_response(
errors.BadRequestResponseErrorData, http_res
)
raise errors.BadRequestResponseError(response_data, http_res)
if utils.match_response(http_res, "401", "application/json"):
response_data = unmarshal_json_response(
errors.UnauthorizedResponseErrorData, 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.