Skip to content

Commit aaf3e8a

Browse files
committed
## Python SDK Changes:
* `open_router.interns.chat()`: `response.status[202]` **Added** (Breaking ⚠️) * `open_router.byok.list()`: `response.data[].declared_zdr` **Added** * `open_router.byok.create()`: * `request.declared_zdr` **Added** * `response.data.declared_zdr` **Added** * `open_router.byok.get()`: `response.data.declared_zdr` **Added** * `open_router.byok.update()`: * `request.declared_zdr` **Added** * `response.data.declared_zdr` **Added**
1 parent 161c194 commit aaf3e8a

29 files changed

Lines changed: 395 additions & 172 deletions

‎.speakeasy/gen.lock‎

Lines changed: 65 additions & 51 deletions
Large diffs are not rendered by default.

‎.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.2.11
39+
version: 1.2.12
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,6 +4570,7 @@ components:
45704570
allowed_models: null
45714571
allowed_user_ids: null
45724572
created_at: '2025-08-24T10:30:00Z'
4573+
declared_zdr: null
45734574
disabled: false
45744575
id: '11111111-2222-3333-4444-555555555555'
45754576
is_byok_only: false
@@ -4613,6 +4614,12 @@ components:
46134614
description: 'ISO timestamp of when the credential was created.'
46144615
example: '2025-08-24T10:30:00Z'
46154616
type: 'string'
4617+
declared_zdr:
4618+
description: 'Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter''s data policy for the provider''s endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter.'
4619+
example: null
4620+
type:
4621+
- 'boolean'
4622+
- 'null'
46164623
disabled:
46174624
description: 'Whether this credential is currently disabled.'
46184625
example: false
@@ -4666,6 +4673,7 @@ components:
46664673
- 'is_fallback'
46674674
- 'is_required'
46684675
- 'is_byok_only'
4676+
- 'declared_zdr'
46694677
- 'allowed_models'
46704678
- 'allowed_api_key_hashes'
46714679
- 'allowed_user_ids'
@@ -7383,6 +7391,12 @@ components:
73837391
type:
73847392
- 'array'
73857393
- 'null'
7394+
declared_zdr:
7395+
description: 'Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter''s data policy for the provider''s endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter. Defaults to `null`.'
7396+
example: null
7397+
type:
7398+
- 'boolean'
7399+
- 'null'
73867400
disabled:
73877401
description: 'Whether this credential should be created in a disabled state.'
73887402
example: false
@@ -7429,6 +7443,7 @@ components:
74297443
allowed_models: null
74307444
allowed_user_ids: null
74317445
created_at: '2025-08-24T10:30:00Z'
7446+
declared_zdr: null
74327447
disabled: false
74337448
id: '11111111-2222-3333-4444-555555555555'
74347449
is_byok_only: false
@@ -10214,11 +10229,11 @@ components:
1021410229
- 'completions'
1021510230
- 'embeddings'
1021610231
- 'rerank'
10232+
- 'decisions'
10233+
- 'video'
1021710234
- 'tts'
1021810235
- 'stt'
10219-
- 'video'
1022010236
- 'image'
10221-
- 'decisions'
1022210237
- null
1022310238
type:
1022410239
- 'string'
@@ -10535,6 +10550,7 @@ components:
1053510550
allowed_models: null
1053610551
allowed_user_ids: null
1053710552
created_at: '2025-08-24T10:30:00Z'
10553+
declared_zdr: null
1053810554
disabled: false
1053910555
id: '11111111-2222-3333-4444-555555555555'
1054010556
is_byok_only: false
@@ -12858,6 +12874,25 @@ components:
1285812874
required:
1285912875
- 'cached_tokens'
1286012876
type: 'object'
12877+
InternChatSteeredResponse:
12878+
description: 'The message was delivered into the turn already running on the same session. Its effect is streamed on that turn, not here.'
12879+
example:
12880+
session_id: 'sess_01j9x0k4q7v8r2t3m6n5p8w9y1'
12881+
status: 'steered'
12882+
properties:
12883+
session_id:
12884+
description: 'The session of the running turn the message was delivered to.'
12885+
example: 'sess_01j9x0k4q7v8r2t3m6n5p8w9y1'
12886+
type: 'string'
12887+
status:
12888+
description: 'The message was handed to the turn already running on this session.'
12889+
enum:
12890+
- 'steered'
12891+
type: 'string'
12892+
required:
12893+
- 'session_id'
12894+
- 'status'
12895+
type: 'object'
1286112896
InternChatStreamError:
1286212897
description: 'A failure after the response headers were sent. The chunk that carries it has `finish_reason: "error"`, then the final empty-`choices` chunk and `[DONE]` follow. Reasons here are `attachment_failed`, `busy`, `client_closed_request`, `interaction_not_pending`, `interaction_unknown`, `intern_unreachable`, `run_ended`, `stream_severed`, `timeout` or `turn_failed`. `run_ended` reports an ending the intern confirmed, such as a cancellation or a deadline, while `stream_severed` reports a connection lost without that confirmation.'
1286312898
example:
@@ -13267,6 +13302,7 @@ components:
1326713302
allowed_models: null
1326813303
allowed_user_ids: null
1326913304
created_at: '2025-08-24T10:30:00Z'
13305+
declared_zdr: null
1327013306
disabled: false
1327113307
id: '11111111-2222-3333-4444-555555555555'
1327213308
is_byok_only: false
@@ -27776,6 +27812,12 @@ components:
2777627812
type:
2777727813
- 'array'
2777827814
- 'null'
27815+
declared_zdr:
27816+
description: 'Your declaration of whether the upstream provider account behind this credential has zero data retention (ZDR). `null` inherits OpenRouter''s data policy for the provider''s endpoint; `true` declares the account ZDR so requests that require ZDR may route to this credential even when the shared endpoint retains data; `false` declares it non-ZDR so such requests never route to it. Self-declared and not verified by OpenRouter. Omit to leave the stored value unchanged; `null` clears the declaration.'
27817+
example: null
27818+
type:
27819+
- 'boolean'
27820+
- 'null'
2777927821
disabled:
2778027822
description: 'Whether this credential is disabled.'
2778127823
example: false
@@ -27812,6 +27854,7 @@ components:
2781227854
allowed_models: null
2781327855
allowed_user_ids: null
2781427856
created_at: '2025-08-24T10:30:00Z'
27857+
declared_zdr: null
2781527858
disabled: false
2781627859
id: '11111111-2222-3333-4444-555555555555'
2781727860
is_byok_only: false
@@ -31562,6 +31605,7 @@ paths:
3156231605
allowed_models: null
3156331606
allowed_user_ids: null
3156431607
created_at: '2025-08-24T10:30:00Z'
31608+
declared_zdr: null
3156531609
disabled: false
3156631610
id: '11111111-2222-3333-4444-555555555555'
3156731611
is_byok_only: false
@@ -31644,6 +31688,7 @@ paths:
3164431688
allowed_models: null
3164531689
allowed_user_ids: null
3164631690
created_at: '2025-08-24T10:30:00Z'
31691+
declared_zdr: null
3164731692
disabled: false
3164831693
id: '11111111-2222-3333-4444-555555555555'
3164931694
is_byok_only: false
@@ -31785,6 +31830,7 @@ paths:
3178531830
allowed_models: null
3178631831
allowed_user_ids: null
3178731832
created_at: '2025-08-24T10:30:00Z'
31833+
declared_zdr: null
3178831834
disabled: false
3178931835
id: '11111111-2222-3333-4444-555555555555'
3179031836
is_byok_only: false
@@ -31864,6 +31910,7 @@ paths:
3186431910
allowed_models: null
3186531911
allowed_user_ids: null
3186631912
created_at: '2025-08-24T10:30:00Z'
31913+
declared_zdr: null
3186731914
disabled: false
3186831915
id: '11111111-2222-3333-4444-555555555555'
3186931916
is_byok_only: false
@@ -37238,6 +37285,12 @@ paths:
3723837285
schema:
3723937286
$ref: '#/components/schemas/InternChatCompletionChunk'
3724037287
description: 'The streamed completion. Chunks carry text, then a finish chunk: `finish_reason: "stop"` when the turn is complete, `finish_reason: "tool_calls"` when the intern is waiting for an answer, or `finish_reason: "error"` for a failure after this status. A final chunk with empty `choices` follows in every case, carrying `session_id` and `usage` (`null` unless the intern reported usage, and always `null` after `tool_calls`), and the stream ends with `data: [DONE]`.'
37288+
'202':
37289+
content:
37290+
application/json:
37291+
schema:
37292+
$ref: '#/components/schemas/InternChatSteeredResponse'
37293+
description: 'A turn is already running on this intern for the same `session_id`, and the message was delivered into it instead of starting a new turn. Nothing streams here: the intern takes the message up on the running turn, whose stream continues on the request that started it. Sent only for a `user` message with a `session_id`; a `tool` reply, a request without a `session_id`, or one for another session gets `409 busy`, as does a message the intern could not take.'
3724137294
'400':
3724237295
content:
3724337296
application/json:
@@ -37309,7 +37362,7 @@ paths:
3730937362
retryable: false
3731037363
schema:
3731137364
$ref: '#/components/schemas/InternChatErrorResponse'
37312-
description: 'The intern is not running (`intern_not_ready`), another turn is already running on this intern (`busy`), the question is no longer waiting (`interaction_not_pending`), or another request is already attached to the run (`attachment_failed`). The turn lock is per intern, not per session. `intern_not_ready` and `busy` report `retryable: true`, and a `busy` refusal carries `Retry-After`.'
37365+
description: 'The intern is not running (`intern_not_ready`), another turn is already running on this intern for a different session, for no session, or for a `tool` reply (`busy`), the question is no longer waiting (`interaction_not_pending`), or another request is already attached to the run (`attachment_failed`). The turn lock is per intern, not per session. `intern_not_ready` and `busy` report `retryable: true`, and a `busy` refusal carries `Retry-After`.'
3731337366
headers:
3731437367
Retry-After:
3731537368
description: 'Seconds to wait before retrying this request. Present only on a `busy` refusal.'

‎.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:74de8f20bb42a350b592daa622a1adf3f86b82145addc9650f1150ba07c5ba96
6-
sourceBlobDigest: sha256:8d2ecb843db7a0b1f4e7ab4db9ccf09fc4531b264789b8fac03f3337f92ea5e4
5+
sourceRevisionDigest: sha256:c35dc5499ca6883e191f921c4a50e5c45ae09daccd130f34af46cb7ee18a44f4
6+
sourceBlobDigest: sha256:fc62c51c841c1730b744b0177d7b714def70ebcc12b313f96fc925f4d4ad84d7
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:74de8f20bb42a350b592daa622a1adf3f86b82145addc9650f1150ba07c5ba96
15-
sourceBlobDigest: sha256:8d2ecb843db7a0b1f4e7ab4db9ccf09fc4531b264789b8fac03f3337f92ea5e4
14+
sourceRevisionDigest: sha256:c35dc5499ca6883e191f921c4a50e5c45ae09daccd130f34af46cb7ee18a44f4
15+
sourceBlobDigest: sha256:fc62c51c841c1730b744b0177d7b714def70ebcc12b313f96fc925f4d4ad84d7
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:e3ae5ea70e5b2b1730d77e0084828c0c02d908cc22ff455eed790ca263a223d1
17+
codeSamplesRevisionDigest: sha256:1b8e0a86712a06b4708ccd9196d1f6d5dcc25249fd34c99323bd89586af4aa97
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
@@ -2519,4 +2519,14 @@ Based on:
25192519
### Generated
25202520
- [python v1.2.11] .
25212521
### Releases
2522-
- [PyPI v1.2.11] https://pypi.org/project/openrouter/1.2.11 - .
2522+
- [PyPI v1.2.11] https://pypi.org/project/openrouter/1.2.11 - .
2523+
2524+
## 2026-09-21 20:58:16
2525+
### Changes
2526+
Based on:
2527+
- OpenAPI Doc
2528+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
2529+
### Generated
2530+
- [python v1.2.12] .
2531+
### Releases
2532+
- [PyPI v1.2.12] https://pypi.org/project/openrouter/1.2.12 - .

‎docs/components/apitype.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This is an open enum. Unrecognized values will not fail type checks.
2121
- `"completions"`
2222
- `"embeddings"`
2323
- `"rerank"`
24+
- `"decisions"`
25+
- `"video"`
2426
- `"tts"`
2527
- `"stt"`
26-
- `"video"`
2728
- `"image"`
28-
- `"decisions"`

0 commit comments

Comments
 (0)