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
30 changes: 15 additions & 15 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: a48af6dd312a474c88edd4e459b30474
docChecksum: 468cf191c8bcc65f5a8ce3e0018e2823
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.2.19
configChecksum: db8f929cb84ef27f6368356566d95dd3
releaseVersion: 1.2.20
configChecksum: 86ac2705440475f5369e51fcfea3b0e5
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: a77aba72-7f21-4c38-9490-fde2c3f75dc3
pristine_commit_hash: 16e15b43ebabef2fe8c1fd80ec285561d9237cf5
pristine_tree_hash: 10f488efd43fe2dbcb00dc72ef17e8a8487b12d1
generation_id: a5787b67-da19-4251-bef1-23ae549f5bd3
pristine_commit_hash: 89e300f89f43145c9c2987065e24dac97a46e476
pristine_tree_hash: b00ab492d6721240922d381ea1d29ff19a68a3ca
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -5791,8 +5791,8 @@ trackedFiles:
pristine_git_object: 6817216b64de42e834ab68a072287701e621daa8
docs/components/toolcustom.mdx:
id: b3ea2dbc7af5
last_write_checksum: sha1:b05a11b62179ab9242129b616c4ac4e24357807b
pristine_git_object: e52e0f6a01c66838f7b55e4eef45e5612a2fb4e5
last_write_checksum: sha1:3659a42c9b930d77f5aecb8be29aef877d1502de
pristine_git_object: a4ed39817c997d4e25266c25d12498e648d77190
docs/components/toolsearchservertool.mdx:
id: 827c342fe25b
last_write_checksum: sha1:62eee3897b26cfc2097be04aeb24dc578da877ec
Expand Down Expand Up @@ -8219,8 +8219,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:436f8d3098e3248e6e0f26d8d8a6fcaca4992052
pristine_git_object: adf7aebe740b587f93cd26db0caf61d76f4b9f6f
last_write_checksum: sha1:d840d09771e9321a247c7798346f48f4c79f82d2
pristine_git_object: cdec75962905ef0fde47759c28b7b74e62744f5a
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -8247,8 +8247,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:671b03df56863efa19d966a9e87d1337d826f068
pristine_git_object: 6aa88e3d294eeae41c19317dfafad6f2a69d5e7c
last_write_checksum: sha1:4bede80cef633b1474c61639cde1ddfcd62ddce9
pristine_git_object: 414f7141481e8394c8e826a4ae4fd1acbdd88228
src/openrouter/alpha.py:
id: 306c4d93308d
last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a
Expand Down Expand Up @@ -9819,8 +9819,8 @@ trackedFiles:
pristine_git_object: 7e69d1f775baece5f94b03d35bcd884d5e6f519d
src/openrouter/components/messagesrequest.py:
id: 72b1f339024d
last_write_checksum: sha1:5bfa56761972b32daba5d10eef1ed30ded1adf24
pristine_git_object: 3f54e45bfad8e67704e3581071fe4d9dc7090af9
last_write_checksum: sha1:b5abcd9ebdda9e2f62b497d2376bcd798108db64
pristine_git_object: abb8605093cfb0af7babc6cf8acda945b5c12845
src/openrouter/components/messagessearchmodelsservertool.py:
id: 53d755edb120
last_write_checksum: sha1:389786fc22ba4bb47b0a086b7aa321f2f04fe943
Expand Down Expand Up @@ -15076,4 +15076,4 @@ examples:
"529":
application/json: {"error": {"code": 529, "message": "Provider returned error"}}
examplesVersion: 1.0.2
releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n* `open_router.presets.create_presets_messages()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n* `open_router.responses.send()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n* `open_router.beta.responses.send()`: \n * `request.plugins[].union(switchyard-router)` **Added**\n"
releaseNotes: "## Python SDK Changes:\n* `open_router.presets.create_presets_messages()`: \n * `request.tools[].union(class (0)).strict` **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: 1.2.19
version: 1.2.20
additionalDependencies:
dev: {}
main: {}
Expand Down
2 changes: 2 additions & 0 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15178,6 +15178,8 @@ components:
type: 'object'
name:
type: 'string'
strict:
type: 'boolean'
type:
enum:
- 'custom'
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:9c27444c53f6e5272e398439da5de1625f993021d2455c6cdc6a9e32ac29189d
sourceBlobDigest: sha256:3af7d1d4972b8c2a6f130e4b7d18023e94770ccb7c0fcebed53254e716be6f8b
sourceRevisionDigest: sha256:9096e3c973fe03b2d2e126bc0b659394df4714d4f5986c8b092ff2e7e76a1307
sourceBlobDigest: sha256:b8d713fe553a23ae7ac006f621b79a0a0f4831e7da12d114623f15e168407379
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:9c27444c53f6e5272e398439da5de1625f993021d2455c6cdc6a9e32ac29189d
sourceBlobDigest: sha256:3af7d1d4972b8c2a6f130e4b7d18023e94770ccb7c0fcebed53254e716be6f8b
sourceRevisionDigest: sha256:9096e3c973fe03b2d2e126bc0b659394df4714d4f5986c8b092ff2e7e76a1307
sourceBlobDigest: sha256:b8d713fe553a23ae7ac006f621b79a0a0f4831e7da12d114623f15e168407379
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:a55706fcf2a8e9dc8a6c0204885105962047838f93baeac31e5d595ef80678cf
codeSamplesRevisionDigest: sha256:3d584eb544edd3781554d297a528027bee5c37b707cbe53974ab972a33fb4f6e
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 @@ -2599,4 +2599,14 @@ Based on:
### Generated
- [python v1.2.19] .
### Releases
- [PyPI v1.2.19] https://pypi.org/project/openrouter/1.2.19 - .
- [PyPI v1.2.19] https://pypi.org/project/openrouter/1.2.19 - .

## 2026-09-23 14:53:31
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.2.20] .
### Releases
- [PyPI v1.2.20] https://pypi.org/project/openrouter/1.2.20 - .
1 change: 1 addition & 0 deletions docs/components/toolcustom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ title: "ToolCustom"
| `description` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `input_schema` | [components.InputSchema](../components/inputschema.mdx) | :heavy_check_mark: | N/A | |
| `name` | *str* | :heavy_check_mark: | N/A | |
| `strict` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `type` | [Optional[components.ToolTypeCustom]](../components/tooltypecustom.mdx) | :heavy_minus_sign: | N/A | |
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.2.19"
version = "1.2.20"
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.2.19"
__version__: str = "1.2.20"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
__user_agent__: str = "speakeasy-sdk/python 1.2.19 2.914.0 1.0.0 openrouter"
__user_agent__: str = "speakeasy-sdk/python 1.2.20 2.914.0 1.0.0 openrouter"

try:
if __package__ is not None:
Expand Down
11 changes: 8 additions & 3 deletions src/openrouter/components/messagesrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ class ToolCustomTypedDict(TypedDict):
r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format."""
defer_loading: NotRequired[bool]
description: NotRequired[str]
strict: NotRequired[bool]
type: NotRequired[ToolTypeCustom]


Expand All @@ -1049,11 +1050,15 @@ class ToolCustom(BaseModel):

description: Optional[str] = None

strict: Optional[bool] = None

type: Optional[ToolTypeCustom] = None

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["cache_control", "defer_loading", "description", "type"])
optional_fields = set(
["cache_control", "defer_loading", "description", "strict", "type"]
)
serialized = handler(self)
m = {}

Expand Down Expand Up @@ -1083,8 +1088,8 @@ def serialize_model(self, handler):
ToolTextEditor20250124TypedDict,
ToolBash20250124TypedDict,
AnthropicToolSearchToolBm25TypedDict,
ToolCustomTypedDict,
AnthropicToolSearchToolRegexTypedDict,
ToolCustomTypedDict,
ToolWebSearch20250305TypedDict,
ToolAdvisor20260301TypedDict,
ToolWebSearch20260209TypedDict,
Expand All @@ -1107,8 +1112,8 @@ def serialize_model(self, handler):
ToolTextEditor20250124,
ToolBash20250124,
AnthropicToolSearchToolBm25,
ToolCustom,
AnthropicToolSearchToolRegex,
ToolCustom,
ToolWebSearch20250305,
ToolAdvisor20260301,
ToolWebSearch20260209,
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading