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
73 changes: 57 additions & 16 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: 92108b39165950fa16e8dfbf4d3f2266
docChecksum: 2820c1ebeee9014a28ca30bf098f8aee
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.3.57
configChecksum: bc6d380c803d374425ffd992a616c3dd
releaseVersion: 1.3.58
configChecksum: 402618c19e749c96b24b99f3da7e25d5
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 0d97340d-2f0f-4cb3-9013-a6398e37bc3a
pristine_commit_hash: 13762bdb649fcf5de52ca952a649ca2452916431
pristine_tree_hash: 4803d134f22a7cc41c19f4800e457809fe242162
generation_id: 247f2336-3669-41d1-a973-651801266f68
pristine_commit_hash: 7fc1c4d6c4813a5d232f4c7309e34a207afe6106
pristine_tree_hash: 4d8a3da59058ebca12b8b2d618a296012352b4f2
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -10304,8 +10304,8 @@ trackedFiles:
pristine_git_object: 7b3c78a7323028a4668d6ce8394c8cdd4c15b67d
docs/sdks/vault/README.mdx:
id: 3738c6722acd
last_write_checksum: sha1:12acdfed4c2a32488d98b6091fd8c392af516494
pristine_git_object: 8d9386c0a3101f823f7509e8d6d1ebb97c8339d0
last_write_checksum: sha1:b608fe6954d2fc05d3982c4d071d8818ce68c1d8
pristine_git_object: 03052b483039f45f63018432feaa54d255506749
docs/sdks/videogeneration/README.mdx:
id: 9a8fa04c3872
last_write_checksum: sha1:936739fa3beecf2583d22e02baf5186917e466b4
Expand All @@ -10320,8 +10320,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:f0420b2b06b3cb030d94be2f44bf6b8561c5b843
pristine_git_object: 60445589a7cf37d92757b4dc2825ca01d1a2e5fc
last_write_checksum: sha1:a86a096de48d48d3e59c20f6f49ef7bd9008c900
pristine_git_object: a1e0ff5e66179c29d1e07e0d2fbce8d160d63747
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -10348,8 +10348,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:29be669907fe2701d7dabdb6a426b453c763617b
pristine_git_object: dcb23768aa23470a0e72b9f45ff92c91191c565f
last_write_checksum: sha1:640adf20b6b1131f18d77eead235ede40e5aadba
pristine_git_object: 01dfa8836269c963c723ea7abb2d21b8e5bae4bf
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
Expand Down Expand Up @@ -14808,8 +14808,8 @@ trackedFiles:
pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3
src/openrouter/vault.py:
id: 0645fe426ac1
last_write_checksum: sha1:3a0daca68628b484130fcfec530820c6dcbde67c
pristine_git_object: 7619f073a18d91f4230f51f2a1915598ef4d8a48
last_write_checksum: sha1:04d687c1ccb0980e4bab049b684e545d88343a7d
pristine_git_object: fbe218be3bd8fec06925de712f3a7fd13babf41d
src/openrouter/video_generation.py:
id: d0a90c1b8efe
last_write_checksum: sha1:e5fc6c816742687bad4a0ae9a9d9232945f04815
Expand Down Expand Up @@ -17097,6 +17097,16 @@ examples:
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
"504":
application/json: {"error": {"code": 504, "message": "The operation was aborted due to timeout"}}
"409":
application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
conflict:
parameters:
path:
internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7"
name: "github_token"
responses:
"409":
application/json: {"error": {"code": 409, "message": "Vault request conflicts with existing secrets"}}
storeInternVaultSecret:
speakeasy-default-store-intern-vault-secret:
parameters:
Expand Down Expand Up @@ -17292,6 +17302,16 @@ examples:
responses:
"504":
application/json: {"error": {"code": 504, "message": "Vault request timed out"}}
conflict:
parameters:
path:
internId: "7c9e6679-7425-40de-944b-e07fc1f90ae7"
name: "github_token"
requestBody:
application/json: {"hosts": ["api.github.com"], "value": "ghp_exampleTokenValue"}
responses:
"409":
application/json: {"error": {"code": 409, "message": "Vault request conflicts with existing secrets"}}
copyVaultSecretsToIntern:
speakeasy-default-copy-vault-secrets-to-intern:
parameters:
Expand Down Expand Up @@ -17735,6 +17755,15 @@ examples:
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
"504":
application/json: {"error": {"code": 504, "message": "The operation was aborted due to timeout"}}
"409":
application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
conflict:
parameters:
path:
name: "github_token"
responses:
"409":
application/json: {"error": {"code": 409, "message": "Vault request conflicts with existing secrets"}}
storeVaultSecret:
speakeasy-default-store-vault-secret:
parameters:
Expand Down Expand Up @@ -17767,6 +17796,8 @@ examples:
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
"504":
application/json: {"error": {"code": 504, "message": "The operation was aborted due to timeout"}}
"409":
application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}}
invalid-vault-request:
parameters:
path:
Expand Down Expand Up @@ -17902,6 +17933,15 @@ examples:
responses:
"504":
application/json: {"error": {"code": 504, "message": "Vault request timed out"}}
conflict:
parameters:
path:
name: "github_token"
requestBody:
application/json: {"hosts": ["api.github.com"], "value": "ghp_exampleTokenValue"}
responses:
"409":
application/json: {"error": {"code": 409, "message": "Vault request conflicts with existing secrets"}}
listInterns:
speakeasy-default-list-interns:
responses:
Expand Down Expand Up @@ -18794,5 +18834,6 @@ examples:
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.endpoints.list_zdr_endpoints()`: `response.data[].service_tier` **Added**
* `open_router.endpoints.list()`: `response.data.endpoints[].service_tier` **Added**
* `open_router.vault.delete_intern_vault_secret()`: `error.status[409]` **Added**
* `open_router.vault.delete_vault_secret()`: `error.status[409]` **Added**
* `open_router.vault.store_vault_secret()`: `error.status[409]` **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.57
version: 1.3.58
additionalDependencies:
dev: {}
main: {}
Expand Down
47 changes: 43 additions & 4 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52682,6 +52682,19 @@ paths:
schema:
$ref: '#/components/schemas/RequestTimeoutResponse'
description: 'Request Timeout - The route deadline passed before the request completed, or the request body stopped arriving.'
'409':
content:
application/json:
examples:
conflict:
summary: 'Conflict'
value:
error:
code: 409
message: 'Vault request conflicts with existing secrets'
schema:
$ref: '#/components/schemas/ConflictResponse'
description: 'Conflict - The secret belongs to a connection (for example an MCP or GitHub connection) and can only be replaced or removed by reconnecting or disconnecting it.'
'429':
content:
application/json:
Expand Down Expand Up @@ -52893,15 +52906,15 @@ paths:
content:
application/json:
examples:
transfer-in-progress:
summary: 'Transfer in progress'
conflict:
summary: 'Conflict'
value:
error:
code: 409
message: 'Vault request conflicts with existing secrets'
schema:
$ref: '#/components/schemas/ConflictResponse'
description: 'Conflict - The intern is being transferred to another workspace and its vault has not moved yet. Retry once the transfer finishes.'
description: 'Conflict - The secret belongs to a connection (for example an MCP or GitHub connection) and can only be replaced or removed by reconnecting or disconnecting it. Also returned while the intern is being transferred to another workspace and its vault has not moved yet.'
'413':
content:
application/json:
Expand Down Expand Up @@ -53127,7 +53140,7 @@ paths:
message: 'Vault request conflicts with existing secrets'
schema:
$ref: '#/components/schemas/ConflictResponse'
description: 'Conflict - A named workspace secret has no hosts yet, or the intern is being transferred to another workspace. Nothing is copied.'
description: 'Conflict - A named workspace secret has no hosts yet, the intern already holds a secret of that name that belongs to a connection, or the intern is being transferred to another workspace. Nothing is copied.'
'413':
content:
application/json:
Expand Down Expand Up @@ -53533,6 +53546,19 @@ paths:
schema:
$ref: '#/components/schemas/RequestTimeoutResponse'
description: 'Request Timeout - The route deadline passed before the request completed, or the request body stopped arriving.'
'409':
content:
application/json:
examples:
conflict:
summary: 'Conflict'
value:
error:
code: 409
message: 'Vault request conflicts with existing secrets'
schema:
$ref: '#/components/schemas/ConflictResponse'
description: 'Conflict - The secret belongs to a connection (for example an MCP or GitHub connection) and can only be replaced or removed by reconnecting or disconnecting it.'
'429':
content:
application/json:
Expand Down Expand Up @@ -53731,6 +53757,19 @@ paths:
schema:
$ref: '#/components/schemas/RequestTimeoutResponse'
description: 'Request Timeout - The route deadline passed before the request completed, or the request body stopped arriving.'
'409':
content:
application/json:
examples:
conflict:
summary: 'Conflict'
value:
error:
code: 409
message: 'Vault request conflicts with existing secrets'
schema:
$ref: '#/components/schemas/ConflictResponse'
description: 'Conflict - The secret belongs to a connection (for example an MCP or GitHub connection) and can only be replaced or removed by reconnecting or disconnecting it.'
'413':
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:5139bdd0598c536fc25ef5ad8702b412a2c7da5623e092b8bbc46df2e89bc4f6
sourceBlobDigest: sha256:d02958640cd56cfc0519ba9cfb5d928d43aaad7587f0b060db29acda8b648f1e
sourceRevisionDigest: sha256:6a8e2a83988a144c76a37022b284c3231f2c21214f5eedf21acc119f3811331f
sourceBlobDigest: sha256:9e11fb751bf0341d329ac70e5b91bf099fe7a5081c596c5769be8427d748efe0
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:5139bdd0598c536fc25ef5ad8702b412a2c7da5623e092b8bbc46df2e89bc4f6
sourceBlobDigest: sha256:d02958640cd56cfc0519ba9cfb5d928d43aaad7587f0b060db29acda8b648f1e
sourceRevisionDigest: sha256:6a8e2a83988a144c76a37022b284c3231f2c21214f5eedf21acc119f3811331f
sourceBlobDigest: sha256:9e11fb751bf0341d329ac70e5b91bf099fe7a5081c596c5769be8427d748efe0
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:cc360e09e1933d1206b8a8233d6540f41b9875dd58d9247f160102001752321d
codeSamplesRevisionDigest: sha256:2ab616a7ffef4556033bee8f360e5279bad1a8b8733cd81659320213ffcf3379
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 @@ -3339,4 +3339,14 @@ Based on:
### Generated
- [python v1.3.57] .
### Releases
- [PyPI v1.3.57] https://pypi.org/project/openrouter/1.3.57 - .
- [PyPI v1.3.57] https://pypi.org/project/openrouter/1.3.57 - .

## 2026-10-15 18:35:35
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.58] .
### Releases
- [PyPI v1.3.58] https://pypi.org/project/openrouter/1.3.58 - .
47 changes: 47 additions & 0 deletions docs/sdks/vault/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ with OpenRouter(
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.RequestTimeoutResponseError | 408 | application/json |
| errors.ConflictResponseError | 409 | application/json |
| errors.TooManyRequestsResponseError | 429 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.BadGatewayResponseError | 502 | application/json |
Expand Down Expand Up @@ -216,6 +217,28 @@ from openrouter import OpenRouter
import os


with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:

res = open_router.vault.store_intern_vault_secret(intern_id="7c9e6679-7425-40de-944b-e07fc1f90ae7", name="github_token", hosts=[
"api.github.com",
], value="ghp_exampleTokenValue")

# Handle response
print(res)

```
### Example Usage: conflict

```python
from openrouter import OpenRouter
import os


with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
Expand Down Expand Up @@ -1064,6 +1087,7 @@ with OpenRouter(
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.RequestTimeoutResponseError | 408 | application/json |
| errors.ConflictResponseError | 409 | application/json |
| errors.TooManyRequestsResponseError | 429 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.BadGatewayResponseError | 502 | application/json |
Expand Down Expand Up @@ -1104,6 +1128,28 @@ from openrouter import OpenRouter
import os


with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:

res = open_router.vault.store_vault_secret(name="github_token", hosts=[
"api.github.com",
], value="ghp_exampleTokenValue")

# Handle response
print(res)

```
### Example Usage: conflict

```python
from openrouter import OpenRouter
import os


with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
Expand Down Expand Up @@ -1431,6 +1477,7 @@ with OpenRouter(
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.RequestTimeoutResponseError | 408 | application/json |
| errors.ConflictResponseError | 409 | application/json |
| errors.PayloadTooLargeResponseError | 413 | application/json |
| errors.TooManyRequestsResponseError | 429 | application/json |
| errors.InternalServerResponseError | 500 | 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.57"
version = "1.3.58"
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.57"
__version__: str = "1.3.58"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.3.57 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.3.58 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
Loading