diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 56ea3feb..f5eaf5e7 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: 4cecdf8377ee5221bad7f3dfb91e519e + docChecksum: 2d5bcd23718a2f336acb63e4dbd5a3f4 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.52 - configChecksum: e5d3dce79fcb6f1aed5d0eec382c7eef + releaseVersion: 1.1.53 + configChecksum: 046b9a1447a12fc06957e8165fb33a5a repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 49d4da65-daee-4c27-a619-226dde71b391 - pristine_commit_hash: 6d3a8ff7de2e8bc45cd35d511eed03dca36d1686 - pristine_tree_hash: c8d9ec3c0e50c912b19004832cd5c9ffffcfdea7 + generation_id: d0a8239a-44f6-4840-8b7d-577fd92030ac + pristine_commit_hash: c4f40d2d82ebd6183c92956112143a5420161520 + pristine_tree_hash: 31f8c130d0fa462508b614115d096e2724e40099 features: python: acceptHeaders: 3.0.0 @@ -1218,8 +1218,8 @@ trackedFiles: pristine_git_object: 11d6c22059efcf4e3b0d6b15b39a67678adc7a4b docs/components/chatwebsearchshorthand.mdx: id: 40f0c0a47ef4 - last_write_checksum: sha1:225d243249948ef85c7786e814a91e2aedf8faec - pristine_git_object: 3321c18ffc01588c393e1b3515d759ac17063894 + last_write_checksum: sha1:5b95f0e1a5bae43dee10b8357022286ec847c807 + pristine_git_object: 5833ac229f8f39e4e9d2f5f3d58e3fde74bdc1ac docs/components/chatwebsearchshorthandtype.mdx: id: ce16c0139963 last_write_checksum: sha1:1637ce5dac9fc9c87df3793d46a4eff33282e0a3 @@ -2730,8 +2730,8 @@ trackedFiles: pristine_git_object: 63991d9ba8aedd15e34bdc73c8f99fbdcda2d037 docs/components/legacywebsearchservertool.mdx: id: 0b47ff5dd0c4 - last_write_checksum: sha1:065f7b4b60819f8110fa09c3136c01cd57b2fe55 - pristine_git_object: 1db3c8572e32518588c5cc680e5732c8f6685624 + last_write_checksum: sha1:a0547b5ec5cb8d9bbe0d046c4f06279cf44ab7d2 + pristine_git_object: df8142b8197d1e0b112f4a0580f6bb3b1cdcb19c docs/components/legacywebsearchservertooltype.mdx: id: 192fa7358f3b last_write_checksum: sha1:c82facbab1f9b4f53e06a6e3986b886f2a9b9b00 @@ -4230,16 +4230,16 @@ trackedFiles: pristine_git_object: 56d189d99021af45f7fa6fb143af33d7d08cedcb docs/components/preview20250311websearchservertool.mdx: id: aeecb65a50e0 - last_write_checksum: sha1:5ec0b2800c361990733edd126d107480b3743516 - pristine_git_object: 9bf9466f07360cf2566c335df6c5a00ad58daed3 + last_write_checksum: sha1:217f26de38fcee5dff7383bcc951209f7953128e + pristine_git_object: 1bf764e9509ec226be514b35df3611b4ed77d8a0 docs/components/preview20250311websearchservertooltype.mdx: id: cedcfeda38d6 last_write_checksum: sha1:f7ac2913cc8c24d851c06d02c06742f9fe435084 pristine_git_object: 3669d05ce38327fa9b3d9a8c66c1de208a5f30e2 docs/components/previewwebsearchservertool.mdx: id: 2695e6e2fdfb - last_write_checksum: sha1:d6aad5ee1e14fcb680ee677385e350c51eb82cc7 - pristine_git_object: e7cc75dca6edc8c3507466b16c6deebd2ebb2b8f + last_write_checksum: sha1:05b9f2d0cd253d8b41efc9a5e0636d27b001fe17 + pristine_git_object: 019ecc2ee18b8514a8158df1994fd1d010f26e6c docs/components/previewwebsearchservertooltype.mdx: id: 4b6373295164 last_write_checksum: sha1:b28bae247d5a91d62f9be9877cd6f437628be49e @@ -5610,8 +5610,8 @@ trackedFiles: pristine_git_object: 6453f10f1843521ab57609e00cea4459984d565b docs/components/websearchconfig.mdx: id: 6d343d63543d - last_write_checksum: sha1:d2454c684c63ed8a6cf61ce56db01c75710cfa43 - pristine_git_object: 2b399b96a3e07bd1931beb1afd573c849258e781 + last_write_checksum: sha1:427af5f821a51df4a0a25afba483c53f50f82643 + pristine_git_object: eaef734fea7a2343f4f57fa6014fc88b5461a2fe docs/components/websearchdomainfilter.mdx: id: e6aef0d8853a last_write_checksum: sha1:3f5103c40e44f2a6d9d11052e6f5dc88284c4fca @@ -5626,12 +5626,12 @@ trackedFiles: pristine_git_object: d0c7f8329d3c98def79ee10dadd5c63b0cb6863e docs/components/websearchmode.mdx: id: da4dbe8706a0 - last_write_checksum: sha1:f9e1d69bc1cfdf2b94fcc7351451231d6deaa530 - pristine_git_object: 928a895090e79502e73ae4db46741e5554c2d751 + last_write_checksum: sha1:8e467bf671263fa2bb66ed39f6e2b104f6c685c3 + pristine_git_object: c674cdb6a897e6c96734175d20e3a68efd5f60b5 docs/components/websearchplugin.mdx: id: 5cb313bf543c - last_write_checksum: sha1:4c91a9b6554d8faea63ba7eb14507bebb72e8bf9 - pristine_git_object: 3b8919a50b2b5e6d9caa2ce1160507eade77bbb0 + last_write_checksum: sha1:de63c0f452dd8aeb7f461898b29a5d0db07661d0 + pristine_git_object: c9c9b637782a5380c7ec96519fe16363a8ce066b docs/components/websearchpluginid.mdx: id: d033d5ea2573 last_write_checksum: sha1:11622d868a103d09aa6a02ad5253f8fae2e90004 @@ -5642,12 +5642,12 @@ trackedFiles: pristine_git_object: 35edaa6c73e1f7c3731d7d5005897f72ca4ed496 docs/components/websearchservertool.mdx: id: cf9994f5aba9 - last_write_checksum: sha1:f8661fd47b6d65c059c663cf0641550bb64a3e05 - pristine_git_object: 9c256f6f3ded3f7bd9876670dd6c6f5ab86be1ba + last_write_checksum: sha1:30b6b3afbe1112343da4befa5cc94b56c97d334f + pristine_git_object: 86c6d642762f247b61755692bba9fd1e88cfb99f docs/components/websearchservertoolconfig.mdx: id: bb335e5d49e5 - last_write_checksum: sha1:45f3c04eb8f8d55c0fedc5ff61d2e02fa603e60e - pristine_git_object: 969b67e5012be92472c98779ff4674072547445a + last_write_checksum: sha1:292e26300cd55d0740170e5824ec37fdcde440f3 + pristine_git_object: a39dc8893a1e8bdca79c876b6d650e1a54ac7bda docs/components/websearchservertoolopenrouter.mdx: id: d1e3cf613d26 last_write_checksum: sha1:014a351e3ba7d11d72eeb622e088215abdf7d4eb @@ -7234,8 +7234,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:03398aba9b1908fec1d3681272d41752aceb15ec - pristine_git_object: 4ed2364928298757a211c6ea8bc63282cd6ee397 + last_write_checksum: sha1:53e50533f146f4ac766c94b5b7b32335523c0337 + pristine_git_object: 68ae14ebea3cc0946a60e58727930bd12accae3d scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7262,8 +7262,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:c624e0975aa5787a8fd6553cb764523dbfb6b446 - pristine_git_object: f3170bf2f8cfcbf5562941c9a3e5ebf7609546b5 + last_write_checksum: sha1:ab7cf50544b97675cf90ac09044a0866cf9d1910 + pristine_git_object: 81fa932cfb4133ccb4d7c1694a124ee5e3f0aafb src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a @@ -7850,8 +7850,8 @@ trackedFiles: pristine_git_object: d5ebd465c8d843f4bc1f0763d136d31960ab2efa src/openrouter/components/chatwebsearchshorthand.py: id: 13091b97a3f6 - last_write_checksum: sha1:11e1d4a2ec7a708ee1b3ed19f29f870a097350c3 - pristine_git_object: 64857b828ca341da26e6a67d7f802bfb07145d4a + last_write_checksum: sha1:9d13fe621764f1fb81617b0c6c323331c05991c3 + pristine_git_object: 5a4b645f94ad99647a7cf7b8ef1317def0baa61c src/openrouter/components/codeinterpretercallcodedeltaevent.py: id: 57cd88fa2bbd last_write_checksum: sha1:494b5f489144b2b2e30203bd4cdf43df102508f6 @@ -8494,8 +8494,8 @@ trackedFiles: pristine_git_object: 0fe43c16758210b0b304f3f31cc88ba2df5e46a0 src/openrouter/components/legacy_websearchservertool.py: id: 8b28b05b8756 - last_write_checksum: sha1:7c8c4369d99fc38660873ba78e680513ba109fa2 - pristine_git_object: 3097160a9727a45f088635d371b982db7bee1d44 + last_write_checksum: sha1:236eb9aa2e35646d64c0b6beb172dbf0a8cade6d + pristine_git_object: 25e499f0595dbe1eb9059600e7aee8216a100778 src/openrouter/components/listbyokkeysresponse.py: id: d5f63cba5dd9 last_write_checksum: sha1:97cd54e94ba4996ebb43252ac31aa70511e0328c @@ -9074,12 +9074,12 @@ trackedFiles: pristine_git_object: 6828e9dd037e51ac1409380429e4aa86f8446211 src/openrouter/components/preview_20250311_websearchservertool.py: id: ecfe1a37c34f - last_write_checksum: sha1:292ff1119d0e9564211d5084993cbf00c9c322f2 - pristine_git_object: 39530a45a6b6575fe69561dfe82cacb7fa63f76a + last_write_checksum: sha1:aff10889646ab6286f3a9e65686c61dc2ca52be7 + pristine_git_object: 3df7c01df5cac12b079105627fceb8722e7fac87 src/openrouter/components/preview_websearchservertool.py: id: 9c02777285ce - last_write_checksum: sha1:b3046f7829a4f30ac48ae7449982c3afae59d5d4 - pristine_git_object: c7edf6c6f6f922224cf3ae7098e12456ef696463 + last_write_checksum: sha1:44a3481201bca0948161bbb382d3170395ab9b0e + pristine_git_object: a6cf3bc0a8d6401f07ddc2e8880c150afed9f578 src/openrouter/components/preview_websearchuserlocation.py: id: 40414eada27a last_write_checksum: sha1:0e241830bf9014e8ea814465c573711d8a7caa2c @@ -9686,8 +9686,8 @@ trackedFiles: pristine_git_object: adceee794cf8135f5db3b2d741dc6e4de9c4e968 src/openrouter/components/websearchconfig.py: id: 3884d9509e8c - last_write_checksum: sha1:dd9eb9657775855efd71b8b9d141aea974656d03 - pristine_git_object: f8f885ea905d18b3ce5063a392744806e787acae + last_write_checksum: sha1:b13ad1f3b3b6d84cf315ed6c09720d5cebc0d604 + pristine_git_object: 3c4da59fc4d11f9f381aae7edddc1d1c46588dc3 src/openrouter/components/websearchdomainfilter.py: id: 4a7307ed2ba6 last_write_checksum: sha1:15246ac9135fd303e0522b8b570f27254b90495d @@ -9702,24 +9702,24 @@ trackedFiles: pristine_git_object: aba36c1943f9b8e57d5e6f95d8b707263d95f738 src/openrouter/components/websearchmode.py: id: 56a5dcb05613 - last_write_checksum: sha1:5fc2f8406ff78c88426a6b92e511a918951d00df - pristine_git_object: 12838605b22eaf6d116fc09e1a16db665352ca19 + last_write_checksum: sha1:8fd784393b475615076b851746cb45ac7ae0a452 + pristine_git_object: 61fb20e57526288d2b768165dff3524400b573ed src/openrouter/components/websearchplugin.py: id: 1d872d1792a7 - last_write_checksum: sha1:791a5d57f7390430264c04cc9a86726da9d4207c - pristine_git_object: a605a1b5a14d545be6551c42e8cd004d29773307 + last_write_checksum: sha1:2a196cb9883166d6a5317afc1503a249f9a0e479 + pristine_git_object: 338d13aa60d5325a3fa369282f9c0589be602620 src/openrouter/components/websearchservertool.py: id: 32c7333e3c21 - last_write_checksum: sha1:5eba5565a3b70c9ea0c7d156c6dad36dbf8f443a - pristine_git_object: ac7ee95a3576418d2419451ba305a94508bb6bc7 + last_write_checksum: sha1:20427239c9bfce56e5d3c0f5fa51f22d6cd07021 + pristine_git_object: 2c4460d1ccda88300babac0af631da8a0c1bf4cd src/openrouter/components/websearchservertool_openrouter.py: id: 3fcedc999f5b last_write_checksum: sha1:d5c34450670513a4fed73afc86670fc77f19a247 pristine_git_object: cac816de64f204cda6c706eee57f0d72b8b860eb src/openrouter/components/websearchservertoolconfig.py: id: ebdaa99d47da - last_write_checksum: sha1:0d8d501205687110480986dafc292ea947cdb8c9 - pristine_git_object: af44dc6bf8c3334c25e6453cb3741378b3893898 + last_write_checksum: sha1:59741826392b77c989b4c233f251d39615cb6804 + pristine_git_object: 8a7ecce351027a4b71fa3e4198c85932b38f09f0 src/openrouter/components/websearchsource.py: id: a1fe81b68a7b last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e344e07c..9e3edb6c 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.52 + version: 1.1.53 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 00773588..ced0fde4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -26003,7 +26003,7 @@ components: type: 'string' x-speakeasy-unknown-values: allow WebSearchMode: - description: 'Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.' + description: 'Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.' enum: - 'instant' - 'fast' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e054dbf1..09c45d8e 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:62c8d150a5709bef346fbd26459a107b1594eda0e28f9618e097a5629bc48e34 - sourceBlobDigest: sha256:54207711992241a24d86e50a7bf0642b69f2f79a7a257f97c6ae23959c224257 + sourceRevisionDigest: sha256:6c76bfeb6a982bcb53a0b5f815ccab5f21cef0ec3ce014453f5802412c481f8a + sourceBlobDigest: sha256:4c1aad2d75f9821f8ccdba6874352a0a47f9861c76dae22fcf4dc57a6dd1c9e0 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:62c8d150a5709bef346fbd26459a107b1594eda0e28f9618e097a5629bc48e34 - sourceBlobDigest: sha256:54207711992241a24d86e50a7bf0642b69f2f79a7a257f97c6ae23959c224257 + sourceRevisionDigest: sha256:6c76bfeb6a982bcb53a0b5f815ccab5f21cef0ec3ce014453f5802412c481f8a + sourceBlobDigest: sha256:4c1aad2d75f9821f8ccdba6874352a0a47f9861c76dae22fcf4dc57a6dd1c9e0 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:87944548e989b15861ef01f4ad683c4e9479cff0aca9416237c654c7c722cfa2 + codeSamplesRevisionDigest: sha256:1ec9d902e312299d629fe65c0a05a57c256db41c6a70ccecba7461a815fa8174 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index eba63c29..60b9b20f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1309,4 +1309,14 @@ Based on: ### Generated - [python v1.1.52] . ### Releases -- [PyPI v1.1.52] https://pypi.org/project/openrouter/1.1.52 - . \ No newline at end of file +- [PyPI v1.1.52] https://pypi.org/project/openrouter/1.1.52 - . + +## 2026-08-13 18:21:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.53] . +### Releases +- [PyPI v1.1.53] https://pypi.org/project/openrouter/1.1.53 - . \ No newline at end of file diff --git a/docs/components/chatwebsearchshorthand.mdx b/docs/components/chatwebsearchshorthand.mdx index 3321c18f..5833ac22 100644 --- a/docs/components/chatwebsearchshorthand.mdx +++ b/docs/components/chatwebsearchshorthand.mdx @@ -16,7 +16,7 @@ Web search tool using OpenAI Responses API syntax. Automatically converted to op | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_total_results` | *Optional[int]* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. | 50 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `parameters` | [Optional[components.WebSearchConfig]](../components/websearchconfig.mdx) | :heavy_minus_sign: | N/A | \{
"max_results": 5,
"search_context_size": "medium"
} | | `search_context_size` | [Optional[components.SearchQualityLevel]](../components/searchqualitylevel.mdx) | :heavy_minus_sign: | How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. | medium | | `type` | [components.ChatWebSearchShorthandType](../components/chatwebsearchshorthandtype.mdx) | :heavy_check_mark: | N/A | | diff --git a/docs/components/legacywebsearchservertool.mdx b/docs/components/legacywebsearchservertool.mdx index 1db3c857..df8142b8 100644 --- a/docs/components/legacywebsearchservertool.mdx +++ b/docs/components/legacywebsearchservertool.mdx @@ -13,7 +13,7 @@ Web search tool configuration | `filters` | [OptionalNullable[components.WebSearchDomainFilter]](../components/websearchdomainfilter.mdx) | :heavy_minus_sign: | N/A | \{
"allowed_domains": [
"example.com"
],
"blocked_domains": [
"spam.com"
],
"excluded_domains": [
"spam.com"
]
} | | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchContextSizeEnum]](../components/searchcontextsizeenum.mdx) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `type` | [components.LegacyWebSearchServerToolType](../components/legacywebsearchservertooltype.mdx) | :heavy_check_mark: | N/A | | | `user_location` | [OptionalNullable[components.WebSearchUserLocation]](../components/websearchuserlocation.mdx) | :heavy_minus_sign: | User location information for web search | \{
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/preview20250311websearchservertool.mdx b/docs/components/preview20250311websearchservertool.mdx index 9bf9466f..1bf764e9 100644 --- a/docs/components/preview20250311websearchservertool.mdx +++ b/docs/components/preview20250311websearchservertool.mdx @@ -13,7 +13,7 @@ Web search preview tool configuration (2025-03-11 version) | `filters` | [OptionalNullable[components.WebSearchDomainFilter]](../components/websearchdomainfilter.mdx) | :heavy_minus_sign: | N/A | \{
"allowed_domains": [
"example.com"
],
"blocked_domains": [
"spam.com"
],
"excluded_domains": [
"spam.com"
]
} | | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchContextSizeEnum]](../components/searchcontextsizeenum.mdx) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `type` | [components.Preview20250311WebSearchServerToolType](../components/preview20250311websearchservertooltype.mdx) | :heavy_check_mark: | N/A | | | `user_location` | [OptionalNullable[components.PreviewWebSearchUserLocation]](../components/previewwebsearchuserlocation.mdx) | :heavy_minus_sign: | N/A | \{
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/previewwebsearchservertool.mdx b/docs/components/previewwebsearchservertool.mdx index e7cc75dc..019ecc2e 100644 --- a/docs/components/previewwebsearchservertool.mdx +++ b/docs/components/previewwebsearchservertool.mdx @@ -13,7 +13,7 @@ Web search preview tool configuration | `filters` | [OptionalNullable[components.WebSearchDomainFilter]](../components/websearchdomainfilter.mdx) | :heavy_minus_sign: | N/A | \{
"allowed_domains": [
"example.com"
],
"blocked_domains": [
"spam.com"
],
"excluded_domains": [
"spam.com"
]
} | | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchContextSizeEnum]](../components/searchcontextsizeenum.mdx) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `type` | [components.PreviewWebSearchServerToolType](../components/previewwebsearchservertooltype.mdx) | :heavy_check_mark: | N/A | | | `user_location` | [OptionalNullable[components.PreviewWebSearchUserLocation]](../components/previewwebsearchuserlocation.mdx) | :heavy_minus_sign: | N/A | \{
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/websearchconfig.mdx b/docs/components/websearchconfig.mdx index 2b399b96..eaef734f 100644 --- a/docs/components/websearchconfig.mdx +++ b/docs/components/websearchconfig.mdx @@ -13,6 +13,6 @@ title: "WebSearchConfig" | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_total_results` | *Optional[int]* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. | 50 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchQualityLevel]](../components/searchqualitylevel.mdx) | :heavy_minus_sign: | How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. | medium | | `user_location` | [Optional[components.WebSearchUserLocationServerTool]](../components/websearchuserlocationservertool.mdx) | :heavy_minus_sign: | Approximate user location for location-biased results. | \{
"city": "San Francisco",
"country": "US",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/websearchmode.mdx b/docs/components/websearchmode.mdx index 928a8950..c674cdb6 100644 --- a/docs/components/websearchmode.mdx +++ b/docs/components/websearchmode.mdx @@ -2,7 +2,7 @@ title: "WebSearchMode" --- -Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. +Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. ## Example Usage diff --git a/docs/components/websearchplugin.mdx b/docs/components/websearchplugin.mdx index 3b8919a5..c9c9b637 100644 --- a/docs/components/websearchplugin.mdx +++ b/docs/components/websearchplugin.mdx @@ -4,15 +4,15 @@ title: "WebSearchPlugin" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | | -| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.mdx) | :heavy_minus_sign: | The search engine to use for web search. | exa | -| `exclude_domains` | List[*str*] | :heavy_minus_sign: | A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | -| `id` | [components.WebSearchPluginID](../components/websearchpluginid.mdx) | :heavy_check_mark: | N/A | | -| `include_domains` | List[*str*] | :heavy_minus_sign: | A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | -| `max_results` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic). | | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | -| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `user_location` | [OptionalNullable[components.UserLocation]](../components/userlocation.mdx) | :heavy_minus_sign: | N/A | \{
"city": "San Francisco",
"country": "US",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | | +| `engine` | [Optional[components.WebSearchEngine]](../components/websearchengine.mdx) | :heavy_minus_sign: | The search engine to use for web search. | exa | +| `exclude_domains` | List[*str*] | :heavy_minus_sign: | A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | +| `id` | [components.WebSearchPluginID](../components/websearchpluginid.mdx) | :heavy_check_mark: | N/A | | +| `include_domains` | List[*str*] | :heavy_minus_sign: | A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | +| `max_results` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic). | | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `user_location` | [OptionalNullable[components.UserLocation]](../components/userlocation.mdx) | :heavy_minus_sign: | N/A | \{
"city": "San Francisco",
"country": "US",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/websearchservertool.mdx b/docs/components/websearchservertool.mdx index 9c256f6f..86c6d642 100644 --- a/docs/components/websearchservertool.mdx +++ b/docs/components/websearchservertool.mdx @@ -13,7 +13,7 @@ Web search tool configuration (2025-08-26 version) | `filters` | [OptionalNullable[components.WebSearchDomainFilter]](../components/websearchdomainfilter.mdx) | :heavy_minus_sign: | N/A | \{
"allowed_domains": [
"example.com"
],
"blocked_domains": [
"spam.com"
],
"excluded_domains": [
"spam.com"
]
} | | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchContextSizeEnum]](../components/searchcontextsizeenum.mdx) | :heavy_minus_sign: | Size of the search context for web search tools | medium | | `type` | [components.WebSearchServerToolType](../components/websearchservertooltype.mdx) | :heavy_check_mark: | N/A | | | `user_location` | [OptionalNullable[components.WebSearchUserLocation]](../components/websearchuserlocation.mdx) | :heavy_minus_sign: | User location information for web search | \{
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/docs/components/websearchservertoolconfig.mdx b/docs/components/websearchservertoolconfig.mdx index 969b67e5..a39dc889 100644 --- a/docs/components/websearchservertoolconfig.mdx +++ b/docs/components/websearchservertoolconfig.mdx @@ -16,6 +16,6 @@ Configuration for the openrouter:web_search server tool | `max_results` | *Optional[int]* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. | 5 | | `max_total_results` | *Optional[int]* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. | 50 | | `max_uses` | *Optional[int]* | :heavy_minus_sign: | Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. | 3 | -| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | +| `mode` | [Optional[components.WebSearchMode]](../components/websearchmode.mdx) | :heavy_minus_sign: | Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. | auto | | `search_context_size` | [Optional[components.SearchQualityLevel]](../components/searchqualitylevel.mdx) | :heavy_minus_sign: | How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. | medium | | `user_location` | [Optional[components.WebSearchUserLocationServerTool]](../components/websearchuserlocationservertool.mdx) | :heavy_minus_sign: | Approximate user location for location-biased results. | \{
"city": "San Francisco",
"country": "US",
"region": "California",
"timezone": "America/Los_Angeles",
"type": "approximate"
} | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4ed23649..68ae14eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.52" +version = "1.1.53" 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 f3170bf2..81fa932c 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.52" +__version__: str = "1.1.53" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.52 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.53 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py index 64857b82..5a4b645f 100644 --- a/src/openrouter/components/chatwebsearchshorthand.py +++ b/src/openrouter/components/chatwebsearchshorthand.py @@ -45,7 +45,7 @@ class ChatWebSearchShorthandTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" parameters: NotRequired[WebSearchConfigTypedDict] search_context_size: NotRequired[SearchQualityLevel] r"""How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.""" @@ -80,7 +80,7 @@ class ChatWebSearchShorthand(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" parameters: Optional[WebSearchConfig] = None diff --git a/src/openrouter/components/legacy_websearchservertool.py b/src/openrouter/components/legacy_websearchservertool.py index 3097160a..25e499f0 100644 --- a/src/openrouter/components/legacy_websearchservertool.py +++ b/src/openrouter/components/legacy_websearchservertool.py @@ -33,7 +33,7 @@ class LegacyWebSearchServerToolTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchContextSizeEnum] r"""Size of the search context for web search tools""" user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]] @@ -57,7 +57,7 @@ class LegacyWebSearchServerTool(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchContextSizeEnum] = None r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/preview_20250311_websearchservertool.py b/src/openrouter/components/preview_20250311_websearchservertool.py index 39530a45..3df7c01d 100644 --- a/src/openrouter/components/preview_20250311_websearchservertool.py +++ b/src/openrouter/components/preview_20250311_websearchservertool.py @@ -36,7 +36,7 @@ class Preview20250311WebSearchServerToolTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchContextSizeEnum] r"""Size of the search context for web search tools""" user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]] @@ -59,7 +59,7 @@ class Preview20250311WebSearchServerTool(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchContextSizeEnum] = None r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/preview_websearchservertool.py b/src/openrouter/components/preview_websearchservertool.py index c7edf6c6..a6cf3bc0 100644 --- a/src/openrouter/components/preview_websearchservertool.py +++ b/src/openrouter/components/preview_websearchservertool.py @@ -36,7 +36,7 @@ class PreviewWebSearchServerToolTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchContextSizeEnum] r"""Size of the search context for web search tools""" user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]] @@ -59,7 +59,7 @@ class PreviewWebSearchServerTool(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchContextSizeEnum] = None r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/websearchconfig.py b/src/openrouter/components/websearchconfig.py index f8f885ea..3c4da59f 100644 --- a/src/openrouter/components/websearchconfig.py +++ b/src/openrouter/components/websearchconfig.py @@ -30,7 +30,7 @@ class WebSearchConfigTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchQualityLevel] r"""How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.""" user_location: NotRequired[WebSearchUserLocationServerToolTypedDict] @@ -60,7 +60,7 @@ class WebSearchConfig(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchQualityLevel] = None r"""How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.""" diff --git a/src/openrouter/components/websearchmode.py b/src/openrouter/components/websearchmode.py index 12838605..61fb20e5 100644 --- a/src/openrouter/components/websearchmode.py +++ b/src/openrouter/components/websearchmode.py @@ -19,4 +19,4 @@ ], UnrecognizedStr, ] -r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" +r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" diff --git a/src/openrouter/components/websearchplugin.py b/src/openrouter/components/websearchplugin.py index a605a1b5..338d13aa 100644 --- a/src/openrouter/components/websearchplugin.py +++ b/src/openrouter/components/websearchplugin.py @@ -84,7 +84,7 @@ class WebSearchPluginTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_prompt: NotRequired[str] user_location: NotRequired[Nullable[UserLocationTypedDict]] @@ -110,7 +110,7 @@ class WebSearchPlugin(BaseModel): r"""Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_prompt: Optional[str] = None diff --git a/src/openrouter/components/websearchservertool.py b/src/openrouter/components/websearchservertool.py index ac7ee95a..2c4460d1 100644 --- a/src/openrouter/components/websearchservertool.py +++ b/src/openrouter/components/websearchservertool.py @@ -33,7 +33,7 @@ class WebSearchServerToolTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchContextSizeEnum] r"""Size of the search context for web search tools""" user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]] @@ -57,7 +57,7 @@ class WebSearchServerTool(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchContextSizeEnum] = None r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/websearchservertoolconfig.py b/src/openrouter/components/websearchservertoolconfig.py index af44dc6b..8a7ecce3 100644 --- a/src/openrouter/components/websearchservertoolconfig.py +++ b/src/openrouter/components/websearchservertoolconfig.py @@ -32,7 +32,7 @@ class WebSearchServerToolConfigTypedDict(TypedDict): max_uses: NotRequired[int] r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: NotRequired[WebSearchMode] - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: NotRequired[SearchQualityLevel] r"""How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.""" user_location: NotRequired[WebSearchUserLocationServerToolTypedDict] @@ -64,7 +64,7 @@ class WebSearchServerToolConfig(BaseModel): r"""Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.""" mode: Optional[WebSearchMode] = None - r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" + r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.""" search_context_size: Optional[SearchQualityLevel] = None r"""How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.""" diff --git a/uv.lock b/uv.lock index f441e9a3..c3f2e9f6 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.52" +version = "1.1.53" source = { editable = "." } dependencies = [ { name = "httpcore" },