Skip to content

Commit ebd10da

Browse files
committed
## Python SDK Changes:
* `open_router.chat.send()`: * `request.messages[].union(assistant).reasoning_details[].union(reasoning.server_tool_call)` **Added** * `response` **Changed** * `open_router.presets.create_presets_chat_completions()`: * `request.messages[].union(assistant).reasoning_details[].union(reasoning.server_tool_call)` **Added**
1 parent c9d39da commit ebd10da

14 files changed

Lines changed: 230 additions & 30 deletions

.speakeasy/gen.lock

Lines changed: 29 additions & 19 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: 806da48c3f8b0f6fcd8822556deb2d52
4+
docChecksum: 8f7ea245a84b730eab57728b3cacc35c
55
docVersion: 1.0.0
66
speakeasyVersion: 1.787.0
77
generationVersion: 2.914.0
8-
releaseVersion: 0.11.12
9-
configChecksum: 716de99521ede522990999611400003e
8+
releaseVersion: 0.11.13
9+
configChecksum: c88203387459a0cbb769727c96db3986
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: 8679aa3b-5d9e-4893-8022-baf536bf7090
15-
pristine_commit_hash: 65881050ceed3021f70ad4f272545c4b4a65c4b1
16-
pristine_tree_hash: 81dbfc8598b20a107de700cfb2a93473c41dde40
14+
generation_id: 609662c1-5d0e-47a3-9079-d08e16b49533
15+
pristine_commit_hash: 4cc996dbf6544dc4b74c850198e2854bc462097d
16+
pristine_tree_hash: 0c0596c5003de8de766314afa7eb7c8f5d5f433b
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -3904,6 +3904,14 @@ trackedFiles:
39043904
id: 7dea8887a486
39053905
last_write_checksum: sha1:92808e57ae938c7cfaf7d5ab1dcc2e411d887108
39063906
pristine_git_object: 3779ebb04af32b9188d75c4c910752f6ef31ccc6
3907+
docs/components/reasoningdetailservertoolcall.mdx:
3908+
id: 095a5cb44df4
3909+
last_write_checksum: sha1:ef83973b82b8630fcb3f195c4bed67e1ea9a0994
3910+
pristine_git_object: 78f316a13caa1cbc4b95082c1273f83cdfdb88b6
3911+
docs/components/reasoningdetailservertoolcalltype.mdx:
3912+
id: 703597bf09db
3913+
last_write_checksum: sha1:a4415cefe09b6e1944d239999be6622a057ef865
3914+
pristine_git_object: cb6b4d6476d46b8715441055056e000b56448b3d
39073915
docs/components/reasoningdetailsummary.mdx:
39083916
id: 264cd49526bd
39093917
last_write_checksum: sha1:73d7efd548b4a457454ebf381f159797ddc91970
@@ -3922,8 +3930,8 @@ trackedFiles:
39223930
pristine_git_object: 4b94f542433728f6cf9adce6be943b7be90dbd41
39233931
docs/components/reasoningdetailunion.mdx:
39243932
id: b79bc447eaff
3925-
last_write_checksum: sha1:93c29cce21e4ba625b7299ecc8891d1b1fa7ef87
3926-
pristine_git_object: 49ac02bee627aed7cc041917d432dd368463827a
3933+
last_write_checksum: sha1:b2451dd8ad86ad3ef3ba6cea0fd18bea1c488bcd
3934+
pristine_git_object: 19039845eae5a92b79a1e53f4797cd69996fec0a
39273935
docs/components/reasoningdoneevent.mdx:
39283936
id: 3183f11559d0
39293937
last_write_checksum: sha1:b2ab6eac3b93629f1643c518dca3e7274d4b17c9
@@ -6458,8 +6466,8 @@ trackedFiles:
64586466
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
64596467
pyproject.toml:
64606468
id: 5d07e7d72637
6461-
last_write_checksum: sha1:ac2002f15d1247065c7cb46d7eefa45718cff498
6462-
pristine_git_object: e6ead548984f180e102da37f58096846d8587c7e
6469+
last_write_checksum: sha1:cdca9f1f09271dc533678cd9ba90c0a00909e209
6470+
pristine_git_object: f0cbdaa88fc060abeadb111e9c3466fdaf854ddd
64636471
scripts/prepare_readme.py:
64646472
id: e0c5957a6035
64656473
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -6486,8 +6494,8 @@ trackedFiles:
64866494
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
64876495
src/openrouter/_version.py:
64886496
id: d8d15ad6c586
6489-
last_write_checksum: sha1:48782d3a645f92804e627ef77ff3a65b355a5e74
6490-
pristine_git_object: 9208d774c192a728cd2db520bd8ca629d9b2e37c
6497+
last_write_checksum: sha1:a509125dbf0ac5f32ee0e70ac41c9c1a476e36eb
6498+
pristine_git_object: 150a77b0b7087e6c156087c8502ea4b98c03249c
64916499
src/openrouter/analytics.py:
64926500
id: cb406b5aaabb
64936501
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
@@ -6526,8 +6534,8 @@ trackedFiles:
65266534
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
65276535
src/openrouter/components/__init__.py:
65286536
id: 81754e97b3f4
6529-
last_write_checksum: sha1:fa3d53883e45a8fb738127b91ca4f16c9ff29c9d
6530-
pristine_git_object: b5563aa875171f1bc0051960b459f8ee37314405
6537+
last_write_checksum: sha1:d65b820c63aa6a5ee9fdbe852f4e00ccb3d7fbcf
6538+
pristine_git_object: 397ffe2ed69a6cd49c904ad5e4a487a6feb4116e
65316539
src/openrouter/components/aabenchmarkentry.py:
65326540
id: e2e0f0b48c82
65336541
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -8176,6 +8184,10 @@ trackedFiles:
81768184
id: ae7d7526c9b5
81778185
last_write_checksum: sha1:df579e34f32d49b348ae1fc8e74904ac4edb03a3
81788186
pristine_git_object: 0ba2daa8d62116e1122638e2c703e89428cd742d
8187+
src/openrouter/components/reasoningdetailservertoolcall.py:
8188+
id: f95da47c231d
8189+
last_write_checksum: sha1:5196ad2ea5f8b463bb8e9e98adc54f8faa63a07e
8190+
pristine_git_object: 4487eb0e24600c0affed1a29ea5380328c56fd0f
81798191
src/openrouter/components/reasoningdetailsummary.py:
81808192
id: 53bda5c72dc5
81818193
last_write_checksum: sha1:db665a5b9c7ca3be181719df3c81f07ce3c127ea
@@ -8186,8 +8198,8 @@ trackedFiles:
81868198
pristine_git_object: 49b08a205274f8aad7af7c5c910a7dbc73c12588
81878199
src/openrouter/components/reasoningdetailunion.py:
81888200
id: 3326e0b80cdb
8189-
last_write_checksum: sha1:ba9766e0906ce06081ef33e5889ca7c0af870e13
8190-
pristine_git_object: 78e5924ea5aff2f91111acd8348907ff37c738e9
8201+
last_write_checksum: sha1:0a582331054241874c2bb83991b6596c84358e43
8202+
pristine_git_object: 17b2534207bf2a898937bbcf3ee56fd58020cb41
81918203
src/openrouter/components/reasoningdoneevent.py:
81928204
id: 5d7fc847e949
81938205
last_write_checksum: sha1:456aa0d5bc1ca2e46d2dd494d3d0f78d77ca23bf
@@ -10780,6 +10792,4 @@ examples:
1078010792
"500":
1078110793
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1078210794
examplesVersion: 1.0.2
10783-
releaseNotes: |
10784-
## Python SDK Changes:
10785-
* `open_router.generations.get_generation()`: `response.data.provider_responses[].routed_service_tier` **Added**
10795+
releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request.messages[].union(assistant).reasoning_details[].union(reasoning.server_tool_call)` **Added**\n * `response` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.messages[].union(assistant).reasoning_details[].union(reasoning.server_tool_call)` **Added**\n"

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

.speakeasy/out.openapi.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19277,6 +19277,42 @@ components:
1927719277
- type
1927819278
- data
1927919279
type: object
19280+
ReasoningDetailServerToolCall:
19281+
description: >-
19282+
Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation.
19283+
example:
19284+
arguments: '{"prompt":"Compare carbon tax proposals"}'
19285+
result: '{"status":"ok","models":["openai/gpt-4o"]}'
19286+
tool_call_id: call_abc123
19287+
tool_name: openrouter:fusion
19288+
type: reasoning.server_tool_call
19289+
properties:
19290+
arguments:
19291+
type: string
19292+
format:
19293+
$ref: '#/components/schemas/ReasoningFormat'
19294+
id:
19295+
nullable: true
19296+
type: string
19297+
index:
19298+
type: integer
19299+
result:
19300+
type: string
19301+
tool_call_id:
19302+
nullable: true
19303+
type: string
19304+
tool_name:
19305+
type: string
19306+
type:
19307+
enum:
19308+
- reasoning.server_tool_call
19309+
type: string
19310+
required:
19311+
- type
19312+
- tool_name
19313+
- arguments
19314+
- result
19315+
type: object
1928019316
ReasoningDetailSummary:
1928119317
description: Reasoning detail summary schema
1928219318
example:
@@ -19332,6 +19368,7 @@ components:
1933219368
discriminator:
1933319369
mapping:
1933419370
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
19371+
reasoning.server_tool_call: '#/components/schemas/ReasoningDetailServerToolCall'
1933519372
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
1933619373
reasoning.text: '#/components/schemas/ReasoningDetailText'
1933719374
propertyName: type
@@ -19342,6 +19379,7 @@ components:
1934219379
- $ref: '#/components/schemas/ReasoningDetailSummary'
1934319380
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
1934419381
- $ref: '#/components/schemas/ReasoningDetailText'
19382+
- $ref: '#/components/schemas/ReasoningDetailServerToolCall'
1934519383
ReasoningDoneEvent:
1934619384
allOf:
1934719385
- $ref: '#/components/schemas/BaseReasoningDoneEvent'

.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:3c5226489661662950b09fb9ca17bb6ab30677c06d598e45101a4b5e57f4defb
6-
sourceBlobDigest: sha256:dbe7c54c8149d63bb85a11bc4a9d5c4f7b6871426b32289bf314847ed57e4203
5+
sourceRevisionDigest: sha256:92cd773ef78afbd37e90739af75ab30e169c59cb0931e50a0afbb81a040efa47
6+
sourceBlobDigest: sha256:ad7b1ae1700a5dd784690c2a598d95fa515f280fd2dfaf020567d85c76f91d73
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:3c5226489661662950b09fb9ca17bb6ab30677c06d598e45101a4b5e57f4defb
15-
sourceBlobDigest: sha256:dbe7c54c8149d63bb85a11bc4a9d5c4f7b6871426b32289bf314847ed57e4203
14+
sourceRevisionDigest: sha256:92cd773ef78afbd37e90739af75ab30e169c59cb0931e50a0afbb81a040efa47
15+
sourceBlobDigest: sha256:ad7b1ae1700a5dd784690c2a598d95fa515f280fd2dfaf020567d85c76f91d73
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:51a9185a00a3d2d584952cd0e0351cd69907763d9174fe6e1ce4ab45f608cf8c
17+
codeSamplesRevisionDigest: sha256:67ea1409449c1bdeac71bddc4300e6137ad4d53833ad8b4f631c80c338c5c414
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
@@ -228,4 +228,14 @@ Based on:
228228
### Generated
229229
- [python v0.11.12] .
230230
### Releases
231-
- [PyPI v0.11.12] https://pypi.org/project/openrouter/0.11.12 - .
231+
- [PyPI v0.11.12] https://pypi.org/project/openrouter/0.11.12 - .
232+
233+
## 2026-07-09 17:12:18
234+
### Changes
235+
Based on:
236+
- OpenAPI Doc
237+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
238+
### Generated
239+
- [python v0.11.13] .
240+
### Releases
241+
- [PyPI v0.11.13] https://pypi.org/project/openrouter/0.11.13 - .
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "ReasoningDetailServerToolCall"
3+
---
4+
5+
Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation.
6+
7+
8+
## Fields
9+
10+
| Field | Type | Required | Description | Example |
11+
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
12+
| `arguments` | *str* | :heavy_check_mark: | N/A | |
13+
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.mdx) | :heavy_minus_sign: | N/A | unknown |
14+
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
15+
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
16+
| `result` | *str* | :heavy_check_mark: | N/A | |
17+
| `tool_call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
18+
| `tool_name` | *str* | :heavy_check_mark: | N/A | |
19+
| `type` | [components.ReasoningDetailServerToolCallType](../components/reasoningdetailservertoolcalltype.mdx) | :heavy_check_mark: | N/A | |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "ReasoningDetailServerToolCallType"
3+
---
4+
5+
## Example Usage
6+
7+
```python
8+
from openrouter.components import ReasoningDetailServerToolCallType
9+
value: ReasoningDetailServerToolCallType = "reasoning.server_tool_call"
10+
```
11+
12+
13+
## Values
14+
15+
- `"reasoning.server_tool_call"`

docs/components/reasoningdetailunion.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Reasoning detail union schema
1313
value: components.ReasoningDetailEncrypted = /* values here */
1414
```
1515

16+
### `components.ReasoningDetailServerToolCall`
17+
18+
```python
19+
value: components.ReasoningDetailServerToolCall = /* values here */
20+
```
21+
1622
### `components.ReasoningDetailSummary`
1723

1824
```python

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 = "0.11.12"
3+
version = "0.11.13"
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 = "0.11.12"
6+
__version__: str = "0.11.13"
77
__openapi_doc_version__: str = "1.0.0"
88
__gen_version__: str = "2.914.0"
9-
__user_agent__: str = "speakeasy-sdk/python 0.11.12 2.914.0 1.0.0 openrouter"
9+
__user_agent__: str = "speakeasy-sdk/python 0.11.13 2.914.0 1.0.0 openrouter"
1010

1111
try:
1212
if __package__ is not None:

0 commit comments

Comments
 (0)