diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 66c64315..2d4f34e1 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: 01fc86077124f57b35827aad2e4f8755
+ docChecksum: 17cbed3ecce7703bd8245551c60c3007
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.33
- configChecksum: 65453bab23b113af1a31879f7fc03dc4
+ releaseVersion: 1.1.34
+ configChecksum: 93ec1c0e0c04a5411813aaa2a5a81dde
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 20ad2ca1-60f6-48a0-95d6-167fd27a897e
- pristine_commit_hash: 1f0772b40020e57dc94553158c5e20e89d919726
- pristine_tree_hash: 5d1172658a619a126815e21cfbe55b6058fecc48
+ generation_id: 61a9af6e-a797-40be-b45d-d2b16f962554
+ pristine_commit_hash: a493c7bd9f40e0a5b5ffbacd33c2c9e5ffad10d3
+ pristine_tree_hash: 7dc0ce4fbbbc6e9ae839185c10e9a670c0b2efa8
features:
python:
acceptHeaders: 3.0.0
@@ -1222,8 +1222,8 @@ trackedFiles:
pristine_git_object: 11d6c22059efcf4e3b0d6b15b39a67678adc7a4b
docs/components/chatwebsearchshorthand.mdx:
id: 40f0c0a47ef4
- last_write_checksum: sha1:ad81bf3478b4f9f7a2c261258e361f73ce621fa4
- pristine_git_object: 3bd2348d4bda43b0d1157b6f5523666754aa1fb5
+ last_write_checksum: sha1:0bd92fae69f31834bb69788c63522f1684854d75
+ pristine_git_object: 22b6dbe0b38b17f832e9d5eda222f83f768409c9
docs/components/chatwebsearchshorthandtype.mdx:
id: ce16c0139963
last_write_checksum: sha1:1637ce5dac9fc9c87df3793d46a4eff33282e0a3
@@ -2662,8 +2662,8 @@ trackedFiles:
pristine_git_object: 63991d9ba8aedd15e34bdc73c8f99fbdcda2d037
docs/components/legacywebsearchservertool.mdx:
id: 0b47ff5dd0c4
- last_write_checksum: sha1:052167b691dabe51ac07c9a7c5377005e01f59a2
- pristine_git_object: b7073786f83c5e1e66342aff13924837658df723
+ last_write_checksum: sha1:e867239b76a44e6407489dfd29e5f763466d5eab
+ pristine_git_object: e73a1ade5ca3dec621e108e61351c2bbde325937
docs/components/legacywebsearchservertooltype.mdx:
id: 192fa7358f3b
last_write_checksum: sha1:c82facbab1f9b4f53e06a6e3986b886f2a9b9b00
@@ -4166,16 +4166,16 @@ trackedFiles:
pristine_git_object: 56d189d99021af45f7fa6fb143af33d7d08cedcb
docs/components/preview20250311websearchservertool.mdx:
id: aeecb65a50e0
- last_write_checksum: sha1:f778c999aee30436fe19d5718949df949b812dbf
- pristine_git_object: ef9b4c5ad08274dfbddc534c4511074c1f84cf7d
+ last_write_checksum: sha1:a982f9d1b6ae3f91636a5a8e5a63cbb89f14cff7
+ pristine_git_object: f7104c881cf8d9a6d1308497c2057f8f132f198f
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:e58226ef3bf42fbecdbbaed6577b5eb3b0661952
- pristine_git_object: adbba6fbe7961a8213451bdd9780fdc6e1445fe3
+ last_write_checksum: sha1:b7ad4bc6edeaa07199e47e84e1994172b7958155
+ pristine_git_object: 1fa43dd16ff0300773ecf771d92604e455e33269
docs/components/previewwebsearchservertooltype.mdx:
id: 4b6373295164
last_write_checksum: sha1:b28bae247d5a91d62f9be9877cd6f437628be49e
@@ -5506,8 +5506,8 @@ trackedFiles:
pristine_git_object: 6453f10f1843521ab57609e00cea4459984d565b
docs/components/websearchconfig.mdx:
id: 6d343d63543d
- last_write_checksum: sha1:1b57dd852a7dd0321b82fe08dd965ade7501eb49
- pristine_git_object: d7fecd7b2b02da6a0373ea88c089c5047f7b651d
+ last_write_checksum: sha1:ef2c7b2f668f5086101d28c126cb2938a800c389
+ pristine_git_object: b15fce664f27e78a6c42085185db0296591ace97
docs/components/websearchdomainfilter.mdx:
id: e6aef0d8853a
last_write_checksum: sha1:3f5103c40e44f2a6d9d11052e6f5dc88284c4fca
@@ -5520,10 +5520,14 @@ trackedFiles:
id: de0188abe418
last_write_checksum: sha1:7931b92ee21a06057d273be6f52e15ec649ab20e
pristine_git_object: d0c7f8329d3c98def79ee10dadd5c63b0cb6863e
+ docs/components/websearchmode.mdx:
+ id: da4dbe8706a0
+ last_write_checksum: sha1:8ec757de8b4fcefdad348f661f0326a06c3c1088
+ pristine_git_object: b37c721f52063fea006ae27617f1d4f1e6313ac4
docs/components/websearchplugin.mdx:
id: 5cb313bf543c
- last_write_checksum: sha1:90537e686b540148dc8fae0847e79552b3e72b9c
- pristine_git_object: c4cbc7b9551c40b5845c91b20ec4dede18149143
+ last_write_checksum: sha1:6ff77d70cd6e3e13b2ad140a56d95db91a641cf6
+ pristine_git_object: 27273fc5d39be99a4266ab49bbe3fb744cc6c178
docs/components/websearchpluginid.mdx:
id: d033d5ea2573
last_write_checksum: sha1:11622d868a103d09aa6a02ad5253f8fae2e90004
@@ -5534,12 +5538,12 @@ trackedFiles:
pristine_git_object: 35edaa6c73e1f7c3731d7d5005897f72ca4ed496
docs/components/websearchservertool.mdx:
id: cf9994f5aba9
- last_write_checksum: sha1:8c213f86650026608aeeb96d587ae0c67277149d
- pristine_git_object: 30f7dd631fadeed7e891f9743f642cc7b5711676
+ last_write_checksum: sha1:efc7da27182f48e02507d6009e35ea7ac20ccfff
+ pristine_git_object: a7c716788f3b076ded969dcfcfc5b80f67654550
docs/components/websearchservertoolconfig.mdx:
id: bb335e5d49e5
- last_write_checksum: sha1:665afb30cb0c42ed3fd5498afadb416390ecf51a
- pristine_git_object: 373a48eeae93dc54bf79fabca0c5e9cfe3307507
+ last_write_checksum: sha1:1fe0cd616bf9cc99d33d066db3a2e3842ca913d9
+ pristine_git_object: 1b148667733907f4de98c7235213330166058a92
docs/components/websearchservertoolopenrouter.mdx:
id: d1e3cf613d26
last_write_checksum: sha1:014a351e3ba7d11d72eeb622e088215abdf7d4eb
@@ -7102,8 +7106,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:d94daad013b97144210fa250e9e3932cc1baf4e8
- pristine_git_object: b2c3f31ea4987ae8992b8774f28c002b16b9448c
+ last_write_checksum: sha1:3361a4c4c8e0110226f0c9054e8dad11bd85b867
+ pristine_git_object: 81fcba003c5e1e15f321ea19b914207d58c0fbd1
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7130,8 +7134,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:606df2cc0a90a8a44622c53b0dfb293334fb8668
- pristine_git_object: 62dec07925df42249632f250769525a6e64f0fbe
+ last_write_checksum: sha1:8857e54b8cbb1e6ddf90d5e4c30cd6dcc068329f
+ pristine_git_object: 1dc0acdc54b27867d9343e49d8d4ed9cfc630bcd
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a
@@ -7174,8 +7178,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:59723836087352ed0b816cdda561039510aec153
- pristine_git_object: afac4dacd65518f5dd79db7f3181888246a451b1
+ last_write_checksum: sha1:464c7d54ea7f9bcec393d05f1d433ed5ebe24ac0
+ pristine_git_object: 2d6b0ae3aa92f73697966b8e0d25df317d888310
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -7718,8 +7722,8 @@ trackedFiles:
pristine_git_object: d5ebd465c8d843f4bc1f0763d136d31960ab2efa
src/openrouter/components/chatwebsearchshorthand.py:
id: 13091b97a3f6
- last_write_checksum: sha1:802cd0682a84f95a08a695a5f4d6769280b52c6b
- pristine_git_object: 9f6dcda909dcaec4511ecd0cc1e51b36e086c7c6
+ last_write_checksum: sha1:175467dd12af52db74931fff622ec8862298e47b
+ pristine_git_object: 48a494268294c8640d05d6397f1ae6ba9b49bf67
src/openrouter/components/codeinterpreterservertool.py:
id: a72c520afbf9
last_write_checksum: sha1:89e529b98c4b42a9d573f9234ee44f702e8bfcb7
@@ -8322,8 +8326,8 @@ trackedFiles:
pristine_git_object: 0fe43c16758210b0b304f3f31cc88ba2df5e46a0
src/openrouter/components/legacy_websearchservertool.py:
id: 8b28b05b8756
- last_write_checksum: sha1:35911582d15ad277e42d99e7ec51fd3b02f0e9f8
- pristine_git_object: f293a934b9940801b091d7c67a531b06991229fa
+ last_write_checksum: sha1:753c03a9469c7c7d4e6f39db5ed6c7210931a2db
+ pristine_git_object: f0fae341837a390484f2c50b62f2158fde13e3ec
src/openrouter/components/listbyokkeysresponse.py:
id: d5f63cba5dd9
last_write_checksum: sha1:97cd54e94ba4996ebb43252ac31aa70511e0328c
@@ -8902,12 +8906,12 @@ trackedFiles:
pristine_git_object: 6828e9dd037e51ac1409380429e4aa86f8446211
src/openrouter/components/preview_20250311_websearchservertool.py:
id: ecfe1a37c34f
- last_write_checksum: sha1:6ba52dd1187f6b0763317143c6e2a561007abe4c
- pristine_git_object: d2b460468999a65bfb0a874d227bffa19bbc47b4
+ last_write_checksum: sha1:e2bffc41b1eb44bde5fa8ac9bccb9e7692744a69
+ pristine_git_object: 77eb038d3211f7f624d9fe5c7e7f1f00c5cd8cbc
src/openrouter/components/preview_websearchservertool.py:
id: 9c02777285ce
- last_write_checksum: sha1:7402fbafe151df158e1252f39e2763d35169d578
- pristine_git_object: f94bdab26839bd04307ba239f98dcb6eca28ddea
+ last_write_checksum: sha1:0213d875b418d16281fb035d0d6f93f3b503d4fd
+ pristine_git_object: 0e4fd5ef86610bd6ac5fdd8d2d17c52690f90b90
src/openrouter/components/preview_websearchuserlocation.py:
id: 40414eada27a
last_write_checksum: sha1:0e241830bf9014e8ea814465c573711d8a7caa2c
@@ -9494,8 +9498,8 @@ trackedFiles:
pristine_git_object: adceee794cf8135f5db3b2d741dc6e4de9c4e968
src/openrouter/components/websearchconfig.py:
id: 3884d9509e8c
- last_write_checksum: sha1:3c77abecb2202a8b47fffb10a4c806353123f1f9
- pristine_git_object: 9ed297456c30c9f033c000480e71608e1b45452b
+ last_write_checksum: sha1:6a4c4bd33203949606f6dd33fc904a8206fe64b5
+ pristine_git_object: d13a69978e05b2c75d55cd9e5273dbcdf0045389
src/openrouter/components/websearchdomainfilter.py:
id: 4a7307ed2ba6
last_write_checksum: sha1:15246ac9135fd303e0522b8b570f27254b90495d
@@ -9508,22 +9512,26 @@ trackedFiles:
id: 97803317b825
last_write_checksum: sha1:f3c03768c47a20eece5f58e1043a8dafb13a4c59
pristine_git_object: aba36c1943f9b8e57d5e6f95d8b707263d95f738
+ src/openrouter/components/websearchmode.py:
+ id: 56a5dcb05613
+ last_write_checksum: sha1:25d005027c965ba8e50a6d511b37099120515844
+ pristine_git_object: cf825deec0bfb177c9c527952ebccf55dcf28b88
src/openrouter/components/websearchplugin.py:
id: 1d872d1792a7
- last_write_checksum: sha1:47e4951d6c60dc26e595ffd3e4eb032c5d3f3cf2
- pristine_git_object: 324037856d9c5a39675e4a2237eba61ac471dcee
+ last_write_checksum: sha1:fc6d13857c16641f501b5e7903f0582fd0b86448
+ pristine_git_object: 2121245ff9395d96d4dc924349a0686af7829c88
src/openrouter/components/websearchservertool.py:
id: 32c7333e3c21
- last_write_checksum: sha1:2d8241a33b09154843403aa7fc92cfd272a9e078
- pristine_git_object: cb00458d1e50cdc2b57206059a82b12264257b28
+ last_write_checksum: sha1:9d15566c339f53ae944d767de00dbb6529744626
+ pristine_git_object: 45c228b92f72ee1f0f6d286173c5081a6cbe2341
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:fd899b9014ee44193c66ce5e019db53136023f6b
- pristine_git_object: a22eb95a6c73c2b67920109122d703b2c537bee3
+ last_write_checksum: sha1:24fb841925a6bf4dd0238bff1260a8f40e7ea8da
+ pristine_git_object: 4c131b5e04e62582b9b032229b3ff2d453d645e3
src/openrouter/components/websearchsource.py:
id: a1fe81b68a7b
last_write_checksum: sha1:fa30e5813682231d742fb6861f0fe92f655c8e81
@@ -11931,3 +11939,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
+releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request` **Changed**\n * `response` **Changed**\n* `open_router.chat.send()`: `request` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: `request` **Changed**\n* `open_router.presets.create_presets_messages()`: `request` **Changed**\n* `open_router.presets.create_presets_responses()`: `request` **Changed**\n* `open_router.responses.send()`: \n * `request` **Changed**\n * `response` **Changed**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index e650b231..48fb0459 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.33
+ version: 1.1.34
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index 9b972f05..e497f366 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -6191,6 +6191,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
parameters:
$ref: '#/components/schemas/WebSearchConfig'
search_context_size:
@@ -11456,6 +11458,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchContextSizeEnum'
type:
@@ -19842,6 +19846,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchContextSizeEnum'
type:
@@ -19870,6 +19876,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchContextSizeEnum'
type:
@@ -25338,6 +25346,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchQualityLevel'
user_location:
@@ -25396,6 +25406,21 @@ components:
example: 'auto'
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 (default), basic, and advanced. Modes unsupported by the selected engine are ignored.'
+ enum:
+ - 'instant'
+ - 'fast'
+ - 'auto'
+ - 'deep-lite'
+ - 'deep'
+ - 'deep-reasoning'
+ - 'turbo'
+ - 'basic'
+ - 'advanced'
+ example: 'auto'
+ type: 'string'
+ x-speakeasy-unknown-values: allow
WebSearchPlugin:
example:
enabled: true
@@ -25434,6 +25459,8 @@ components:
max_uses:
description: '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).'
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_prompt:
type: 'string'
user_location:
@@ -25472,6 +25499,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchContextSizeEnum'
type:
@@ -25533,6 +25562,8 @@ components:
description: '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.'
example: 3
type: 'integer'
+ mode:
+ $ref: '#/components/schemas/WebSearchMode'
search_context_size:
$ref: '#/components/schemas/SearchQualityLevel'
user_location:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index e6128f53..5cea8988 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:41bbc8797c78ca32b2c7be99a7be2cfb78d74e0f58d06206209e5f46f63a434b
- sourceBlobDigest: sha256:204f1956ee37dd60f3320e61dbb25d4a00b7bdd4c53706328c3bed22880fd277
+ sourceRevisionDigest: sha256:82b286e54f6162e2701ebe5f054a1bd3a714fec8ce4215f9eda98ebc1eb55049
+ sourceBlobDigest: sha256:01f655f454e0e2c68495ccb6a2bd1ed2d7a30fab16c04e151c1112cf53cedf7c
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:41bbc8797c78ca32b2c7be99a7be2cfb78d74e0f58d06206209e5f46f63a434b
- sourceBlobDigest: sha256:204f1956ee37dd60f3320e61dbb25d4a00b7bdd4c53706328c3bed22880fd277
+ sourceRevisionDigest: sha256:82b286e54f6162e2701ebe5f054a1bd3a714fec8ce4215f9eda98ebc1eb55049
+ sourceBlobDigest: sha256:01f655f454e0e2c68495ccb6a2bd1ed2d7a30fab16c04e151c1112cf53cedf7c
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:2cbe4d5db22ca813dfb6cf94706c58913be98dc031c6357658ffb4fb0bc05fab
+ codeSamplesRevisionDigest: sha256:66ea6e96d967e7ef40d12140548ede734473f0eb49413d6d63e766cd95da71a8
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 489ce1f7..9330796f 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1119,4 +1119,14 @@ Based on:
### Generated
- [python v1.1.33] .
### Releases
-- [PyPI v1.1.33] https://pypi.org/project/openrouter/1.1.33 - .
\ No newline at end of file
+- [PyPI v1.1.33] https://pypi.org/project/openrouter/1.1.33 - .
+
+## 2026-08-07 21:21:32
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.34] .
+### Releases
+- [PyPI v1.1.34] https://pypi.org/project/openrouter/1.1.34 - .
\ No newline at end of file
diff --git a/docs/components/chatwebsearchshorthand.mdx b/docs/components/chatwebsearchshorthand.mdx
index 3bd2348d..22b6dbe0 100644
--- a/docs/components/chatwebsearchshorthand.mdx
+++ b/docs/components/chatwebsearchshorthand.mdx
@@ -16,6 +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 (default), basic, 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 b7073786..e73a1ade 100644
--- a/docs/components/legacywebsearchservertool.mdx
+++ b/docs/components/legacywebsearchservertool.mdx
@@ -13,6 +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 (default), basic, 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 ef9b4c5a..f7104c88 100644
--- a/docs/components/preview20250311websearchservertool.mdx
+++ b/docs/components/preview20250311websearchservertool.mdx
@@ -13,6 +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 (default), basic, 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 adbba6fb..1fa43dd1 100644
--- a/docs/components/previewwebsearchservertool.mdx
+++ b/docs/components/previewwebsearchservertool.mdx
@@ -13,6 +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 (default), basic, 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 d7fecd7b..b15fce66 100644
--- a/docs/components/websearchconfig.mdx
+++ b/docs/components/websearchconfig.mdx
@@ -13,5 +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 (default), basic, 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
new file mode 100644
index 00000000..b37c721f
--- /dev/null
+++ b/docs/components/websearchmode.mdx
@@ -0,0 +1,29 @@
+---
+title: "WebSearchMode"
+---
+
+Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo (default), basic, and advanced. Modes unsupported by the selected engine are ignored.
+
+## Example Usage
+
+```python
+from openrouter.components import WebSearchMode
+
+# Open enum: unrecognized values are captured as UnrecognizedStr
+value: WebSearchMode = "instant"
+```
+
+
+## Values
+
+This is an open enum. Unrecognized values will not fail type checks.
+
+- `"instant"`
+- `"fast"`
+- `"auto"`
+- `"deep-lite"`
+- `"deep"`
+- `"deep-reasoning"`
+- `"turbo"`
+- `"basic"`
+- `"advanced"`
diff --git a/docs/components/websearchplugin.mdx b/docs/components/websearchplugin.mdx
index c4cbc7b9..27273fc5 100644
--- a/docs/components/websearchplugin.mdx
+++ b/docs/components/websearchplugin.mdx
@@ -4,14 +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). | |
-| `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 (default), basic, 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 30f7dd63..a7c71678 100644
--- a/docs/components/websearchservertool.mdx
+++ b/docs/components/websearchservertool.mdx
@@ -13,6 +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 (default), basic, 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 373a48ee..1b148667 100644
--- a/docs/components/websearchservertoolconfig.mdx
+++ b/docs/components/websearchservertoolconfig.mdx
@@ -16,5 +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 (default), basic, 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 b2c3f31e..81fcba00 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.33"
+version = "1.1.34"
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 62dec079..1dc0acdc 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.33"
+__version__: str = "1.1.34"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.33 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.34 2.914.0 1.0.0 openrouter"
try:
if __package__ is not None:
diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py
index afac4dac..2d6b0ae3 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -2989,6 +2989,7 @@
)
from .websearchengine import WebSearchEngine
from .websearchengineenum import WebSearchEngineEnum
+ from .websearchmode import WebSearchMode
from .websearchplugin import (
UserLocation,
UserLocationTypedDict,
@@ -5226,6 +5227,7 @@
"WebSearchDomainFilterTypedDict",
"WebSearchEngine",
"WebSearchEngineEnum",
+ "WebSearchMode",
"WebSearchPlugin",
"WebSearchPluginID",
"WebSearchPluginType",
@@ -7441,6 +7443,7 @@
"WebSearchDomainFilterTypedDict": ".websearchdomainfilter",
"WebSearchEngine": ".websearchengine",
"WebSearchEngineEnum": ".websearchengineenum",
+ "WebSearchMode": ".websearchmode",
"UserLocation": ".websearchplugin",
"UserLocationTypedDict": ".websearchplugin",
"WebSearchPlugin": ".websearchplugin",
diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py
index 9f6dcda9..48a49426 100644
--- a/src/openrouter/components/chatwebsearchshorthand.py
+++ b/src/openrouter/components/chatwebsearchshorthand.py
@@ -4,6 +4,7 @@
from .searchqualitylevel import SearchQualityLevel
from .websearchconfig import WebSearchConfig, WebSearchConfigTypedDict
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from .websearchuserlocationservertool import (
WebSearchUserLocationServerTool,
WebSearchUserLocationServerToolTypedDict,
@@ -43,6 +44,8 @@ class ChatWebSearchShorthandTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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."""
@@ -76,6 +79,9 @@ class ChatWebSearchShorthand(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, and advanced. Modes unsupported by the selected engine are ignored."""
+
parameters: Optional[WebSearchConfig] = None
search_context_size: Optional[SearchQualityLevel] = None
@@ -95,6 +101,7 @@ def serialize_model(self, handler):
"max_results",
"max_total_results",
"max_uses",
+ "mode",
"parameters",
"search_context_size",
"user_location",
diff --git a/src/openrouter/components/legacy_websearchservertool.py b/src/openrouter/components/legacy_websearchservertool.py
index f293a934..f0fae341 100644
--- a/src/openrouter/components/legacy_websearchservertool.py
+++ b/src/openrouter/components/legacy_websearchservertool.py
@@ -4,6 +4,7 @@
from .searchcontextsizeenum import SearchContextSizeEnum
from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict
from openrouter.types import (
BaseModel,
@@ -31,6 +32,8 @@ class LegacyWebSearchServerToolTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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]]
@@ -53,6 +56,9 @@ class LegacyWebSearchServerTool(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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"""
@@ -67,6 +73,7 @@ def serialize_model(self, handler):
"filters",
"max_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/src/openrouter/components/preview_20250311_websearchservertool.py b/src/openrouter/components/preview_20250311_websearchservertool.py
index d2b46046..77eb038d 100644
--- a/src/openrouter/components/preview_20250311_websearchservertool.py
+++ b/src/openrouter/components/preview_20250311_websearchservertool.py
@@ -8,6 +8,7 @@
from .searchcontextsizeenum import SearchContextSizeEnum
from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from openrouter.types import (
BaseModel,
Nullable,
@@ -34,6 +35,8 @@ class Preview20250311WebSearchServerToolTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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]]
@@ -55,6 +58,9 @@ class Preview20250311WebSearchServerTool(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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"""
@@ -68,6 +74,7 @@ def serialize_model(self, handler):
"filters",
"max_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/src/openrouter/components/preview_websearchservertool.py b/src/openrouter/components/preview_websearchservertool.py
index f94bdab2..0e4fd5ef 100644
--- a/src/openrouter/components/preview_websearchservertool.py
+++ b/src/openrouter/components/preview_websearchservertool.py
@@ -8,6 +8,7 @@
from .searchcontextsizeenum import SearchContextSizeEnum
from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from openrouter.types import (
BaseModel,
Nullable,
@@ -34,6 +35,8 @@ class PreviewWebSearchServerToolTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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]]
@@ -55,6 +58,9 @@ class PreviewWebSearchServerTool(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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"""
@@ -68,6 +74,7 @@ def serialize_model(self, handler):
"filters",
"max_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/src/openrouter/components/websearchconfig.py b/src/openrouter/components/websearchconfig.py
index 9ed29745..d13a6997 100644
--- a/src/openrouter/components/websearchconfig.py
+++ b/src/openrouter/components/websearchconfig.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .searchqualitylevel import SearchQualityLevel
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from .websearchuserlocationservertool import (
WebSearchUserLocationServerTool,
WebSearchUserLocationServerToolTypedDict,
@@ -28,6 +29,8 @@ class WebSearchConfigTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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]
@@ -56,6 +59,9 @@ class WebSearchConfig(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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."""
@@ -73,6 +79,7 @@ def serialize_model(self, handler):
"max_results",
"max_total_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/src/openrouter/components/websearchmode.py b/src/openrouter/components/websearchmode.py
new file mode 100644
index 00000000..cf825dee
--- /dev/null
+++ b/src/openrouter/components/websearchmode.py
@@ -0,0 +1,22 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import UnrecognizedStr
+from typing import Literal, Union
+
+
+WebSearchMode = Union[
+ Literal[
+ "instant",
+ "fast",
+ "auto",
+ "deep-lite",
+ "deep",
+ "deep-reasoning",
+ "turbo",
+ "basic",
+ "advanced",
+ ],
+ UnrecognizedStr,
+]
+r"""Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo (default), basic, 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 32403785..2121245f 100644
--- a/src/openrouter/components/websearchplugin.py
+++ b/src/openrouter/components/websearchplugin.py
@@ -2,6 +2,7 @@
from __future__ import annotations
from .websearchengine import WebSearchEngine
+from .websearchmode import WebSearchMode
from openrouter.types import (
BaseModel,
Nullable,
@@ -82,6 +83,8 @@ class WebSearchPluginTypedDict(TypedDict):
max_results: NotRequired[int]
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 (default), basic, and advanced. Modes unsupported by the selected engine are ignored."""
search_prompt: NotRequired[str]
user_location: NotRequired[Nullable[UserLocationTypedDict]]
@@ -106,6 +109,9 @@ class WebSearchPlugin(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, and advanced. Modes unsupported by the selected engine are ignored."""
+
search_prompt: Optional[str] = None
user_location: OptionalNullable[UserLocation] = UNSET
@@ -120,6 +126,7 @@ def serialize_model(self, handler):
"include_domains",
"max_results",
"max_uses",
+ "mode",
"search_prompt",
"user_location",
]
diff --git a/src/openrouter/components/websearchservertool.py b/src/openrouter/components/websearchservertool.py
index cb00458d..45c228b9 100644
--- a/src/openrouter/components/websearchservertool.py
+++ b/src/openrouter/components/websearchservertool.py
@@ -4,6 +4,7 @@
from .searchcontextsizeenum import SearchContextSizeEnum
from .websearchdomainfilter import WebSearchDomainFilter, WebSearchDomainFilterTypedDict
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict
from openrouter.types import (
BaseModel,
@@ -31,6 +32,8 @@ class WebSearchServerToolTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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]]
@@ -53,6 +56,9 @@ class WebSearchServerTool(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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"""
@@ -67,6 +73,7 @@ def serialize_model(self, handler):
"filters",
"max_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/src/openrouter/components/websearchservertoolconfig.py b/src/openrouter/components/websearchservertoolconfig.py
index a22eb95a..4c131b5e 100644
--- a/src/openrouter/components/websearchservertoolconfig.py
+++ b/src/openrouter/components/websearchservertoolconfig.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from .searchqualitylevel import SearchQualityLevel
from .websearchengineenum import WebSearchEngineEnum
+from .websearchmode import WebSearchMode
from .websearchuserlocationservertool import (
WebSearchUserLocationServerTool,
WebSearchUserLocationServerToolTypedDict,
@@ -30,6 +31,8 @@ class WebSearchServerToolConfigTypedDict(TypedDict):
r"""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."""
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 (default), basic, 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,6 +63,9 @@ class WebSearchServerToolConfig(BaseModel):
max_uses: Optional[int] = None
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 (default), basic, 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."""
@@ -77,6 +83,7 @@ def serialize_model(self, handler):
"max_results",
"max_total_results",
"max_uses",
+ "mode",
"search_context_size",
"user_location",
]
diff --git a/uv.lock b/uv.lock
index 4d4acc27..8e2d2caa 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.33"
+version = "1.1.34"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },