diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 51f9d04d5..4f2da96ff 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: 1d98f85e72400b97453cd787ef6d3892 + docChecksum: 4e3a7decb0983fd885239f88ab71b279 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.2.117 - configChecksum: 86f94eda464ba632a84268abea8bc20b + releaseVersion: 1.2.118 + configChecksum: c53870ed7b7a294d7a9eafaaadaf7679 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: d82a626c-74c3-43b9-9652-88673d6a5e50 - pristine_commit_hash: 836dcc0a41fb5091e79895f98365d9b76d46c242 - pristine_tree_hash: b65b2d6debb2f235401dbf95172417d814ac3d25 + generation_id: 5ab7f1d6-4b53-4f64-b8f6-08910f947c59 + pristine_commit_hash: ffa5759a7a2cad0a5955994f07f36291e02438a8 + pristine_tree_hash: fb1e1e83b2e86555226441c621342d79073119e6 features: typescript: acceptHeaders: 2.81.2 @@ -159,8 +159,8 @@ trackedFiles: pristine_git_object: 9e457b8ffc764a99257aeaff59e8881fb4804b73 docs/models/additionaltoolsitemtoolfunction.mdx: id: 24feb6428a92 - last_write_checksum: sha1:201c38e6f457fb20a645ecd35b99e5958cff5e9c - pristine_git_object: 0ea4f7e8176312fc176e8013e7bba1a856db990d + last_write_checksum: sha1:c83d99975e987c70a5e4f2a224fbdf2a4dbe0d7d + pristine_git_object: d9b2bb1b889276bb577dee3e29c2d8875389fd4a docs/models/additionaltoolsitemtooltype.mdx: id: 597d1a87a02e last_write_checksum: sha1:edaa0f3596eb694d143a843708b1a94aa8b26f98 @@ -2614,8 +2614,8 @@ trackedFiles: pristine_git_object: dd252da9bc3f5a4ba141dcddc81e9eaeb58d7f3a docs/models/code.mdx: id: 3d3e4db6d71b - last_write_checksum: sha1:f68ce5680ab16bd5416c9dd2c45724dc73702100 - pristine_git_object: 62d17c7bcc9991b05bf12589c39f93022237e481 + last_write_checksum: sha1:c51db5e033fef0f8f100d2b97f5b28b281ed51bf + pristine_git_object: 3b9de60e0c4c8c8f84603b5b31776147eab5d8c1 docs/models/codeinterpretercallcodedeltaevent.mdx: id: 7198a7802127 last_write_checksum: sha1:ec628a8ec4b18ae95db1342a502029c53120e707 @@ -3251,8 +3251,8 @@ trackedFiles: deleted: true docs/models/customtool.mdx: id: 06712148a406 - last_write_checksum: sha1:51fbdfd2b2dab9253486a4d55a87345c677bea96 - pristine_git_object: c9604a8c4855bdde0cf786c6d676ea3320b08a8f + last_write_checksum: sha1:5efa0145ceea56016421430c089bfe817ab9ce75 + pristine_git_object: 83a783e3e08582e47ae2c57fd46a3481ab761d2c docs/models/customtoolcallinputdeltaevent.md: id: 4ff71ac28aba last_write_checksum: sha1:573363c0b3bbbc7eb3157f1ce3c45f9d825ffd17 @@ -3278,8 +3278,8 @@ trackedFiles: deleted: true docs/models/customtoolcallitem.mdx: id: f5aefce0cc1b - last_write_checksum: sha1:d044a5ad0b98112a9a9d260de55ac205e797e003 - pristine_git_object: 6805f5eecb1c5c7fb0b3e80d3c5a80be7335655d + last_write_checksum: sha1:9e91bd093e65dfaae3a18750f68139594330346e + pristine_git_object: 52d689f41897e2811b8c7b4b5ec524eaf5288230 docs/models/customtoolcallitemtype.md: id: 695c2252b124 last_write_checksum: sha1:3ffede76adb738db02be522a1c36b1d65eec1dcb @@ -4098,8 +4098,8 @@ trackedFiles: deleted: true docs/models/functioncallitem.mdx: id: b71f02394362 - last_write_checksum: sha1:b2caee2c197e435425f18c8ac831ef2eee47c0da - pristine_git_object: 503fc529006c4a49ed94262ed0aa91ebe41c194d + last_write_checksum: sha1:c28297d214abdd71aa62aaa69ae7ecab93197643 + pristine_git_object: 8df0e6a55407f084bc004ecc03c9d4986174d77f docs/models/functioncallitemsubagentitem.mdx: id: ca813ee9e8a8 last_write_checksum: sha1:fca2e78176a1d2fff903411a1825dc9b5a6bed57 @@ -4269,8 +4269,8 @@ trackedFiles: deleted: true docs/models/fusionplugin.mdx: id: 746db79fa0eb - last_write_checksum: sha1:054727d0793c12a6fafef0379c65a5ae2edb6df0 - pristine_git_object: 3c094dfd9dbb696e05035bdbde40bc2e567e842b + last_write_checksum: sha1:fcd9f974257981fe9facf91fe1c9025051e99d53 + pristine_git_object: b65e03239aa5d8e134eaaa8161f5e1f7911f7541 docs/models/fusionplugintool.md: id: 7d3861059f79 last_write_checksum: sha1:2c8f070d789964069140d67b614b952d30463c69 @@ -4287,8 +4287,8 @@ trackedFiles: deleted: true docs/models/fusionservertoolconfig.mdx: id: 07d85f26dc29 - last_write_checksum: sha1:686f69cbafb368df3c91bd7c595c42e24284d5f9 - pristine_git_object: 9ff57eee84c1102ecb5a348f6934fa87ebfe7315 + last_write_checksum: sha1:249b21871271af35514ff5a9be95047332c79a22 + pristine_git_object: ee31998d7918e93334373058a08f4af02b24b061 docs/models/fusionservertoolconfigeffort.md: id: 8e9519531e12 last_write_checksum: sha1:7d8e4d53d85b1baf4bee735be03898c7bcd08424 @@ -4323,8 +4323,8 @@ trackedFiles: deleted: true docs/models/fusionservertoolopenrouter.mdx: id: c11761c11056 - last_write_checksum: sha1:a2f622b7cc4d272300096733ef4ebc1ed514b3c9 - pristine_git_object: 8abc492c94c17aec5fc7489c5547377c0a736899 + last_write_checksum: sha1:f8f2c712eb42d849ca033f5c9067fcbe23efc553 + pristine_git_object: 3a2448c8b37eaa41f6997c45c0a1da803091afbe docs/models/fusionservertoolopenroutertype.mdx: id: a708fee8d1ae last_write_checksum: sha1:c83f5724e221956284152d25dff8d9d42816abf7 @@ -6176,8 +6176,8 @@ trackedFiles: pristine_git_object: 87c880b64d05f25324be7c9aacb6ad73ed9e8ea3 docs/models/namespacefunctiontool.mdx: id: 0a59b71b33f8 - last_write_checksum: sha1:bd3804f2a4ddc4e10ed3bcdae80221c5a2abd79f - pristine_git_object: 4a001f4693fcc14d31a07ff5d7a5e85094c07489 + last_write_checksum: sha1:b8d0afbb19cbadea60d7bae5be003e5e816022b0 + pristine_git_object: 6ab7300504eb87a678a7c2543329dd3c393e0e5b docs/models/namespacetool.mdx: id: afc942abd633 last_write_checksum: sha1:e691a7b7a6697ad0affa9874f4eec274db755fd8 @@ -6627,8 +6627,8 @@ trackedFiles: deleted: true docs/models/openairesponsecustomtoolcall.mdx: id: e3903c35fc5d - last_write_checksum: sha1:5c263d34cb71807d809adde8767fbaabc5b1547c - pristine_git_object: 5655e502f9038c9485f43aa705c52224232daaa3 + last_write_checksum: sha1:84d79f23f56e0911b1a0bf4b6da062468bb660e9 + pristine_git_object: 367e9378b528e00eb5d1ebff974725cd813a6307 docs/models/openairesponsecustomtoolcalloutput.md: id: 145e57778fc8 last_write_checksum: sha1:0170176add0fe68ad449b4f7ccaa6e303e40b7a4 @@ -6681,8 +6681,8 @@ trackedFiles: deleted: true docs/models/openairesponsefunctiontoolcall.mdx: id: e39d0a52ecbc - last_write_checksum: sha1:9eb98e5ae9a68ea2c0d45475d566ab765de63907 - pristine_git_object: 0a2540fd8f53a803ea0a5901488106991e5f1573 + last_write_checksum: sha1:6a3518593c16d3359c8595ddf5402bd9fd373cc2 + pristine_git_object: 7085f8300c76b0487337fc6fe49d152bbdde4a81 docs/models/openairesponsefunctiontoolcalloutput.md: id: 7188829dbce3 last_write_checksum: sha1:49c73c0d70c8db811db18bba781cbce086f965e0 @@ -6931,8 +6931,8 @@ trackedFiles: deleted: true docs/models/openresponsesresulttoolfunction.mdx: id: 97ab7ea0185b - last_write_checksum: sha1:a6eae23df130d01b3ebdd8f4e5d37f3eedd00fbd - pristine_git_object: ca5315fd859e09b781b00b9ca465938e02cd69a6 + last_write_checksum: sha1:d211003b19aa3cbc9c32347c4518101843dadeac + pristine_git_object: e770c09dd59dbe61c899ccdb6088fa9e073a02f3 docs/models/openresponsesresulttoolunion.md: id: d416c6c1ff45 last_write_checksum: sha1:0444bf00ab67e56eafc690a4db7df089ac29defc @@ -9491,8 +9491,8 @@ trackedFiles: deleted: true docs/models/outputcustomtoolcallitem.mdx: id: 908e60a01b9d - last_write_checksum: sha1:2e59064905a0f817633588ca8a61946e5ff2ded2 - pristine_git_object: 5abe18bb1b8c8d0480e611ea8b81358fecac69c0 + last_write_checksum: sha1:90d5edefa3dfe04f66df1f27abf25f1df39bbb8b + pristine_git_object: 74fd3e29f54044e2346242b32eeffdb372f48d72 docs/models/outputcustomtoolcallitemstatus.mdx: id: 6d19bf9c8da3 last_write_checksum: sha1:88c00cdeeb8a9292ae4201cb6d6d270987363c78 @@ -9585,8 +9585,8 @@ trackedFiles: deleted: true docs/models/outputfunctioncallitem.mdx: id: 728d84ca3242 - last_write_checksum: sha1:07eee9262604586a00fe8ba2c5f4eddc7aa11193 - pristine_git_object: 871651766b883d5f7ff2ccd25f0b6eeafa9c12ad + last_write_checksum: sha1:509e78ec2c1013187b2aae1afd868c70410ff2e5 + pristine_git_object: bb73d7ea845bfae600ff32464c5a258a6f0fa23b docs/models/outputfunctioncallitemstatuscompleted.md: id: 38f4a88dba7e last_write_checksum: sha1:d71da18899b11ffc260978b45e806b2076835a74 @@ -11133,8 +11133,8 @@ trackedFiles: deleted: true docs/models/responsesrequesttoolfunction.mdx: id: e3de8d2bc41f - last_write_checksum: sha1:56ba5f374482def0d859751915704e5cb1b8d381 - pristine_git_object: 66b542222134be6849047572eb58e7934c7c30f9 + last_write_checksum: sha1:a43e56cab5572279c0477b5341cfe3edc2cf9317 + pristine_git_object: d890234c858514249a771087b0fb3375163854b6 docs/models/responsesrequesttoolunion.md: id: 0cab4203954b last_write_checksum: sha1:c9550a9493ce3b91d1921d3d9bf7ab43eee3c0c3 @@ -13313,12 +13313,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:bc84946ecfaf5c0940d39d8c3d298678194603ce - pristine_git_object: 2a0c9d8e9f04708817bb02f99b33252a1278b23d + last_write_checksum: sha1:4820fc55082408051f5ff8eccd743544812c3896 + pristine_git_object: 55d3c0d4eea245d9d43b3d5b7e1c2a480f86ceec package.json: id: 7030d0b2f71b - last_write_checksum: sha1:a9ca840b117cd567e79ecb59b33e74ae42f1d36b - pristine_git_object: 8a2ab2d7391af53db9d1bcf1d81845115e389f08 + last_write_checksum: sha1:13f9b5b5faf7367a7ddac8e6dca9d621fdcc4460 + pristine_git_object: 00adafc446fe1a7a2815e2c808465973b451574b src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -13761,8 +13761,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:ec126338a521e6b745998a42c5a5898a77faf5c9 - pristine_git_object: e581d492ee1ec6aff09c171532be4e5e549a28da + last_write_checksum: sha1:9a5fe511f22e4fc5dd8b007c6e15c65f8c3fff20 + pristine_git_object: cfae1750c0333b14957acb67f2fe7fcfd87372f5 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -13839,8 +13839,8 @@ trackedFiles: pristine_git_object: 41223fe450362a089e7de222ab42d025e0cecc9f src/models/additionaltoolsitem.ts: id: d33059f81c21 - last_write_checksum: sha1:e346868b1a3bf88ab3cdb2ab4bfabb71865d32d1 - pristine_git_object: f9c55e4628849df4d45bb27deaf1353d8981cf01 + last_write_checksum: sha1:7c49fa74fa21f7280aa54615675bd6420c9e7400 + pristine_git_object: dea372e92ecdeddb27ba08e98171df0914d25d15 src/models/advisorreasoning.ts: id: 4c86be6688b0 last_write_checksum: sha1:e8706d4a0822ef4f7dcea85943851788ed3228a0 @@ -14587,8 +14587,8 @@ trackedFiles: pristine_git_object: 6ea71694bc225ce09045e67e802e421d408bf9b6 src/models/customtool.ts: id: b293ddf87321 - last_write_checksum: sha1:720e7e63ec3077f42b2ab3cee38de8658a9caf95 - pristine_git_object: 3c30d5ef22a09762f0ed91314d4697a9c8831838 + last_write_checksum: sha1:1728c9ba2cf36d5ba66332b57328dbcb540de014 + pristine_git_object: 1ff3fb5b700ede584b56089793f3e76bc0897978 src/models/customtoolcallinputdeltaevent.ts: id: 54de1fe595f7 last_write_checksum: sha1:d9874535d39487e08a87d1131da60a1d2051d49d @@ -14599,8 +14599,8 @@ trackedFiles: pristine_git_object: a63c85bd87ec074c56e7a2e7b9a458b8c8414302 src/models/customtoolcallitem.ts: id: 84d0034c7065 - last_write_checksum: sha1:62318b541f4604b97b381df23078055f169df5b9 - pristine_git_object: 2cb753d2b278f2be2fd4ebc9e818e3ecc50c7607 + last_write_checksum: sha1:948edee755c4c0476016a0ca5c6a3594933b47dd + pristine_git_object: a5565a16429ef3268a84b8ac7bd63f318f0f50bf src/models/customtoolcalloutputitem.ts: id: 02aed5cefca5 last_write_checksum: sha1:fdda79fc4dd37fbe050a8d896d2156678723c71c @@ -14843,8 +14843,8 @@ trackedFiles: pristine_git_object: fa8a75b45e36d1d65c5208e8b2195eadbecf4cd9 src/models/functioncallitem.ts: id: 7e96e10e664b - last_write_checksum: sha1:fd3dac485002f81839c7adcf4b6bbe71c819e9e2 - pristine_git_object: 9fdaf807f513c0765140477f3d46ada52da7ab43 + last_write_checksum: sha1:3413282488bf857648c8daad26471a19c7dc1e18 + pristine_git_object: e6f462bfbb6931a10bbf654f8065759ad4369b5c src/models/functioncalloutputitem.ts: id: 279b91cadffe last_write_checksum: sha1:990ee52a62ff92726c64fa9ed1039cb6e6f9b772 @@ -14891,8 +14891,8 @@ trackedFiles: pristine_git_object: ea15abc3d64f380762a1b1f373c7a68cfa266d23 src/models/fusionplugin.ts: id: f2f6926f21f9 - last_write_checksum: sha1:1d7099fd46276f84137ef0e8a25753bd5a5b630a - pristine_git_object: 3dad906b120951d61f8f6f6b7cf0014853ee7e1e + last_write_checksum: sha1:620db3fd48f0b5b360c414f960ddcc7531550936 + pristine_git_object: f612981253814a2c03a2810a7536145bb400de11 src/models/fusionservertoolconfig.ts: id: 500c34bd192b last_write_checksum: sha1:9cb2475e03f059446acd5a5d7c5709f52ba29e65 @@ -15347,8 +15347,8 @@ trackedFiles: pristine_git_object: d6d730aa634d45baae1356f33b209a94bc525fdb src/models/namespacefunctiontool.ts: id: ca0cabda8e0a - last_write_checksum: sha1:b386751d0a9072bed8f5b07d2ece164589c3afdc - pristine_git_object: d71199e7ca9880bef65354ec98a3a508759cb83a + last_write_checksum: sha1:f0b19cfb9f51f4b3f42b733c1b0df04ac80d40f9 + pristine_git_object: 364ab1c0cef22d950b16454d65d222f4e293b49c src/models/namespacetool.ts: id: b430de21d6c4 last_write_checksum: sha1:787d25ab81607b94f1e0d13702fdb95ddf326055 @@ -15471,16 +15471,16 @@ trackedFiles: pristine_git_object: 0c4518bfa834945f0e3a27b6215a77b321db1563 src/models/openairesponsecustomtoolcall.ts: id: af21a6dcaaac - last_write_checksum: sha1:6e4777f4b4cfcd953f7e4d7040dcb9079be8b648 - pristine_git_object: cbeb21e8baf83197a3a886847c4acb6f353f2549 + last_write_checksum: sha1:6b732585227b8fa89da67eeaf7a71f64ba17823a + pristine_git_object: b1a391b4416147cff5b62ea001944feccb3d9eb5 src/models/openairesponsecustomtoolcalloutput.ts: id: 7ce70f788343 last_write_checksum: sha1:85dfebdee2edbaf0bca5ce0e4f62075d416b9e23 pristine_git_object: 3a9748370262a999375dba4e95ff570a5244b385 src/models/openairesponsefunctiontoolcall.ts: id: d27a63e0fb93 - last_write_checksum: sha1:529fd3b8c18ad123cc573a53ea91c6b14208d2cf - pristine_git_object: abb761ce5e8d3c88ee44d083e2fcda183b452d0b + last_write_checksum: sha1:c831fa25ed96f9b51d7914d8c189f5703d9a7aab + pristine_git_object: eae70fa1924e3fd9c060f3b3fc90cb0d3a89f24d src/models/openairesponsefunctiontoolcalloutput.ts: id: 78c25d89c63e last_write_checksum: sha1:48f7ca6c0307ea990c33865c7fca540ccc34684c @@ -15519,8 +15519,8 @@ trackedFiles: pristine_git_object: 364907411826c3fa6e2b65c7d5bbdc569d4ea08b src/models/openresponsesresult.ts: id: 95391b93fcbf - last_write_checksum: sha1:0ba10f968367193edb759ce93e8adffd19d3c427 - pristine_git_object: 205831ba397225455c527d9ae400fefab6f278ba + last_write_checksum: sha1:2aaf1058230d55451dfeb4a1cf5e990b85757557 + pristine_git_object: 33631f998d08383d05028a6aadd011872b7bde45 src/models/openrouterfile.ts: id: acb151305aa2 last_write_checksum: sha1:13efa47e00f89091a90808aa87d0617aa571c714 @@ -15995,8 +15995,8 @@ trackedFiles: pristine_git_object: 0b456de74a91e798ad764c716aaccdbe2126646f src/models/outputcustomtoolcallitem.ts: id: 71596c10c79b - last_write_checksum: sha1:898d6b16b6d3fa48747f2860d430997b8444a05d - pristine_git_object: 10bdda92e139b2a798989cf7f884d107c9df6c27 + last_write_checksum: sha1:cdc4f30076b0128a47861b2ca3e8792874e3a929 + pristine_git_object: 90e4caca20e6c841b02be9a609ef89380ee01387 src/models/outputdatetimeitem.ts: id: 0c1828e72f98 last_write_checksum: sha1:86f98e5eb24990beb4283eba0d2ff0a12c7048b8 @@ -16015,8 +16015,8 @@ trackedFiles: pristine_git_object: 8ba4848f8854032ff11c48db57e9ac7d5b1be4f4 src/models/outputfunctioncallitem.ts: id: 9c462e9ff54b - last_write_checksum: sha1:cb2ac335eae8020e4564921ed9eb78f552310e55 - pristine_git_object: 6506be9a2326a23adefc6737afeea07fb171341f + last_write_checksum: sha1:2ab1a71ccb81ddac9942463d351450cc3abbfd2f + pristine_git_object: 9f9265c5fa4332849e1854538aa4962fe8df24b5 src/models/outputfusionservertoolitem.ts: id: 30bcfe965217 last_write_checksum: sha1:9f08b458689579fa8750eccebe104da10a05c6d9 @@ -16371,12 +16371,12 @@ trackedFiles: pristine_git_object: 9e0f74740007f9a0041481f2aab78f8f69544add src/models/responseserrorfield.ts: id: 830ea3d3b590 - last_write_checksum: sha1:8df4803ee74868a6b920fa8746e3775cf5774d6d - pristine_git_object: bc8ccf76cd8919d9c9a679670f1858edc646af50 + last_write_checksum: sha1:38fa89961d68a08e52a7d20c5dad37d191e41e4f + pristine_git_object: a774bea0fd7ca1669e1bb5719f0bad2c0eeca4a9 src/models/responsesrequest.ts: id: 39799702f982 - last_write_checksum: sha1:deaff151f44633cf79faa757adec248088b546d2 - pristine_git_object: fec669e40ba5c24b7aac03f732c412d39abd8a58 + last_write_checksum: sha1:f9e5d5dbe890bebb1f30ee3393901ac33c98804d + pristine_git_object: 5fcce89f264490d114ea6d5c5dcd0e3fc9bb1bfb src/models/responsesstreamingresponse.ts: id: 69284d63df45 last_write_checksum: sha1:215a40ab5dab91267bbc60f1e7c7e9d3cf6082d2 @@ -19012,9 +19012,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Typescript SDK Changes: - * `openrouter.workspaces.listBudgets()`: `request` **Changed** (Breaking ⚠️) - * `openrouter.workspaces.deleteBudget()`: `request` **Changed** (Breaking ⚠️) - * `openrouter.workspaces.getBudget()`: `request` **Changed** (Breaking ⚠️) - * `openrouter.workspaces.setBudget()`: `request` **Changed** (Breaking ⚠️) +releaseNotes: "## Typescript SDK Changes:\n* `openrouter.presets.createPresetsResponses()`: \n * `request.responsesRequest` **Changed**\n* `openrouter.responses.send()`: \n * `request.responsesRequest` **Changed**\n * `response` **Changed**\n* `openrouter.beta.responses.send()`: \n * `request.responsesRequest` **Changed**\n * `response` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 13ea9a97b..b96471959 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.2.117 + version: 1.2.118 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 83bc67767..68492b2ef 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -194,6 +194,10 @@ components: - allOf: - $ref: '#/components/schemas/FunctionTool' - properties: + async: + description: 'Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.' + example: true + type: 'boolean' defer_loading: description: 'Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.' example: true @@ -4164,6 +4168,10 @@ components: - allOf: - $ref: '#/components/schemas/FunctionTool' - properties: + async: + description: 'Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.' + example: true + type: 'boolean' defer_loading: description: 'Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.' example: true @@ -8017,6 +8025,10 @@ components: name: 'my_tool' type: 'custom' properties: + async: + description: 'Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.' + example: true + type: 'boolean' description: type: 'string' format: @@ -9405,17 +9417,17 @@ components: example: analysis_models: - '~anthropic/claude-opus-latest' - - '~openai/gpt-latest' + - '~openai/gpt-sol-latest' - '~google/gemini-pro-latest' enabled: true id: 'fusion' model: '~anthropic/claude-opus-latest' properties: analysis_models: - description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest).' example: - '~anthropic/claude-opus-latest' - - '~openai/gpt-latest' + - '~openai/gpt-sol-latest' - '~google/gemini-pro-latest' items: type: 'string' @@ -9504,7 +9516,7 @@ components: parameters: analysis_models: - '~anthropic/claude-opus-latest' - - '~openai/gpt-latest' + - '~openai/gpt-sol-latest' type: 'openrouter:fusion' properties: parameters: @@ -9521,14 +9533,14 @@ components: example: analysis_models: - '~anthropic/claude-opus-latest' - - '~openai/gpt-latest' + - '~openai/gpt-sol-latest' - '~google/gemini-pro-latest' properties: analysis_models: description: 'Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.' example: - '~anthropic/claude-opus-latest' - - '~openai/gpt-latest' + - '~openai/gpt-sol-latest' - '~google/gemini-pro-latest' items: type: 'string' @@ -15211,6 +15223,10 @@ components: type: - 'array' - 'null' + async: + description: 'Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.' + example: true + type: 'boolean' defer_loading: type: 'boolean' description: @@ -17963,6 +17979,10 @@ components: name: 'apply_patch' type: 'custom_tool_call' properties: + async: + description: 'True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.' + example: true + type: 'boolean' call_id: type: 'string' id: @@ -18029,6 +18049,10 @@ components: properties: arguments: type: 'string' + async: + description: 'True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.' + example: true + type: 'boolean' call_id: type: 'string' id: @@ -19441,6 +19465,10 @@ components: status: 'completed' type: 'custom_tool_call' properties: + async: + description: 'True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.' + example: true + type: 'boolean' call_id: type: 'string' id: @@ -19874,6 +19902,10 @@ components: status: 'completed' type: 'custom_tool_call' properties: + async: + description: 'True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.' + example: true + type: 'boolean' call_id: type: 'string' id: @@ -19992,6 +20024,10 @@ components: properties: arguments: type: 'string' + async: + description: 'True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.' + example: true + type: 'boolean' call_id: type: 'string' id: @@ -23579,6 +23615,7 @@ components: - 'failed_to_download_image' - 'image_file_not_found' - 'bio_policy' + - 'cyber_policy' - 'misalignment_policy_violation' - 'data_residency_mismatch' type: 'string' @@ -23766,6 +23803,10 @@ components: - allOf: - $ref: '#/components/schemas/FunctionTool' - properties: + async: + description: 'Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.' + example: true + type: 'boolean' defer_loading: description: 'Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.' example: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a5c36c370..c36534b6d 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:ee7a7d395c9332be60eae6efb6ac6196fe91f1594ecd61088dc3d229b68fca6a - sourceBlobDigest: sha256:ca620c767778cb3f05a5df2f0d6f0b1612578f60ad9313b5f9ad32ec6425d1c5 + sourceRevisionDigest: sha256:f5e0ba920940e3804bd53c90da5a5314eb64542e17fadacb5252d21f5f7079ef + sourceBlobDigest: sha256:ca9660507abaa3871ae59d8dc8204363ad0ee97a44f9be6e5d110d369c1a486f tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:ee7a7d395c9332be60eae6efb6ac6196fe91f1594ecd61088dc3d229b68fca6a - sourceBlobDigest: sha256:ca620c767778cb3f05a5df2f0d6f0b1612578f60ad9313b5f9ad32ec6425d1c5 + sourceRevisionDigest: sha256:f5e0ba920940e3804bd53c90da5a5314eb64542e17fadacb5252d21f5f7079ef + sourceBlobDigest: sha256:ca9660507abaa3871ae59d8dc8204363ad0ee97a44f9be6e5d110d369c1a486f codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:65266dd0d93c0b33264bb7ad976a570a7088e2a0a84603e676ed3369e8006cbb + codeSamplesRevisionDigest: sha256:8a953fd88604d41f5479293cf4682e2995c919fc5627d4b369ec74fca8a6901e workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 15a639d44..a61752969 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3466,4 +3466,14 @@ Based on: ### Generated - [typescript v1.2.117] . ### Releases -- [NPM v1.2.117] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.117 - . \ No newline at end of file +- [NPM v1.2.117] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.117 - . + +## 2026-09-11 14:41:25 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.2.118] . +### Releases +- [NPM v1.2.118] https://www.npmjs.com/package/@openrouter/sdk/v/1.2.118 - . \ No newline at end of file diff --git a/docs/models/additionaltoolsitemtoolfunction.mdx b/docs/models/additionaltoolsitemtoolfunction.mdx index 0ea4f7e81..d9b2bb1b8 100644 --- a/docs/models/additionaltoolsitemtoolfunction.mdx +++ b/docs/models/additionaltoolsitemtoolfunction.mdx @@ -37,11 +37,12 @@ let value: AdditionalToolsItemToolFunction = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `description` | *string* | :heavy_minus_sign: | N/A | | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `parameters` | Record\ | :heavy_check_mark: | N/A | | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | | -| `type` | [models.AdditionalToolsItemTypeFunction](../models/additionaltoolsitemtypefunction.mdx) | :heavy_check_mark: | N/A | | -| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `parameters` | Record\ | :heavy_check_mark: | N/A | | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | | +| `type` | [models.AdditionalToolsItemTypeFunction](../models/additionaltoolsitemtypefunction.mdx) | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. | true | +| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file diff --git a/docs/models/code.mdx b/docs/models/code.mdx index 62d17c7bc..3b9de60e0 100644 --- a/docs/models/code.mdx +++ b/docs/models/code.mdx @@ -15,5 +15,5 @@ let value: Code = "server_error"; ## Values ```typescript -"server_error" | "rate_limit_exceeded" | "invalid_prompt" | "vector_store_timeout" | "invalid_image" | "invalid_image_format" | "invalid_base64_image" | "invalid_image_url" | "image_too_large" | "image_too_small" | "image_parse_error" | "image_content_policy_violation" | "invalid_image_mode" | "image_file_too_large" | "unsupported_image_media_type" | "empty_image_file" | "failed_to_download_image" | "image_file_not_found" | "bio_policy" | "misalignment_policy_violation" | "data_residency_mismatch" | Unrecognized +"server_error" | "rate_limit_exceeded" | "invalid_prompt" | "vector_store_timeout" | "invalid_image" | "invalid_image_format" | "invalid_base64_image" | "invalid_image_url" | "image_too_large" | "image_too_small" | "image_parse_error" | "image_content_policy_violation" | "invalid_image_mode" | "image_file_too_large" | "unsupported_image_media_type" | "empty_image_file" | "failed_to_download_image" | "image_file_not_found" | "bio_policy" | "cyber_policy" | "misalignment_policy_violation" | "data_residency_mismatch" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/customtool.mdx b/docs/models/customtool.mdx index c9604a8c4..83a783e3e 100644 --- a/docs/models/customtool.mdx +++ b/docs/models/customtool.mdx @@ -17,9 +17,10 @@ let value: CustomTool = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `format` | *models.Format* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `type` | [models.CustomToolTypeCustom](../models/customtooltypecustom.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `async` | *boolean* | :heavy_minus_sign: | Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. | true | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `format` | *models.Format* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `type` | [models.CustomToolTypeCustom](../models/customtooltypecustom.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/customtoolcallitem.mdx b/docs/models/customtoolcallitem.mdx index 6805f5eec..52d689f41 100644 --- a/docs/models/customtoolcallitem.mdx +++ b/docs/models/customtoolcallitem.mdx @@ -19,12 +19,13 @@ let value: CustomToolCallItem = { ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `callId` | *string* | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_minus_sign: | N/A | | -| `input` | *string* | :heavy_check_mark: | N/A | | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | | -| `type` | [models.CustomToolCallItemType](../models/customtoolcallitemtype.mdx) | :heavy_check_mark: | N/A | | -| `status` | [models.ToolCallStatus](../models/toolcallstatus.mdx) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | +| `callId` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `input` | *string* | :heavy_check_mark: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | | +| `type` | [models.CustomToolCallItemType](../models/customtoolcallitemtype.mdx) | :heavy_check_mark: | N/A | | +| `status` | [models.ToolCallStatus](../models/toolcallstatus.mdx) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/models/functioncallitem.mdx b/docs/models/functioncallitem.mdx index 503fc5290..8df0e6a55 100644 --- a/docs/models/functioncallitem.mdx +++ b/docs/models/functioncallitem.mdx @@ -23,6 +23,7 @@ let value: FunctionCallItem = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `arguments` | *string* | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | | `callId` | *string* | :heavy_check_mark: | N/A | | | `id` | *string* | :heavy_check_mark: | N/A | | | `name` | *string* | :heavy_check_mark: | N/A | | diff --git a/docs/models/fusionplugin.mdx b/docs/models/fusionplugin.mdx index 3c094dfd9..b65e03239 100644 --- a/docs/models/fusionplugin.mdx +++ b/docs/models/fusionplugin.mdx @@ -14,12 +14,12 @@ let value: FusionPlugin = { ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `analysisModels` | *string*[] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | -| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. | | -| `id` | *"fusion"* | :heavy_check_mark: | N/A | | -| `maxToolCalls` | *number* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. | 12 | -| `model` | *string* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | -| `preset` | [models.PresetEnum](../models/presetenum.mdx) | :heavy_minus_sign: | Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | -| `tools` | [models.FusionPluginTool](../models/fusionplugintool.mdx)[] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `analysisModels` | *string*[] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-sol-latest",
"~google/gemini-pro-latest"
] | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. | | +| `id` | *"fusion"* | :heavy_check_mark: | N/A | | +| `maxToolCalls` | *number* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. | 12 | +| `model` | *string* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | +| `preset` | [models.PresetEnum](../models/presetenum.mdx) | :heavy_minus_sign: | Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | +| `tools` | [models.FusionPluginTool](../models/fusionplugintool.mdx)[] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file diff --git a/docs/models/fusionservertoolconfig.mdx b/docs/models/fusionservertoolconfig.mdx index 9ff57eee8..ee31998d7 100644 --- a/docs/models/fusionservertoolconfig.mdx +++ b/docs/models/fusionservertoolconfig.mdx @@ -16,7 +16,7 @@ let value: FusionServerToolConfig = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `analysisModels` | *string*[] | :heavy_minus_sign: | Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | +| `analysisModels` | *string*[] | :heavy_minus_sign: | Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. | [
"~anthropic/claude-opus-latest",
"~openai/gpt-sol-latest",
"~google/gemini-pro-latest"
] | | `cacheControl` | [models.AnthropicCacheControlDirective](../models/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} | | `maxCompletionTokens` | *number* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted. | 16384 | | `maxToolCalls` | *number* | :heavy_minus_sign: | Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. | 12 | diff --git a/docs/models/fusionservertoolopenrouter.mdx b/docs/models/fusionservertoolopenrouter.mdx index 8abc492c9..3a2448c8b 100644 --- a/docs/models/fusionservertoolopenrouter.mdx +++ b/docs/models/fusionservertoolopenrouter.mdx @@ -16,7 +16,7 @@ let value: FusionServerToolOpenRouter = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `parameters` | [models.FusionServerToolConfig](../models/fusionservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for the openrouter:fusion server tool. | \{
"analysis_models": [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
]
} | -| `type` | [models.FusionServerToolOpenRouterType](../models/fusionservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `parameters` | [models.FusionServerToolConfig](../models/fusionservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for the openrouter:fusion server tool. | \{
"analysis_models": [
"~anthropic/claude-opus-latest",
"~openai/gpt-sol-latest",
"~google/gemini-pro-latest"
]
} | +| `type` | [models.FusionServerToolOpenRouterType](../models/fusionservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/namespacefunctiontool.mdx b/docs/models/namespacefunctiontool.mdx index 4a001f469..6ab730050 100644 --- a/docs/models/namespacefunctiontool.mdx +++ b/docs/models/namespacefunctiontool.mdx @@ -17,13 +17,14 @@ let value: NamespaceFunctionTool = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `allowedCallers` | [models.AllowedCaller](../models/allowedcaller.mdx)[] | :heavy_minus_sign: | N/A | -| `deferLoading` | *boolean* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `outputSchema` | Record\ | :heavy_minus_sign: | N/A | -| `parameters` | Record\ | :heavy_minus_sign: | N/A | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | -| `type` | *"function"* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowedCallers` | [models.AllowedCaller](../models/allowedcaller.mdx)[] | :heavy_minus_sign: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. | true | +| `deferLoading` | *boolean* | :heavy_minus_sign: | N/A | | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `outputSchema` | Record\ | :heavy_minus_sign: | N/A | | +| `parameters` | Record\ | :heavy_minus_sign: | N/A | | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | | +| `type` | *"function"* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openairesponsecustomtoolcall.mdx b/docs/models/openairesponsecustomtoolcall.mdx index 5655e502f..367e9378b 100644 --- a/docs/models/openairesponsecustomtoolcall.mdx +++ b/docs/models/openairesponsecustomtoolcall.mdx @@ -17,11 +17,12 @@ let value: OpenAIResponseCustomToolCall = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `callId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `input` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | -| `type` | [models.OpenAIResponseCustomToolCallType](../models/openairesponsecustomtoolcalltype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | +| `callId` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `input` | *string* | :heavy_check_mark: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | | +| `type` | [models.OpenAIResponseCustomToolCallType](../models/openairesponsecustomtoolcalltype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/openairesponsefunctiontoolcall.mdx b/docs/models/openairesponsefunctiontoolcall.mdx index 0a2540fd8..7085f8300 100644 --- a/docs/models/openairesponsefunctiontoolcall.mdx +++ b/docs/models/openairesponsefunctiontoolcall.mdx @@ -20,6 +20,7 @@ let value: OpenAIResponseFunctionToolCall = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `arguments` | *string* | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | | `callId` | *string* | :heavy_check_mark: | N/A | | | `id` | *string* | :heavy_minus_sign: | N/A | | | `name` | *string* | :heavy_check_mark: | N/A | | diff --git a/docs/models/openresponsesresulttoolfunction.mdx b/docs/models/openresponsesresulttoolfunction.mdx index ca5315fd8..e770c09dd 100644 --- a/docs/models/openresponsesresulttoolfunction.mdx +++ b/docs/models/openresponsesresulttoolfunction.mdx @@ -37,11 +37,12 @@ let value: OpenResponsesResultToolFunction = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `description` | *string* | :heavy_minus_sign: | N/A | | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `parameters` | Record\ | :heavy_check_mark: | N/A | | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | | -| `type` | *"function"* | :heavy_check_mark: | N/A | | -| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `parameters` | Record\ | :heavy_check_mark: | N/A | | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | | +| `type` | *"function"* | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. | true | +| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file diff --git a/docs/models/outputcustomtoolcallitem.mdx b/docs/models/outputcustomtoolcallitem.mdx index 5abe18bb1..74fd3e29f 100644 --- a/docs/models/outputcustomtoolcallitem.mdx +++ b/docs/models/outputcustomtoolcallitem.mdx @@ -19,12 +19,13 @@ let value: OutputCustomToolCallItem = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `callId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `input` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | -| `status` | [models.OutputCustomToolCallItemStatus](../models/outputcustomtoolcallitemstatus.mdx) | :heavy_minus_sign: | N/A | -| `type` | [models.OutputCustomToolCallItemType](../models/outputcustomtoolcallitemtype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | +| `callId` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `input` | *string* | :heavy_check_mark: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | | +| `status` | [models.OutputCustomToolCallItemStatus](../models/outputcustomtoolcallitemstatus.mdx) | :heavy_minus_sign: | N/A | | +| `type` | [models.OutputCustomToolCallItemType](../models/outputcustomtoolcallitemtype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/outputfunctioncallitem.mdx b/docs/models/outputfunctioncallitem.mdx index 871651766..bb73d7ea8 100644 --- a/docs/models/outputfunctioncallitem.mdx +++ b/docs/models/outputfunctioncallitem.mdx @@ -17,14 +17,15 @@ let value: OutputFunctionCallItem = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `arguments` | *string* | :heavy_check_mark: | N/A | -| `callId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | -| `status` | *models.OutputFunctionCallItemStatusUnion* | :heavy_minus_sign: | N/A | -| `type` | [models.OutputFunctionCallItemType](../models/outputfunctioncallitemtype.mdx) | :heavy_check_mark: | N/A | -| `subagentId` | *string* | :heavy_minus_sign: | EXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls. | -| `subagentItems` | [models.OutputFunctionCallItemSubagentItem](../models/outputfunctioncallitemsubagentitem.mdx)[] | :heavy_minus_sign: | EXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent created multiple parallel tool calls, only the first tool call will have this field. The other tool calls will only have `subagent_id`. Present only if the tool call originates from a subagent spawned by the `openrouter:subagent` server tool. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `arguments` | *string* | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. | true | +| `callId` | *string* | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `namespace` | *string* | :heavy_minus_sign: | Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) | | +| `status` | *models.OutputFunctionCallItemStatusUnion* | :heavy_minus_sign: | N/A | | +| `type` | [models.OutputFunctionCallItemType](../models/outputfunctioncallitemtype.mdx) | :heavy_check_mark: | N/A | | +| `subagentId` | *string* | :heavy_minus_sign: | EXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls. | | +| `subagentItems` | [models.OutputFunctionCallItemSubagentItem](../models/outputfunctioncallitemsubagentitem.mdx)[] | :heavy_minus_sign: | EXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent created multiple parallel tool calls, only the first tool call will have this field. The other tool calls will only have `subagent_id`. Present only if the tool call originates from a subagent spawned by the `openrouter:subagent` server tool. | | \ No newline at end of file diff --git a/docs/models/responsesrequesttoolfunction.mdx b/docs/models/responsesrequesttoolfunction.mdx index 66b542222..d890234c8 100644 --- a/docs/models/responsesrequesttoolfunction.mdx +++ b/docs/models/responsesrequesttoolfunction.mdx @@ -37,11 +37,12 @@ let value: ResponsesRequestToolFunction = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `description` | *string* | :heavy_minus_sign: | N/A | | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `parameters` | Record\ | :heavy_check_mark: | N/A | | -| `strict` | *boolean* | :heavy_minus_sign: | N/A | | -| `type` | *"function"* | :heavy_check_mark: | N/A | | -| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `parameters` | Record\ | :heavy_check_mark: | N/A | | +| `strict` | *boolean* | :heavy_minus_sign: | N/A | | +| `type` | *"function"* | :heavy_check_mark: | N/A | | +| `async` | *boolean* | :heavy_minus_sign: | Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. | true | +| `deferLoading` | *boolean* | :heavy_minus_sign: | Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. | true | \ No newline at end of file diff --git a/jsr.json b/jsr.json index 2a0c9d8e9..55d3c0d4e 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.2.117", + "version": "1.2.118", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 5627236de..29d5cdccb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.2.117", + "version": "1.2.118", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build", + "test:watch": "vitest --watch --project unit", "compile": "tsc", - "postinstall": "node scripts/check-types.js || true", - "prepare": "npm run build", - "test:e2e": "vitest --run --project e2e", - "typecheck": "tsc --noEmit", "test": "vitest --run --project unit", + "test:e2e": "vitest --run --project e2e", "test:transit": "exit 0", - "test:watch": "vitest --watch --project unit", - "typecheck:transit": "exit 0" + "typecheck": "tsc --noEmit", + "typecheck:transit": "exit 0", + "postinstall": "node scripts/check-types.js || true", + "prepare": "npm run build" }, "peerDependencies": {}, "devDependencies": { diff --git a/src/lib/config.ts b/src/lib/config.ts index 097308f5a..6a3eddfa4 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.2.117", + sdkVersion: "1.2.118", genVersion: "2.914.0", - userAgent: "speakeasy-sdk/typescript 1.2.117 2.914.0 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.2.118 2.914.0 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/additionaltoolsitem.ts b/src/models/additionaltoolsitem.ts index f9c55e462..dea372e92 100644 --- a/src/models/additionaltoolsitem.ts +++ b/src/models/additionaltoolsitem.ts @@ -176,6 +176,10 @@ export type AdditionalToolsItemToolFunction = { parameters: { [k: string]: any } | null; strict?: boolean | null | undefined; type: AdditionalToolsItemTypeFunction; + /** + * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + */ + async?: boolean | undefined; /** * Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. */ @@ -306,6 +310,7 @@ export type AdditionalToolsItemToolFunction$Outbound = { parameters: { [k: string]: any } | null; strict?: boolean | null | undefined; type: string; + async?: boolean | undefined; defer_loading?: boolean | undefined; }; @@ -319,6 +324,7 @@ export const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType< parameters: z.nullable(z.record(z.string(), z.any())), strict: z.nullable(z.boolean()).optional(), type: AdditionalToolsItemTypeFunction$outboundSchema, + async: z.boolean().optional(), deferLoading: z.boolean().optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/customtool.ts b/src/models/customtool.ts index 3c30d5ef2..1ff3fb5b7 100644 --- a/src/models/customtool.ts +++ b/src/models/customtool.ts @@ -42,6 +42,10 @@ export type CustomToolTypeCustom = ClosedEnum; * Custom tool configuration */ export type CustomTool = { + /** + * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + */ + async?: boolean | undefined; description?: string | undefined; format?: | FormatText @@ -168,6 +172,7 @@ export const CustomToolTypeCustom$outboundSchema: z.ZodEnum< /** @internal */ export const CustomTool$inboundSchema: z.ZodType = z .object({ + async: z.boolean().optional(), description: z.string().optional(), format: discriminatedUnion("type", { text: z.lazy(() => FormatText$inboundSchema), @@ -178,6 +183,7 @@ export const CustomTool$inboundSchema: z.ZodType = z }); /** @internal */ export type CustomTool$Outbound = { + async?: boolean | undefined; description?: string | undefined; format?: FormatText$Outbound | FormatGrammar$Outbound | undefined; name: string; @@ -189,6 +195,7 @@ export const CustomTool$outboundSchema: z.ZodType< CustomTool$Outbound, CustomTool > = z.object({ + async: z.boolean().optional(), description: z.string().optional(), format: z.union([ z.lazy(() => FormatText$outboundSchema), diff --git a/src/models/customtoolcallitem.ts b/src/models/customtoolcallitem.ts index 2cb753d2b..a5565a164 100644 --- a/src/models/customtoolcallitem.ts +++ b/src/models/customtoolcallitem.ts @@ -20,6 +20,10 @@ export type CustomToolCallItemType = ClosedEnum; * A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. */ export type CustomToolCallItem = { + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id?: string | undefined; input: string; @@ -39,6 +43,7 @@ export const CustomToolCallItemType$outboundSchema: z.ZodEnum< /** @internal */ export type CustomToolCallItem$Outbound = { + async?: boolean | undefined; call_id: string; id?: string | undefined; input: string; @@ -53,6 +58,7 @@ export const CustomToolCallItem$outboundSchema: z.ZodType< CustomToolCallItem$Outbound, CustomToolCallItem > = z.object({ + async: z.boolean().optional(), callId: z.string(), id: z.string().optional(), input: z.string(), diff --git a/src/models/functioncallitem.ts b/src/models/functioncallitem.ts index 9fdaf807f..e6f462bfb 100644 --- a/src/models/functioncallitem.ts +++ b/src/models/functioncallitem.ts @@ -26,6 +26,10 @@ export type FunctionCallItemType = ClosedEnum; */ export type FunctionCallItem = { arguments: string; + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id: string; name: string; @@ -85,6 +89,7 @@ export const FunctionCallItemType$outboundSchema: z.ZodEnum< /** @internal */ export type FunctionCallItem$Outbound = { arguments: string; + async?: boolean | undefined; call_id: string; id: string; name: string; @@ -101,6 +106,7 @@ export const FunctionCallItem$outboundSchema: z.ZodType< FunctionCallItem > = z.object({ arguments: z.string(), + async: z.boolean().optional(), callId: z.string(), id: z.string(), name: z.string(), diff --git a/src/models/fusionplugin.ts b/src/models/fusionplugin.ts index 3dad906b1..f61298125 100644 --- a/src/models/fusionplugin.ts +++ b/src/models/fusionplugin.ts @@ -53,7 +53,7 @@ export type FusionPluginTool = { export type FusionPlugin = { /** - * For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). + * For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest). */ analysisModels?: Array | undefined; /** diff --git a/src/models/namespacefunctiontool.ts b/src/models/namespacefunctiontool.ts index d71199e7c..364ab1c0c 100644 --- a/src/models/namespacefunctiontool.ts +++ b/src/models/namespacefunctiontool.ts @@ -22,6 +22,10 @@ export type AllowedCaller = OpenEnum; */ export type NamespaceFunctionTool = { allowedCallers?: Array | null | undefined; + /** + * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + */ + async?: boolean | undefined; deferLoading?: boolean | undefined; description?: string | null | undefined; name: string; @@ -44,6 +48,7 @@ export const NamespaceFunctionTool$inboundSchema: z.ZodType< unknown > = z.object({ allowed_callers: z.nullable(z.array(AllowedCaller$inboundSchema)).optional(), + async: z.boolean().optional(), defer_loading: z.boolean().optional(), description: z.nullable(z.string()).optional(), name: z.string(), @@ -61,6 +66,7 @@ export const NamespaceFunctionTool$inboundSchema: z.ZodType< /** @internal */ export type NamespaceFunctionTool$Outbound = { allowed_callers?: Array | null | undefined; + async?: boolean | undefined; defer_loading?: boolean | undefined; description?: string | null | undefined; name: string; @@ -76,6 +82,7 @@ export const NamespaceFunctionTool$outboundSchema: z.ZodType< NamespaceFunctionTool > = z.object({ allowedCallers: z.nullable(z.array(AllowedCaller$outboundSchema)).optional(), + async: z.boolean().optional(), deferLoading: z.boolean().optional(), description: z.nullable(z.string()).optional(), name: z.string(), diff --git a/src/models/openairesponsecustomtoolcall.ts b/src/models/openairesponsecustomtoolcall.ts index cbeb21e8b..b1a391b44 100644 --- a/src/models/openairesponsecustomtoolcall.ts +++ b/src/models/openairesponsecustomtoolcall.ts @@ -18,6 +18,10 @@ export type OpenAIResponseCustomToolCallType = ClosedEnum< >; export type OpenAIResponseCustomToolCall = { + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id?: string | undefined; input: string; @@ -39,6 +43,7 @@ export const OpenAIResponseCustomToolCall$inboundSchema: z.ZodType< OpenAIResponseCustomToolCall, unknown > = z.object({ + async: z.boolean().optional(), call_id: z.string(), id: z.string().optional(), input: z.string(), diff --git a/src/models/openairesponsefunctiontoolcall.ts b/src/models/openairesponsefunctiontoolcall.ts index abb761ce5..eae70fa19 100644 --- a/src/models/openairesponsefunctiontoolcall.ts +++ b/src/models/openairesponsefunctiontoolcall.ts @@ -31,6 +31,10 @@ export type OpenAIResponseFunctionToolCallType = ClosedEnum< export type OpenAIResponseFunctionToolCall = { arguments: string; + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id?: string | undefined; name: string; @@ -88,6 +92,7 @@ export const OpenAIResponseFunctionToolCall$inboundSchema: z.ZodType< unknown > = z.object({ arguments: z.string(), + async: z.boolean().optional(), call_id: z.string(), id: z.string().optional(), name: z.string(), diff --git a/src/models/openresponsesresult.ts b/src/models/openresponsesresult.ts index 205831ba3..33631f998 100644 --- a/src/models/openresponsesresult.ts +++ b/src/models/openresponsesresult.ts @@ -122,6 +122,10 @@ export type OpenResponsesResultToolFunction = { parameters: { [k: string]: any } | null; strict?: boolean | null | undefined; type: "function"; + /** + * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + */ + async?: boolean | undefined; /** * Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. */ @@ -283,6 +287,7 @@ export const OpenResponsesResultToolFunction$inboundSchema: z.ZodType< parameters: z.nullable(z.record(z.string(), z.any())), strict: z.nullable(z.boolean()).optional(), type: z.literal("function"), + async: z.boolean().optional(), defer_loading: z.boolean().optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/outputcustomtoolcallitem.ts b/src/models/outputcustomtoolcallitem.ts index 10bdda92e..90e4caca2 100644 --- a/src/models/outputcustomtoolcallitem.ts +++ b/src/models/outputcustomtoolcallitem.ts @@ -31,6 +31,10 @@ export type OutputCustomToolCallItemType = ClosedEnum< * A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. */ export type OutputCustomToolCallItem = { + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id?: string | undefined; input: string; @@ -68,6 +72,7 @@ export const OutputCustomToolCallItem$inboundSchema: z.ZodType< OutputCustomToolCallItem, unknown > = z.object({ + async: z.boolean().optional(), call_id: z.string(), id: z.string().optional(), input: z.string(), @@ -82,6 +87,7 @@ export const OutputCustomToolCallItem$inboundSchema: z.ZodType< }); /** @internal */ export type OutputCustomToolCallItem$Outbound = { + async?: boolean | undefined; call_id: string; id?: string | undefined; input: string; @@ -96,6 +102,7 @@ export const OutputCustomToolCallItem$outboundSchema: z.ZodType< OutputCustomToolCallItem$Outbound, OutputCustomToolCallItem > = z.object({ + async: z.boolean().optional(), callId: z.string(), id: z.string().optional(), input: z.string(), diff --git a/src/models/outputfunctioncallitem.ts b/src/models/outputfunctioncallitem.ts index 6506be9a2..9f9265c5f 100644 --- a/src/models/outputfunctioncallitem.ts +++ b/src/models/outputfunctioncallitem.ts @@ -53,6 +53,10 @@ export type OutputFunctionCallItemSubagentItem = { export type OutputFunctionCallItem = { arguments: string; + /** + * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + */ + async?: boolean | undefined; callId: string; id?: string | undefined; name: string; @@ -215,6 +219,7 @@ export const OutputFunctionCallItem$inboundSchema: z.ZodType< unknown > = z.object({ arguments: z.string(), + async: z.boolean().optional(), call_id: z.string(), id: z.string().optional(), name: z.string(), @@ -239,6 +244,7 @@ export const OutputFunctionCallItem$inboundSchema: z.ZodType< /** @internal */ export type OutputFunctionCallItem$Outbound = { arguments: string; + async?: boolean | undefined; call_id: string; id?: string | undefined; name: string; @@ -257,6 +263,7 @@ export const OutputFunctionCallItem$outboundSchema: z.ZodType< OutputFunctionCallItem > = z.object({ arguments: z.string(), + async: z.boolean().optional(), callId: z.string(), id: z.string().optional(), name: z.string(), diff --git a/src/models/responseserrorfield.ts b/src/models/responseserrorfield.ts index bc8ccf76c..a774bea0f 100644 --- a/src/models/responseserrorfield.ts +++ b/src/models/responseserrorfield.ts @@ -30,6 +30,7 @@ export const Code = { FailedToDownloadImage: "failed_to_download_image", ImageFileNotFound: "image_file_not_found", BioPolicy: "bio_policy", + CyberPolicy: "cyber_policy", MisalignmentPolicyViolation: "misalignment_policy_violation", DataResidencyMismatch: "data_residency_mismatch", } as const; diff --git a/src/models/responsesrequest.ts b/src/models/responsesrequest.ts index fec669e40..5fcce89f2 100644 --- a/src/models/responsesrequest.ts +++ b/src/models/responsesrequest.ts @@ -330,6 +330,10 @@ export type ResponsesRequestToolFunction = { parameters: { [k: string]: any } | null; strict?: boolean | null | undefined; type: "function"; + /** + * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + */ + async?: boolean | undefined; /** * Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred. */ @@ -608,6 +612,7 @@ export type ResponsesRequestToolFunction$Outbound = { parameters: { [k: string]: any } | null; strict?: boolean | null | undefined; type: "function"; + async?: boolean | undefined; defer_loading?: boolean | undefined; }; @@ -621,6 +626,7 @@ export const ResponsesRequestToolFunction$outboundSchema: z.ZodType< parameters: z.nullable(z.record(z.string(), z.any())), strict: z.nullable(z.boolean()).optional(), type: z.literal("function"), + async: z.boolean().optional(), deferLoading: z.boolean().optional(), }).transform((v) => { return remap$(v, {