diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0adec213..e051b975 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: c64e8a1bb43b3df7d97e44bed1a86038 + docChecksum: 8bae8d75507e25f4bce802fa8d4e51d4 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.141 - configChecksum: 57e51fee9c5d53ea72d3e0b8381f6ea8 + releaseVersion: 1.3.142 + configChecksum: ecad88779f821f146821691d219a36c1 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 080eb84b-a268-48e1-88f8-5387670ca0b7 - pristine_commit_hash: 0a133e3a8370c6b6c7ffcd95f439e50de8a1f3d2 - pristine_tree_hash: d6eea92a6d82c2e5be1e8de78b4ad087f8b07218 + generation_id: 4281e77a-9127-4b49-9461-c9069ab3fb98 + pristine_commit_hash: a1bfb01c6f4b18cca2537e06836ab14978820517 + pristine_tree_hash: a41537682739cbddba7562e9362d375b2d85be89 features: python: acceptHeaders: 3.0.0 @@ -3132,8 +3132,8 @@ trackedFiles: pristine_git_object: 78c74a24e624245cbbfe2f989c4301442bbb5fee docs/components/deferredbm25search.mdx: id: 28b5539be31d - last_write_checksum: sha1:a15bcc6774c01064019b8322f75c420d16fcd615 - pristine_git_object: 2ca788fa3c94eb09e32070aa7042e4074fc96ccc + last_write_checksum: sha1:d14a631611b9e843f885300ea0767d3c19f0e749 + pristine_git_object: 7c232f74da7187977ef499699d16f6cbea9abf86 docs/components/deferredbm25searchtype.mdx: id: 7c08005a05ac last_write_checksum: sha1:4c12129e0ab52db31056314a17628cbfedb600b8 @@ -3148,8 +3148,8 @@ trackedFiles: pristine_git_object: 8accaf302940a8ab39f159badc6daccad7fddd75 docs/components/deferredregexsearch.mdx: id: 8b88be545243 - last_write_checksum: sha1:03a700d04a33be1a412a4e02cf78384bfac7aa12 - pristine_git_object: c1b67599df1b7edf23020afca6f28224ebf6ef4b + last_write_checksum: sha1:1f76450bf1fde4fb2c157551d4579f39ed9c8097 + pristine_git_object: 9186c94f06a12fcb64ede66bbbf693254c74c6f6 docs/components/deferredregexsearchtype.mdx: id: bcec87810dd1 last_write_checksum: sha1:59b772e53fc1109c2cc4f42f4cf21405c35830a6 @@ -11572,8 +11572,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:4e8e9761c42ce8a62aa8067fe8b61d6420853214 - pristine_git_object: 3c2f24271d9e9d34c5a0b77afa52ebe2133e7475 + last_write_checksum: sha1:a93813c6551be9f3bcff14e9fea4c8640b0f69b0 + pristine_git_object: 1a7f67c5ab467c0cb958532096f18f2238d3b85a 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:d5a41727fce325bc07490814cee31abfb1c339a7 - pristine_git_object: 2c06f86bfa6db8f5f0fa6987c7456476c3411647 + last_write_checksum: sha1:2d24d9a720a5ae17fd14c2b40875600f91d69ade + pristine_git_object: c40284be584f0d9ecb3ef6a792673d4a53f6ba43 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -12980,16 +12980,16 @@ trackedFiles: pristine_git_object: dccefb2123d06d6d9920e7035f21a8ab5e7b86a8 src/openrouter/components/deferredbm25search.py: id: b988bf147d9f - last_write_checksum: sha1:844c2abcc0abfe97fb0fc674433fbe562b13d1be - pristine_git_object: fc8e02ddf1351afcd9eea9bb0f0b22c70f56455d + last_write_checksum: sha1:b3a14b9dae651760293ecc84df9b52703b37bbf3 + pristine_git_object: 2d6f448ab6a697eb6ca1a0b4b5d8816ff720d153 src/openrouter/components/deferredcustomsearch.py: id: 71d9d33ba373 last_write_checksum: sha1:1b308d057e8b27d8a7da76b1edf47734ab11dd0c pristine_git_object: b47ed4f8a5b51b416f3105bb22b93dddf23e7aa6 src/openrouter/components/deferredregexsearch.py: id: 64f28f2cc1af - last_write_checksum: sha1:5b1e7421dd0cfce6630b734abd5419c17b7e4ca0 - pristine_git_object: 3df7acb264606e29fc26a79c5f5eda4166b8e206 + last_write_checksum: sha1:5e9edbf452c0aa3c1a9d72a585e82828a7855352 + pristine_git_object: 28a24b67fabae6494389877dad418ebf5102ef2b src/openrouter/components/deferredtoolscontrol.py: id: b8b6ceef6f86 last_write_checksum: sha1:400370e0b6065417a670fba03fc5faa713f503c3 @@ -21505,8 +21505,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.presets.create_presets_chat_completions()`: `request.deferred_tools` **Changed** - * `open_router.presets.create_presets_messages()`: `request.deferred_tools` **Changed** - * `open_router.presets.create_presets_responses()`: `request.deferred_tools` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8b939a9f..f63744ed 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.141 + version: 1.3.142 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 35d617ea..260e99eb 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -12110,7 +12110,7 @@ components: max_results: type: 'integer' miss_sources: - description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client''s built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.' + description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model''s own words, the query''s leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool''s name or indexed description (its own and its namespace''s) carries the leading word (`jira create issue` answered with another tracker''s issue tools). Direct tools, including a client''s built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.' type: 'boolean' siblings: description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.' @@ -12159,7 +12159,7 @@ components: max_results: type: 'integer' miss_sources: - description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client''s built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.' + description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model''s own words, the query''s leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool''s name or indexed description (its own and its namespace''s) carries the leading word (`jira create issue` answered with another tracker''s issue tools). Direct tools, including a client''s built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.' type: 'boolean' siblings: description: 'Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c5fee74f..bf77f15c 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:dc1791abea34c3b54da7554eb2636d9378f6958fe52dc9b02c7a391561b6803c - sourceBlobDigest: sha256:a5d9fb0ee44c6ed55e7daf20a8b4849087a8173a1579cc76233167915af91d29 + sourceRevisionDigest: sha256:8376ada66c3e2114903c12b6a7afbae77714b9765cb8927ee151c7347938c4ed + sourceBlobDigest: sha256:94fd3adf77940387fbca15605d91f9f58fcde6cfc5a037e256a8dc3cd98b618c tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:dc1791abea34c3b54da7554eb2636d9378f6958fe52dc9b02c7a391561b6803c - sourceBlobDigest: sha256:a5d9fb0ee44c6ed55e7daf20a8b4849087a8173a1579cc76233167915af91d29 + sourceRevisionDigest: sha256:8376ada66c3e2114903c12b6a7afbae77714b9765cb8927ee151c7347938c4ed + sourceBlobDigest: sha256:94fd3adf77940387fbca15605d91f9f58fcde6cfc5a037e256a8dc3cd98b618c codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:6903f04c32a0eed4f2e5d36b8172901cfe6bcd3902c8fbe414b6546d3eb0a6a1 + codeSamplesRevisionDigest: sha256:47487391742a548da11ad765b6873dc544be577f9b95dae3bba66b8b8d379845 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index dab60a81..759d2a8d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4179,4 +4179,14 @@ Based on: ### Generated - [python v1.3.141] . ### Releases -- [PyPI v1.3.141] https://pypi.org/project/openrouter/1.3.141 - . \ No newline at end of file +- [PyPI v1.3.141] https://pypi.org/project/openrouter/1.3.141 - . + +## 2026-11-08 21:57:58 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.142] . +### Releases +- [PyPI v1.3.142] https://pypi.org/project/openrouter/1.3.142 - . \ No newline at end of file diff --git a/docs/components/deferredbm25search.mdx b/docs/components/deferredbm25search.mdx index 2ca788fa..7c232f74 100644 --- a/docs/components/deferredbm25search.mdx +++ b/docs/components/deferredbm25search.mdx @@ -7,10 +7,10 @@ Deterministic BM25 retrieval over supplied tool definitions. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `max_results` | *Optional[int]* | ➖ | N/A | -| `miss_sources` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only. | -| `siblings` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone. | -| `spread` | *Optional[bool]* | ➖ | Universal profile only, for keyword searches the router answers through the `tool_search` wrapper. When true, a result spreads across sources: of the 3 x limit best-scoring candidates, those scoring at least 60% of the best match take at most 2 slots per source (MCP server, namespace or shared `_` prefix; a tool with no source is never capped), and the remaining slots fill in score order, so a catalog with several systems for one job (web search, page extraction) shows one of each instead of the top system's siblings. Absent or false: results are the best matches in score order. | -| `type` | [components.DeferredBm25SearchType](../components/deferredbm25searchtype.mdx) | ✔️ | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `max_results` | *Optional[int]* | ➖ | N/A | +| `miss_sources` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only. | +| `siblings` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone. | +| `spread` | *Optional[bool]* | ➖ | Universal profile only, for keyword searches the router answers through the `tool_search` wrapper. When true, a result spreads across sources: of the 3 x limit best-scoring candidates, those scoring at least 60% of the best match take at most 2 slots per source (MCP server, namespace or shared `_` prefix; a tool with no source is never capped), and the remaining slots fill in score order, so a catalog with several systems for one job (web search, page extraction) shows one of each instead of the top system's siblings. Absent or false: results are the best matches in score order. | +| `type` | [components.DeferredBm25SearchType](../components/deferredbm25searchtype.mdx) | ✔️ | N/A | \ No newline at end of file diff --git a/docs/components/deferredregexsearch.mdx b/docs/components/deferredregexsearch.mdx index c1b67599..9186c94f 100644 --- a/docs/components/deferredregexsearch.mdx +++ b/docs/components/deferredregexsearch.mdx @@ -7,9 +7,9 @@ Versioned safe-regex retrieval over supplied tool definitions. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `max_results` | *Optional[int]* | ➖ | N/A | -| `miss_sources` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only. | -| `siblings` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone. | -| `type` | [components.DeferredRegexSearchType](../components/deferredregexsearchtype.mdx) | ✔️ | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `max_results` | *Optional[int]* | ➖ | N/A | +| `miss_sources` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only. | +| `siblings` | *Optional[bool]* | ➖ | Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone. | +| `type` | [components.DeferredRegexSearchType](../components/deferredregexsearchtype.mdx) | ✔️ | N/A | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3c2f2427..1a7f67c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.141" +version = "1.3.142" 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 2c06f86b..c40284be 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.141" +__version__: str = "1.3.142" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.141 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.142 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/deferredbm25search.py b/src/openrouter/components/deferredbm25search.py index fc8e02dd..2d6f448a 100644 --- a/src/openrouter/components/deferredbm25search.py +++ b/src/openrouter/components/deferredbm25search.py @@ -16,7 +16,7 @@ class DeferredBm25SearchTypedDict(TypedDict): type: DeferredBm25SearchType max_results: NotRequired[int] miss_sources: NotRequired[bool] - r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" + r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" siblings: NotRequired[bool] r"""Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.""" spread: NotRequired[bool] @@ -31,7 +31,7 @@ class DeferredBm25Search(BaseModel): max_results: Optional[int] = None miss_sources: Optional[bool] = None - r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" + r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" siblings: Optional[bool] = None r"""Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.""" diff --git a/src/openrouter/components/deferredregexsearch.py b/src/openrouter/components/deferredregexsearch.py index 3df7acb2..28a24b67 100644 --- a/src/openrouter/components/deferredregexsearch.py +++ b/src/openrouter/components/deferredregexsearch.py @@ -16,7 +16,7 @@ class DeferredRegexSearchTypedDict(TypedDict): type: DeferredRegexSearchType max_results: NotRequired[int] miss_sources: NotRequired[bool] - r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" + r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" siblings: NotRequired[bool] r"""Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.""" @@ -29,7 +29,7 @@ class DeferredRegexSearch(BaseModel): max_results: Optional[int] = None miss_sources: Optional[bool] = None - r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" + r"""Universal profile only, for searches the router answers through the `tool_search` wrapper. When true, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `_` prefixes; up to 40 names or 2,000 characters, with a count of any omitted) and tells the model that a source the search does not cover is unreachable through it in this request, so it can make a client tool call the task already needs (or a read-only one) and search again on a later turn instead of concluding the integration is missing. A hit gets the same guidance after its matches when, as a heuristic on the model's own words, the query's leading word has 3 to 64 characters, no query word names a searchable source, and no deferred tool's name or indexed description (its own and its namespace's) carries the leading word (`jira create issue` answered with another tracker's issue tools). Direct tools, including a client's built-in tools, are already in the tool list and are not named. Absent or false: a miss suggests other keywords and the closest names only.""" siblings: Optional[bool] = None r"""Universal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match came from, so a model that found one tool of an MCP server learns its neighbours without another search. Absent or false: results list the matched tools alone.""" diff --git a/uv.lock b/uv.lock index d3ce92f0..8c9d2b47 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.141" +version = "1.3.142" source = { editable = "." } dependencies = [ { name = "httpcore" },