diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5ced62da..c2ea2d08 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: 022eb2c5a16a240dbadc4af33fe7a0b2 + docChecksum: a467c32ffc76671e6fecb2930dc378e1 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.143 - configChecksum: f1173d9f286b063f509b47bc8f11c460 + releaseVersion: 1.3.144 + configChecksum: 96a41e5855d3290a8606fcb1af775adc repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: a482e192-08bc-41ac-92eb-da7cde2731ae - pristine_commit_hash: b67d5c45d7129b1d3cacf13dee817e855c3d3180 - pristine_tree_hash: f2ff85093f2980a0daa4958563987cd364e8c4bd + generation_id: 48adfa13-95a8-4e45-8b66-5dcc7695ff77 + pristine_commit_hash: 3e50bf5d17d54655da43242fbf31b8a1240fb513 + pristine_tree_hash: 2e8c41afb1071ae7f9343902a3f74993c70a1dc9 features: python: acceptHeaders: 3.0.0 @@ -1872,8 +1872,8 @@ trackedFiles: pristine_git_object: ace8f22b972273bdee620a9981abcb0cc46d994e docs/components/cascademode.mdx: id: e12579b7297c - last_write_checksum: sha1:24d8c50bea3a9f645b1d9b970eeb64a3d6c7bc4b - pristine_git_object: 3c814b92aff68b698f3db8546bcf8263392a4a3c + last_write_checksum: sha1:e6be79cba57b5631cfc4c5d5ece5a19a89ee5c07 + pristine_git_object: f48cd9f2d8f491aa8a1f7027e44f92df2e24a30c docs/components/changeguardrailpolicyassignmentrequest.mdx: id: 35619bc1d436 last_write_checksum: sha1:253a32b8a6d92ecdd1c3038449404b876b695fe5 @@ -3156,12 +3156,12 @@ trackedFiles: pristine_git_object: a226240fb3b94358d33acc91761a8bba03309b63 docs/components/deferredtoolscontrol.mdx: id: 13db9fb1f102 - last_write_checksum: sha1:bc65f901da52e95d9b0b352635d44bb9d2908700 - pristine_git_object: 3c02fcdc8dfc6fc694c6e63707e320d60394b392 + last_write_checksum: sha1:0d223417c7b68defb656777205a0f60e7ef8c2fc + pristine_git_object: d9354d31b7b55228250d727f16dfa95bb689e77a docs/components/deferredtoolscontrolscope.mdx: id: 61fade4412af - last_write_checksum: sha1:ff698d00ab177a0e0ac4ffe495004205f89ab63b - pristine_git_object: 55af6d027d9e31a4b9301804e6430ae75de2399f + last_write_checksum: sha1:9d82e5340c3123b7c48033b16798b0142a8461c8 + pristine_git_object: e29edbc3c509f99ebf885f54b4ad3a5fe1a839f7 docs/components/deferredtoolsdetails.mdx: id: 18832b6c60aa last_write_checksum: sha1:15b5cc53097084283f00f04ce8b0f4016a0abb5c @@ -11572,8 +11572,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:56cf94dc2366ba5b3445704a6bdf5ebe06d9069a - pristine_git_object: 36ec87c2b92e021845ae189b0fc83ad1b91e5b2d + last_write_checksum: sha1:1a40818153b380c45f5f42c6db7290dc5f2f5545 + pristine_git_object: b4e2419c9382a19e0a3d5fd96ca8cbaf4a6a14fe scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11600,8 +11600,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:807ee02ed8a8931b2b871e177f2fbbeaef4d82f2 - pristine_git_object: e4090cd898524e1dc2d74603c793d69eb344a066 + last_write_checksum: sha1:4eabe9f62ed722930e88add41646d22c6203645e + pristine_git_object: f15ce30dbf186674ad697ceb1e5c41ed769903df src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -12992,8 +12992,8 @@ trackedFiles: pristine_git_object: c354e6dbcedcec520d770714fe70089c18d7d3c5 src/openrouter/components/deferredtoolscontrol.py: id: b8b6ceef6f86 - last_write_checksum: sha1:400370e0b6065417a670fba03fc5faa713f503c3 - pristine_git_object: 75217e5d298f3e26d8f229a6ae82e5df3e6f1665 + last_write_checksum: sha1:95f45f6727a077a2bb436c9eb1414065d455a1cb + pristine_git_object: 1b3635f0f81fb0a110d6f6fea46c1e3f185cfcec src/openrouter/components/deferredtoolsdetails.py: id: 044f0e33803d last_write_checksum: sha1:2f8fcc43fc779a0cb9621149875a5e7bbfa5e6dc @@ -21505,3 +21505,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: "## Python SDK Changes:\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.deferred_tools.scope.enum(client)` **Removed** (Breaking ⚠️)\n* `open_router.presets.create_presets_messages()`: \n * `request.deferred_tools.scope.enum(client)` **Removed** (Breaking ⚠️)\n* `open_router.presets.create_presets_responses()`: \n * `request.deferred_tools.scope.enum(client)` **Removed** (Breaking ⚠️)\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fa86f1ec..c15485b1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.143 + version: 1.3.144 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index e3514b7e..ab6ea608 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -12185,7 +12185,7 @@ components: description: 'Universal profile only. When true, a catalog whose deferred tools changed between two of the model''s own turns (a client that connects MCP servers while the model works) is re-announced before the next model turn, with the sources added, changed and removed since the previous index, or that no deferred tools remain. Applies when the router lists the catalog itself; a client whose own tool search was adopted lists its deferred tools itself and is not re-announced. The announcement shares the result budget of the turn and is skipped when it does not fit. Absent or false: the catalog index is announced on a user turn only.' type: 'boolean' cascade_mode: - description: 'How a universal `tool_search` query reaches the client''s own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.' + description: 'How a universal `tool_search` query reaches the client''s own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental.' enum: - 'keywords' - 'native' @@ -12218,11 +12218,10 @@ components: - 'v1' type: 'string' scope: - description: 'Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.' + description: 'Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.' enum: - 'all' - 'mcp' - - 'client' type: 'string' x-speakeasy-unknown-values: allow search: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index dc1b0120..4a707064 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:6dbee169e21aaa8d7b9dd3ca997cd72f3243fbb1fa5c29b2d8d11e1655e6f9ea - sourceBlobDigest: sha256:a9bceae7c833849fffd35540ca83736af1078fce6e588669b21206368d302921 + sourceRevisionDigest: sha256:8be9c4eead47940901428494bae72ff1434ed4f67b9b88cf2e2ffbc1425a032b + sourceBlobDigest: sha256:eae580e04ff3bad44228682602b7efd65ab1f06638d86782e6b1e69c5a3c9a8d tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:6dbee169e21aaa8d7b9dd3ca997cd72f3243fbb1fa5c29b2d8d11e1655e6f9ea - sourceBlobDigest: sha256:a9bceae7c833849fffd35540ca83736af1078fce6e588669b21206368d302921 + sourceRevisionDigest: sha256:8be9c4eead47940901428494bae72ff1434ed4f67b9b88cf2e2ffbc1425a032b + sourceBlobDigest: sha256:eae580e04ff3bad44228682602b7efd65ab1f06638d86782e6b1e69c5a3c9a8d codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:b06fce93a4edd96fb3529118d4660bb0de260fa66761a03b49644790a36b81f8 + codeSamplesRevisionDigest: sha256:6e801a7bcae77f295da5deaf9260c839dd4e94bcf12406025c3c4ab229c6fc23 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index e50dcf94..3ee3ad66 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4199,4 +4199,14 @@ Based on: ### Generated - [python v1.3.143] . ### Releases -- [PyPI v1.3.143] https://pypi.org/project/openrouter/1.3.143 - . \ No newline at end of file +- [PyPI v1.3.143] https://pypi.org/project/openrouter/1.3.143 - . + +## 2026-11-09 09:19:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.144] . +### Releases +- [PyPI v1.3.144] https://pypi.org/project/openrouter/1.3.144 - . \ No newline at end of file diff --git a/docs/components/cascademode.mdx b/docs/components/cascademode.mdx index 3c814b92..f48cd9f2 100644 --- a/docs/components/cascademode.mdx +++ b/docs/components/cascademode.mdx @@ -2,7 +2,7 @@ title: "CascadeMode" --- -How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental. +How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental. ## Example Usage diff --git a/docs/components/deferredtoolscontrol.mdx b/docs/components/deferredtoolscontrol.mdx index 3c02fcdc..d9354d31 100644 --- a/docs/components/deferredtoolscontrol.mdx +++ b/docs/components/deferredtoolscontrol.mdx @@ -10,12 +10,12 @@ Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `announce_catalog_changes` | *Optional[bool]* | ➖ | Universal profile only. When true, a catalog whose deferred tools changed between two of the model's own turns (a client that connects MCP servers while the model works) is re-announced before the next model turn, with the sources added, changed and removed since the previous index, or that no deferred tools remain. Applies when the router lists the catalog itself; a client whose own tool search was adopted lists its deferred tools itself and is not re-announced. The announcement shares the result budget of the turn and is skipped when it does not fit. Absent or false: the catalog index is announced on a user turn only. | | -| `cascade_mode` | [Optional[components.CascadeMode]](../components/cascademode.mdx) | ➖ | How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental. | | +| `cascade_mode` | [Optional[components.CascadeMode]](../components/cascademode.mdx) | ➖ | How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental. | | | `hint` | *Optional[str]* | ➖ | Universal profile only. Caller text announced to the model with the deferred catalog before its first turn, for example which sources the task needs. Repeated only when it changes. Trimmed before the length bounds apply. Recorded in the `catalog_index` discovery record of the response, so it is replayed with the conversation. | | | `interface` | [Optional[components.Interface]](../components/interface.mdx) | ➖ | How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental. | | | `min_deferred_tools` | *Optional[int]* | ➖ | Universal profile only. When fewer tools than this would be deferred, the universal profile defers none of them and sends the client tools unchanged, so a harness with a handful of non-core tools and no MCP servers pays no search turn for them. Counted after the interface exclusions; ignored with a custom search, whose client decides what it loads. Absent: every wrappable tool in scope is deferred. | | | `profile` | [components.Profile](../components/profile.mdx) | ✔️ | Loading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes (unless `min_deferred_tools` inlines a small catalog), and rebuilds the catalog from each request so tools can be added or removed mid-conversation. | | | `protocol` | [components.Protocol](../components/protocol.mdx) | ✔️ | N/A | | -| `scope` | [Optional[components.DeferredToolsControlScope]](../components/deferredtoolscontrolscope.mdx) | ➖ | Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental. | | +| `scope` | [Optional[components.DeferredToolsControlScope]](../components/deferredtoolscontrolscope.mdx) | ➖ | Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental. | | | `search` | [components.DeferredToolsSearchStrategy](../components/deferredtoolssearchstrategy.mdx) | ✔️ | Router-local regex/BM25 or caller-owned custom search. | \{
"max_results": 5,
"type": "bm25"
} | | `validation` | [components.Validation](../components/validation.mdx) | ✔️ | Where tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release. | | \ No newline at end of file diff --git a/docs/components/deferredtoolscontrolscope.mdx b/docs/components/deferredtoolscontrolscope.mdx index 55af6d02..e29edbc3 100644 --- a/docs/components/deferredtoolscontrolscope.mdx +++ b/docs/components/deferredtoolscontrolscope.mdx @@ -2,7 +2,7 @@ title: "DeferredToolsControlScope" --- -Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental. +Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental. ## Example Usage @@ -20,4 +20,3 @@ This is an open enum. Unrecognized values will not fail type checks. - `"all"` - `"mcp"` -- `"client"` diff --git a/pyproject.toml b/pyproject.toml index 36ec87c2..b4e2419c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.143" +version = "1.3.144" 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 e4090cd8..f15ce30d 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.143" +__version__: str = "1.3.144" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.143 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.144 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/deferredtoolscontrol.py b/src/openrouter/components/deferredtoolscontrol.py index 75217e5d..1b3635f0 100644 --- a/src/openrouter/components/deferredtoolscontrol.py +++ b/src/openrouter/components/deferredtoolscontrol.py @@ -18,7 +18,7 @@ ], UnrecognizedStr, ] -r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.""" +r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental.""" Interface = Union[ @@ -48,11 +48,10 @@ Literal[ "all", "mcp", - "client", ], UnrecognizedStr, ] -r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.""" +r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.""" Validation = Literal["runtime",] @@ -72,7 +71,7 @@ class DeferredToolsControlTypedDict(TypedDict): announce_catalog_changes: NotRequired[bool] r"""Universal profile only. When true, a catalog whose deferred tools changed between two of the model's own turns (a client that connects MCP servers while the model works) is re-announced before the next model turn, with the sources added, changed and removed since the previous index, or that no deferred tools remain. Applies when the router lists the catalog itself; a client whose own tool search was adopted lists its deferred tools itself and is not re-announced. The announcement shares the result budget of the turn and is skipped when it does not fit. Absent or false: the catalog index is announced on a user turn only.""" cascade_mode: NotRequired[CascadeMode] - r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.""" + r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental.""" hint: NotRequired[str] r"""Universal profile only. Caller text announced to the model with the deferred catalog before its first turn, for example which sources the task needs. Repeated only when it changes. Trimmed before the length bounds apply. Recorded in the `catalog_index` discovery record of the response, so it is replayed with the conversation.""" interface: NotRequired[Interface] @@ -80,7 +79,7 @@ class DeferredToolsControlTypedDict(TypedDict): min_deferred_tools: NotRequired[int] r"""Universal profile only. When fewer tools than this would be deferred, the universal profile defers none of them and sends the client tools unchanged, so a harness with a handful of non-core tools and no MCP servers pays no search turn for them. Counted after the interface exclusions; ignored with a custom search, whose client decides what it loads. Absent: every wrappable tool in scope is deferred.""" scope: NotRequired[DeferredToolsControlScope] - r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.""" + r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.""" class DeferredToolsControl(BaseModel): @@ -101,7 +100,7 @@ class DeferredToolsControl(BaseModel): r"""Universal profile only. When true, a catalog whose deferred tools changed between two of the model's own turns (a client that connects MCP servers while the model works) is re-announced before the next model turn, with the sources added, changed and removed since the previous index, or that no deferred tools remain. Applies when the router lists the catalog itself; a client whose own tool search was adopted lists its deferred tools itself and is not re-announced. The announcement shares the result budget of the turn and is skipped when it does not fit. Absent or false: the catalog index is announced on a user turn only.""" cascade_mode: Optional[CascadeMode] = None - r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. Experimental.""" + r"""How a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search documents `select:`, and the limit field is sent only when the model gave one, unless the client search requires it, in which case its documented default is sent. A tool the client sent with `defer_loading: true` that universal keeps direct is forwarded with that flag, so the provider loads it through the client search as it would without universal. Experimental.""" hint: Optional[str] = None r"""Universal profile only. Caller text announced to the model with the deferred catalog before its first turn, for example which sources the task needs. Repeated only when it changes. Trimmed before the length bounds apply. Recorded in the `catalog_index` discovery record of the response, so it is replayed with the conversation.""" @@ -113,7 +112,7 @@ class DeferredToolsControl(BaseModel): r"""Universal profile only. When fewer tools than this would be deferred, the universal profile defers none of them and sends the client tools unchanged, so a harness with a handful of non-core tools and no MCP servers pays no search turn for them. Counted after the interface exclusions; ignored with a custom search, whose client decides what it loads. Absent: every wrappable tool in scope is deferred.""" scope: Optional[DeferredToolsControlScope] = None - r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. `client`: only the tools the client itself marked `defer_loading`, so a harness with its own tool search keeps its other direct tools direct; an adopted client tool search is still replaced by the router wrappers, and a client-deferred tool the router cannot wrap stays direct. Experimental.""" + r"""Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/uv.lock b/uv.lock index b6387ec9..d36f7b50 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.143" +version = "1.3.144" source = { editable = "." } dependencies = [ { name = "httpcore" },