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
48 changes: 29 additions & 19 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: 806da48c3f8b0f6fcd8822556deb2d52
docChecksum: 8f7ea245a84b730eab57728b3cacc35c
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 0.11.12
configChecksum: 716de99521ede522990999611400003e
releaseVersion: 0.11.13
configChecksum: c88203387459a0cbb769727c96db3986
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 8679aa3b-5d9e-4893-8022-baf536bf7090
pristine_commit_hash: 65881050ceed3021f70ad4f272545c4b4a65c4b1
pristine_tree_hash: 81dbfc8598b20a107de700cfb2a93473c41dde40
generation_id: 609662c1-5d0e-47a3-9079-d08e16b49533
pristine_commit_hash: 4cc996dbf6544dc4b74c850198e2854bc462097d
pristine_tree_hash: 0c0596c5003de8de766314afa7eb7c8f5d5f433b
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -3904,6 +3904,14 @@ trackedFiles:
id: 7dea8887a486
last_write_checksum: sha1:92808e57ae938c7cfaf7d5ab1dcc2e411d887108
pristine_git_object: 3779ebb04af32b9188d75c4c910752f6ef31ccc6
docs/components/reasoningdetailservertoolcall.mdx:
id: 095a5cb44df4
last_write_checksum: sha1:ef83973b82b8630fcb3f195c4bed67e1ea9a0994
pristine_git_object: 78f316a13caa1cbc4b95082c1273f83cdfdb88b6
docs/components/reasoningdetailservertoolcalltype.mdx:
id: 703597bf09db
last_write_checksum: sha1:a4415cefe09b6e1944d239999be6622a057ef865
pristine_git_object: cb6b4d6476d46b8715441055056e000b56448b3d
docs/components/reasoningdetailsummary.mdx:
id: 264cd49526bd
last_write_checksum: sha1:73d7efd548b4a457454ebf381f159797ddc91970
Expand All @@ -3922,8 +3930,8 @@ trackedFiles:
pristine_git_object: 4b94f542433728f6cf9adce6be943b7be90dbd41
docs/components/reasoningdetailunion.mdx:
id: b79bc447eaff
last_write_checksum: sha1:93c29cce21e4ba625b7299ecc8891d1b1fa7ef87
pristine_git_object: 49ac02bee627aed7cc041917d432dd368463827a
last_write_checksum: sha1:b2451dd8ad86ad3ef3ba6cea0fd18bea1c488bcd
pristine_git_object: 19039845eae5a92b79a1e53f4797cd69996fec0a
docs/components/reasoningdoneevent.mdx:
id: 3183f11559d0
last_write_checksum: sha1:b2ab6eac3b93629f1643c518dca3e7274d4b17c9
Expand Down Expand Up @@ -6458,8 +6466,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:ac2002f15d1247065c7cb46d7eefa45718cff498
pristine_git_object: e6ead548984f180e102da37f58096846d8587c7e
last_write_checksum: sha1:cdca9f1f09271dc533678cd9ba90c0a00909e209
pristine_git_object: f0cbdaa88fc060abeadb111e9c3466fdaf854ddd
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -6486,8 +6494,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:48782d3a645f92804e627ef77ff3a65b355a5e74
pristine_git_object: 9208d774c192a728cd2db520bd8ca629d9b2e37c
last_write_checksum: sha1:a509125dbf0ac5f32ee0e70ac41c9c1a476e36eb
pristine_git_object: 150a77b0b7087e6c156087c8502ea4b98c03249c
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
Expand Down Expand Up @@ -6526,8 +6534,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:fa3d53883e45a8fb738127b91ca4f16c9ff29c9d
pristine_git_object: b5563aa875171f1bc0051960b459f8ee37314405
last_write_checksum: sha1:d65b820c63aa6a5ee9fdbe852f4e00ccb3d7fbcf
pristine_git_object: 397ffe2ed69a6cd49c904ad5e4a487a6feb4116e
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
Expand Down Expand Up @@ -8176,6 +8184,10 @@ trackedFiles:
id: ae7d7526c9b5
last_write_checksum: sha1:df579e34f32d49b348ae1fc8e74904ac4edb03a3
pristine_git_object: 0ba2daa8d62116e1122638e2c703e89428cd742d
src/openrouter/components/reasoningdetailservertoolcall.py:
id: f95da47c231d
last_write_checksum: sha1:5196ad2ea5f8b463bb8e9e98adc54f8faa63a07e
pristine_git_object: 4487eb0e24600c0affed1a29ea5380328c56fd0f
src/openrouter/components/reasoningdetailsummary.py:
id: 53bda5c72dc5
last_write_checksum: sha1:db665a5b9c7ca3be181719df3c81f07ce3c127ea
Expand All @@ -8186,8 +8198,8 @@ trackedFiles:
pristine_git_object: 49b08a205274f8aad7af7c5c910a7dbc73c12588
src/openrouter/components/reasoningdetailunion.py:
id: 3326e0b80cdb
last_write_checksum: sha1:ba9766e0906ce06081ef33e5889ca7c0af870e13
pristine_git_object: 78e5924ea5aff2f91111acd8348907ff37c738e9
last_write_checksum: sha1:0a582331054241874c2bb83991b6596c84358e43
pristine_git_object: 17b2534207bf2a898937bbcf3ee56fd58020cb41
src/openrouter/components/reasoningdoneevent.py:
id: 5d7fc847e949
last_write_checksum: sha1:456aa0d5bc1ca2e46d2dd494d3d0f78d77ca23bf
Expand Down Expand Up @@ -10780,6 +10792,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: |
## Python SDK Changes:
* `open_router.generations.get_generation()`: `response.data.provider_responses[].routed_service_tier` **Added**
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"
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: 0.11.12
version: 0.11.13
additionalDependencies:
dev: {}
main: {}
Expand Down
38 changes: 38 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19277,6 +19277,42 @@ components:
- type
- data
type: object
ReasoningDetailServerToolCall:
description: >-
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.
example:
arguments: '{"prompt":"Compare carbon tax proposals"}'
result: '{"status":"ok","models":["openai/gpt-4o"]}'
tool_call_id: call_abc123
tool_name: openrouter:fusion
type: reasoning.server_tool_call
properties:
arguments:
type: string
format:
$ref: '#/components/schemas/ReasoningFormat'
id:
nullable: true
type: string
index:
type: integer
result:
type: string
tool_call_id:
nullable: true
type: string
tool_name:
type: string
type:
enum:
- reasoning.server_tool_call
type: string
required:
- type
- tool_name
- arguments
- result
type: object
ReasoningDetailSummary:
description: Reasoning detail summary schema
example:
Expand Down Expand Up @@ -19332,6 +19368,7 @@ components:
discriminator:
mapping:
reasoning.encrypted: '#/components/schemas/ReasoningDetailEncrypted'
reasoning.server_tool_call: '#/components/schemas/ReasoningDetailServerToolCall'
reasoning.summary: '#/components/schemas/ReasoningDetailSummary'
reasoning.text: '#/components/schemas/ReasoningDetailText'
propertyName: type
Expand All @@ -19342,6 +19379,7 @@ components:
- $ref: '#/components/schemas/ReasoningDetailSummary'
- $ref: '#/components/schemas/ReasoningDetailEncrypted'
- $ref: '#/components/schemas/ReasoningDetailText'
- $ref: '#/components/schemas/ReasoningDetailServerToolCall'
ReasoningDoneEvent:
allOf:
- $ref: '#/components/schemas/BaseReasoningDoneEvent'
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:3c5226489661662950b09fb9ca17bb6ab30677c06d598e45101a4b5e57f4defb
sourceBlobDigest: sha256:dbe7c54c8149d63bb85a11bc4a9d5c4f7b6871426b32289bf314847ed57e4203
sourceRevisionDigest: sha256:92cd773ef78afbd37e90739af75ab30e169c59cb0931e50a0afbb81a040efa47
sourceBlobDigest: sha256:ad7b1ae1700a5dd784690c2a598d95fa515f280fd2dfaf020567d85c76f91d73
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:3c5226489661662950b09fb9ca17bb6ab30677c06d598e45101a4b5e57f4defb
sourceBlobDigest: sha256:dbe7c54c8149d63bb85a11bc4a9d5c4f7b6871426b32289bf314847ed57e4203
sourceRevisionDigest: sha256:92cd773ef78afbd37e90739af75ab30e169c59cb0931e50a0afbb81a040efa47
sourceBlobDigest: sha256:ad7b1ae1700a5dd784690c2a598d95fa515f280fd2dfaf020567d85c76f91d73
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:51a9185a00a3d2d584952cd0e0351cd69907763d9174fe6e1ce4ab45f608cf8c
codeSamplesRevisionDigest: sha256:67ea1409449c1bdeac71bddc4300e6137ad4d53833ad8b4f631c80c338c5c414
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 @@ -228,4 +228,14 @@ Based on:
### Generated
- [python v0.11.12] .
### Releases
- [PyPI v0.11.12] https://pypi.org/project/openrouter/0.11.12 - .
- [PyPI v0.11.12] https://pypi.org/project/openrouter/0.11.12 - .

## 2026-07-09 17:12:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.13] .
### Releases
- [PyPI v0.11.13] https://pypi.org/project/openrouter/0.11.13 - .
19 changes: 19 additions & 0 deletions docs/components/reasoningdetailservertoolcall.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "ReasoningDetailServerToolCall"
---

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.


## Fields

| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `arguments` | *str* | :heavy_check_mark: | N/A | |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.mdx) | :heavy_minus_sign: | N/A | unknown |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `result` | *str* | :heavy_check_mark: | N/A | |
| `tool_call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `tool_name` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.ReasoningDetailServerToolCallType](../components/reasoningdetailservertoolcalltype.mdx) | :heavy_check_mark: | N/A | |
15 changes: 15 additions & 0 deletions docs/components/reasoningdetailservertoolcalltype.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "ReasoningDetailServerToolCallType"
---

## Example Usage

```python
from openrouter.components import ReasoningDetailServerToolCallType
value: ReasoningDetailServerToolCallType = "reasoning.server_tool_call"
```


## Values

- `"reasoning.server_tool_call"`
6 changes: 6 additions & 0 deletions docs/components/reasoningdetailunion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Reasoning detail union schema
value: components.ReasoningDetailEncrypted = /* values here */
```

### `components.ReasoningDetailServerToolCall`

```python
value: components.ReasoningDetailServerToolCall = /* values here */
```

### `components.ReasoningDetailSummary`

```python
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 = "0.11.12"
version = "0.11.13"
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 = "0.11.12"
__version__: str = "0.11.13"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 0.11.12 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 0.11.13 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
11 changes: 11 additions & 0 deletions src/openrouter/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,11 @@
ReasoningDetailEncryptedType,
ReasoningDetailEncryptedTypedDict,
)
from .reasoningdetailservertoolcall import (
ReasoningDetailServerToolCall,
ReasoningDetailServerToolCallType,
ReasoningDetailServerToolCallTypedDict,
)
from .reasoningdetailsummary import (
ReasoningDetailSummary,
ReasoningDetailSummaryType,
Expand Down Expand Up @@ -4253,6 +4258,9 @@
"ReasoningDetailEncrypted",
"ReasoningDetailEncryptedType",
"ReasoningDetailEncryptedTypedDict",
"ReasoningDetailServerToolCall",
"ReasoningDetailServerToolCallType",
"ReasoningDetailServerToolCallTypedDict",
"ReasoningDetailSummary",
"ReasoningDetailSummaryType",
"ReasoningDetailSummaryTypedDict",
Expand Down Expand Up @@ -6386,6 +6394,9 @@
"ReasoningDetailEncrypted": ".reasoningdetailencrypted",
"ReasoningDetailEncryptedType": ".reasoningdetailencrypted",
"ReasoningDetailEncryptedTypedDict": ".reasoningdetailencrypted",
"ReasoningDetailServerToolCall": ".reasoningdetailservertoolcall",
"ReasoningDetailServerToolCallType": ".reasoningdetailservertoolcall",
"ReasoningDetailServerToolCallTypedDict": ".reasoningdetailservertoolcall",
"ReasoningDetailSummary": ".reasoningdetailsummary",
"ReasoningDetailSummaryType": ".reasoningdetailsummary",
"ReasoningDetailSummaryTypedDict": ".reasoningdetailsummary",
Expand Down
Loading
Loading