Skip to content

Commit 40718f0

Browse files
committed
## Python SDK Changes:
* `open_router.generations.list_generation_content()`: `response.data.error` **Added**
1 parent 85d2dff commit 40718f0

19 files changed

Lines changed: 364 additions & 57 deletions

‎.speakeasy/gen.lock‎

Lines changed: 44 additions & 26 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: e408687b6809c0eb28ce2608b3c9d155
4+
docChecksum: b4c802a90b9a216deeaff44a52c2357a
55
docVersion: 1.0.0
66
speakeasyVersion: 1.787.0
77
generationVersion: 2.914.0
8-
releaseVersion: 1.1.44
9-
configChecksum: 58e13146341fef6b0ea6ae8882827d37
8+
releaseVersion: 1.1.45
9+
configChecksum: 7ca5bb9842bd6cb37efcb3bbaa5b1855
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: f961c45e-5096-4334-bf45-ef26d2b749e8
15-
pristine_commit_hash: ba9a7f326ed5f0c2a84c6b81ced43935892e8629
16-
pristine_tree_hash: e87ac6459017910906d4f2566ca55e1cebef6340
14+
generation_id: b03c4396-b2bc-48aa-86c6-98130db36529
15+
pristine_commit_hash: fff7fca5c6ba772a88e7b2a29634d67a5e098a26
16+
pristine_tree_hash: cc67c4656f2f0e02d468801620f418c4922f4adf
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -2182,16 +2182,24 @@ trackedFiles:
21822182
pristine_git_object: 384c9eac32dc42b655935f262e21ecd6d125dfa0
21832183
docs/components/generationcontentdata.mdx:
21842184
id: 030f8930b5df
2185-
last_write_checksum: sha1:84792e91bcca8347a02d62672fa755bd7c607cbb
2186-
pristine_git_object: 1e4a22a040cc50e6700e7a2a9786e812e88435ef
2185+
last_write_checksum: sha1:8cd824dc313a2f8c1aad0e35483f8591f8614170
2186+
pristine_git_object: 09bc28302495af1bea9c207b9389c713d99fa029
21872187
docs/components/generationcontentdataoutput.mdx:
21882188
id: a86cb8cf8b22
21892189
last_write_checksum: sha1:3ddde7d4af4ff46aebf9c585f0fb4d2a4a452bea
21902190
pristine_git_object: d497eb12b1565177425a3b77996c12e540110b31
2191+
docs/components/generationcontenterror.mdx:
2192+
id: d4193c1812a5
2193+
last_write_checksum: sha1:d841546e93c61a086ff2e3c74739e110f5c2ede1
2194+
pristine_git_object: f6cee61d8c57fb7f98c9d79401c83c46e9b6e1cd
2195+
docs/components/generationcontenterrorattempt.mdx:
2196+
id: f52c4b75b1c6
2197+
last_write_checksum: sha1:efab9c4c12e66bf9eb98dc1a96be1b13912471f3
2198+
pristine_git_object: cc7ba02b5f5ab4b97b9b0b3138e39040c94d8ea9
21912199
docs/components/generationcontentresponse.mdx:
21922200
id: 6961bdcaae0b
2193-
last_write_checksum: sha1:e4c7d5fcddd8c9ad181766e24a2b3b62c1cd1f5c
2194-
pristine_git_object: e214221d00eebf62201405e60c28a40d7f568e57
2201+
last_write_checksum: sha1:6b718cc97d35a859e34cc13791ddb3811f562a66
2202+
pristine_git_object: 8fab8bcf0f61600ace4f2d18a75ffd3864aebee4
21952203
docs/components/generationresponse.mdx:
21962204
id: b3a5579b9919
21972205
last_write_checksum: sha1:95b41bf6ced0933321650bd2c4413106974766da
@@ -7122,8 +7130,8 @@ trackedFiles:
71227130
pristine_git_object: d9aef34c11d538fe9d54a41f27a913181cc4f1f5
71237131
docs/sdks/generations/README.mdx:
71247132
id: a754fecc8514
7125-
last_write_checksum: sha1:b5f8035c676b5eb050472ed9697b64718aed8f17
7126-
pristine_git_object: f262b34982a18293f5ae22bfbbf385010bfcdc9c
7133+
last_write_checksum: sha1:f6c55504d8c3e5e44420db68d7864fbbae4d999a
7134+
pristine_git_object: 064751ea194bff6b8111575603f804362960b886
71277135
docs/sdks/guardrails/README.mdx:
71287136
id: a0cd4218b8fa
71297137
last_write_checksum: sha1:a1382f5db5f769469ee8c236eb60d5a44068bc88
@@ -7190,8 +7198,8 @@ trackedFiles:
71907198
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
71917199
pyproject.toml:
71927200
id: 5d07e7d72637
7193-
last_write_checksum: sha1:18256d8b9cc609a66b10b73bc29e1f89e71a5ce1
7194-
pristine_git_object: 2633c255582f9f232999f764a31f1a5d170c712f
7201+
last_write_checksum: sha1:c0690cb780257bb8812899d9164ad0ad80eb186a
7202+
pristine_git_object: 975fb5a58ae9ffc5ac42c92c5000484ca535fe39
71957203
scripts/prepare_readme.py:
71967204
id: e0c5957a6035
71977205
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7218,8 +7226,8 @@ trackedFiles:
72187226
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
72197227
src/openrouter/_version.py:
72207228
id: d8d15ad6c586
7221-
last_write_checksum: sha1:bf92de0c3824a4280f6bb520e285a00d20188ed7
7222-
pristine_git_object: 055275608059735910d646e0ada351d41f4a6017
7229+
last_write_checksum: sha1:5258379a3f8f8ab4a170e1a1eebca76f22071757
7230+
pristine_git_object: ad84bcae12afe6d5fa7d04d77a6b71180dd4b275
72237231
src/openrouter/analytics.py:
72247232
id: cb406b5aaabb
72257233
last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a
@@ -7262,8 +7270,8 @@ trackedFiles:
72627270
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
72637271
src/openrouter/components/__init__.py:
72647272
id: 81754e97b3f4
7265-
last_write_checksum: sha1:7fc8366c0da24c31337bded97df0f1c8f9cdb173
7266-
pristine_git_object: f714cc3337bfe431ca2007e9511a81d970dd4e62
7273+
last_write_checksum: sha1:53e2861e42f8094758a01a20eba2b39a4cd1cb91
7274+
pristine_git_object: e2409b0beded65a52ecd777135d3f040030ef699
72677275
src/openrouter/components/aabenchmarkentry.py:
72687276
id: e2e0f0b48c82
72697277
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -8218,12 +8226,20 @@ trackedFiles:
82188226
pristine_git_object: cfe434755a0c8f34cc8797777eee68311dbbd243
82198227
src/openrouter/components/generationcontentdata.py:
82208228
id: 0140215b5b46
8221-
last_write_checksum: sha1:8f0b1104c944ce96fa078baf47dfd9d040828c77
8222-
pristine_git_object: 5a777789d3ddd89f39a889cd38b3abed8af6149b
8229+
last_write_checksum: sha1:c3d877cd0fcbed4aed6e7c1956f72a799fa5b045
8230+
pristine_git_object: 755c088a9f24a16411584f6c784bd325978aa8b1
8231+
src/openrouter/components/generationcontenterror.py:
8232+
id: a4b33e2351b0
8233+
last_write_checksum: sha1:043bd0da39dded8b0b8ae11964589965b08ed02a
8234+
pristine_git_object: b9f03a6bfaf00c313e7b557cf012fcb894c633fb
8235+
src/openrouter/components/generationcontenterrorattempt.py:
8236+
id: 6b708637e7ba
8237+
last_write_checksum: sha1:04adc8dda708c09164974b2bd78cd20566d82c3a
8238+
pristine_git_object: dc0f9e7b77baa4348526b87cb52311473cd3a233
82238239
src/openrouter/components/generationcontentresponse.py:
82248240
id: c3f3f745a193
8225-
last_write_checksum: sha1:0a87a329f4b565c773d730ddc74595c6a0d64ddc
8226-
pristine_git_object: b762f6507fe7c7456df88a9400f82587fd6d63c9
8241+
last_write_checksum: sha1:efb4b4930d2b85d8f68f45256ef487c2f9d9ba76
8242+
pristine_git_object: 5caeacf169f3edff5b6e9823264aeeff8be1e8ff
82278243
src/openrouter/components/generationresponse.py:
82288244
id: 84d4e3e7da8b
82298245
last_write_checksum: sha1:b26bce951ba1ce6ffb0779809e4410b03d9b9e6a
@@ -9790,8 +9806,8 @@ trackedFiles:
97909806
pristine_git_object: 268e617de41c88c6393b791a4c04048de4d7ce3c
97919807
src/openrouter/generations.py:
97929808
id: 70e1c21042bc
9793-
last_write_checksum: sha1:00b190db603c57571f77ccfe5d5612a3f42c62a0
9794-
pristine_git_object: f6dbf5440466ba6b1d92442cad1b91e2b3587c52
9809+
last_write_checksum: sha1:a8679c263af864e94aa0b33e6a8505e66b4c4047
9810+
pristine_git_object: d5990c4254d4b3c5dae3f548bbec02558adadae1
97959811
src/openrouter/guardrails.py:
97969812
id: 705839f34e66
97979813
last_write_checksum: sha1:51cf6938e2307e3834dbeaf45e454fdbec040352
@@ -11274,7 +11290,7 @@ examples:
1127411290
id: "gen-1234567890"
1127511291
responses:
1127611292
"200":
11277-
application/json: {"data": {"input": {"messages": [{"content": "What is the meaning of life?", "role": "user"}]}, "output": {"completion": "The meaning of life is a philosophical question...", "reasoning": null}}}
11293+
application/json: {"data": {"error": null, "input": {"messages": [{"content": "What is the meaning of life?", "role": "user"}]}, "output": {"completion": "The meaning of life is a philosophical question...", "reasoning": null}}}
1127811294
"401":
1127911295
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
1128011296
"403":
@@ -12066,4 +12082,6 @@ examples:
1206612082
"500":
1206712083
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1206812084
examplesVersion: 1.0.2
12069-
releaseNotes: "## Python SDK Changes:\n* `open_router.benchmarks.get_benchmarks()`: \n * `request` **Changed**\n * `response.data[]` **Changed** (Breaking ⚠️)\n"
12085+
releaseNotes: |
12086+
## Python SDK Changes:
12087+
* `open_router.generations.list_generation_content()`: `response.data.error` **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.1.44
39+
version: 1.1.45
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9151,8 +9151,9 @@ components:
91519151
- 'title'
91529152
type: 'object'
91539153
GenerationContentData:
9154-
description: 'Stored prompt and completion content'
9154+
description: 'Stored prompt and completion content, plus the failure error when one was stored'
91559155
example:
9156+
error: null
91569157
input:
91579158
messages:
91589159
- content: 'What is the meaning of life?'
@@ -9161,6 +9162,8 @@ components:
91619162
completion: 'The meaning of life is a philosophical question...'
91629163
reasoning: null
91639164
properties:
9165+
error:
9166+
$ref: '#/components/schemas/GenerationContentError'
91649167
input:
91659168
anyOf:
91669169
- properties:
@@ -9203,11 +9206,98 @@ components:
92039206
required:
92049207
- 'input'
92059208
- 'output'
9209+
- 'error'
9210+
type: 'object'
9211+
GenerationContentError:
9212+
description: 'The stored failure for this generation, or null when it succeeded'
9213+
example:
9214+
message: 'Timed out waiting for the provider'
9215+
previous_errors:
9216+
- code: 429
9217+
message: 'Provider returned error'
9218+
provider_name: 'Google'
9219+
raw: '{"error":{"code":429,"message":"Resource exhausted"}}'
9220+
provider_name: 'Vertex'
9221+
raw: '{"error":{"code":504,"message":"Deadline exceeded"}}'
9222+
status: 504
9223+
properties:
9224+
message:
9225+
description: 'Error message returned to the client'
9226+
example: 'Timed out waiting for the provider'
9227+
type:
9228+
- 'string'
9229+
- 'null'
9230+
previous_errors:
9231+
description: 'Every upstream attempt that failed before the returned error, in attempt order'
9232+
items:
9233+
$ref: '#/components/schemas/GenerationContentErrorAttempt'
9234+
type: 'array'
9235+
provider_name:
9236+
description: 'Provider whose error was returned to the client, when known'
9237+
example: 'Vertex'
9238+
type:
9239+
- 'string'
9240+
- 'null'
9241+
raw:
9242+
description: 'Raw error body behind the returned error, when stored'
9243+
example: '{"error":{"code":504,"message":"Deadline exceeded"}}'
9244+
type:
9245+
- 'string'
9246+
- 'null'
9247+
status:
9248+
description: 'HTTP status returned to the client'
9249+
example: 504
9250+
type:
9251+
- 'integer'
9252+
- 'null'
9253+
required:
9254+
- 'status'
9255+
- 'message'
9256+
- 'provider_name'
9257+
- 'raw'
9258+
- 'previous_errors'
9259+
type:
9260+
- 'object'
9261+
- 'null'
9262+
GenerationContentErrorAttempt:
9263+
description: 'A single failed upstream attempt recorded for the generation'
9264+
example:
9265+
code: 429
9266+
message: 'Provider returned error'
9267+
provider_name: 'Google'
9268+
raw: '{"error":{"code":429,"message":"Resource exhausted"}}'
9269+
properties:
9270+
code:
9271+
description: 'HTTP status returned by this attempt'
9272+
example: 429
9273+
type: 'integer'
9274+
message:
9275+
description: 'Error message returned by this attempt'
9276+
example: 'Provider returned error'
9277+
type: 'string'
9278+
provider_name:
9279+
description: 'Provider that served this attempt, when known'
9280+
example: 'Google'
9281+
type:
9282+
- 'string'
9283+
- 'null'
9284+
raw:
9285+
description: 'Raw error body returned by the provider, when stored'
9286+
example: '{"error":{"code":429,"message":"Resource exhausted"}}'
9287+
type:
9288+
- 'string'
9289+
- 'null'
9290+
required:
9291+
- 'code'
9292+
- 'message'
9293+
- 'provider_name'
9294+
- 'raw'
92069295
type: 'object'
92079296
GenerationContentResponse:
92089297
description: 'Stored prompt and completion content for a generation'
92099298
example:
92109299
data:
9300+
error: null
92119301
input:
92129302
messages:
92139303
- content: 'What is the meaning of life?'
@@ -30417,16 +30507,26 @@ paths:
3041730507
application/json:
3041830508
example:
3041930509
data:
30510+
error:
30511+
message: 'Timed out waiting for the provider'
30512+
previous_errors:
30513+
- code: 429
30514+
message: 'Provider returned error'
30515+
provider_name: 'Google'
30516+
raw: '{"error":{"code":429,"message":"Resource exhausted"}}'
30517+
provider_name: 'Vertex'
30518+
raw: '{"error":{"code":504,"message":"Deadline exceeded"}}'
30519+
status: 504
3042030520
input:
3042130521
messages:
3042230522
- content: 'What is the meaning of life?'
3042330523
role: 'user'
3042430524
output:
30425-
completion: 'The meaning of life is a philosophical question...'
30525+
completion: null
3042630526
reasoning: null
3042730527
schema:
3042830528
$ref: '#/components/schemas/GenerationContentResponse'
30429-
description: 'Returns the stored prompt and completion content'
30529+
description: 'Returns the stored prompt and completion content, plus the failure error when the generation failed'
3043030530
'401':
3043130531
content:
3043230532
application/json:
@@ -30507,7 +30607,7 @@ paths:
3050730607
schema:
3050830608
$ref: '#/components/schemas/ProviderOverloadedResponse'
3050930609
description: 'Provider Overloaded - Provider is temporarily overloaded'
30510-
summary: 'Get stored prompt and completion content for a generation'
30610+
summary: 'Get stored prompt, completion, and error content for a generation'
3051130611
tags:
3051230612
- 'Generations'
3051330613
parameters:

‎.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:0f0480623513ea8eb6966a24c5e7ea07750f656ec7a181a95c05b0688a23e203
6-
sourceBlobDigest: sha256:86789908c3b9752a073bf734375a2597651a71927911c6b9470089ada3d6d255
5+
sourceRevisionDigest: sha256:816e23f17fb6ac302f7a907e82281ed5dea91a00943de092bc90062ddc764970
6+
sourceBlobDigest: sha256:fb2a15f75e22611c599bd706978add5c56a2a3cfe767e28b50cf87f027f803be
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:0f0480623513ea8eb6966a24c5e7ea07750f656ec7a181a95c05b0688a23e203
15-
sourceBlobDigest: sha256:86789908c3b9752a073bf734375a2597651a71927911c6b9470089ada3d6d255
14+
sourceRevisionDigest: sha256:816e23f17fb6ac302f7a907e82281ed5dea91a00943de092bc90062ddc764970
15+
sourceBlobDigest: sha256:fb2a15f75e22611c599bd706978add5c56a2a3cfe767e28b50cf87f027f803be
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:96ade224222d016e3a3e25dcf397a3b3a191917caa45946af874d0f9e9cb4d91
17+
codeSamplesRevisionDigest: sha256:8ae3982d471f05e246e090e902923ef9c0b30e8adfc19eae33176cefa37fe19b
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
@@ -1229,4 +1229,14 @@ Based on:
12291229
### Generated
12301230
- [python v1.1.44] .
12311231
### Releases
1232-
- [PyPI v1.1.44] https://pypi.org/project/openrouter/1.1.44 - .
1232+
- [PyPI v1.1.44] https://pypi.org/project/openrouter/1.1.44 - .
1233+
1234+
## 2026-08-11 18:24:00
1235+
### Changes
1236+
Based on:
1237+
- OpenAPI Doc
1238+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
1239+
### Generated
1240+
- [python v1.1.45] .
1241+
### Releases
1242+
- [PyPI v1.1.45] https://pypi.org/project/openrouter/1.1.45 - .

0 commit comments

Comments
 (0)