diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 062b7142..b1f11db9 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
- docChecksum: 2ceae3a4d5ec00d9acf88a1d00032182
+ docChecksum: 70f3ab92fb1757fe6fd721c78ba894ed
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.63
- configChecksum: 33df828b80be375edf429dd692a7b7cc
+ releaseVersion: 1.1.64
+ configChecksum: e9adf1e0afd4d8f2fedb9fe76743644d
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 99642417-54eb-4655-a3ab-2fe2e4863d4a
- pristine_commit_hash: 5043d6a5d18a819823e3a6d2f3ad3601b824c365
- pristine_tree_hash: 7a9a1ad1fd3a74c63db2ffda089f947d56798304
+ generation_id: 32d709d1-2144-467d-bdd3-b0ed3dd97df8
+ pristine_commit_hash: 1203d6c0ba320025aa33aca75ea7f2bb3fd1500d
+ pristine_tree_hash: 69271419732b2548bba3b6f456bfb333c8ad70a1
features:
python:
acceptHeaders: 3.0.0
@@ -132,10 +132,6 @@ trackedFiles:
id: bf179b4008af
last_write_checksum: sha1:c0d4fee7d39fbd3d08c44bbe0e7b929350c5d7e8
pristine_git_object: 00ce08abaaf149eb1713cc084e87a8b1efc8df81
- docs/components/advisornestedtool.mdx:
- id: 71464b7dde39
- last_write_checksum: sha1:89d7a7836c487fe84756f39b306bbfca59b1ca6c
- pristine_git_object: 81964e19bd13c14a67371b972b99926dc712b11d
docs/components/advisorreasoning.mdx:
id: c4f80ddfbd1b
last_write_checksum: sha1:9e16412ad2176b95e0c995efeb0850318ec58d37
@@ -146,12 +142,12 @@ trackedFiles:
pristine_git_object: aa427b33bd2210325fc468dcce935c9ad2da4096
docs/components/advisorservertoolconfig.mdx:
id: 21d52f2c8a42
- last_write_checksum: sha1:c998886f93312eec86a7747ad12d095c20fbf64f
- pristine_git_object: 123fe8790d1b021480efb9e7da3176cdd2736f00
+ last_write_checksum: sha1:18215d160281c46a57b84463dfb774990a51184f
+ pristine_git_object: 5aa0ee10cafd923ef9cbb7987020cf131a6f5507
docs/components/advisorservertoolopenrouter.mdx:
id: ed2fd64f9766
- last_write_checksum: sha1:d0c85e7d14ded4e6686f9463bf6a1460ce9267df
- pristine_git_object: 928a0b80faca7f5e8faa898ebe1634c9a09c15f9
+ last_write_checksum: sha1:4aef2b661a53d38da31561ca99875d22bf12791f
+ pristine_git_object: 3c141ae5132e50d3cacec70b29da5d545220d88e
docs/components/advisorservertoolopenroutertype.mdx:
id: 037d49b1a02c
last_write_checksum: sha1:1ef65dad1b6f74dad67829f8b67d65da6144922b
@@ -7254,8 +7250,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:59d0ec5280f78c46b6882823110d574ff257d53c
- pristine_git_object: e412a9e64578c70e0d91b0767d1a9414506807ed
+ last_write_checksum: sha1:ed7fe7a914a6cd7a0c1609753fa5cebedba923c7
+ pristine_git_object: e823397e9b0c660033fc5146b23b734eea44ece0
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7282,8 +7278,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:660c7ddfd0347049728c32c2d01f8cb7f19e42f8
- pristine_git_object: 7b6bb8689d72b5119416d40a7cebccdc35d11538
+ last_write_checksum: sha1:d7958726a5435981410aeaa43f2e386cbfa1a0e7
+ pristine_git_object: 31d8ed78e8fcbff03276adcb217dcf340dac50e4
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a
@@ -7326,8 +7322,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:1038d7f0c962e487787582da4d527b819f122aee
- pristine_git_object: 84f9a9561ebe764a905326d20e6e80ba30922047
+ last_write_checksum: sha1:22904934dac60fa1c97520d0af7148864e9a05a4
+ pristine_git_object: 0ecfa1024355f685f89166989f37ddf8a98375dc
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -7344,22 +7340,18 @@ trackedFiles:
id: 2761ab789f41
last_write_checksum: sha1:f711aac1f44184306bed8d816190208e8c73daa5
pristine_git_object: c9851ef1cc4b9fadc8f0cb79089282ab0b0af941
- src/openrouter/components/advisornestedtool.py:
- id: 768fcc6bad2b
- last_write_checksum: sha1:23f5831fd27a32345fb4e50c1406df0510b0bf47
- pristine_git_object: 23e5798c1057c478480a96f1cc09bebc6ca10836
src/openrouter/components/advisorreasoning.py:
id: d5af5c19fc73
last_write_checksum: sha1:0fd32e4ff2d89f7cea861d6e691e82a7e1ff62f2
pristine_git_object: 0b87e3c6bde34128215d2228f2349a44ff453a5b
src/openrouter/components/advisorservertool_openrouter.py:
id: 4442cd9ad387
- last_write_checksum: sha1:74597f510ec8044437d9a0f5abd6465152141c1d
- pristine_git_object: ffec551949aaf877801193abb0dd8ed6d015453a
+ last_write_checksum: sha1:ad191d2c52264c0f5a51f35892a744b17ac4fe6e
+ pristine_git_object: 5be72439952695c033cf270d087234703fbf1607
src/openrouter/components/advisorservertoolconfig.py:
id: 683887bb9db3
- last_write_checksum: sha1:3a801b02cc92e02a00f0e26f377fb93a6893641a
- pristine_git_object: d92e19f8e9bec36933cd3e5d7ccc1690f14b168f
+ last_write_checksum: sha1:96cab10eadadadf9663f83a003ffa5d74555287e
+ pristine_git_object: 4aca4ffde948a789118b9388fdf4638cb878e532
src/openrouter/components/agentmessageitem.py:
id: 6dbe0c8e2c79
last_write_checksum: sha1:475390ec86c90a835bb2f7a1d256d6b03acbbfd5
@@ -12179,3 +12171,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(AdvisorServerTool_OpenRouter).parameters` **Changed** (Breaking ⚠️)\n* `open_router.chat.send()`: \n * `request.tools[].union(AdvisorServerTool_OpenRouter).parameters` **Changed** (Breaking ⚠️)\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.tools[].union(AdvisorServerTool_OpenRouter).parameters` **Changed** (Breaking ⚠️)\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(AdvisorServerTool_OpenRouter).parameters` **Changed** (Breaking ⚠️)\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(AdvisorServerTool_OpenRouter).parameters` **Changed** (Breaking ⚠️)\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index 87688041..39de7c46 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.63
+ version: 1.1.64
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index a8b28186..21cc8c15 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -255,20 +255,6 @@ components:
- 'role'
- 'tools'
type: 'object'
- AdvisorNestedTool:
- additionalProperties: {}
- description: 'A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.'
- example:
- type: 'openrouter:web_search'
- properties:
- parameters:
- additionalProperties: {}
- type: 'object'
- type:
- type: 'string'
- required:
- - 'type'
- type: 'object'
AdvisorReasoning:
description: 'Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.'
example:
@@ -291,7 +277,7 @@ components:
type: 'integer'
type: 'object'
AdvisorServerTool_OpenRouter:
- description: 'OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.'
+ description: 'OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.'
example:
parameters:
model: '~anthropic/claude-opus-latest'
@@ -325,14 +311,8 @@ components:
description: 'Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider''s default applies.'
example: 2048
type: 'integer'
- max_tool_calls:
- description: 'Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools.'
- example: 5
- maximum: 25
- minimum: 1
- type: 'integer'
model:
- description: 'Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call''s `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model.'
+ description: 'Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call''s `model` argument; if neither is set, the model from the outer API request is used.'
example: '~anthropic/claude-opus-latest'
type: 'string'
name:
@@ -353,11 +333,6 @@ components:
example: 0.7
format: 'double'
type: 'number'
- tools:
- description: 'Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself.'
- items:
- $ref: '#/components/schemas/AdvisorNestedTool'
- type: 'array'
type: 'object'
AgentMessageItem:
additionalProperties: {}
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index ccf527da..ea82c457 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:023df89581f20dd13a85aa2d4c9f6d3182fcd96aaa807aa8e62639417b306e2a
- sourceBlobDigest: sha256:363a38fc818de682150ae32c8bc061ad3fc7d96b07489b68116f0f8057816b6a
+ sourceRevisionDigest: sha256:8619baee716f98a1763601a5e441153de11ba39cd1987e4a3bac14c99bf09e17
+ sourceBlobDigest: sha256:8dfabc64791bb2672929791e0cd1e22f17fc22c506259586458e48b661c12331
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:023df89581f20dd13a85aa2d4c9f6d3182fcd96aaa807aa8e62639417b306e2a
- sourceBlobDigest: sha256:363a38fc818de682150ae32c8bc061ad3fc7d96b07489b68116f0f8057816b6a
+ sourceRevisionDigest: sha256:8619baee716f98a1763601a5e441153de11ba39cd1987e4a3bac14c99bf09e17
+ sourceBlobDigest: sha256:8dfabc64791bb2672929791e0cd1e22f17fc22c506259586458e48b661c12331
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:eb9909056a14f8265e6d8e229bc5cdc56a6834ffdf324b40bc9b6e104e45835b
+ codeSamplesRevisionDigest: sha256:fc65d3b585ff9c91785e620714dc0ad87f207be2a2c1d0155c2c62858a918892
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 2ce23291..f20570b3 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1419,4 +1419,14 @@ Based on:
### Generated
- [python v1.1.63] .
### Releases
-- [PyPI v1.1.63] https://pypi.org/project/openrouter/1.1.63 - .
\ No newline at end of file
+- [PyPI v1.1.63] https://pypi.org/project/openrouter/1.1.63 - .
+
+## 2026-08-19 04:57:42
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.64] .
+### Releases
+- [PyPI v1.1.64] https://pypi.org/project/openrouter/1.1.64 - .
\ No newline at end of file
diff --git a/docs/components/advisornestedtool.mdx b/docs/components/advisornestedtool.mdx
deleted file mode 100644
index 81964e19..00000000
--- a/docs/components/advisornestedtool.mdx
+++ /dev/null
@@ -1,14 +0,0 @@
----
-title: "AdvisorNestedTool"
----
-
-A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.
-
-
-## Fields
-
-| Field | Type | Required | Description | Example |
-| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
-| `parameters` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | |
-| `type` | *str* | :heavy_check_mark: | N/A | |
-| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \{
"type": "openrouter:web_search"
} |
\ No newline at end of file
diff --git a/docs/components/advisorservertoolconfig.mdx b/docs/components/advisorservertoolconfig.mdx
index 123fe879..5aa0ee10 100644
--- a/docs/components/advisorservertoolconfig.mdx
+++ b/docs/components/advisorservertoolconfig.mdx
@@ -12,10 +12,8 @@ Configuration for one openrouter:advisor server tool entry.
| `forward_transcript` | *Optional[bool]* | :heavy_minus_sign: | When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call. | false |
| `instructions` | *Optional[str]* | :heavy_minus_sign: | System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own. | You are a senior staff engineer. Give a focused, decisive plan. |
| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies. | 2048 |
-| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools. | 5 |
-| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model. | ~anthropic/claude-opus-latest |
+| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. | ~anthropic/claude-opus-latest |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars. | reviewer |
| `reasoning` | [Optional[components.AdvisorReasoning]](../components/advisorreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. | \{
"effort": "high"
} |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result. | false |
-| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. | 0.7 |
-| `tools` | List[[components.AdvisorNestedTool](../components/advisornestedtool.mdx)] | :heavy_minus_sign: | Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself. | |
\ No newline at end of file
+| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. | 0.7 |
\ No newline at end of file
diff --git a/docs/components/advisorservertoolopenrouter.mdx b/docs/components/advisorservertoolopenrouter.mdx
index 928a0b80..3c141ae5 100644
--- a/docs/components/advisorservertoolopenrouter.mdx
+++ b/docs/components/advisorservertoolopenrouter.mdx
@@ -2,7 +2,7 @@
title: "AdvisorServerToolOpenRouter"
---
-OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
+OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
## Fields
diff --git a/pyproject.toml b/pyproject.toml
index e412a9e6..e823397e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.63"
+version = "1.1.64"
description = "Official Python Client SDK for OpenRouter."
authors = [{ name = "OpenRouter" },]
readme = "README-PYPI.md"
diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py
index 7b6bb868..31d8ed78 100644
--- a/src/openrouter/_version.py
+++ b/src/openrouter/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "openrouter"
-__version__: str = "1.1.63"
+__version__: str = "1.1.64"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.63 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.64 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index 84f9a956..0ecfa102 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -21,7 +21,6 @@
AdditionalToolsItemTypedDict,
TypeAdditionalTools,
)
- from .advisornestedtool import AdvisorNestedTool, AdvisorNestedToolTypedDict
from .advisorreasoning import (
AdvisorReasoning,
AdvisorReasoningEffort,
@@ -3142,8 +3141,6 @@
"AdditionalToolsItemToolUnionTypedDict",
"AdditionalToolsItemTypeFunction",
"AdditionalToolsItemTypedDict",
- "AdvisorNestedTool",
- "AdvisorNestedToolTypedDict",
"AdvisorReasoning",
"AdvisorReasoningEffort",
"AdvisorReasoningTypedDict",
@@ -5399,8 +5396,6 @@
"AdditionalToolsItemTypeFunction": ".additionaltoolsitem",
"AdditionalToolsItemTypedDict": ".additionaltoolsitem",
"TypeAdditionalTools": ".additionaltoolsitem",
- "AdvisorNestedTool": ".advisornestedtool",
- "AdvisorNestedToolTypedDict": ".advisornestedtool",
"AdvisorReasoning": ".advisorreasoning",
"AdvisorReasoningEffort": ".advisorreasoning",
"AdvisorReasoningTypedDict": ".advisorreasoning",
diff --git a/src/openrouter/components/advisornestedtool.py b/src/openrouter/components/advisornestedtool.py
deleted file mode 100644
index 23e5798c..00000000
--- a/src/openrouter/components/advisornestedtool.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
-
-from __future__ import annotations
-from openrouter.types import BaseModel, UNSET_SENTINEL
-import pydantic
-from pydantic import ConfigDict, model_serializer
-from typing import Any, Dict, Optional
-from typing_extensions import NotRequired, TypedDict
-
-
-class AdvisorNestedToolTypedDict(TypedDict):
- r"""A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself."""
-
- type: str
- parameters: NotRequired[Dict[str, Any]]
-
-
-class AdvisorNestedTool(BaseModel):
- r"""A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself."""
-
- model_config = ConfigDict(
- populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
- )
- __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
-
- type: str
-
- parameters: Optional[Dict[str, Any]] = None
-
- @property
- def additional_properties(self):
- return self.__pydantic_extra__
-
- @additional_properties.setter
- def additional_properties(self, value):
- self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
-
- @model_serializer(mode="wrap")
- def serialize_model(self, handler):
- optional_fields = set(["parameters"])
- serialized = handler(self)
- m = {}
-
- for n, f in type(self).model_fields.items():
- k = f.alias or n
- val = serialized.get(k, serialized.get(n))
- serialized.pop(k, serialized.pop(n, None))
-
- if val != UNSET_SENTINEL:
- if val is not None or k not in optional_fields:
- m[k] = val
- for k, v in serialized.items():
- m[k] = v
-
- return m
diff --git a/src/openrouter/components/advisorservertool_openrouter.py b/src/openrouter/components/advisorservertool_openrouter.py
index ffec5519..5be72439 100644
--- a/src/openrouter/components/advisorservertool_openrouter.py
+++ b/src/openrouter/components/advisorservertool_openrouter.py
@@ -15,7 +15,7 @@
class AdvisorServerToolOpenRouterTypedDict(TypedDict):
- r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
+ r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
type: AdvisorServerToolOpenRouterType
parameters: NotRequired[AdvisorServerToolConfigTypedDict]
@@ -23,7 +23,7 @@ class AdvisorServerToolOpenRouterTypedDict(TypedDict):
class AdvisorServerToolOpenRouter(BaseModel):
- r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
+ r"""OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor."""
type: AdvisorServerToolOpenRouterType
diff --git a/src/openrouter/components/advisorservertoolconfig.py b/src/openrouter/components/advisorservertoolconfig.py
index d92e19f8..4aca4ffd 100644
--- a/src/openrouter/components/advisorservertoolconfig.py
+++ b/src/openrouter/components/advisorservertoolconfig.py
@@ -1,11 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from .advisornestedtool import AdvisorNestedTool, AdvisorNestedToolTypedDict
from .advisorreasoning import AdvisorReasoning, AdvisorReasoningTypedDict
from openrouter.types import BaseModel, UNSET_SENTINEL
from pydantic import model_serializer
-from typing import List, Optional
+from typing import Optional
from typing_extensions import NotRequired, TypedDict
@@ -18,10 +17,8 @@ class AdvisorServerToolConfigTypedDict(TypedDict):
r"""System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own."""
max_completion_tokens: NotRequired[int]
r"""Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies."""
- max_tool_calls: NotRequired[int]
- r"""Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools."""
model: NotRequired[str]
- r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model."""
+ r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used."""
name: NotRequired[str]
r"""Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."""
reasoning: NotRequired[AdvisorReasoningTypedDict]
@@ -30,8 +27,6 @@ class AdvisorServerToolConfigTypedDict(TypedDict):
r"""When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result."""
temperature: NotRequired[float]
r"""Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies."""
- tools: NotRequired[List[AdvisorNestedToolTypedDict]]
- r"""Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself."""
class AdvisorServerToolConfig(BaseModel):
@@ -46,11 +41,8 @@ class AdvisorServerToolConfig(BaseModel):
max_completion_tokens: Optional[int] = None
r"""Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies."""
- max_tool_calls: Optional[int] = None
- r"""Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools."""
-
model: Optional[str] = None
- r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model."""
+ r"""Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used."""
name: Optional[str] = None
r"""Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars."""
@@ -64,9 +56,6 @@ class AdvisorServerToolConfig(BaseModel):
temperature: Optional[float] = None
r"""Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies."""
- tools: Optional[List[AdvisorNestedTool]] = None
- r"""Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself."""
-
@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(
@@ -74,13 +63,11 @@ def serialize_model(self, handler):
"forward_transcript",
"instructions",
"max_completion_tokens",
- "max_tool_calls",
"model",
"name",
"reasoning",
"stream",
"temperature",
- "tools",
]
)
serialized = handler(self)
diff --git a/uv.lock b/uv.lock
index 5dd53f06..fa977930 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.63"
+version = "1.1.64"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },