diff --git a/.npmrc b/.npmrc index 38a58688..d2301476 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ shamefully-hoist=false -strict-peer-dependencies=true \ No newline at end of file +strict-peer-dependencies=false +frozen-lockfile=false diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f5ed456d..3612cacf 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: - docChecksum: 5dd16b70b1989045490170a2da6582b0 + docChecksum: 7165e52f013c74fa78c326f6b366282c docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.9.11 - configChecksum: eada15eed596fc8b0440ceb51bb4a701 + releaseVersion: 0.11.0 + configChecksum: 3711287fa61fad4e0537821280b07c1d repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: 84eebc1d-c56d-4d48-9afa-9d36b1d15de9 - pristine_commit_hash: f7d9494047ccace96dd09160108fdaae5e490064 - pristine_tree_hash: 85dae5546321586034bf607b7dc7ba19c729fcf3 + generation_id: 1c8b27b5-296e-43be-932e-19c800542f0c + pristine_commit_hash: e91fa66a5256a653651adb061cf4ef03ef6e40d0 + pristine_tree_hash: f43a1eec314cb69b149395ef847b19129c5be4c7 features: typescript: acceptHeaders: 2.81.2 @@ -65,32 +65,56 @@ trackedFiles: pristine_git_object: 113eead5093c17d43a46159132885318f281a68a FUNCTIONS.md: id: 21b9df02aaeb - last_write_checksum: sha1:b86704fc7669e8ee550d1982f4a421f426f88817 - pristine_git_object: cdb097a34292bdea92eae4632d88d99faa6e179f + last_write_checksum: sha1:b300987378afed64ab7243984a121463022fb867 + pristine_git_object: 8688495f3809ae46ed63a98d2a9cdf85c4ed273e RUNTIMES.md: id: 620c490847b6 last_write_checksum: sha1:e45b854f02c357cbcfdb8c3663000e8339e16505 pristine_git_object: 27731c3b5ace66bedc454ed5acbe15075aacd3dc USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:03eb670663fbc28d3d63679b2a94c7ad2e39047c - pristine_git_object: 76073b0482c95777249180ebc0c5a33b35ff3ecb + last_write_checksum: sha1:d060a3edc0ef7c47343f5e3aeedb868fe01118c4 + pristine_git_object: 4042e92f3a6130fa8ea422597d6f970eda42f5ad docs/lib/utils/retryconfig.md: id: 0ce9707cb848 last_write_checksum: sha1:bc4454e196fcd219f5a78da690375a884f5ed07b pristine_git_object: 08f95f4552349360b2c0b01802aa71ec3a55d2c2 + docs/models/action.md: + id: 3b583d6a609e + last_write_checksum: sha1:25d1128305b92739e2a378bf7fa8ed6bb179cde2 + pristine_git_object: c98359d81435645774b48bef76efd8804558d94b + docs/models/actionfindinpage.md: + id: 82de07ae8815 + last_write_checksum: sha1:892232466ee3462f6b196c464ed942b03275156b + pristine_git_object: 26959fe558ad2ab64f933d526ff923a4868f4cbf + docs/models/actionopenpage.md: + id: 014a2d814419 + last_write_checksum: sha1:35237daa203e015624ca63edc538f1bba81b946d + pristine_git_object: 5563636092178fc7f98d571c8443fb8d2ae61806 + docs/models/actionsearch.md: + id: 52ec8c04eadc + last_write_checksum: sha1:8b4f14fd19abb9f25a3f51dbb29bf7712cad9c67 + pristine_git_object: 6f80a5536ddd27c3926ae1f4333d66ae85412bf6 docs/models/activityitem.md: id: f0c5f0e6c469 last_write_checksum: sha1:d25ad4a8896acf08a136b24bdeca528217e63366 pristine_git_object: 761ca947b3ed048a95b168c2167d5806536ef64a + docs/models/allowedtools.md: + id: 3173f34039d5 + last_write_checksum: sha1:88a50744e9312e7b30f29130bcfcfc190ce6fd5f + pristine_git_object: c0a3f36038e2c4859ba998970302c4ccabf9b797 + docs/models/always.md: + id: 017ae40db277 + last_write_checksum: sha1:ad37e192d0d5375f48064a5ad6a0c3658ff5438e + pristine_git_object: e642f971bacfad9e4b23959b7ba033e4508e3318 docs/models/architecture.md: id: b8d52e1654c4 last_write_checksum: sha1:0bd9cc05997d16f001166a012902211783c24264 pristine_git_object: 342542484892f40ebac8a4113f6016114e16f3ee docs/models/assistantmessage.md: id: 7e0218023943 - last_write_checksum: sha1:79480b70e560f69bbf160f5d73854f14b9de1a80 - pristine_git_object: fefb42063808dd14e8937a53685b13de12903f27 + last_write_checksum: sha1:6d1369ead637a330e1a04008a4f25686c166b188 + pristine_git_object: 2d57f04f45df82822c613183b493ab060d2106ca docs/models/assistantmessagecontent.md: id: 9f1795bbe642 last_write_checksum: sha1:4239958c4e27af3c7e5007f1215f811a962e36dd @@ -107,6 +131,10 @@ trackedFiles: id: bb5d2a4bc72f last_write_checksum: sha1:3848d540d6b9b85f6ea05e1698dd7b661eac93fc pristine_git_object: 7f02f827cf3e2368e90b4bba7aafa3719dccf4c2 + docs/models/background.md: + id: 3b0fc0aed098 + last_write_checksum: sha1:661ec7a0314e15f771520cc83a0b1abf8c193db8 + pristine_git_object: 1f1ea308dd50dc34e21f6e957fe491b0611c2b1e docs/models/badgatewayresponseerrordata.md: id: 15451fc8cf63 last_write_checksum: sha1:7d1bd0317b5d98eaf83c5d46b9feca3f7f0b0d59 @@ -117,24 +145,32 @@ trackedFiles: pristine_git_object: 84693b01441744a1f1ff1f663d03bed57d5d3c49 docs/models/by.md: id: 197cbd9579c6 - last_write_checksum: sha1:f76a32fe44b8bad9178da6f7c7d60cc55804b97d - pristine_git_object: 8e95225b33f27c5c4b0f2cb8f80bcb41c1f0501b + last_write_checksum: sha1:199f9dc29475ad082d7e6bcf15e316ba1e05045c + pristine_git_object: 34fc3e7f28c01b3e098cd89fd1c07ff0a8ef17dc + docs/models/cachecontrol.md: + id: 400a7240e8c2 + last_write_checksum: sha1:02df8704e1de84bc6d42332d837844a2e7d99a2f + pristine_git_object: 6b395400e0e274e4f14d618ee67b6d802c968a9f docs/models/chainid.md: id: 9136f718f4f8 last_write_checksum: sha1:795deccf3a2947bd47f6ae9efbfbbebeea6eb01c pristine_git_object: d7ceb6611e9cdb38186a504fa4f6b01226de1822 + docs/models/chatcompletionaudiooutput.md: + id: 949ef77423f3 + last_write_checksum: sha1:12875e48574630dec1e0e2f150efc57526176a03 + pristine_git_object: d765e7842aa38acae997c1debb5b6268a490ebe5 docs/models/chatcompletionfinishreason.md: id: 586041c9ec02 last_write_checksum: sha1:44e626b5da7ca77d5771fb6a5558931265ba8580 pristine_git_object: 8c39f973adcc92ce38497cd05bc2b7e4d246eccc docs/models/chatgenerationparams.md: id: bb3446bdc077 - last_write_checksum: sha1:fe3ffbbdf176de4168f9486299f6b8e2c2736ef2 - pristine_git_object: c79297696743c4581780e9bafe5bca0309985dde + last_write_checksum: sha1:232f2bc7e38be3c987258e9d0d3e1ed503a46fab + pristine_git_object: 4f8bfe586371470f5e471004ffba992f7ff7cfe4 docs/models/chatgenerationparamsby.md: id: e6ee58ce066c - last_write_checksum: sha1:bde6c752c109deb4c3b4e1e620e659cfc076ddde - pristine_git_object: 775431756fc354007b0152cfbbf83fd97cef7198 + last_write_checksum: sha1:c060802cb4004d1e8170bbce71c8b8ab316c6927 + pristine_git_object: 94d93e32e35848d21ca919a0163882b9f1ecb5df docs/models/chatgenerationparamsignore.md: id: 8e90bca6b12a last_write_checksum: sha1:3e46d99acc0ff9d7de8d7bba2824d6b2b8e3a6eb @@ -163,6 +199,10 @@ trackedFiles: id: 83e3a7365cc3 last_write_checksum: sha1:41ac18ab91d2d547ec428f72c93cb406a0a1c1fa pristine_git_object: bc272191873753c1d3369a4f3ef41306c0c8a544 + docs/models/chatgenerationparamsplugincontextcompression.md: + id: e2bd418965b7 + last_write_checksum: sha1:04924611fe3ae6de07deb77f48999c78a4563a19 + pristine_git_object: 703c17ae91c5e9e3c226d06ee46d2a4e5cc5d03a docs/models/chatgenerationparamspluginfileparser.md: id: 600ec63a57f7 last_write_checksum: sha1:09829a43e23c51c19250f38550ec447ee4f4b2c0 @@ -177,36 +217,36 @@ trackedFiles: pristine_git_object: 7688b175bea6007ec0343537c984458cdce814d1 docs/models/chatgenerationparamspluginunion.md: id: e0e521e5432e - last_write_checksum: sha1:68ceb4389dc4d58eeaaaff1bc7ca77aabdc1e294 - pristine_git_object: fcecb0aba42cabb6aa43d1f251397e3f77309dbb + last_write_checksum: sha1:5ff95a743766668dfdaf63d389f985c880b35a73 + pristine_git_object: 18f608e4a3a9831493ee25c0a4a60f3cff2ab76b docs/models/chatgenerationparamspluginweb.md: id: d0d73d469fd5 - last_write_checksum: sha1:1d9b501d38f404c0a4d2bc71f3fbd6af9cf9fe66 - pristine_git_object: cd592c9ec6e98fba491172160b84a7f8cfc722f1 + last_write_checksum: sha1:34300fdf3a66b9af091d06b465de6b3f218e411f + pristine_git_object: 0ceb10c881ac69bc2138ccf8ede2d9518dc7382d docs/models/chatgenerationparamsprovider.md: id: 53100e96f9b3 last_write_checksum: sha1:b74cfbb32881d7d8daf477016b1ac3aa9177d74f pristine_git_object: 5e19af77045dd4b6e4c37d26b9737fd578d5bbf7 docs/models/chatgenerationparamsprovidersort.md: id: 4a9d5832e067 - last_write_checksum: sha1:e59f556279035757372c8ce5f901ca589dbf7bd0 - pristine_git_object: 49d01bd7be211abde1e1c0983d03465ef1bef861 + last_write_checksum: sha1:24d833ac6f271c8dff0683d88787ef2e0f19d789 + pristine_git_object: 9ca87dfedf04537e4926f6209824eeecab4b4d24 docs/models/chatgenerationparamsprovidersortconfig.md: id: b3cf60c0750d last_write_checksum: sha1:317bf9fbe1722530e4296fe2f370474ba6560c34 pristine_git_object: 6fabc8e68ccebf055c9f4b129081c4f273775169 docs/models/chatgenerationparamsprovidersortconfigenum.md: id: fe34c7066332 - last_write_checksum: sha1:cd0a294bcf8620af28b9d240da90e19685cfaa06 - pristine_git_object: a194eedc46e79a127ef3127f2a582241d4925554 + last_write_checksum: sha1:f2c379c8907487769094063ba0a74ea2ef025f1c + pristine_git_object: d7335a92f4155f8012b1de5d5bcb76f31dde4b5b docs/models/chatgenerationparamsprovidersortconfigunion.md: id: 7ed8535c0167 last_write_checksum: sha1:d6857aa4d6a3db20b6f49bd1ff11961e95f2e623 pristine_git_object: 9c9e2bdbd1d0a44d411857ac40efc3e55f8de167 docs/models/chatgenerationparamssortenum.md: id: 90d490370327 - last_write_checksum: sha1:c76c151e30c91e1ac9871951ca3be450857894f1 - pristine_git_object: 586baae6e7f15c34aa2a8fd6aa056c624f38ff19 + last_write_checksum: sha1:5e337339f15eb975c42a4e4cf3035025cbc09114 + pristine_git_object: 713b750d8a2b8643ec59b60a9d70af9be3403b1b docs/models/chatgenerationparamssortunion.md: id: 9fad910ac1d9 last_write_checksum: sha1:013faf67ad4629b78434266a2eba1be5da699814 @@ -215,14 +255,22 @@ trackedFiles: id: ba491d2073bb last_write_checksum: sha1:7f9af19cadeb77c2d319157de92ee9c4d2fcb14c pristine_git_object: 62191c84b075653224bc35315f1f028c7f8b7f25 + docs/models/chatgenerationparamsttl.md: + id: 3ac183513176 + last_write_checksum: sha1:b8b01ddef74ed5710e572555530897974e01c8b9 + pristine_git_object: 12b1bfb7d829051fd3efaf2c87d11326572cab1a + docs/models/chatgenerationparamstype.md: + id: c42582f4690a + last_write_checksum: sha1:25d0fed91968474e813e07d88b6838238cd96f45 + pristine_git_object: 6644af9e1bea8bd3e5e89d7385412e9e2eefb0b0 docs/models/chatgenerationtokenusage.md: id: e19063b1bf4d last_write_checksum: sha1:972fcae6f5f46ac450ddaf10cdf098ef17e156ff pristine_git_object: 8b5bd765193cd052ba5798dda01da7fc0bb7127c docs/models/chatmessagecontentitem.md: id: 4e59fab9efd9 - last_write_checksum: sha1:fc44afbda59b46caf1f201c563c7f6b6ffd36510 - pristine_git_object: 60b3ec3fe06be1f7d72863188439b49572d031b8 + last_write_checksum: sha1:2e290aeefb70d2c1330719d58fd9ff8cc84b0af3 + pristine_git_object: 22d53850ffe471c23f37fa4290d36a1ffa9e1193 docs/models/chatmessagecontentitem1.md: id: f2881fb1f290 last_write_checksum: sha1:d9a46a8c31f9fa362f6b41fef52882c58ad8e1c6 @@ -241,12 +289,24 @@ trackedFiles: pristine_git_object: 8b322e992781ec9ac3cae0179093cfe960cd6dd8 docs/models/chatmessagecontentitemcachecontrol.md: id: c39918266a37 - last_write_checksum: sha1:5bc0a8e326f09695cd18a78ca363aee509d7be64 - pristine_git_object: 7af306bc63bdc12425deb60b4ce291020d5c49e6 + last_write_checksum: sha1:ad73d2752893fe03184a1d68fb7bfc789f02f452 + pristine_git_object: af289c081a24742bb8f21d9dc22c7250767ae919 + docs/models/chatmessagecontentitemcachecontrolttl.md: + id: 80fe75b59524 + last_write_checksum: sha1:75a0b92c30032b678af51b735acde249af3389b8 + pristine_git_object: 35793d8545c1752e06e33c3744403cc11e920a2e docs/models/chatmessagecontentitemcachecontroltype.md: id: 284323c24fb7 last_write_checksum: sha1:1ada70dcd1b95d01eae4a15eb15a7f824f607221 pristine_git_object: 9fa295c5718f4e3ebd74790fda55e362253bd05e + docs/models/chatmessagecontentitemfile.md: + id: ec2b68f01bff + last_write_checksum: sha1:720b28752b681211686eff94441e63730109da74 + pristine_git_object: 62fcd17c10aa796808190160a37e96195b9ec92c + docs/models/chatmessagecontentitemfiletype.md: + id: c7aaa02dbeb7 + last_write_checksum: sha1:b65551630891d1819fc90cf90034e34949b6b0fd + pristine_git_object: 5f0961a9197875e267962203e0c96de55eea3b44 docs/models/chatmessagecontentitemimage.md: id: 1667af650eed last_write_checksum: sha1:fbfb3b0141e9691f1b46d72c0363d7a0d33b1fbc @@ -285,8 +345,8 @@ trackedFiles: pristine_git_object: 9062deeab754e8e7ea12dfb5ed1eb5abb84f7fa7 docs/models/chatmessagetokenlogprobs.md: id: e987211f8936 - last_write_checksum: sha1:44c3ae9877d0fd848fc7c6fbc407e39a6686bf93 - pristine_git_object: e125f27d0ec978467f87c157f80f08e349dfc4a7 + last_write_checksum: sha1:e2b506f3b6a345aa4ae812efbe60fa130de5339a + pristine_git_object: 732a08c6635b39f8bcdc984c3a26e3768458c816 docs/models/chatmessagetokenlogprobtoplogprob.md: id: e0875b3ca7c0 last_write_checksum: sha1:687f38dfac49d7f7487cb96c33f6a05e96db665e @@ -305,8 +365,8 @@ trackedFiles: pristine_git_object: 527e75da63ec5798c87246bfb7888a0ff5d78c1a docs/models/chatresponse.md: id: f59beb8f6c98 - last_write_checksum: sha1:718447999bb52bbe93236d5540bdd3f2f4baa942 - pristine_git_object: 89d69ec1f1fd49bf0bf0b38eadfbc13e0a06199a + last_write_checksum: sha1:bcbd2ca050f321f496a8dc1c23fe40e5ffc512d2 + pristine_git_object: a11c9bc1843eed9b24d718bb35948491058f1e11 docs/models/chatresponsechoice.md: id: 7248e25b3cf8 last_write_checksum: sha1:670b4402e0f31c29be3dafa681d5e8d9689f391a @@ -321,8 +381,8 @@ trackedFiles: pristine_git_object: c915f1ae7119ed5685c13000212253e03b6ecdb3 docs/models/chatstreamingmessagechunk.md: id: f904722b1ed6 - last_write_checksum: sha1:d5d8d2cb8039d976305286e8bd9ee7ef5bd3cc56 - pristine_git_object: 7cb663d9c5f93a7f1f366f2040a14cf58ce2dbe2 + last_write_checksum: sha1:8a66a182904046e54a706cab11d077a9d1ad3bf5 + pristine_git_object: 167fe829824765d313ee5b4f8bbcd79260c7f1bf docs/models/chatstreamingmessagechunkrole.md: id: 570be00c9576 last_write_checksum: sha1:8459b6f6c158102abd1204d73ccb1b0eed4717e8 @@ -359,6 +419,38 @@ trackedFiles: id: 72beafa9a4c8 last_write_checksum: sha1:ab7fd2fb62512d53b92921c238fa94460eb4934d pristine_git_object: f5a794e0d74f3ac046e339d3f12ac56e364b8c20 + docs/models/compoundfilter.md: + id: 627199c420ed + last_write_checksum: sha1:962b93f3a49a97912b063011837bf311ecddad23 + pristine_git_object: 34117bb825a00cd2a7a02a6fca13b27fae01def9 + docs/models/compoundfiltertype.md: + id: ef2e7d157a4c + last_write_checksum: sha1:4d1edac8493674cf4b3b9faf455b1ed4d95e9742 + pristine_git_object: 2e01022eace954d6cb539c11522469192118c734 + docs/models/conflictresponseerrordata.md: + id: c41b32b38525 + last_write_checksum: sha1:b6b9961b8d49b1e3271953aca606ed3f5e35dc80 + pristine_git_object: 1a8c387fbe2a0ab6ae27abf5d8e667f131cebb26 + docs/models/connectorid.md: + id: 29d30b8a8e3f + last_write_checksum: sha1:81adc96cf3c1239cda49a552d37fa64fa097dfbd + pristine_git_object: f69435e002ac26e31e170d90437af19253dce2c8 + docs/models/container.md: + id: d907521490d4 + last_write_checksum: sha1:ffcdaf92e947f03903955242ecfcad4dc20c323a + pristine_git_object: 399dbfe1e9e176f8450afa69922ad0628709d655 + docs/models/containerauto.md: + id: 9e3854e3f695 + last_write_checksum: sha1:f91f7657994119efacb99d6ce95c84c95e5c8cc5 + pristine_git_object: c3849da3cc46269fc62bb33bb22d42ea312c5670 + docs/models/containertype.md: + id: e49331791929 + last_write_checksum: sha1:20ad66281225915ab779d00d5566addce4dd498e + pristine_git_object: 4b56db201b3ae06afe6bd3659ca0969f4dee8074 + docs/models/contextcompressionengine.md: + id: c70d46632a91 + last_write_checksum: sha1:0b4ceaf9569f9af29844ed5a324f886daf7bb70d + pristine_git_object: 52167978e886bfda0a13c99624e3d828806b0d35 docs/models/costdetails.md: id: 35e3d2efb6b1 last_write_checksum: sha1:8e70b5ef0b5ff86b63dd487ea4cbabe9e4488c71 @@ -375,14 +467,22 @@ trackedFiles: id: e9b57ccc9d48 last_write_checksum: sha1:445fff3f319baebba4dedc12725cd146cdc1bc19 pristine_git_object: 0fd355ae0d8d2d65c4463d5dad5aac537cb5828e + docs/models/datetimeservertool.md: + id: b02ea2e59c87 + last_write_checksum: sha1:fcd25cdf0c3997bad2021f3002a558f6adc51230 + pristine_git_object: 48e62c405122597a6b5823f5f0a21ed6aaf2287e + docs/models/datetimeservertoolparameters.md: + id: d6eec048a057 + last_write_checksum: sha1:82ffcf0abd98727c87bdfad71460c1c77cc0cd2f + pristine_git_object: 885b1342f492a4ee0c3d2a7160d168af3465f3d6 docs/models/debugoptions.md: id: ebab350e870a last_write_checksum: sha1:a1f77a84d743b9b3f4135a178df9c9998b4224fb pristine_git_object: a32e2f497a9e49c4171d83b6aa7c6ae80b386c25 docs/models/defaultparameters.md: id: 91207995478e - last_write_checksum: sha1:d8d874b2c673e3c994fc31914592baeeba373602 - pristine_git_object: 9a80e9d9bf49674f4c490852fb37761d32c90497 + last_write_checksum: sha1:8aead0a16b750025f3e18b89d01ae1e4656272f1 + pristine_git_object: 2f1254ed0b2b36b3bec078d9e424f15ebfe3997c docs/models/developermessage.md: id: 2a6952605f1d last_write_checksum: sha1:abc5d7c2036ed534067a88e2ad200d2caed18c9f @@ -403,6 +503,10 @@ trackedFiles: id: fcbb5455c001 last_write_checksum: sha1:e9daf88d4ef1b012a12b901aa68aeafd081b700b pristine_git_object: 9ecd2701ba2938052faa99415a3e52e19aac2ba7 + docs/models/environment.md: + id: 6a34665c56a8 + last_write_checksum: sha1:bfca92b3ee992204736d483533b5d48048341c37 + pristine_git_object: 466e048f5870b2d9c3a40587afdf2b624e219909 docs/models/errors/badgatewayresponseerror.md: id: 0abbce1892eb last_write_checksum: sha1:eee3402a9874f0715c05cc9d7e05fb12f3abe21b @@ -411,6 +515,10 @@ trackedFiles: id: a4d74f0d0bb5 last_write_checksum: sha1:5af65d54698b0c919d4543605c48a51c87cf3c23 pristine_git_object: 344e10a91bc613a9692f15491788304a9c2d1b7d + docs/models/errors/conflictresponseerror.md: + id: dfa7a1e4c341 + last_write_checksum: sha1:685c60ee01bb3fbfd69aa101decbcdf9166472e6 + pristine_git_object: 0ab1f6283950af9e7d9243d1ffcb22a759a90954 docs/models/errors/edgenetworktimeoutresponseerror.md: id: c59578401a13 last_write_checksum: sha1:b3e22fe213270e8001d99fa00f55f42f61fedea4 @@ -471,14 +579,46 @@ trackedFiles: id: 631b7692556d last_write_checksum: sha1:86e5dd38e3b26b0238814697cb6ce5086f5963cc pristine_git_object: 1401b28fe26e4bfce1b2e72765d431185f919ae8 + docs/models/filet.md: + id: a3e5d1b56bb6 + last_write_checksum: sha1:a24284687f9cb271852b26a4e2b9e4be3cd0c597 + pristine_git_object: 5a179500118afed0663a9d98323d84fbf1c15052 + docs/models/filters.md: + id: 1370bfdd2199 + last_write_checksum: sha1:93856a6ed0b6fcf03b4cd21a5d1f31edc80457bc + pristine_git_object: 654ebc527fa8631253bac900aa5b2fb2b098d229 + docs/models/filterstype.md: + id: db98c2c52aa6 + last_write_checksum: sha1:1a8632935b28b389363195dcc5eb43d37ce2f635 + pristine_git_object: 4022dc5d7932a6d085786e5fbd3a894e04e3a403 docs/models/forbiddenresponseerrordata.md: id: dcfaa46a8072 last_write_checksum: sha1:cbc76d78110922926f151f33e467c2b9821fb505 pristine_git_object: 35682871fd89355f201cd3a4fee14d6e86c39405 + docs/models/format.md: + id: b5610092256d + last_write_checksum: sha1:5283b707d7844d8c8c9acbe3c1867f16b873a556 + pristine_git_object: 9eb17e0b444ea849e508a97faecc627b2f97ea94 + docs/models/formatgrammar.md: + id: dbda5ad4fee4 + last_write_checksum: sha1:daac2d887a5d63050e180b847137cd453f284604 + pristine_git_object: ee56de30d84e97a6d6d719e35380551cebd12d68 + docs/models/formattext.md: + id: 0ae418225de8 + last_write_checksum: sha1:02ca8658ec162050be0f26775259d35559f5852a + pristine_git_object: 416429d8d86b2c3c628142eabb813bd82c7331ad docs/models/imagegenerationstatus.md: id: 3d5a75816868 last_write_checksum: sha1:0c95ad71f4207dfb87bf19129d84b06e4d3cc7e1 pristine_git_object: e302b7849859fdf85389980aa95ce1ab12ae05f7 + docs/models/inputfidelity.md: + id: f19e94e3f06b + last_write_checksum: sha1:a244dbbbc2f742d40162e4d9d4ff4692c058f9ed + pristine_git_object: 35299388222a054f35d6b7167d6417dac603348f + docs/models/inputimagemask.md: + id: da2fa5a8c52d + last_write_checksum: sha1:5bf96254cf2126f784c49c63a4007943a2085fcd + pristine_git_object: 37eb5a598b6a3d767520af4585880aa62cf7ef4b docs/models/inputmodality.md: id: 4f5310c12bd7 last_write_checksum: sha1:c9ce83fceb1507d9a18af305456a98cf4eb0f173 @@ -503,22 +643,22 @@ trackedFiles: id: 538591337ba9 last_write_checksum: sha1:555c569b345924d6219465cca4593fd210b6a832 pristine_git_object: bc31945779c3be0faf2bf6d8106870b5f0a2e3d6 - docs/models/logprob.md: - id: 5a2841eb9a83 - last_write_checksum: sha1:0afee55ce697e0a37bf0f144ccc90baf49e88e2e - pristine_git_object: 3ba44ac20d009c1d6249925ed2d328f615d4b882 + docs/models/memorylimit.md: + id: 811cdcd7930f + last_write_checksum: sha1:19b1d50b4dca7b6f2c8ed38ac52f660d6f7c6bed + pristine_git_object: 961f646a7f9a709cf7aa069383ef1580fc475051 docs/models/message.md: id: a9614076792b last_write_checksum: sha1:6f2e98d851ee1b90a1316b6db411d5aa0a80afed pristine_git_object: 351b6c0eaac29d79341b3b658fa8ee816ef78271 docs/models/modality.md: id: bf9d60290081 - last_write_checksum: sha1:7aedfc6c59f0ecc8bb5ee91c0d0a14f4270d01cb - pristine_git_object: 81727872b2ab71047358eedf339f81f53ed17bcd + last_write_checksum: sha1:60d57e4430cf8ed3e24b5302a46469e9117ac3b9 + pristine_git_object: 7efa7059f95750a8161c0a67fc2c1da280341c6b docs/models/model.md: id: 66e0236ac289 - last_write_checksum: sha1:eb75b1300cfe9248668c8a0fb9ae8ecf2c5dd7ad - pristine_git_object: cac0629ab55781d3c287887f5c29a5ee06168c88 + last_write_checksum: sha1:8b8ab26b7e950c859dc5ef3de05709f5f8ab7980 + pristine_git_object: 41ae5101981033da8558be0d3a38cfb461f32029 docs/models/modelarchitecture.md: id: 7eab960e8441 last_write_checksum: sha1:b0fc4a5562c42268752c5da883ccba22e8294b93 @@ -527,6 +667,10 @@ trackedFiles: id: 9015c2ad9d20 last_write_checksum: sha1:9cee981c94ca9fd86b339563467f3be353bead3c pristine_git_object: ca31383d10a318b7a38ac476d6b1b686e4baa401 + docs/models/modelenum.md: + id: 2d6430130374 + last_write_checksum: sha1:d7b55062c1663240d3e1c525b27f47e4f07ac7f7 + pristine_git_object: 262038b879576394c9e91c3f81ac6e29fb9aad0e docs/models/modelgroup.md: id: f8bdc830b8ff last_write_checksum: sha1:80a1c46f7875d455e6ee0449faf5cc097967b331 @@ -539,6 +683,10 @@ trackedFiles: id: 62180dd98256 last_write_checksum: sha1:b647f2ce2c4b1f38914220821183e83e61df2a2d pristine_git_object: 30173e6226f406ac4599db10fb486904167e3805 + docs/models/moderation.md: + id: ace7cb4ee27c + last_write_checksum: sha1:bbff22cf8f44408d5c1f5af346cb413690596107 + pristine_git_object: 79f8ff00f192f9ade2886276ee4f8f515fe11aac docs/models/namedtoolchoice.md: id: a0833124ac01 last_write_checksum: sha1:347ba19079d1cd1bcb5e5f49fb13cb141dce6f20 @@ -551,6 +699,10 @@ trackedFiles: id: 21363922f4dd last_write_checksum: sha1:bb2b88b41dc3a3cc2291f269358da0808033ff62 pristine_git_object: 933269bdc278c78670b8a9d0ef9664261c546bf3 + docs/models/never.md: + id: cb9bec97a0d2 + last_write_checksum: sha1:8aa370da73c412b9a13cc0d437eae126c0e5a977 + pristine_git_object: fda3bdf69a1b5a69d7f0dcedb82f725fd35f11b6 docs/models/notfoundresponseerrordata.md: id: 757633dd768c last_write_checksum: sha1:c11ecb97bcefe57923f48599d0eeaa6ed34d750a @@ -585,16 +737,36 @@ trackedFiles: pristine_git_object: 6106247a1695fe59beaab760dba373884fe00042 docs/models/openairesponsesinputfunctioncalloutput.md: id: b2a4cbb737ba - last_write_checksum: sha1:39bc7f0a6e9effbbceaafa45cad84711b95f96ed - pristine_git_object: 1e95ba5bc0ef88836ff973fc7f75c443131a053c + last_write_checksum: sha1:211f806d66e37aa1ff8e7a296b21411a73c7adc7 + pristine_git_object: a2589e3d2fa1eb9e1abab8e00cfe86bbf189c6ae docs/models/openairesponsesinputmessage1.md: id: caecbbcf455f - last_write_checksum: sha1:8260aa48f3ff6339c2f90b95f0cc7fe7e35008aa - pristine_git_object: 2e34a547fd659ce6676f995656bfd0bab2885591 + last_write_checksum: sha1:916175f7559455d04e28e1d6e66cfc6b03f0102a + pristine_git_object: 541430d08771453c1dd6a67afc2b0b6404a401f4 docs/models/openairesponsesinputmessage2.md: id: 6a4753605cb6 last_write_checksum: sha1:a57dd8827527ed2b8d695e714e41ad31aa70e29d pristine_git_object: dc2a5dcf58ce764b6661ed51b720bf3c262faa24 + docs/models/openairesponsesinputoutput1.md: + id: 47761a04a867 + last_write_checksum: sha1:7c342d56200503b8b590d49e995aa9e7512dffcb + pristine_git_object: 785eebdab68a9f6a1db10fdf186556fefb33d9b0 + docs/models/openairesponsesinputoutput2.md: + id: f137245fa948 + last_write_checksum: sha1:f5a5f46ba28cb7f7d7bdf6ab97abd6fea870631a + pristine_git_object: 0cf26c74ea29c70544f11c3d727ba8666d10dd74 + docs/models/openairesponsesinputphasecommentary.md: + id: a83c37c3a252 + last_write_checksum: sha1:d3a74dd05adc955049145d7f32af108072189d41 + pristine_git_object: b2aa47be01892e8729f8a4447afd85362a15c85a + docs/models/openairesponsesinputphasefinalanswer.md: + id: a4054e3be63c + last_write_checksum: sha1:4502222fdb7b8d80b16093f2f1dec9361434a15d + pristine_git_object: fd4df6b8da22ce748e6835bd083f7d66acfa84be + docs/models/openairesponsesinputphaseunion.md: + id: 79196cde0c72 + last_write_checksum: sha1:540b30e8eca8e238d7b88c84b7d1363215dc6f5f + pristine_git_object: 11a00d11372eff0943c794967f6b557b4af7a026 docs/models/openairesponsesinputroleassistant.md: id: f0f6aca6a77f last_write_checksum: sha1:cfca5c8ca1897d834b654e95edaa033ade30c8ad @@ -653,8 +825,8 @@ trackedFiles: pristine_git_object: fdb7bd5f1df4f238ea09791442474caaeb8a86a3 docs/models/openairesponsesinputunion1.md: id: 8d9889e1e2bd - last_write_checksum: sha1:621e8391e3450b3e115a7803732f607d84aa1b08 - pristine_git_object: a47c9dbf2ad55ccb2b4eee52b121b96cf748c1a6 + last_write_checksum: sha1:7abae6bf9f6905bb50071d150405cecf2d72a3db + pristine_git_object: 5d6bdf26fce039392d9eff685808e992c6246fe0 docs/models/openairesponsesprompt.md: id: 6ec9959c8df0 last_write_checksum: sha1:bc4315a22e5f1761b1b482750ea4f784b7575f2d @@ -719,10 +891,26 @@ trackedFiles: id: 8b8c4dd661e0 last_write_checksum: sha1:a4e5c64a3d7ed9f32221a22031c373af63048dba pristine_git_object: 76ff2a11e013076db454e95be5720f0735f48413 + docs/models/openresponsesapplypatchtool.md: + id: 0d01f586fc9a + last_write_checksum: sha1:1f98b26aca800906bbf799693d579a9522f2df2b + pristine_git_object: 9a72c508ae4aa42ac657ea067172936ab0ed73eb + docs/models/openresponsescodeinterpretertool.md: + id: 5741a1884b43 + last_write_checksum: sha1:504a35d0ae0677af2c559b25368d23f3adabb70e + pristine_git_object: 9d3ad62ea4aa3d00ec6b20a7c6fb8133652f3b7b + docs/models/openresponsescomputertool.md: + id: f43de9eff83f + last_write_checksum: sha1:e1ff1915eb72732501b40360eed6112b1f92c414 + pristine_git_object: eaed857fd586fc9a66387e886530e35eaadd7d6b + docs/models/openresponsescustomtool.md: + id: e571ceaafa78 + last_write_checksum: sha1:ff084f08639ffd826087775c4e84754c9cbff5d3 + pristine_git_object: e91d343fe3567daffc64ec736c4d0f1b9e5d360e docs/models/openresponseseasyinputmessage.md: id: adc7a69b8fce - last_write_checksum: sha1:a1913dca348a4e75579e5707fd61685985e42eed - pristine_git_object: 98941cc65573e1cad8a6eecf5327eafb61ca151b + last_write_checksum: sha1:78256b52255298fde679d453c7486766b156186b + pristine_git_object: 2238757d8f8a661a33a7a68c6518fb90a752188e docs/models/openresponseseasyinputmessagecontentinputimage.md: id: f7e2ecc93999 last_write_checksum: sha1:9a46ccdefddd2902b7aa40590818eda2443a1120 @@ -733,12 +921,24 @@ trackedFiles: pristine_git_object: 07d8e7cdcdb4c7ea5a2c9d2ac88c8145514e9a58 docs/models/openresponseseasyinputmessagecontentunion2.md: id: c52981ea58b6 - last_write_checksum: sha1:7cc465aad38312d8073a22de702889f1d6e59a62 - pristine_git_object: e535b1b4806ea678681e82eb27ab1ecd697f29ca + last_write_checksum: sha1:8eaf1b6b743069ba47158d27363d966f54841e48 + pristine_git_object: fc9c0cc8900962851781fec881fc0088a1036f9e docs/models/openresponseseasyinputmessagedetail.md: id: 069deae7def7 last_write_checksum: sha1:9fc1b8f628b71f6f24a49eeb31109044a533d2b1 pristine_git_object: b5fbf956996b3f2d6ccc73ef2c573d2b05c58c33 + docs/models/openresponseseasyinputmessagephasecommentary.md: + id: e0c6eaac1ce1 + last_write_checksum: sha1:d94924a7319674581a2c3a5167bb715a650455ce + pristine_git_object: d4409ea670902a13d2d0b557181fa2d48a785d2b + docs/models/openresponseseasyinputmessagephasefinalanswer.md: + id: 0cf77635dafd + last_write_checksum: sha1:091e06a5c46f1ecc66a71cba7c93a22842ae3c28 + pristine_git_object: b5b5669584e8da97b507a24d6335096410946b9a + docs/models/openresponseseasyinputmessagephaseunion.md: + id: da174bba1564 + last_write_checksum: sha1:97e2b2903e255aedf5a22d1fdf810b2800c7f6e3 + pristine_git_object: fba351e57ce73dd187f276771c7f4584618e6adf docs/models/openresponseseasyinputmessageroleassistant.md: id: f355d4b1ce01 last_write_checksum: sha1:2d58ab82959697ff0bbd5b01c767226b42429986 @@ -767,14 +967,38 @@ trackedFiles: id: 73d189c27d1d last_write_checksum: sha1:8802680fc643016a1ef21f46f8cd7d0d64ca071f pristine_git_object: 2f7c6c1c28b498604b61752b7964f308933d1f5c + docs/models/openresponsesfilesearchtool.md: + id: 484cea07957d + last_write_checksum: sha1:9b0016ff4b909cb093f31f38876246b887e41dbb + pristine_git_object: f40c21aac216e1d6b6680b24f2a27534793aeaa2 + docs/models/openresponsesfilesearchtoolfilters.md: + id: ad07dfb15b79 + last_write_checksum: sha1:953092ba9a596f45a0044a7042329964d569d17e + pristine_git_object: b4a0adf1776f7f3701a17ad8633cf71e24ba9cc2 docs/models/openresponsesfunctioncalloutput.md: id: 596fd5b27be4 - last_write_checksum: sha1:13a39da7aaf57b6d372b90e802ce440dc2404174 - pristine_git_object: a4ce7a72e94278415cfa28619394f2ad351e8afb - docs/models/openresponsesfunctioncalloutputtype.md: - id: c55b88923db8 - last_write_checksum: sha1:af4a934c5a8dc10bd16874e044c1f2e04482d810 - pristine_git_object: 78a849bbc1e8d4ffb2d3cadcdf3479a1b37378a4 + last_write_checksum: sha1:3d299c7e3c90b8aea39c21c701fb4f0003a2aa92 + pristine_git_object: d5836a48c7f681e294d7e9299481b06a860fc69b + docs/models/openresponsesfunctioncalloutputdetail.md: + id: 6d7280a70827 + last_write_checksum: sha1:2fc25edf233dafa66c5e940692295d38915a1fe0 + pristine_git_object: 8c2d634c78107c0f85356739d711f846534d13cd + docs/models/openresponsesfunctioncalloutputoutputunion1.md: + id: 0f44724cd908 + last_write_checksum: sha1:66b06c7a856f5965ef3e7628a55fe415a5e367a2 + pristine_git_object: 8f015e8fc638186fe6a84791a752754b2b80f14d + docs/models/openresponsesfunctioncalloutputoutputunion2.md: + id: 54d4f2e33bad + last_write_checksum: sha1:d3c3701ea2e67bda50725a0c7a769d1971453270 + pristine_git_object: e8f36d41ecc51e274d72ad1100346ef26bf4eedc + docs/models/openresponsesfunctioncalloutputtypefunctioncalloutput.md: + id: 2fe37cbfe4b7 + last_write_checksum: sha1:3e5c8269ac5e3ebbb1afc45ee94681bed80e99d9 + pristine_git_object: 526ec8de5b52bc293c798783945f4b03351c3923 + docs/models/openresponsesfunctionshelltool.md: + id: 2f7c54d54ebc + last_write_checksum: sha1:ae828f3d21be325155d143e94162cd4e676daa53 + pristine_git_object: 742417c13f82f30e1be349b60813fc4ab6bcfe54 docs/models/openresponsesfunctiontoolcall.md: id: f6abdce2bae7 last_write_checksum: sha1:2cf1264e2883b0471326c3bfe391d4694947560e @@ -799,18 +1023,30 @@ trackedFiles: id: 4ecae6993d63 last_write_checksum: sha1:20fc8b70b5ae3237fa70f0b1c855081b83cead18 pristine_git_object: 78fe0e8d03fedaf81689cc0e743aaffa27b7abb0 - docs/models/openresponsesinput.md: - id: 887417c13685 - last_write_checksum: sha1:5c1aacd7f8a99b05745e9249f6831a762f138551 - pristine_git_object: 379d091148e86055f2d70dd874874e19f4d31580 - docs/models/openresponsesinput1.md: - id: 1c2b0af8a69d - last_write_checksum: sha1:f23219b26048dbef8bea56a734d0a68e3e8d01f0 - pristine_git_object: 69c3aef479a7f82c847a96e5bd1ed6a71459f816 + docs/models/openresponsesimagegenerationtool.md: + id: 0f48dbd25cc5 + last_write_checksum: sha1:80c8586b823dc69b7712e2d47bc3db639e8797f3 + pristine_git_object: 6ab5b064d6a6a25a371d9a197c66fd17aba6ff5a + docs/models/openresponsesinputcontent1.md: + id: d4a6083c8921 + last_write_checksum: sha1:aee8f97a3e3005e435723811c6401da69b2d5abb + pristine_git_object: f7fe8fc1db546c587e7c57e853c895cf393a3259 + docs/models/openresponsesinputcontent2.md: + id: aa5e744cc715 + last_write_checksum: sha1:b8b5efcaa5121cdd1387385b87fe8a9011fdbd2d + pristine_git_object: babc3b9014b22d5489a3a9a15421175727bbd465 + docs/models/openresponsesinputformat.md: + id: 4ef18f292be9 + last_write_checksum: sha1:be313bbbaf8c8b5764e00ef8869fb0c5c96d2840 + pristine_git_object: e0db48f960bf51a013bc30680d5b7c9547867e63 + docs/models/openresponsesinputmessage.md: + id: a0418be33150 + last_write_checksum: sha1:18ddb492092feeff568c24f4c5ebbd962bea1164 + pristine_git_object: b738bf487f5dbd5cf40084ca676e495014dc6d5a docs/models/openresponsesinputmessageitem.md: id: 3c300aacc4af - last_write_checksum: sha1:c15ce1231ca81255b857d01d82c84eb0f8cc6acc - pristine_git_object: cea2a8277c84dd35c790f6deb6592a1574c60e31 + last_write_checksum: sha1:b373ba6f758de2f5738cd1b1cac13a547b13f05f + pristine_git_object: c1a851a1e33cc5dbcd0e5f08e98aaf452853248e docs/models/openresponsesinputmessageitemcontentinputimage.md: id: 4301bb16e51e last_write_checksum: sha1:fd767ef043d9de5e64b9c32ae32778fffa32f789 @@ -843,14 +1079,86 @@ trackedFiles: id: 1fcd16e8ac95 last_write_checksum: sha1:bc280ddba584d2aa5a0837031b55ff470cf7bed9 pristine_git_object: be978ccbdecc45bd79214fd2db7547e8637c8103 - docs/models/openresponseslogprobs.md: - id: e0a6e43b0b8b - last_write_checksum: sha1:8c2e618697b6c0401e9ce3d01614e49d8def36fc - pristine_git_object: 378b69f703e65c59ff8b639ead80a32b3f7e4b4e + docs/models/openresponsesinputphasecommentary.md: + id: ce4cf44774ef + last_write_checksum: sha1:7d3ceb84436979d245412a2bd301418dcf864a83 + pristine_git_object: d68ba8b8e254e89914748d65e546693dc07871b9 + docs/models/openresponsesinputphasefinalanswer.md: + id: 4a3d4ff4aba4 + last_write_checksum: sha1:34aec0c3d9d55ac49392d889291696edaae86753 + pristine_git_object: e403d80a694fd9215026b8e1ab940a991bd69b30 + docs/models/openresponsesinputphaseunion.md: + id: 4c18f863938f + last_write_checksum: sha1:d547edad6d2cceea52dba915de7954f9ce0cf6e1 + pristine_git_object: b164ab9c32bbf2942ba8616a0d7aa990517bf05b + docs/models/openresponsesinputreasoning.md: + id: 7e62a3c82dd6 + last_write_checksum: sha1:0ca0a9723657eb56f34e79fb2f6fee88fd4426aa + pristine_git_object: 4e88ff6e66675cb1049889ac3f4336803dc0e7e5 + docs/models/openresponsesinputrole.md: + id: 33554f08ce76 + last_write_checksum: sha1:08a720dfc8bf39c86a6ab45bf1d25666564c08b4 + pristine_git_object: e5a0e2d05237020ab80942ddbca32c7e3df36615 + docs/models/openresponsesinputstatuscompleted1.md: + id: dc2366a02c56 + last_write_checksum: sha1:26bca4104e6bb7645a7020e1c10769bcafbea82f + pristine_git_object: 4e004feace8b6c61742dadad8a33f2316198a845 + docs/models/openresponsesinputstatuscompleted2.md: + id: f552b46d7c45 + last_write_checksum: sha1:69d5da327505f2b0765fc99cc092ec98c4bf2605 + pristine_git_object: d966b1efa3160fe58ad93d68db73bfc26bd2446d + docs/models/openresponsesinputstatusincomplete1.md: + id: 780fd4ea50e1 + last_write_checksum: sha1:a64256160b3024a4174ab852440306511c4d7502 + pristine_git_object: f08d410dd595e5bb5746215b8450afbbff4f97d8 + docs/models/openresponsesinputstatusincomplete2.md: + id: 2d704052e78b + last_write_checksum: sha1:7b1dc2eb0fc8e29edf616c49d923401afb9d0c5f + pristine_git_object: 3278a25e93d35303742a8db190b8c8afac8d36c2 + docs/models/openresponsesinputstatusinprogress1.md: + id: 02cc465a80ad + last_write_checksum: sha1:44b034d9bdf24fbaa4274bc2ec1624d1c26fcb15 + pristine_git_object: ec941b902e22eac6fadfcb4c5327734213207a90 + docs/models/openresponsesinputstatusinprogress2.md: + id: 352b959fbc6d + last_write_checksum: sha1:126019d2e34a0189704d528d5694b981f6d5bf4a + pristine_git_object: e00a81b2ceb1668979d1fecd6f4066d624b7564b + docs/models/openresponsesinputstatusunion1.md: + id: 2705a629a3a2 + last_write_checksum: sha1:6a32cd2861bff1b7af40a8831cc7e9d94183f1f8 + pristine_git_object: 59ff97271c4da73fe05c0da0e4aea8cdeccb886a + docs/models/openresponsesinputstatusunion2.md: + id: a155ab4d54c4 + last_write_checksum: sha1:438792644fafe696d72ba0da6ea831c01a3d1a5c + pristine_git_object: e0580346d94c4cfc30e47a3fa18b929dbb909009 + docs/models/openresponsesinputtypemessage.md: + id: 3385c9780d4c + last_write_checksum: sha1:810c61ac47ade1c2e6bca7f924fa846697db3cc1 + pristine_git_object: bf35c8406011f27a2193579b2a16fd7a24909ecd + docs/models/openresponsesinputtypereasoning.md: + id: 7ced253f95ed + last_write_checksum: sha1:a26f9a645c2811dfc2f0011879b736dc4b3f3166 + pristine_git_object: 8bca1b667ead099b494e900ef1637b91e7dc0887 + docs/models/openresponsesinputunion.md: + id: 21f7565de750 + last_write_checksum: sha1:edc47196f3ccd0c69a0e20f001fcf54e6402830e + pristine_git_object: 160cf986828fa2df90d2038dee6c0c04be3c204d + docs/models/openresponsesinputunion1.md: + id: bd5a2db00b4b + last_write_checksum: sha1:6fa095023336d19ed1254e82544732c387d80d49 + pristine_git_object: 836bcb4141f1a47136eaef232e1d6febc02f31e7 + docs/models/openresponseslocalshelltool.md: + id: 51ff10fbe79f + last_write_checksum: sha1:a8afa90c7c5c54f2e1075fe26dea758af43de4e4 + pristine_git_object: aeebc9be4029cb1eca8b1a831b53c99b5af1c2b9 + docs/models/openresponsesmcptool.md: + id: e06a9023245e + last_write_checksum: sha1:1c932fc373603319b1818b557ab96683a67a05cc + pristine_git_object: 776f46ffb8d5d34099723b85fb2b1173167b027b docs/models/openresponsesnonstreamingresponse.md: id: d0ac728b4904 - last_write_checksum: sha1:1c37fae828ada0f763160afd9045d61fd7d72408 - pristine_git_object: 7a9ff6c578ddc49d7d944ced74ebe21f91914bb1 + last_write_checksum: sha1:b18a1801910e39681fb27bfe7a8035fafe7277be + pristine_git_object: 2247891f5de5423400406ea0ecf3227034654cce docs/models/openresponsesnonstreamingresponseobject.md: id: c11e5ad506a3 last_write_checksum: sha1:3a7405d64aa7b5c9822fd317837a3e813e3e0ad8 @@ -861,8 +1169,8 @@ trackedFiles: pristine_git_object: db249bb9cde891b24aa47138ab8288de2a7478e3 docs/models/openresponsesnonstreamingresponsetoolunion.md: id: db2aa3be7082 - last_write_checksum: sha1:e66d58d133751292456437d088bb82a49ff6c70d - pristine_git_object: 2ae4e46d1637548e919efc0fd2b0bc0f33382850 + last_write_checksum: sha1:b8cc67fc90e64b604028d064eaf2402cd853fbb8 + pristine_git_object: 5cb2ac773b6bbc1de238976e42e3c5ef32135bd4 docs/models/openresponsesreasoning.md: id: ce4f6ccc4d52 last_write_checksum: sha1:8911be839dc05015692586ecad6b0987a31efd74 @@ -917,8 +1225,8 @@ trackedFiles: pristine_git_object: 58b79f7952dde1e36fc3696b72a2e7d5fff2d06b docs/models/openresponsesrequest.md: id: 31fbfb05398d - last_write_checksum: sha1:5406f753b27db1d51d4869e0e291d9d6bfbb6f90 - pristine_git_object: 3134fc5600dd106c7deeb7dbd151500aaad87533 + last_write_checksum: sha1:b26d0ce2d9e3e18da76140aa8aa2b3fd5aa05918 + pristine_git_object: b31377c240163d70d1446c2dcc290af05015f745 docs/models/openresponsesrequestignore.md: id: 1a7632be7d10 last_write_checksum: sha1:c0e3072d51d1b5f00239a5ae9c2c79bf46da8e19 @@ -943,6 +1251,10 @@ trackedFiles: id: 06093724cf28 last_write_checksum: sha1:21792c84844bbf81c371f10ac3b9ceaed67ee88a pristine_git_object: 9d4f2c148dbdab7f92d7b8229064a97dd94bede4 + docs/models/openresponsesrequestplugincontextcompression.md: + id: b8d11e2968ce + last_write_checksum: sha1:ac5af325bf9df203b3922acd15db8be648c2e527 + pristine_git_object: 02523acb54799bb75b38c0af874e7418c19113cf docs/models/openresponsesrequestpluginfileparser.md: id: f5035f920ff2 last_write_checksum: sha1:47a5304db29ef1ca8267a5d74b5c20e080c9d7d2 @@ -957,12 +1269,12 @@ trackedFiles: pristine_git_object: 915847518314c82da5c93e2076c3b6db4791324d docs/models/openresponsesrequestpluginunion.md: id: 43ff38d22485 - last_write_checksum: sha1:9e32216e48d28d62b2a3491e3112f166d4427ee3 - pristine_git_object: ebf50062aae9875480fd776600184800679e0898 + last_write_checksum: sha1:b20c362f50391c57a4fdbbc9648049a786daef36 + pristine_git_object: 2a7b5e18fb40df64620f02db26054a2e96f9074b docs/models/openresponsesrequestpluginweb.md: id: 38282c1e86f2 - last_write_checksum: sha1:d8ae45bfb7704c835e01394807827a22b9a09c40 - pristine_git_object: 333dc3c779b7a07246980f0edb554299a3273a1a + last_write_checksum: sha1:eca9b82159bbef3b5f3bb268ea4b59f42ec9a206 + pristine_git_object: a43d37508e8ad0f8aafec3a1e0ea2470162674d4 docs/models/openresponsesrequestprovider.md: id: 73c771e9ab67 last_write_checksum: sha1:662c3b7ba7e1aa1ab34ab6e29e437e540556808b @@ -977,8 +1289,8 @@ trackedFiles: pristine_git_object: ca21d15d593eb8d31d71c3ead288271887bab88c docs/models/openresponsesrequesttoolunion.md: id: d372a31e11b6 - last_write_checksum: sha1:bec88093100fdc93195e221498f91d4bc82cce23 - pristine_git_object: bcdfa06a6e4afbefcf808ccbc7d96b2424047f8d + last_write_checksum: sha1:6bc0d50cfb05fd50908dd982122b3073aeb45fca + pristine_git_object: fa3b102e6958793f25501ffd0fce892070ba2109 docs/models/openresponsesrequesttrace.md: id: 7195fc4fa929 last_write_checksum: sha1:22a92eb871989a3390ccb7ac830d45a40dc28ad0 @@ -993,12 +1305,20 @@ trackedFiles: pristine_git_object: 5e291d4568e9e2ab971494b572afa548757424b5 docs/models/openresponsesstreamevent.md: id: 29f83c2fa377 - last_write_checksum: sha1:3e4f1c39710d12e4fb4f4e6bdabb1070c3089a95 - pristine_git_object: c4ab7b8008526317429c09f81f25cfaee8ca5d66 + last_write_checksum: sha1:c651457b44f81bdd3f8bd1c20e540f3f3eade755 + pristine_git_object: 622e7fb5fee15d5e543b6d03e15406d54a28f719 + docs/models/openresponsesstreameventlogprob1.md: + id: cc9cfe90ab51 + last_write_checksum: sha1:f3446b92b4f508981d775691b0820e528a8a2690 + pristine_git_object: 16008c0033b5266b4582c6c48fa594005095f9e1 + docs/models/openresponsesstreameventlogprob2.md: + id: b188af623bd4 + last_write_checksum: sha1:adf3c6056e37fed2dc73fa21d98b8639d49b8a23 + pristine_git_object: 0461ea09358864258fa2c12e51d15d80c3d73760 docs/models/openresponsesstreameventresponsecompleted.md: id: 8ddfba315394 - last_write_checksum: sha1:ec03af2d20dbe3c3bd565ef3f3661ec53e359c3d - pristine_git_object: c2cccbaf22d0ffc35c6c5282d7cc77ae96671bbc + last_write_checksum: sha1:a3adcbe9dc4d70a9e04806a7923e951b29222e42 + pristine_git_object: 05f65263ca98a5c4b2a3464bb68e75175c125c01 docs/models/openresponsesstreameventresponsecontentpartadded.md: id: 1c72b5c00176 last_write_checksum: sha1:e7e7d00d49b90a6637a63b988855bd8166a77762 @@ -1033,24 +1353,24 @@ trackedFiles: pristine_git_object: e4a8ca13d17903b3e3538fb0167fc1405645093e docs/models/openresponsesstreameventresponseoutputitemadded.md: id: 0c3c06e02f9c - last_write_checksum: sha1:8d17077a002ff9b3cb9027c74b802ae64b9a8cc3 - pristine_git_object: c83b4e4cb179cf55dbb8b46f5ecdf11af530485a + last_write_checksum: sha1:0b4a6421e17b074607f43234f9cfad69c6538865 + pristine_git_object: a00e73649a444c47df1a9ee9951b70095a921583 docs/models/openresponsesstreameventresponseoutputitemdone.md: id: 854ed11cac9b - last_write_checksum: sha1:4e4aa38d3adc052f1d636e66e54f27ee1b08de48 - pristine_git_object: 3957c89521575acb1ffdf82b2d401634975f3703 + last_write_checksum: sha1:89e2138b64856967ea4e693543feeaac64d3a5fc + pristine_git_object: f34bbcaf06213f457de8141cf1dea9ea80780b85 docs/models/openresponsesstreameventresponseoutputtextannotationadded.md: id: 29857a68ef55 last_write_checksum: sha1:0f4426bb604a2bc38be7e9d9d8596e1d7a9be0e0 pristine_git_object: 86b18986d1c7c26bb3987296969b13120e624acd docs/models/openresponsesstreameventresponseoutputtextdelta.md: id: e3c8a0401a97 - last_write_checksum: sha1:b33b5c11647d120f8478a669d44ee9f1daa76c9c - pristine_git_object: f625356210c3583f31249d5a102a20036322ad99 + last_write_checksum: sha1:956ff440ca42964d882d7b64a10e07535e4530ef + pristine_git_object: f58d29b9e2b2164a64c99f29d468fa054593359f docs/models/openresponsesstreameventresponseoutputtextdone.md: id: fd5c4d478821 - last_write_checksum: sha1:bffa8ba08ff722cb4be47971accbaff78fc218dd - pristine_git_object: 411ff0a13e0134c3e71e9e3382ef483a67efe20f + last_write_checksum: sha1:f79442b2f59215843274d1949ea678091c49be78 + pristine_git_object: 8b3ee7a9c62657515461c66e310364df04d24265 docs/models/openresponsesstreameventresponsereasoningsummarypartdone.md: id: 373d0cc5345b last_write_checksum: sha1:72431df4c961c8e562d6d1c99db88bf9cc3bb3dd @@ -1063,50 +1383,90 @@ trackedFiles: id: e69979ceb2ec last_write_checksum: sha1:510224118e8629da1852637f0ee3ebc84fb9e8d5 pristine_git_object: ca13a4cb0d9397cd26ed0402cd2d38ab985a704c - docs/models/openresponsestoplogprobs.md: - id: efa1a87f7f48 - last_write_checksum: sha1:8ec9e13d76df0a8cd387b7ba6eaff4fc365b20da - pristine_git_object: e1258deae13f7c2860a14608e80148a5b8dcb085 + docs/models/openresponsesstreameventtoplogprob1.md: + id: 39b6f6baf148 + last_write_checksum: sha1:e72f3db27af61d0529d25378d85201e9e73f2625 + pristine_git_object: 9c2cd1699c3d53c98ee189829c44ccd2175d09fc + docs/models/openresponsesstreameventtoplogprob2.md: + id: b758d0d1038b + last_write_checksum: sha1:89ed619a10a3ae149f12cae45ecccfe8201136b0 + pristine_git_object: 3c138e0bb2144ce0a12fcbfe8d324fdfcf689662 docs/models/openresponsesusage.md: id: 6a8d90c521c0 last_write_checksum: sha1:3598e5cdf22bc2967eb51052b860fb2d72e296ff pristine_git_object: 5f9cd86ec8d6174c74b5a79c9af0ee2860be01d3 docs/models/openresponseswebsearch20250826tool.md: id: c3e34f18c7b1 - last_write_checksum: sha1:fc07b3368ab34024b01816da4fc4dbe1f2fe1ecf - pristine_git_object: 9cd8ec3adb81801432c35f0586fdbccb8fc4c4f7 + last_write_checksum: sha1:46822069b4699131944e42d4dd8875114cea4f66 + pristine_git_object: a2ff98de5243b7fdd5acf343322dd899f7c811cb + docs/models/openresponseswebsearch20250826toolengine.md: + id: b10c01db8889 + last_write_checksum: sha1:e45b231a875d2d1119cae72a5fae72373439a417 + pristine_git_object: 555ca6512de84e153f3f02757199bfc5828df2e0 docs/models/openresponseswebsearch20250826toolfilters.md: id: aa190d7aa094 - last_write_checksum: sha1:8cb77661d893438fbb1e061a967e2352f7475ec5 - pristine_git_object: 2b4a3082d0db40216ed0c6f7667524acac2bbbe8 + last_write_checksum: sha1:50c2ba77a3a6c5024c27544504a0a3f7ab8823a6 + pristine_git_object: 8499a488df30c4a6f28aaf9e55576e61510cb4dc + docs/models/openresponseswebsearchcallcompleted.md: + id: 556ce63427fa + last_write_checksum: sha1:9afd7aae46c7082d3d2eb1dd471e4a0a851aa7d4 + pristine_git_object: 853277faa022dda9388e3a5fcb113d8d5d75754a + docs/models/openresponseswebsearchcallinprogress.md: + id: 10dfab4ef483 + last_write_checksum: sha1:df9def544f9a7af00bef66e35e20207da02b6481 + pristine_git_object: 6f6782840b6688a3dff8566e3e049df5d55d4747 + docs/models/openresponseswebsearchcallsearching.md: + id: d5524cc55d98 + last_write_checksum: sha1:fadaf190051b8bb91fa7e836c7d41bfe3b147c93 + pristine_git_object: 955fff1475ebd46aadb57cad4239b4cffb0b5973 docs/models/openresponseswebsearchpreview20250311tool.md: id: f25c9e8faa14 - last_write_checksum: sha1:3421be64c96e585c3295a7dc1f7a9cc985b08e8a - pristine_git_object: bb47786c7d11301e7bb35a498baa0835be6cb732 + last_write_checksum: sha1:d819f36f888067a4807f8362f655d18c66512b9d + pristine_git_object: 44d58a36c2841cc0fe83a912712049154bb00259 + docs/models/openresponseswebsearchpreview20250311toolengine.md: + id: e746869cf735 + last_write_checksum: sha1:f9b797b0fbb823e8b52814b379be4188dee5edb0 + pristine_git_object: 38289215da4b45c706af249499d42f38fe3af1e1 + docs/models/openresponseswebsearchpreview20250311toolfilters.md: + id: 897dcd3b36d5 + last_write_checksum: sha1:daef79f2dd84f0d53297481d314d7dac3036cf7a + pristine_git_object: c41831c3f94841d3203adf88559263275cdd5115 docs/models/openresponseswebsearchpreviewtool.md: id: d16a27b8c428 - last_write_checksum: sha1:506c42624600a7b2c1484c00a9777e19bab6ab80 - pristine_git_object: 69f214f24c580dc605a36662384688d59a73d62b + last_write_checksum: sha1:8aeae3b82b2ac8d0d6346c1189f08f8c4a81f2e7 + pristine_git_object: ff9b0f60c0b652e184fe40ddf3ba0de31116c9e9 + docs/models/openresponseswebsearchpreviewtoolengine.md: + id: f96b2f0a2416 + last_write_checksum: sha1:506b527dd952d76458ab55959ada4b8bd9a26348 + pristine_git_object: 13b2b9b4d6c550eb6366e59300b346b5bd8e6136 + docs/models/openresponseswebsearchpreviewtoolfilters.md: + id: 85d33956c834 + last_write_checksum: sha1:aa400b46261e7aa015706636600c3fc1a313e9c5 + pristine_git_object: e84cf03ef94be2a598e64e205795f3802cb158f6 docs/models/openresponseswebsearchtool.md: id: f97741a05f38 - last_write_checksum: sha1:26007dbbf4c010c0fc8a2679f3b2701c85e81105 - pristine_git_object: 067f0c26b78e1b767c826bbdb8b52d6e31c6349a + last_write_checksum: sha1:3ebe340bf3bae1ce721587b672202c52e4c82489 + pristine_git_object: 8c63fbc06be8c6f574ed8b211485f84e9ae32976 + docs/models/openresponseswebsearchtoolengine.md: + id: 3a4f0b6d4117 + last_write_checksum: sha1:9ed8172900c3e843ca12082f25518f23c70a1490 + pristine_git_object: afc42b3f788c2154e509e63497de5ef22a0b2318 docs/models/openresponseswebsearchtoolfilters.md: id: d2f93af37f78 - last_write_checksum: sha1:cb0f7433e7fbd8bc34a8708baaeed203b2ee5cea - pristine_git_object: 69bbb263093753df345e2e3a129c25bb845864bf + last_write_checksum: sha1:5428865b3d48b6cfca5a0dfa3f2f24c7e6598472 + pristine_git_object: 638a257a481f6723c2dc973c464f1852bdc644c7 docs/models/operations/apitype.md: id: e006095ee88d last_write_checksum: sha1:f0f8a359c5ab972efccac02b9fb34a00b5851d03 pristine_git_object: fab31645d46330add55d8d4641a80cd946663b97 docs/models/operations/bulkassignkeystoguardrailglobals.md: id: 61e2eefa173b - last_write_checksum: sha1:420f57dc2eabc42bee47d81fe40e5aba398c4d06 - pristine_git_object: e81f92202d7d18afa3e2753cb52b3e4f4bd827b8 + last_write_checksum: sha1:0897cbc7bfb2fdf62072e1be1a99b3edeb0ca9f3 + pristine_git_object: ed0220ebcc4d2aa0848264c910fed701ea427780 docs/models/operations/bulkassignkeystoguardrailrequest.md: id: eec92c190ec4 - last_write_checksum: sha1:5d815cc6f9ba3db0d7bee67cda0da0b4f3c302ca - pristine_git_object: 590d7e0b31e81a339b1436f3c2471f4ddd07e9a4 + last_write_checksum: sha1:307cbc36f810bf29f92ca89be7be0f6240fb780f + pristine_git_object: bc5eaf7105e3f9bf52217c998f882e93624d3f29 docs/models/operations/bulkassignkeystoguardrailrequestbody.md: id: 5f4b03d3ad7d last_write_checksum: sha1:7f7649e3c8a7de3494a0ed89bb2f246688b679d8 @@ -1117,12 +1477,12 @@ trackedFiles: pristine_git_object: a9b6b30ca59a9cc937a2c3cf3015d0deb8fbbaab docs/models/operations/bulkassignmemberstoguardrailglobals.md: id: d9a733e7541f - last_write_checksum: sha1:e308c4494e047e0dc6debd5ed138e0781d9f1dda - pristine_git_object: ea9b800f8c9aa49f5df23911c2c61e6423c147d0 + last_write_checksum: sha1:20dd75b0d6449cd26c74310a1c09e6fbf0671101 + pristine_git_object: 67b29b9d5a1cc8969caa984a245a15bb2667a296 docs/models/operations/bulkassignmemberstoguardrailrequest.md: id: 6d07250d41fb - last_write_checksum: sha1:d71c4f56eefcd42ef9271b2caa793d403b447ff2 - pristine_git_object: b025c34f5d3c3e89c8e52578f70f734eda90bccd + last_write_checksum: sha1:978c9b35d01257153cb6676d9bf583f1c82ea463 + pristine_git_object: fa8bb4cadf7a026fb2beb0cf5c13f792b8afb26c docs/models/operations/bulkassignmemberstoguardrailrequestbody.md: id: 901e5406cc36 last_write_checksum: sha1:694c378c7fb368a63b8797edbbc31161db92c192 @@ -1133,12 +1493,12 @@ trackedFiles: pristine_git_object: 6f83d903b69b867518e6867abebf8fe19a0bdbc8 docs/models/operations/bulkunassignkeysfromguardrailglobals.md: id: 7f8519de7a1a - last_write_checksum: sha1:a0457092fc58f68d1050b3ec1ad81e130c9f2447 - pristine_git_object: a38c80a242db00b6118aa4c2fbf7484c4708585f + last_write_checksum: sha1:ddc9545ee81fc2e8797e3bd984866c223943b6f2 + pristine_git_object: d962c6e5f9ebb848ba0f8b9946068763a4b84cb6 docs/models/operations/bulkunassignkeysfromguardrailrequest.md: id: 11b8284d978b - last_write_checksum: sha1:04af462486d627da4f7311e5ecfab70a83f2a2b2 - pristine_git_object: b89f1237e75bfab9558db123230f69310281e66a + last_write_checksum: sha1:ca01a8b44f28b5093eb77848fccfe77ed55aac07 + pristine_git_object: a57fdea559554754eda842843a4f379a0a3266c8 docs/models/operations/bulkunassignkeysfromguardrailrequestbody.md: id: 70c081957fd7 last_write_checksum: sha1:0ef603ea9b21005fba34c0a16a217cecca35660a @@ -1149,12 +1509,12 @@ trackedFiles: pristine_git_object: c77c8c7788c83b34e67b96fa4e4ee80b5863f83e docs/models/operations/bulkunassignmembersfromguardrailglobals.md: id: ead5b950893f - last_write_checksum: sha1:c3aa5f96a02a3b621de0ae5fd63a56598455a14c - pristine_git_object: 833a38754a4f0c0cb1e9601e5835936b0a243351 + last_write_checksum: sha1:a5880201b08a5af7954db2b93f2a1dea0fcda3b7 + pristine_git_object: 16ee3a942feb9536c0ea9e3dc4022862f737d2f8 docs/models/operations/bulkunassignmembersfromguardrailrequest.md: id: 18d0efe64297 - last_write_checksum: sha1:a843f3189ba745c19277ad7e5473c6c31de3f850 - pristine_git_object: dc9baa29dbd3c7cdb24ed6e37788b29ba1f17261 + last_write_checksum: sha1:57a3df4ae89081559262ce3a0d0480156ec1821c + pristine_git_object: 668117d9a57991d16d33f9b31f8809b5697e820f docs/models/operations/bulkunassignmembersfromguardrailrequestbody.md: id: 88aa17ef2fc4 last_write_checksum: sha1:b38c129d01e1da2f5949e0ff0acf1a8e3519a3f0 @@ -1193,12 +1553,12 @@ trackedFiles: pristine_git_object: 500d330e5fdc3cd245ebf2d001fcb0cefe5c12c7 docs/models/operations/createauthkeyscodeglobals.md: id: b5c73490ff9a - last_write_checksum: sha1:74d7b3c7eb7054eb049f94739a37d36b4938df3f - pristine_git_object: 097f7cf0c592fd6fc34cf96ce3afe796497eb328 + last_write_checksum: sha1:d519193439ef78ac973322c0312272f298cd1dd6 + pristine_git_object: 51848f6b92acda70f704e586150c63e701203925 docs/models/operations/createauthkeyscoderequest.md: id: 3501ca5b0d29 - last_write_checksum: sha1:46c6e35c689b8260e2871ae1a4459f4f18a020c3 - pristine_git_object: 9502d9d59e917351bec93c3c1c736ddb35d5bfc3 + last_write_checksum: sha1:442f1fbc081908634154dc7c3d741fc7043190fc + pristine_git_object: 2068be70948914ac3c26a9bc0469cbe2a3e7e34e docs/models/operations/createauthkeyscoderequestbody.md: id: 41569d05ee8b last_write_checksum: sha1:5d7996ddad24270c2c0e8f11498068d07be6f397 @@ -1213,12 +1573,12 @@ trackedFiles: pristine_git_object: 9acb63a0586c85be3d04febab19bd40d70b8dc09 docs/models/operations/createcoinbasechargeglobals.md: id: bed4fb2653df - last_write_checksum: sha1:18cdb7681a9d30bedfa48d870e79a9e5edfd8c59 - pristine_git_object: ccfb7937b2d16785e24900f363ad134cb28f22da + last_write_checksum: sha1:a441886a90c0ba1a2193b64391eb7b67683fc611 + pristine_git_object: 8a57aaa679bbee961ea6221ab812acaa7beb6473 docs/models/operations/createcoinbasechargerequest.md: id: 1ad6100da109 - last_write_checksum: sha1:c353569cdf391b8df90e64ece175629633522ea3 - pristine_git_object: cd5fbc1623d39c4b13d48905d7bde9e5ad27eee0 + last_write_checksum: sha1:5085c5708cdb0a650bd7120678fb19ba4a6404d2 + pristine_git_object: 7427ed1d4fea842c56462ad06e14b768eac94ee1 docs/models/operations/createcoinbasechargeresponse.md: id: e65fad3f99f9 last_write_checksum: sha1:6659e8d6ccd26453231b2687c880e21c7ec918f6 @@ -1233,12 +1593,12 @@ trackedFiles: pristine_git_object: b6acb2269230b6e88e6d2e8fe87c529343704b0f docs/models/operations/createembeddingsglobals.md: id: 35582313a14e - last_write_checksum: sha1:27e7cae9cd9498ece4f32fcbe68588816d4fc515 - pristine_git_object: 057ab8b55fd7c73cf1c080b7afe97247b0b56923 + last_write_checksum: sha1:a302b579acd0a1ab7767c3f5655366d6f13e1826 + pristine_git_object: fb4f79f436ec911f7b6cf4bf3dea644f1d88659a docs/models/operations/createembeddingsrequest.md: id: 69cf4f5d82bd - last_write_checksum: sha1:68178f030705e648776ca581b5ea86d0711727a6 - pristine_git_object: bbacf589dbf0f9ad2a08611dc1c14e013faea820 + last_write_checksum: sha1:78c2602b817b404958fe44499cc2a0cda6babeb4 + pristine_git_object: 2768e50f2cd1d11ef54222de64f66a63e9715215 docs/models/operations/createembeddingsrequestbody.md: id: 295a16bb71ad last_write_checksum: sha1:218360560487950435b551327c098d4af9cd10cb @@ -1253,20 +1613,20 @@ trackedFiles: pristine_git_object: 18423c1dfd4f45eae5667c74b1b1be2bfd76af72 docs/models/operations/createguardraildata.md: id: d3bba8a28f74 - last_write_checksum: sha1:89ca610736996c2170dfebed62f592983b3dd3aa - pristine_git_object: ed6f0ffd882f6d356b7b3ba85b173b00e4fc11d3 + last_write_checksum: sha1:6982a26c23405a04e48693e0b19b29d3e82119db + pristine_git_object: e914c2f7ab2c53c9bf146a772d71f227dafe7d49 docs/models/operations/createguardrailglobals.md: id: e77858413127 - last_write_checksum: sha1:c1721a2ea6553ee1d7158bfe49787c9317272156 - pristine_git_object: e24d7c6be7e6ffda5793ec33c1dabcb0386c7154 + last_write_checksum: sha1:7ef455ffd6047be34e904af50a099ce6814fad12 + pristine_git_object: 636614f8d6b57715713908ce9142d5f3996bb78d docs/models/operations/createguardrailrequest.md: id: ff2eac26fe01 - last_write_checksum: sha1:6b521078d8b390eda876b957597130dc524ad5d4 - pristine_git_object: c1dd522c6d79c452848292b9380bc00558e1f04c + last_write_checksum: sha1:14431447721281325f6e83766c9f5596289ef266 + pristine_git_object: 2d9de582fe0fa7671b1553effbb80b5192a85330 docs/models/operations/createguardrailrequestbody.md: id: 40f2921a92bb - last_write_checksum: sha1:8da71acab10d28d8f1ace96773310873e8055c1f - pristine_git_object: f5d923c08e8774fcc5e71f5d2b0a942c5c9402b3 + last_write_checksum: sha1:56bde52eb7eb2a32c9f6f933ede5c8caa42351e4 + pristine_git_object: c55fc131f7ed9cae5bf455ef0ce8298d62eb7b7b docs/models/operations/createguardrailresetintervalrequest.md: id: 939a4d83737f last_write_checksum: sha1:59ab737443e59659d300208a25fdd2567c8b6941 @@ -1277,24 +1637,24 @@ trackedFiles: pristine_git_object: 303f5c0935f2872bfdd02e5d29b269f106bbceda docs/models/operations/createguardrailresponse.md: id: 357ae04b4e21 - last_write_checksum: sha1:a1f157dd8e6bc4469b3f90cd36faf22fdda155aa - pristine_git_object: 72be69503b50661caae78a7804ce948e756c41ed + last_write_checksum: sha1:dae57092abd450097d90d42e923e4dbe70853f2c + pristine_git_object: 82ab5e0cf72896cd3133decc512f5c07823b0039 docs/models/operations/createkeysdata.md: id: 9cbfcb7edadb last_write_checksum: sha1:4e46484e82eca32ed6521ba1fff6b73fd7cd5688 pristine_git_object: b8f7e0debe5bad74170e73fa5d608e65cf55d2d0 docs/models/operations/createkeysglobals.md: id: 8b78d8139066 - last_write_checksum: sha1:611517c05dbc501c0c8825bd3dd6b2d1ae06558d - pristine_git_object: 23ad9cc39c01292be096553b106f8d7b4adc5a1c + last_write_checksum: sha1:ffc12fe8639f1ddcc609f944381a2585f223b124 + pristine_git_object: f33e6f02bc9c65306e1ef8416bd489f3ea76f8b7 docs/models/operations/createkeyslimitreset.md: id: 846e23790e8b last_write_checksum: sha1:5c70d714ca82e937445dd086d248625775e4ce6b pristine_git_object: 44dcac0cb198c6d2019b22f904570f4b46ec57ae docs/models/operations/createkeysrequest.md: id: d726547b3345 - last_write_checksum: sha1:4a514037cd0f0205f99fecee12626c1664dfbd55 - pristine_git_object: 8c31af46419ef6290c192bfd8670f9f224cec5fb + last_write_checksum: sha1:85a76e7c9871776d19852edc31dab6733538b1e7 + pristine_git_object: f5db40c72626ccecba274d177ab758088042e56c docs/models/operations/createkeysrequestbody.md: id: 7fe4c5641385 last_write_checksum: sha1:3f1c48490829d0de735fe05d562b774cda30aa6f @@ -1305,40 +1665,40 @@ trackedFiles: pristine_git_object: b71100d6a4167d918e53aeddb2ea473845fde410 docs/models/operations/createresponsesglobals.md: id: 18acf1695447 - last_write_checksum: sha1:c5e3162848aaf6e61b148ff88c42d63f0159eb4d - pristine_git_object: a3ddbc2bceb00e8cf5b91f2351a069d449ec3bd9 + last_write_checksum: sha1:c7c9c9c761a321dd149838148cb8fc0652afd778 + pristine_git_object: 5f55a504c8ac9025886c6ca77837f43be624a5db docs/models/operations/createresponsesrequest.md: id: 5370180b8635 - last_write_checksum: sha1:fb17f828b2f8b533008ce61e8cd8af36d748ff2b - pristine_git_object: 54af75f2cffeacf7acbd2900810512f909d79827 + last_write_checksum: sha1:51983350baba2186cf4423f98414aaa6a0d05ef7 + pristine_git_object: 104531727fa0641324470a02bd9080a3145c6d15 docs/models/operations/createresponsesresponse.md: id: c55a819f0ab5 - last_write_checksum: sha1:39dbcdedff28909f42372e8b7b9092b3fc225e46 - pristine_git_object: a724c72f1baeea19d150a23ed6509f29a5c1f84d + last_write_checksum: sha1:a4cc3a3ee97bc999d13c3a39ab911f80df1e8f72 + pristine_git_object: 05b967139dd5a45c7caa7b58dcb8b62bbfed8ed7 docs/models/operations/createresponsesresponsebody.md: id: c0639e97c684 last_write_checksum: sha1:484f79490add59bf08bc521b3fc9f87c216f537d pristine_git_object: f546415b3380dad92d605b0d04b0638ae71e5b04 docs/models/operations/deleteguardrailglobals.md: id: 80951a3b49bf - last_write_checksum: sha1:82c561e02a9f4e34acc8d8f03f9ea270e3dcfe2b - pristine_git_object: 5195ee3127e4a03c00ea84ac49708b1f45659bde + last_write_checksum: sha1:843ad0a94f754dacf5b4f9ff97c23adc1042c468 + pristine_git_object: 94398fee27fe50d5c99c00cf06ad3e8563030971 docs/models/operations/deleteguardrailrequest.md: id: 1bd1d6b15de5 - last_write_checksum: sha1:455e53cdd348ffbad4201605aa1f47d65b17d336 - pristine_git_object: cf8944c07352b2586a24dbc957d3666a2623e845 + last_write_checksum: sha1:cb09eb05dcaf199d1835df90ba15df361edeff6d + pristine_git_object: 9989ffc9ef5f3ebd4bff9d6078dc4969099d86e3 docs/models/operations/deleteguardrailresponse.md: id: d7079591d587 last_write_checksum: sha1:b0772ea7a1458a5b463290f731f92c21bcdcff1b pristine_git_object: ef931107083e4cd826ffb22de9c3dfa7f0070f3f docs/models/operations/deletekeysglobals.md: id: eee2ff646d0b - last_write_checksum: sha1:acd6fe7343ced7ffea40089ca26ead7497e72a32 - pristine_git_object: 3f7678d04c5692cb69c4abc8b9c987773a4912fe + last_write_checksum: sha1:be1cc97f87b0e022e9ef1673d28b9063b561949c + pristine_git_object: 5b054f2891cc175e810eef51e4f28cc0a49e3155 docs/models/operations/deletekeysrequest.md: id: 88cb4c43ad9d - last_write_checksum: sha1:e22f43439d45befcef63b0d2b369b630eefe9df6 - pristine_git_object: 54f415b8046442e6eac9251fbea16322e0a8c1c7 + last_write_checksum: sha1:3b982111c15007089c6345e44479cfa13b60eed1 + pristine_git_object: 743fe271c30f1abcad6078117e1443a6ef1ed042 docs/models/operations/deletekeysresponse.md: id: b7cb4fb91f4a last_write_checksum: sha1:584251965fcdfd8b0df2b6edafdd4945ac372018 @@ -1357,12 +1717,12 @@ trackedFiles: pristine_git_object: 0898e066295576a34d164b0daf4d3461b8d579b1 docs/models/operations/exchangeauthcodeforapikeyglobals.md: id: 300d81236a0a - last_write_checksum: sha1:80adcb14cad2c64fba7a107725587ce3aa53275e - pristine_git_object: 0a829bb65c88fb67124fd242de6dee14aabd4ad7 + last_write_checksum: sha1:ab8ea3d116b497bc94cac5d8caabed9ac6538d1b + pristine_git_object: a520ad7129f8934021c2f4cff67d12c6a1a87812 docs/models/operations/exchangeauthcodeforapikeyrequest.md: id: 39b4f0553f84 - last_write_checksum: sha1:d39adbe202163884626120993315ac363b9321e9 - pristine_git_object: f0fcc354a656e3332b6f1d34544170e7b722929d + last_write_checksum: sha1:2a8862cc9b9fb8028a8537448516175db6562768 + pristine_git_object: d67d86a086d95902b6498af873f11d0b2d3ae41c docs/models/operations/exchangeauthcodeforapikeyrequestbody.md: id: a18c703b0cc8 last_write_checksum: sha1:167adaf8521d391af1842283ec2e35a10c347dc3 @@ -1377,12 +1737,12 @@ trackedFiles: pristine_git_object: ce61a38e04acdc79e61b5b604d2ff31f4ef2309c docs/models/operations/getcreditsglobals.md: id: 781424bcbd5f - last_write_checksum: sha1:f8703fe3cf7f92045a060b0024e97786c05ef7b9 - pristine_git_object: 8b37c23db4bc3493a338d7515919f8c1dc770a67 + last_write_checksum: sha1:3ff2fbc2d47ebd3b5cf6374de8097fc15b1a6afc + pristine_git_object: df019b2f422facfd552549082b18640db7d510a1 docs/models/operations/getcreditsrequest.md: id: cb74b3103f06 - last_write_checksum: sha1:18d4c286b28ed341c3c1926eb8882bc6d2e216bf - pristine_git_object: 296fb668f1507b20147e6714f1e6beab28e9b8aa + last_write_checksum: sha1:1966ea38f3e3a6fa0f1d42ff87be035c2c79e6a2 + pristine_git_object: 44f21299d13c55cb902864b944669b058112edfa docs/models/operations/getcreditsresponse.md: id: 0062036af02f last_write_checksum: sha1:9326310fa6e1a1783cb9267449fc05f37428a381 @@ -1393,84 +1753,84 @@ trackedFiles: pristine_git_object: cb4a69df119d7d45ace32d36a9f9bff503b3c67c docs/models/operations/getcurrentkeyglobals.md: id: b5c00983ce7d - last_write_checksum: sha1:e4bca1ca7aade62a5723217d156308b2f342bf05 - pristine_git_object: 20e7c359f1fe520e4e9fcde4be6a83d6cfa64f95 + last_write_checksum: sha1:58cb938c5861bc549dd1c0a283555c4a151e02a2 + pristine_git_object: be8ca1f8f1d56c67ebf911603193d7fc6cce5c25 docs/models/operations/getcurrentkeyrequest.md: id: e441097a4f74 - last_write_checksum: sha1:02cbf8143df2eadea16bc4331b203913e929a624 - pristine_git_object: 5faddeba9d845d42c969677de0efaa863f6d34a1 + last_write_checksum: sha1:a939756be9f174b7b22ad0ae11a4c52eac4970e4 + pristine_git_object: 788ef54826304f4f6fd82bec6d3f84e947997af3 docs/models/operations/getcurrentkeyresponse.md: id: 9477562332d8 last_write_checksum: sha1:8ab4907cccaf007e21d808b963b6dce1d044d81c pristine_git_object: 56064c15d21cf03ace429a8b8c5623c59905e8a3 docs/models/operations/getgenerationdata.md: id: c47059f62af7 - last_write_checksum: sha1:1e1cec3402d0cae674de954eb5c335e8e1f99b65 - pristine_git_object: 8443a05a902744483eaa6240b73bd09350efab52 + last_write_checksum: sha1:af20846a31a320fd39534e49800967bca881f27a + pristine_git_object: 500816daa2609ae1b880c8fe86f6bf4440de16da docs/models/operations/getgenerationglobals.md: id: 5f2afe6fb90f - last_write_checksum: sha1:eedf5e173dfe26caf7bd6598bcb1d0afdc745549 - pristine_git_object: f211d392e32e7971eb383d64c058c92a5a7d70ff + last_write_checksum: sha1:832bdd95d117d8afd5ab64f730df60b90be80b60 + pristine_git_object: dc1d1dbefca3833bf2e8ecb7c9a23f4acfcbaa31 docs/models/operations/getgenerationrequest.md: id: fe98f4f7a718 - last_write_checksum: sha1:cafd18773a190026c102a1ee9a27795cd26a7184 - pristine_git_object: 924ad66ad743f029fefb6e35cf16fe36192466f2 + last_write_checksum: sha1:a03a8cac5250effaae1fd86ea721eb5f7be3faad + pristine_git_object: 721877b0c6ed62ec9ca270f1f8a02902427100bf docs/models/operations/getgenerationresponse.md: id: edafe5ee4596 - last_write_checksum: sha1:c5f328be534ea1c9dab86d08420e2d02ae1ef90e - pristine_git_object: ad8d36ec5e2ca43e7a93e2815165758fee94ab67 + last_write_checksum: sha1:2a6b5ed7e9ccbc5ccf1486f345296566925664f7 + pristine_git_object: 2f82ace8b79f14ae2c1d61d3182813ba862b83b4 docs/models/operations/getguardraildata.md: id: 698e237b3e04 - last_write_checksum: sha1:c14d56c6919231412f80e05e5c882090de3e8c42 - pristine_git_object: 712c360c9d28c7049f48922bf6535cce05ed121d + last_write_checksum: sha1:0cf06c8dd86e7eccc4f8fe687d417ce75a136f2f + pristine_git_object: ed56bce70f230cdd8bac6302340534381ba4e64c docs/models/operations/getguardrailglobals.md: id: e8b35d73e652 - last_write_checksum: sha1:515e0d815eda48950aa8440d4ed6ad914e9907ed - pristine_git_object: 99ce38445aa40e466ef12e38a6763c80126af147 + last_write_checksum: sha1:61e3b6bd526b08956d6b98402d15277a8129f88d + pristine_git_object: 162123daaf87a144011bd571bdf7fc8a51e09073 docs/models/operations/getguardrailrequest.md: id: 1e8ddf8ef10a - last_write_checksum: sha1:f650590588a515a9116e49529cf63eb3fab9e66c - pristine_git_object: 47e81190a0964783cebf81a3bb20d4b1ef265891 + last_write_checksum: sha1:72fb2d0b40588232166ae01afc64ba50e97e5f89 + pristine_git_object: fdf0bcfd61cd4a978344d826d4c7ab862842032b docs/models/operations/getguardrailresetinterval.md: id: 8f08f64080d1 last_write_checksum: sha1:44188691a7122b8d67e66a3f2bcbcd05cec9967f pristine_git_object: 1ab597dca4ee2192b2b5bc486a708218089ae4a6 docs/models/operations/getguardrailresponse.md: id: 158ac25881ae - last_write_checksum: sha1:7be991092f55aa8a3ab143910f90ca9a84c2cf12 - pristine_git_object: 8951e641c267958739f4eb76cda14430b3d5b3a2 + last_write_checksum: sha1:2ff76ee41d5f4daf6e74ceb1c3a9a26b83b04ae1 + pristine_git_object: 1f501c881f91f702314209f03f8f1bde80d4ff36 docs/models/operations/getkeydata.md: id: 359964834be9 last_write_checksum: sha1:c51e809544752889db15665720f546a6d57ae3bc pristine_git_object: 268e6252a9f64e00dcdc67536e2ef8f631d41f1a docs/models/operations/getkeyglobals.md: id: 0d57abd2ecf6 - last_write_checksum: sha1:0d83300e3e651a7d33e8831b0d1537b5dcdb449f - pristine_git_object: ed8e973a5773d03785bdc0349321b62215d1a2fb + last_write_checksum: sha1:2743c3fda88dc05c7535ac08846af2406951e613 + pristine_git_object: fd0f8abb7f24ec8ebbcf0b65d58fbfacf6ad9aac docs/models/operations/getkeyrequest.md: id: 0d12b1ba3d1a - last_write_checksum: sha1:e0fc2856e1e134e3cc336c4026f046916b9ac3bf - pristine_git_object: 9bc01978bc452db00f9891a92cb78856c9f7b9ee + last_write_checksum: sha1:ec2e16802c4d80572cf938186bc1adfe13a03a08 + pristine_git_object: cfbdeba6dd8e8c52efa0de0a1adc0d2f9afa2efb docs/models/operations/getkeyresponse.md: id: f5617e59330f last_write_checksum: sha1:29152a8d583c16ad1bffe4daca1037e2c074fc86 pristine_git_object: c88cf75011f7bb8a4a9e0f1bb45fea343c5ffc07 docs/models/operations/getmodelsglobals.md: id: ce4b123aa356 - last_write_checksum: sha1:60f8235f8b5898b78f35f9215dea76939336b9f9 - pristine_git_object: 7d36511632ee293ac8b196c69dffc840fa844ce0 + last_write_checksum: sha1:f05a201ecf793b0070f9d54fe7be6a24d9a076bf + pristine_git_object: ff8b217678df8e2b62c6dec64bc4350add0b3305 docs/models/operations/getmodelsrequest.md: id: 801c51f5ac65 - last_write_checksum: sha1:6865cf051a2eabe6a9fc3e60bcd62735a028773b - pristine_git_object: 64aa011af171e17447a61cb33b7ff59ae47064b9 + last_write_checksum: sha1:d002835390dcc17e508b1471393463c8eafd3d5a + pristine_git_object: 584f2c715beb81dd7aea0917fd044bf119309fc9 docs/models/operations/getuseractivityglobals.md: id: c8e7b780737e - last_write_checksum: sha1:68b8c7a333c3d5762d7e5ede1a049597f9da0375 - pristine_git_object: 29571d1c0838d5c7f919e33c9e2ea6f2dd527e6b + last_write_checksum: sha1:a3a48d069e8d87c6f9a6d01ed1706d9c555e49ac + pristine_git_object: aa35304d64364b40f20fa4733e02954be2d126b5 docs/models/operations/getuseractivityrequest.md: id: 094eba1cffb3 - last_write_checksum: sha1:546ce4ea7c0f81fff587d0555cd91768542b1420 - pristine_git_object: 7b3de014f169978def84f7eed98b2a230da03b5b + last_write_checksum: sha1:3e43f20cdbb65dc5a0c576e4c3b8666ca52ab56d + pristine_git_object: b42df01fc07199083733e2675483899d3aef3ab9 docs/models/operations/getuseractivityresponse.md: id: 4f48d035cca1 last_write_checksum: sha1:eed1b34aa9c90cd31f03b3374363d5b93065b942 @@ -1493,52 +1853,52 @@ trackedFiles: pristine_git_object: f6a4c6fb9e93f9d5def231e51d4fd64269251044 docs/models/operations/listembeddingsmodelsglobals.md: id: 92d77f20bdde - last_write_checksum: sha1:0ec209a44471592ee8d8a147172ffdaf555beb85 - pristine_git_object: 308dda18ef2b76a9fd7bf11d749a66dc210e5f41 + last_write_checksum: sha1:b7eada0e1ba9d9b930223e03cf8c4df4287dfc7e + pristine_git_object: c7b646142f7cc84db64d28c9d7264ee6a4f7b67b docs/models/operations/listembeddingsmodelsrequest.md: id: 7ea1136b8f03 - last_write_checksum: sha1:0ceb2ed0abc0c5054528d2472b8af9c8089488da - pristine_git_object: c4a8c8aaeb870051264f67b655d04013753469bb + last_write_checksum: sha1:b2e19e32b66775823f63a0010e1e21ed4ea02427 + pristine_git_object: df4709a98299ef578cdc1daab99dd7a1788b166c docs/models/operations/listendpointsglobals.md: id: 4e3bdf5323f0 - last_write_checksum: sha1:f1ac0af564c112fbd0dc452d30615d0789a0c0a3 - pristine_git_object: af0178d9183c25dc2f07f01c1492c63400339421 + last_write_checksum: sha1:b217d49b4daf16c62f83f4c4bce9c60af5becc27 + pristine_git_object: 97ff92882e18e4b52f43529b5d31de98dd7c0923 docs/models/operations/listendpointsrequest.md: id: e52338ef5349 - last_write_checksum: sha1:bdf4b83a53cc768ecd197b8be902ecf87732ec11 - pristine_git_object: 5d2f6a2f6264969db86adf5e04db4c3a416a018f + last_write_checksum: sha1:3b4c2df7e469d76796a9477dfa81a751200806f7 + pristine_git_object: a5eecdd5cd6cbb4755e5dc0781759095446b024e docs/models/operations/listendpointsresponse.md: id: 662f4daf76d2 last_write_checksum: sha1:6b213b9f0bdc2fb68e0b3d07f13f68e805c765b7 pristine_git_object: cd366c60649b0588fdbea1f74072759585e04e7c docs/models/operations/listendpointszdrglobals.md: id: 398b7a4786cb - last_write_checksum: sha1:65139d57d98dbb4789294d4d3c1096777cd5afef - pristine_git_object: 496bf5d28e61c8041c79e55c1390c8baa5ea4f54 + last_write_checksum: sha1:2c9fbd5b46ec7115c65583d3e17f0d3144de843c + pristine_git_object: 0b36a6b527caf46381f8a468eb1418011800871b docs/models/operations/listendpointszdrrequest.md: id: 01cc856f9da6 - last_write_checksum: sha1:27226e59ac9e5a726db2c0a7e7f726703582a173 - pristine_git_object: 2b76c98d527eee08b855bb9a97fee480ded7bea3 + last_write_checksum: sha1:b365d976704cb8a3672f26dc10e6816969db8b19 + pristine_git_object: 172a25fac65911a10fe0e5237c5c591dad77afcb docs/models/operations/listendpointszdrresponse.md: id: 5c9c93477484 last_write_checksum: sha1:719e6d95b94c3a9064a7f5d834a3cfa0447a096a pristine_git_object: 92153e5ad732d668c12b57d90b6c0d3df67f01a3 docs/models/operations/listglobals.md: id: f8c0a9ce961c - last_write_checksum: sha1:d38de0ac52f43011c5cfe870941e65a4dde3331c - pristine_git_object: 1f61007ceb1d4351cfc87d6381e93212b0b68922 + last_write_checksum: sha1:3635bee00d7f3c7e1b2fc1c052fcf95743593094 + pristine_git_object: aaf00291062378387c4730897767acb6d1af63e2 docs/models/operations/listguardrailkeyassignmentsdata.md: id: 2449d3e220c5 last_write_checksum: sha1:90c67668b39d1d9014650badbce2bf6eeaf65811 pristine_git_object: 14a675121c0711d893ad996b79deee38f168cf3d docs/models/operations/listguardrailkeyassignmentsglobals.md: id: 7925690ec4dd - last_write_checksum: sha1:c9fffa5c8fc615cdb85314f3c4fd2dab13a86cd0 - pristine_git_object: 50b09500e23e6a3e53d0f5d4b2cf71905af94803 + last_write_checksum: sha1:8da84afb2dd461ca5071e146a1d2d2add5ded7e9 + pristine_git_object: 4a33b8874997b3628aca6328c4618d549b9c151f docs/models/operations/listguardrailkeyassignmentsrequest.md: id: 0da98c6ebcd1 - last_write_checksum: sha1:bc73e083e5f9fbed7c87e11c5c163c21ef61af36 - pristine_git_object: 1fb19af85de93b0180afe91e9398a57a49782de9 + last_write_checksum: sha1:6172f7a40df9fe488e960b4f5bdfeccc7420a744 + pristine_git_object: ea9fca674108d9523254fdaa211a379ff657733a docs/models/operations/listguardrailkeyassignmentsresponse.md: id: e03a3c240b60 last_write_checksum: sha1:98226493d1e8244993f796c0c315b1410a29c90a @@ -1549,28 +1909,28 @@ trackedFiles: pristine_git_object: bccd30f3b2250f966048111d7f090554f60d895c docs/models/operations/listguardrailmemberassignmentsglobals.md: id: 23bf395fd200 - last_write_checksum: sha1:c9691ff028e4b4bf157fa7c6e683a3646c8510db - pristine_git_object: 08bbbba84106d047c58b3047682cda80b79daff8 + last_write_checksum: sha1:47876b17d314afc1d1fa3505fd3b86221665db70 + pristine_git_object: 932671e17336d1c5deef79ee5a27f984457154de docs/models/operations/listguardrailmemberassignmentsrequest.md: id: 09467f2fd854 - last_write_checksum: sha1:5cd1df89651c9c3d47a89640f356fa16d7036573 - pristine_git_object: 40a8add6bbc46bccc3b94efa1f4f8a5775281dc4 + last_write_checksum: sha1:4d27d1975e66f6c8e0d166f1132114c6cca01e2b + pristine_git_object: 6c3d33e2e0cbf56400f3e02f925cfc3f068d7947 docs/models/operations/listguardrailmemberassignmentsresponse.md: id: 192195db9749 last_write_checksum: sha1:335f647ad7d76bdd149681bc88fe95c7e79230d4 pristine_git_object: 297a6a8958e0024e63856f852593cbca1c76e49e docs/models/operations/listguardrailsdata.md: id: e3026e27f10f - last_write_checksum: sha1:8a085edd602ce3dbd2bd11a95ec064c94cdd067d - pristine_git_object: 4ff5e67df9b3b116299e795cbb17b7fafd1e7d87 + last_write_checksum: sha1:8d0f127b786faf02528605c2ea9c26229b12d474 + pristine_git_object: d0b8b4e9f4939cbe0b58333b174fe5bd846ed6b5 docs/models/operations/listguardrailsglobals.md: id: 2f7750b36bce - last_write_checksum: sha1:724ea48bc3b2b0613058fa93ee9c446111fce2c2 - pristine_git_object: bcf0c8561cc0e1559866173ef373875c5f52d612 + last_write_checksum: sha1:a343ddcb7e52369c097bd2ee69a952feee280e1b + pristine_git_object: bd212b445e0509816dd7f1ab76c810d24061e420 docs/models/operations/listguardrailsrequest.md: id: 3ae99ee8cbd8 - last_write_checksum: sha1:9ea927d58c7619c0300f3b76574e5c942c44d2f8 - pristine_git_object: bd35526d0d65ffde18ed2a0ad5c3473be5ffabc6 + last_write_checksum: sha1:945349f076d20164872e43dd1e3408fa9ae440ed + pristine_git_object: fd4c9dede58dca7aa7ea6f0a8a99d2f33600959e docs/models/operations/listguardrailsresetinterval.md: id: 8fcdc9f3b5af last_write_checksum: sha1:05b0271560f47f013f0c7d071f8c710871138843 @@ -1585,12 +1945,12 @@ trackedFiles: pristine_git_object: e30d8132fdab61f06d909b2207a1e4b7c0924641 docs/models/operations/listkeyassignmentsglobals.md: id: ccf1cb233045 - last_write_checksum: sha1:163f0c742f6dfb83cdc062f76f4712f0c9f0485f - pristine_git_object: a00477b1af8aba4105a9eb57a3e119807121e5ca + last_write_checksum: sha1:2e1e5cccd6760af76b71aad6fe4d2f636784d0fa + pristine_git_object: fb98c566c646303406068eabce63e0554e14b4cb docs/models/operations/listkeyassignmentsrequest.md: id: cf678e788175 - last_write_checksum: sha1:eab0a69e0476431bf7153a58c92df8ebcfa97eb7 - pristine_git_object: 8173fed7233c7d067af45d3ec890219a38b52e09 + last_write_checksum: sha1:1f6bf385568005e2ec56f8e7c9e10b15db049541 + pristine_git_object: aee7f11525be694399760131ac3a47284cf5567b docs/models/operations/listkeyassignmentsresponse.md: id: 55f05a5d20ad last_write_checksum: sha1:f65bc21e6582db5b85e12637b4a1c1dc185ccb2b @@ -1601,32 +1961,32 @@ trackedFiles: pristine_git_object: 52d097617cd3df704040c550e747a0636b35ff0f docs/models/operations/listmemberassignmentsglobals.md: id: 248b072d8556 - last_write_checksum: sha1:03c9eac4795ead4aacb3c442055ea3581791e186 - pristine_git_object: 8f58b2bde9c90fc0bcaa448acbf62e6397c7391d + last_write_checksum: sha1:67ac80ef0664b73473b1080135c7847e392ccbc4 + pristine_git_object: 464f8c7bcc97289d56794e4c041550aec310d4b7 docs/models/operations/listmemberassignmentsrequest.md: id: 010cf517af0d - last_write_checksum: sha1:fd5679c7f00ec57b5e40138738aef20787b2632e - pristine_git_object: 7954d6f2816685dfb8b0443ee8d4724c1b63d8e6 + last_write_checksum: sha1:929f4837ac72e1111bcf513c4631f30f45e89581 + pristine_git_object: 9d8e2840a82cfe2f93ea29a472170edc0a8abbf8 docs/models/operations/listmemberassignmentsresponse.md: id: e8da4e9e6027 last_write_checksum: sha1:6299d28524846483d818ac55a0ebb93a416f71b7 pristine_git_object: d9d9bb77d9f221b4586c800442fb88b091c8e3ba docs/models/operations/listmodelscountglobals.md: id: 0af2c2696127 - last_write_checksum: sha1:613ac68303edc7be941144609131d13e47349263 - pristine_git_object: f0f1b87df9cac3b1e1c3217b3e9a2830f22a8a19 + last_write_checksum: sha1:97b26975a931daec6fea5e671fed1534fbfba4cb + pristine_git_object: fa266c2f63b5c5595b86635f2d019829841905be docs/models/operations/listmodelscountrequest.md: id: ecbcd251ee4d - last_write_checksum: sha1:e632ebccb2752a27f9ff09edebe4b80c1f644703 - pristine_git_object: 8038a3f6c3f5a2c79ff65248756d2c76dc09afe2 + last_write_checksum: sha1:3e6405d200f1e207f9e82573b592d1fea07687e3 + pristine_git_object: 3a8a36507e726a793e368dc5c760d6d2883bdf5f docs/models/operations/listmodelsuserglobals.md: id: 4193aa8975ae - last_write_checksum: sha1:f60be50e5630664eae9607dcc4bf925a53747b71 - pristine_git_object: fba7ca401dc94693377a797df9776b073f928d2e + last_write_checksum: sha1:f96edcea0863fb7a930051e82acc12e68e4df696 + pristine_git_object: 311817e16676ca6426169fece9fb30e1af176d2a docs/models/operations/listmodelsuserrequest.md: id: bfacc774eb4d - last_write_checksum: sha1:7562095c6d035f309a34b5783e090f0cc50ea1a4 - pristine_git_object: 2e07531d66377bd588e3df6a33f04901edb84720 + last_write_checksum: sha1:2c06039b5cf3be0d3cf2852a02f98d1ffbf88e1e + pristine_git_object: 4820e3fe0d783814ebffa8703d201fa7da9f1d50 docs/models/operations/listmodelsusersecurity.md: id: 07a43f294881 last_write_checksum: sha1:0960a0a6dbece8266f287e905eb5e592024240f8 @@ -1637,20 +1997,20 @@ trackedFiles: pristine_git_object: 7019383295a6717e0d6102524e2ed218788bd255 docs/models/operations/listprovidersglobals.md: id: 93e8277705f0 - last_write_checksum: sha1:e4162686a6c90dcb096c28d5d844cb88ae581d04 - pristine_git_object: 1fc43a257b72986d302210f2d08eefeba6e92951 + last_write_checksum: sha1:3aa20c5267cc2a3f8d6b587d67254baa86465daf + pristine_git_object: dd7b707d1772bd47b97ab94a180b992835720f28 docs/models/operations/listprovidersrequest.md: id: 8f0183959b5e - last_write_checksum: sha1:d4a72b9fe19a18e7d06a9af1ec075198b74c5688 - pristine_git_object: 23563a66e9c607ed207e8f920b5c4b00b0ddf98b + last_write_checksum: sha1:1f3d030a5f8b40ef2183cc7b7d9a4f85c18a3e76 + pristine_git_object: 7078b856ae958c65d4e00cbb8fbbc685c3dabfb9 docs/models/operations/listprovidersresponse.md: id: df620d200739 last_write_checksum: sha1:23d40b114bfe5a19fd47a486338d02e63ade5e7a pristine_git_object: c383f6cd643368b2e7235318cafbc5658a80d556 docs/models/operations/listrequest.md: id: 88400dabffcb - last_write_checksum: sha1:1b9ec5941f29cd0607a26633927a7b7afa85142c - pristine_git_object: 3dbaaa9f35e346b1514682b9f3d931a7222f899e + last_write_checksum: sha1:5ce56184011ab8b170baf8583c809022efdc2a1e + pristine_git_object: a29359f4850f1b4d5dc7d3d4795307c95689574c docs/models/operations/listresponse.md: id: dcc8376da198 last_write_checksum: sha1:fda1e6e94953122d214468da8c839b6d9fd0aa81 @@ -1669,8 +2029,8 @@ trackedFiles: pristine_git_object: 6319d7beaa2d9709e126f07a3207533fcf24c1b8 docs/models/operations/providername.md: id: 616da1534f02 - last_write_checksum: sha1:354d0c9980080f0be2c471313b96e7932a368868 - pristine_git_object: fda8d2f92b1ec79a301a9490af7186afea441152 + last_write_checksum: sha1:178b10109344a422ad95b86cefbf4ea74d9665f9 + pristine_git_object: 9876aadc11ceecb5752a5a22e8ecfe747119abec docs/models/operations/providerresponse.md: id: 8af09d586b03 last_write_checksum: sha1:3969076345480f6e5738cc0299685a56331137f0 @@ -1681,16 +2041,16 @@ trackedFiles: pristine_git_object: 2fa11c778b7bfd350cabb68566c553fc7faf3435 docs/models/operations/sendchatcompletionrequestglobals.md: id: 90e72b8cd0ff - last_write_checksum: sha1:914ddd0a4cf93624f2ef4ec4fe76b585ff66749c - pristine_git_object: 421b621958c2264cd41d7a13285cfbabaf7570ad + last_write_checksum: sha1:d7862a62211f2fb7eef9c731b553de866ad7d455 + pristine_git_object: 9f12b326c289cab94bfb4cad2cfaa4ed1c830dc2 docs/models/operations/sendchatcompletionrequestrequest.md: id: 20682772581d - last_write_checksum: sha1:f5c2b4798fee336c7931d2c0974996555969ddf6 - pristine_git_object: 2f37d1c203702d232527d45f4bb3c63c27630a7e + last_write_checksum: sha1:4468342d290e38cf76c333aa4e3792d623f10371 + pristine_git_object: ecbb52d0cd530a96112ba4aa867648b188358f53 docs/models/operations/sendchatcompletionrequestresponse.md: id: 3ca0009c143d - last_write_checksum: sha1:61487861042d4397569eddb9e8e0acb36c740267 - pristine_git_object: 4a5ce2eff56b9fa36489af4015cf49f28b34cd7a + last_write_checksum: sha1:1b2138105d67f2da14408af1bf9a468588f1c1a0 + pristine_git_object: e1bbee8581dffa217ccab4af059b7aa7c9c41884 docs/models/operations/sendchatcompletionrequestresponsebody.md: id: fb7605216c3b last_write_checksum: sha1:f02e3992bb92521492cd139708fdc85b8a3f8342 @@ -1701,20 +2061,20 @@ trackedFiles: pristine_git_object: be14c3de94902289b9f2d74ba7472aff1895bc08 docs/models/operations/updateguardraildata.md: id: 5b03440d96da - last_write_checksum: sha1:a23003257c4bf4aca6dddfd611e58c0bd88bbece - pristine_git_object: ca469f5d4264cda47dc0a8afd90735c03fb67348 + last_write_checksum: sha1:b5fedeff51cb8b4be58b2e741f8a118168cdff84 + pristine_git_object: 22cbd14ec9d351587650487eb6d9df5bd37963ba docs/models/operations/updateguardrailglobals.md: id: dc7cc05a81c1 - last_write_checksum: sha1:adb00ac53237d2fcc2ad17d201e71f8adabcd3f6 - pristine_git_object: 15cce4f29fe45eaf0688cf2d0c001551bfca71aa + last_write_checksum: sha1:9a81f6463fdae1bddc1194cd2717b2a6855dae6d + pristine_git_object: 5f51b0819f6f85018f24995306dac910a66bf08a docs/models/operations/updateguardrailrequest.md: id: 4750db2d4690 - last_write_checksum: sha1:c7b486778fb2a898b75ef8746a2139c71b0708fe - pristine_git_object: 3ecb4cd6010a7ef92609540df94b7bb678e1fa12 + last_write_checksum: sha1:5cc26a4b53acc9bc2093d7dc25372eef4696fb9d + pristine_git_object: 1a3aa6337529ada13803aeeb59ba63874f6baee0 docs/models/operations/updateguardrailrequestbody.md: id: c4990d5fd9a9 - last_write_checksum: sha1:70b791be2249fa8cbb749f6bbd210f316c34ee84 - pristine_git_object: dec334ee59964888d99c59db4c43dcde479dfaea + last_write_checksum: sha1:2f1070851bd7d7cbc49899394b25668c69bfdac0 + pristine_git_object: 02e8d2bc846a9724b27ef2425bdf172496bfa340 docs/models/operations/updateguardrailresetintervalrequest.md: id: 8535183822a9 last_write_checksum: sha1:01433a87acb6eb0c88a1f34ac392d05bac8c62a5 @@ -1725,24 +2085,24 @@ trackedFiles: pristine_git_object: 0208b727fa6ddc695e52439fbbbbc3919bb9da1e docs/models/operations/updateguardrailresponse.md: id: 5c8279466bec - last_write_checksum: sha1:89514828edc7ed7ea47b933adfe9428343ee0752 - pristine_git_object: 2790251cd1e0c4d375772f3af21e7694b15cd0cf + last_write_checksum: sha1:714f394c01dbde489c870e026eb7301c497eb49a + pristine_git_object: 51f061f5c4ba1c5c86c2c16e982d127410ef3de5 docs/models/operations/updatekeysdata.md: id: b58660ebb695 last_write_checksum: sha1:682862fea7bc47e5232a37789270ae125485f3f2 pristine_git_object: cb9bc482707e82e6fa4c686137f6109c9cc0bff1 docs/models/operations/updatekeysglobals.md: id: b787a566b0f1 - last_write_checksum: sha1:fcb3bf96a6c877c78d60756595c3814b715ac387 - pristine_git_object: e7fe102b0e568cb7234bf9641e6a09b085af7139 + last_write_checksum: sha1:3972f0041ff459140f561ebeb2fcf11952a527de + pristine_git_object: e786a2e3c895daf96d8e71a48248ab7f68261268 docs/models/operations/updatekeyslimitreset.md: id: e2a79a6b9e42 last_write_checksum: sha1:75d1bb1bad2c971834d18b317e073586b4254798 pristine_git_object: e6b17d013c129d585d241b0c468b4d52e42e987c docs/models/operations/updatekeysrequest.md: id: 153c6f74887d - last_write_checksum: sha1:674ba7bd97033aa828d19c0ef2efba6d89dfe232 - pristine_git_object: 05be4f4950a3ac20ccb95ab98382d112f1bb8a2b + last_write_checksum: sha1:5d41bd90448068d5031f4941b684fcbf7a0eec47 + pristine_git_object: c58123c8fdd03fe4bcc7da4411edf824dd690d62 docs/models/operations/updatekeysrequestbody.md: id: 9971c36d6183 last_write_checksum: sha1:fa4431812f2f5f4dca931799fabf5f356d61ba16 @@ -1763,6 +2123,14 @@ trackedFiles: id: c7e71a30706c last_write_checksum: sha1:f20566610f7231c6e4b8616b55612cb645aec2b4 pristine_git_object: a47730add7de7c357505bd52d7df97ce35232e53 + docs/models/outputformat.md: + id: 80d5ef4c9cd5 + last_write_checksum: sha1:0f4048bf29d99fbf76ae81bf84f7c22883b0e282 + pristine_git_object: ba62d3e5e237482286aa39bc747b3a5ca271eda8 + docs/models/outputinputimage.md: + id: cde5ba2f8cdb + last_write_checksum: sha1:1b86abc728f07b6c59acdaec02c9d0a3c4a6c203 + pristine_git_object: 50c1626482af50a842947a1a575429e3b47cc5b3 docs/models/outputitemimagegenerationcall.md: id: 5abecc8a8d16 last_write_checksum: sha1:032c564efcef5d8e19d85d38b8ccb39522447a94 @@ -1773,12 +2141,24 @@ trackedFiles: pristine_git_object: 06c7d7bce3957e371abf88b72932c381684c553d docs/models/outputmessage.md: id: e52a5866db02 - last_write_checksum: sha1:bb806edb877f8a238cfd8fc4f9c0991998751ad6 - pristine_git_object: f5cf0ba2adf53144c977475ccb0977453477a1ed + last_write_checksum: sha1:1236707e8d8923906d77564ed879f0d899ef8190 + pristine_git_object: e5657b7a8fe4d1cc7ad9f80be4a9bf7b8850a7bc docs/models/outputmessagecontent.md: id: abe8387622df last_write_checksum: sha1:a84e14c42f1d6bfbdc798f522b9a87041347b4c7 pristine_git_object: 24ed1552f16214b458c033eade1f72d2920c939c + docs/models/outputmessagephasecommentary.md: + id: b5d26a8522fb + last_write_checksum: sha1:543070c314dcbddcb234c1677871c9bba60c7f12 + pristine_git_object: cb0d8814dded7da129f2a0fb2d3b8e5d597e6ddd + docs/models/outputmessagephasefinalanswer.md: + id: f21e6b8aef89 + last_write_checksum: sha1:ffdc75a7be0502f12c0993539dec38e7700fd565 + pristine_git_object: ff5fc926e8d041b056ff478185b46d273235e1e6 + docs/models/outputmessagephaseunion.md: + id: 26aacc341ead + last_write_checksum: sha1:9127c5bd1ca95a9f5420a7d863116bedb8e71096 + pristine_git_object: b472eac7923812c7c6f8463bec7a259ee5189bfb docs/models/outputmessagerole.md: id: 400aaea846ec last_write_checksum: sha1:3da10c86f5398b928976f7c068ff336ca0f349b3 @@ -1805,8 +2185,8 @@ trackedFiles: pristine_git_object: 698f2ba84bcf9d383a76f4dd216ffe19ed15aad7 docs/models/outputmodality.md: id: 6fd80b0d62b6 - last_write_checksum: sha1:2f6da4ca250ea95e0dbac5c6202ef52c30f30509 - pristine_git_object: ec9c6f7699bcc581827a253aaf2ee071fc83ef69 + last_write_checksum: sha1:ab60458d0faab216c2a8e8ae51d5091790ffcf50 + pristine_git_object: f0c44c3dada8e4b1aaf318189717dd6cf3ac2007 docs/models/outputtokensdetails.md: id: 4ea91230cf2d last_write_checksum: sha1:2523e32649cad606e8e0b52151d862cf08456b29 @@ -1877,8 +2257,8 @@ trackedFiles: pristine_git_object: ccc55e39bb505328a748b34c3978bf69e2e31fb5 docs/models/providername.md: id: 661ee6ccfa8a - last_write_checksum: sha1:90376da97520c463b8078a1cb820b988e1257412 - pristine_git_object: 17228b59b079aee4ba1b08ad62a2e55ce136c0c8 + last_write_checksum: sha1:11a76a569ebbc3d01f782bb2e49ef4c0b6ac1ff7 + pristine_git_object: bfb2117301147e9eb8e6a6682899f8de643d2bda docs/models/provideroverloadedresponseerrordata.md: id: 23d66996874e last_write_checksum: sha1:93e27b1eabea198409d833c54370b889a138f6b0 @@ -1889,8 +2269,8 @@ trackedFiles: pristine_git_object: 306c9db4c74770bac0d3ccb22c1ca343c1826829 docs/models/providerpreferencesby.md: id: c158490e5169 - last_write_checksum: sha1:48212c3bb5ba36e862691c2b33b5114b75316526 - pristine_git_object: 3fe7a639ad05aaf1003483e3c161b7a75defb1a8 + last_write_checksum: sha1:c6b0073744230911b46b396c9dbadeac569177b4 + pristine_git_object: 46e665f039ed3e0ea4d98238febe335abb4c14c1 docs/models/providerpreferencesignore.md: id: a4edb667e4e3 last_write_checksum: sha1:168239130d7819aaa9dc83613dc8a75564927122 @@ -1913,32 +2293,32 @@ trackedFiles: pristine_git_object: 20b636f3178aeeb6c2fedab5908d67b99f7a8897 docs/models/providerpreferencesprovidersort.md: id: 07b60010ff38 - last_write_checksum: sha1:705b0e95024c0bf76f73a809bc8ff458422f0df5 - pristine_git_object: 9b947c3efe39792b3b46f683c6cffc41886da268 + last_write_checksum: sha1:b07be0f5dda8d87939b3c1cffe989ae669eb42a6 + pristine_git_object: 56fd7f164b9d3238d4272a34d403c09c309348c6 docs/models/providerpreferencesprovidersortconfig.md: id: 166996ff16db last_write_checksum: sha1:080ad6b029f43acda782720deebc77e2a1a71322 pristine_git_object: 5fe0b816124b2af1cf20e73210c65aaa4dd36f0b docs/models/providerpreferencesprovidersortconfigenum.md: id: 94d3da0f14bb - last_write_checksum: sha1:bb2d03c4af4fd34527528b47b70ef51db7c19d18 - pristine_git_object: 1fefe429109b5c52dc54d9ec3d2c1d2be8914f15 + last_write_checksum: sha1:f791319a3b2291f99055511df665fb852fb6926a + pristine_git_object: 488f781432cdbfea0c83acef02f4dc7b0ca38c36 docs/models/providerpreferencesprovidersortconfigunion.md: id: 136affb233c5 - last_write_checksum: sha1:96df4339f16abe736c1a952c0b9a10e0f43fb921 - pristine_git_object: 1acd3e027a167965e58739bcf5bf9a9502acafe6 + last_write_checksum: sha1:55b7731e3bb85ce1c5990097884ed1aff46367a5 + pristine_git_object: a05a4239b04d618df9ed8594ae8079e16d796413 docs/models/providerpreferencessortenum.md: id: b6f1768bdd66 - last_write_checksum: sha1:4da6aa1714aca689c3a48b628fec81680c225e24 - pristine_git_object: 3feec34022c116e1afe1ff06a1ab744aad14e8be + last_write_checksum: sha1:3c16b9e6328bf582c203beb359eb641cddb3bf40 + pristine_git_object: f4cbbfc15f0f9add24211a59f7a8106e637ef4ef docs/models/providerpreferencessortunion.md: id: 92cd060f2cd4 - last_write_checksum: sha1:3612d004faf30e803da3f3acd81a1d5c438c68a3 - pristine_git_object: 0532bfa028156557936144997048a511dcc9039e + last_write_checksum: sha1:235974235f98685dbd2c8cabe67823cb7c370505 + pristine_git_object: 1f9600b5433f706d2811ba7a822df9a360fa1bcb docs/models/providersort.md: id: dedd9969d635 - last_write_checksum: sha1:f8f0fd4a52d1b3c40168ffb4703cb3b6a5fd54e1 - pristine_git_object: 33c90282a34706f36bc89f14eda4563a59263db5 + last_write_checksum: sha1:129a198a977559b4d910417ce8dc33d68d4cc56b + pristine_git_object: 288d3aa415f6967150b25435b85c5943e905ec8f docs/models/providersortconfig.md: id: 4e7360c62f6f last_write_checksum: sha1:1ec8d04ce90ab3a9558d3c73373998922f1ede59 @@ -1955,10 +2335,22 @@ trackedFiles: id: 458e4872bda4 last_write_checksum: sha1:f16e42c805ba68b931793ef7cab7c41dd56a1372 pristine_git_object: 280397773584e18f996651fd71062568182befe6 + docs/models/quality.md: + id: a266576ad922 + last_write_checksum: sha1:458f1cb8b0e85c2353cfa32c75550620fec06a97 + pristine_git_object: 832f0063cb16b398cb9f401754cbc2e088aa677a docs/models/quantization.md: id: 3ca4534df268 last_write_checksum: sha1:936e548d540b1308af1cac36880679a8dc0c0826 pristine_git_object: 5b6f873fde30f98f195c2964727eafff5ab4fa4c + docs/models/ranker.md: + id: 228bf4500066 + last_write_checksum: sha1:6a83adeec98c4d4ea5c3c7fffd78f0587ad5c8bd + pristine_git_object: b96517e6ecaf166331b3986cbc873c4ea4097fbf + docs/models/rankingoptions.md: + id: e5499f41aa21 + last_write_checksum: sha1:676ed3efcee47be2f7c8885f887ecfde8469ee45 + pristine_git_object: 3adf112f484a525afb683687365cf61df1955d16 docs/models/reason.md: id: 087688da6fd4 last_write_checksum: sha1:bdce1cff14f6eef24448c427c8dce1f944d4fc5f @@ -2019,6 +2411,18 @@ trackedFiles: id: d8c3c018c9da last_write_checksum: sha1:db536113967f3acb8e19fed70eee3dc3dedfaa19 pristine_git_object: 035e06a4d3553d4dd50a7f39bb788eae7e5ea48b + docs/models/requireapproval.md: + id: 849ef50aae95 + last_write_checksum: sha1:a30899df180d439ec5c3389aa7dcec2f39c7a5d1 + pristine_git_object: 32ae10be36ceca3a94b26e75a646ca58e2ab2a9a + docs/models/requireapprovalalways.md: + id: 05d4af4eccd7 + last_write_checksum: sha1:ec913748088e06f58bb2c16860c983413b767768 + pristine_git_object: a773b33e76efa25e53a56d4d729221d3fdd3f59f + docs/models/requireapprovalnever.md: + id: 77f9fa189fee + last_write_checksum: sha1:9cc2b084de7b3d0ff91d18d051083eff8adf31f9 + pristine_git_object: c67e97d077270ee4cdf641bd24a871c53b99e3e8 docs/models/responseformat.md: id: 50a1e4140614 last_write_checksum: sha1:7d0a4f567ce641a065e6f9421ca151880453fc7f @@ -2085,8 +2489,12 @@ trackedFiles: pristine_git_object: 863fc5cd105d4c1950c21ef4b64ab65c59e2d1e8 docs/models/responseoutputtext.md: id: 95e91ca81990 - last_write_checksum: sha1:49241881ccb25962d988cd4c8557bd04b433cf76 - pristine_git_object: c0d9c093f7ad217e8cf3cc469e940107412bb3e8 + last_write_checksum: sha1:50491236b5e708d7b7784b7945fda71901bf2269 + pristine_git_object: 76338eb342729aae5bd236f26d087354499371da + docs/models/responseoutputtextlogprob.md: + id: c8fe84770887 + last_write_checksum: sha1:33d456f609ec0289cff49992181390dc2162aa76 + pristine_git_object: b8f8dbd40a99c8dd179a8746a73f41359df2e499 docs/models/responseoutputtexttoplogprob.md: id: 4cae20e12fcf last_write_checksum: sha1:561e05b3d842295788e963a3cd0d5609657a7778 @@ -2113,8 +2521,8 @@ trackedFiles: pristine_git_object: c4e448544e9d5a57db6541702f843ea8ab13a62b docs/models/responsesoutputitem.md: id: 99c5e60fc6b8 - last_write_checksum: sha1:a022310aa21f924a0ae89f33a0151cba577c49be - pristine_git_object: 56976cb053dec115700cbfb4f58b49ec689f01ed + last_write_checksum: sha1:986255986211b543572087798802b727f37e36b0 + pristine_git_object: 1fed6af399830d731f881b1f38d5c2870ae49876 docs/models/responsesoutputitemfilesearchcall.md: id: "1190997683e1" last_write_checksum: sha1:123d0a3f4250b57fa385a0fce52895cffa57bd90 @@ -2177,12 +2585,24 @@ trackedFiles: pristine_git_object: 938ccae6d87b53e63106aa0d51b12ceb9ff15a23 docs/models/responsesoutputmessage.md: id: 9c59afc78069 - last_write_checksum: sha1:0dca545f6b75052f3bd1732f0e08a64f2260581c - pristine_git_object: 993206b53034b04a56fbb2a549ae1981808d96be + last_write_checksum: sha1:4caa659bce20fe9848408caa0a23b93dd79e6710 + pristine_git_object: 3f6f1742c537d17c71ee304bfdd3298f14d5771e docs/models/responsesoutputmessagecontent.md: id: c1adbb0eac4e last_write_checksum: sha1:497217438ed67d84e44cc79becd517e58b24a6fa pristine_git_object: b7affc9c39a2aa3ef5f2882b5f6149ae9f7f80f1 + docs/models/responsesoutputmessagephasecommentary.md: + id: 5ffce1689f96 + last_write_checksum: sha1:1d771ff367f2bafa30f8514259e48fbb678450e4 + pristine_git_object: 5fbf68528cccf36f7b49712d456c99f7e55cf3fb + docs/models/responsesoutputmessagephasefinalanswer.md: + id: 76e8d531a7d4 + last_write_checksum: sha1:98483f2e0da37cfa20937d89c862a4af614275dc + pristine_git_object: 93203fddb3e216d0e277559682050889e5a68967 + docs/models/responsesoutputmessagephaseunion.md: + id: ef0287fe6a16 + last_write_checksum: sha1:a9ce30f29527e411cb014b09e44012ed1495b267 + pristine_git_object: 4382fd7eaa96b3432593ab04057c6bbd9cb4c030 docs/models/responsesoutputmessagerole.md: id: 0aef9e05ab76 last_write_checksum: sha1:bf19d3f5415cdf407c4ba92c815ef7144650c598 @@ -2215,14 +2635,26 @@ trackedFiles: id: e0d2720792b0 last_write_checksum: sha1:117f5155c607bfe6cc70f67aa730c00144a4ba9b pristine_git_object: a3edc639c785f9f2f05bc6d658e71de14ed334f1 + docs/models/responsesservertooloutput.md: + id: ebd3920649ed + last_write_checksum: sha1:b4ec7d94d9128cb84cb74895c7a89e485838a330 + pristine_git_object: f7f0aaca382ef984f043f8ca743155a522246410 + docs/models/responsesservertooloutputstatus.md: + id: 97e62d99a02f + last_write_checksum: sha1:7378583d48430248b84d5bdd3a5175411aec55f9 + pristine_git_object: ca0b3c94bbf1cbd3c4f6fd20f60af0adefb8c5e9 docs/models/responseswebsearchcalloutput.md: id: 4593900250fd - last_write_checksum: sha1:56eba8ce7daba726ab6a1e766f8d2febc64110c6 - pristine_git_object: 875b5953e3f6d3955282988385bc518899117554 - docs/models/responseswebsearchcalloutputtype.md: - id: 1fc3c74fd858 - last_write_checksum: sha1:e5cabb8833ed6ab2ab09018593595b7cedb31ba4 - pristine_git_object: 267a8904db22244465b60a6d68b4e2ce2b6eafc9 + last_write_checksum: sha1:d621a9b1af03eb257c64184cbd4682712e8c8a7d + pristine_git_object: 19fb9df316acf054a4a920ef9cb21be4c12eb449 + docs/models/responseswebsearchservertool.md: + id: c4fe0306f070 + last_write_checksum: sha1:c7e9e288633cdbf83f6a2104b593d8ccae64691a + pristine_git_object: 7020b13d2314c3cf2c1dfe0a18dcce56e47f26cc + docs/models/responseswebsearchservertoolparameters.md: + id: 0dc6c9d5559a + last_write_checksum: sha1:2fb30f4a9cec5bab41664ef20b4cbd71d1a88c11 + pristine_git_object: 53e9777b4602fb40b6605dec4ee6662933090ab8 docs/models/responseswebsearchuserlocation.md: id: e0f83659764d last_write_checksum: sha1:38be84eaf74ef98cf30ebb935d2c37b8266ec278 @@ -2251,10 +2683,22 @@ trackedFiles: id: b50775a0d86d last_write_checksum: sha1:24fb8c872debc75aab710d0fb0ff6ef3619f7859 pristine_git_object: acbb103131a68a6cb0eb141ca860390174b3b7d0 + docs/models/size.md: + id: fa13061e86ae + last_write_checksum: sha1:d2fdc92203e77c11f08db375db109dc3b6c1747a + pristine_git_object: 03963cd18628220ab4247967f7d333eec8ec5c15 + docs/models/source.md: + id: 6541ef7b41e7 + last_write_checksum: sha1:a42cc7c70cebcf51fcff0924a663565de5bfeca1 + pristine_git_object: 9b64b472f50739a8f356df88f52730fbd23d42e7 docs/models/stop.md: id: f231cc9f5041 last_write_checksum: sha1:95c2ed4b5980bcf9f0bb22b368e78934a8ec8bef pristine_git_object: 7e11196842bcbfed098627675ab33ebb7fd22c01 + docs/models/syntax.md: + id: b5f23261fcd5 + last_write_checksum: sha1:f2a84d2687b83383cf324fa0b99b078fb7916556 + pristine_git_object: 18f16a8c97140382fd2a46d7743e96cfc254f684 docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:18b4b56bd13ce3b0ca6a6fe7bfe13dd19ad17845 @@ -2289,24 +2733,24 @@ trackedFiles: pristine_git_object: e2db43c12b5deebc781e88c1b177c85d24f3749f docs/models/tooldefinitionjson.md: id: 30e8e6d8a7d2 - last_write_checksum: sha1:78fdf2cb0129c7f2ec1288ecc4be2a283ffef7a2 - pristine_git_object: ab5f6870e8ebc7b8dbdebbf8fcf3b951f2b8b40d + last_write_checksum: sha1:3a18307f65fc105b22e97803459ca7b4bf9e609d + pristine_git_object: e90d1faf5e3a6e53e6d0760dc0c99dc946a8fbee docs/models/tooldefinitionjsonfunction.md: id: 75761f9c1950 - last_write_checksum: sha1:88063ac26c377baaa329a036d1f7ea597cbb3080 - pristine_git_object: 0da6b3ca53c2c0b33751f5433ab49c5d2ebac9fb - docs/models/tooldefinitionjsontype.md: - id: 4dc3dae1ea45 - last_write_checksum: sha1:365a1506e89492ed19d843e6b97c8dae1250ed69 - pristine_git_object: 5a02c200e082071af2a24137f4fcb4a953f4ca73 + last_write_checksum: sha1:f709dd6c2421272e2ed584160354e5fc266dd6e6 + pristine_git_object: 2a7ceadcae31a2cfb12b6812e30d85ea8fdd96db + docs/models/tooldefinitionjsonfunctionfunction.md: + id: c29082fc1331 + last_write_checksum: sha1:dcd227bb8f289b74a35bb8bcf518ab397180d76a + pristine_git_object: feccc0651c139ea597017e048af4e2474e29eabd docs/models/toolresponsemessage.md: id: 74f6bc03e6c7 last_write_checksum: sha1:a9f26c1ce2f7e312cc0ee99b9e634d87506298f8 pristine_git_object: 50404c94776b628ba3c2b7ab1d038d86f0ee23b7 docs/models/toolresponsemessagecontent.md: id: d3ace04b6d28 - last_write_checksum: sha1:6d1cb311171c9ef7d62162d73f2a47eb92d35dc0 - pristine_git_object: 2d46ed5593578dc046134a5aad453005217eb363 + last_write_checksum: sha1:f1e63e2646c44322fcf818509e6fb8b5ca8abc8f + pristine_git_object: ef0c99e989a66a479410e911b15112722cd2ade8 docs/models/toomanyrequestsresponseerrordata.md: id: b4929af623aa last_write_checksum: sha1:6135140c8a32957c3007ab7a00bc13970d083cca @@ -2319,14 +2763,18 @@ trackedFiles: id: 075cd6c561df last_write_checksum: sha1:a4d0e764b76646b4cbc000895f1512dcad4e09fb pristine_git_object: 0ffdd1b689aaa0cfb4970bcee23050f5ea8c17f2 - docs/models/ttl.md: - id: eb9c4065336c - last_write_checksum: sha1:4af09c2a63a84de8f5a6cbcdcf973f4062f0d399 - pristine_git_object: 34f35ace131a52649d3a3830b732feed53181ebc docs/models/type.md: id: 98c32f09b2c8 last_write_checksum: sha1:0ab2246ff8dbb5a4b379ef7356b2b6d3fd5d8d6f pristine_git_object: 71afedd4f19f14664c959cd332da798d860e7fef + docs/models/typeurl.md: + id: b2b253610bfa + last_write_checksum: sha1:8a8edef8f989c578d2c1a6d60a3c2345723ef2d5 + pristine_git_object: f3dff1721e733ae4322aaf271700fdece67aad10 + docs/models/typewebsearchcall.md: + id: 94eb257927f7 + last_write_checksum: sha1:d720b3663ff1b3bdf3466c91ff808872889b6dad + pristine_git_object: 946c111d2b0a8421355b271b606b1420e65716d0 docs/models/unauthorizedresponseerrordata.md: id: 769991618d26 last_write_checksum: sha1:073e42ea882cc210725f64898e33a58687444bdf @@ -2345,8 +2793,16 @@ trackedFiles: pristine_git_object: a9730290644f3a68b9eb637ae0784c976e4f6f43 docs/models/usermessagecontent.md: id: 52c072c851e8 - last_write_checksum: sha1:c90522b9a9519781fec6ad746725aee98d64fc4c - pristine_git_object: 70ea3af8a9d0cae66da7c537b2910487d597c583 + last_write_checksum: sha1:a8d1e7aba5c1e40658b5c264d195c5d543e7cde3 + pristine_git_object: fa5833b5544c59b6acc96c1d52da108a01498853 + docs/models/value1.md: + id: 5d6c54c6615a + last_write_checksum: sha1:8f0d1850d9d5b27f3717389e66940ea8b79522bc + pristine_git_object: 14cf6ee7046fb6906ba16a49b42e0adcae8e937c + docs/models/value2.md: + id: 4eceb26154e6 + last_write_checksum: sha1:6a308cb36ac4093c71db9b30b0dacb56e9a69d45 + pristine_git_object: bc3d57a239e953ecbf8db811e906c50c38d7fd60 docs/models/variables.md: id: 332583bb3e65 last_write_checksum: sha1:c2cd3fe1d6b00556a5032759a4b4862edeb51137 @@ -2357,8 +2813,8 @@ trackedFiles: pristine_git_object: 776af9320964cdf98ff10ed57bc3972069655cee docs/models/websearchengine.md: id: 2a21d29e41be - last_write_checksum: sha1:880ff8f1183b1b88d85ae88c5e83ee21f1d3535b - pristine_git_object: d1e25e5047a302c6930a31d8938f70794d1dd26d + last_write_checksum: sha1:66d1a9b10487eeb572145381eda99131691a227e + pristine_git_object: 13b5ce054a4d12782ef40ac1e6b11a706d621835 docs/models/websearchpreviewtooluserlocation.md: id: 8e7c968669cb last_write_checksum: sha1:2a52ee2132abbe2bc8fb0648e5beedcefd172124 @@ -2367,58 +2823,126 @@ trackedFiles: id: 3c7796cd0be3 last_write_checksum: sha1:48748acc78d4e9517ce6ab10aa77cf56399fa94c pristine_git_object: 60adb97fcc82042588a2ca5abbacb780c20c3db5 + docs/models/websearchservertool.md: + id: 46b94ec8dea6 + last_write_checksum: sha1:5cbd1a0b57bdaf8c2b0ab1a1256e3f90a5d80096 + pristine_git_object: 6cef6e62991a2f9f0e48727edd24c61d49e90bca + docs/models/websearchservertoolengine.md: + id: 2901cb207f2b + last_write_checksum: sha1:e1de9f4289deeb0712d7a03d40b36c34a69d33db + pristine_git_object: 1162ddb4fa4142727cb9ff7dc6a25ca1e8010bc9 + docs/models/websearchservertoolparameters.md: + id: 8f1067695253 + last_write_checksum: sha1:f41b182bdeba5a7c12b1aca2068b6bfb17886c9d + pristine_git_object: 22b3f8b968c1c81194040f77f9891a284ccb5322 + docs/models/websearchservertoolparameterstype.md: + id: 2cc18df7b4c9 + last_write_checksum: sha1:e1ebae94f4da0e618a4865c5f1b989e0053ee2bf + pristine_git_object: a5510cea1021efea7f8f714336d87b248e0a9744 + docs/models/websearchservertoolsearchcontextsize.md: + id: eb6e5b9cabf5 + last_write_checksum: sha1:3eab328c35e786d6ea46c386faf7b6eed9129caa + pristine_git_object: ff1cd284545a5669ae6662e375dcbd6bfd932eff + docs/models/websearchservertooluserlocation.md: + id: e4baf53e184f + last_write_checksum: sha1:4afabcf079525cd92b6635e3c3f6fd299b97d591 + pristine_git_object: 66d36df447831d266824afd6cd3acbe58aa526f5 + docs/models/websearchshorthand.md: + id: 90377524efd2 + last_write_checksum: sha1:fe7d80ad702402fb1cacaa2b409b961a7dea8e54 + pristine_git_object: 250945b386533996cfc1735e3aab9447b48a9274 + docs/models/websearchshorthandengine.md: + id: 193c6fafa556 + last_write_checksum: sha1:47b85c81e82027eded568adb7ebbfc0869742b09 + pristine_git_object: d237f0bb81bdc9c1fd751298a339291a719ce91c + docs/models/websearchshorthandparameters.md: + id: f124fa7e66f2 + last_write_checksum: sha1:f94b89589fdfeebe5c4d6cebe27603e6f4fac4be + pristine_git_object: 85bb6c53d44720e2e897b7c4d3a1a3a6732f08b0 + docs/models/websearchshorthandparametersengine.md: + id: b8644ad1314e + last_write_checksum: sha1:5d1abff82737f13a93c7fa81f2c9032ddbf7b49e + pristine_git_object: b193c34b7ded3da8eca01940d543b9663c1d15ea + docs/models/websearchshorthandparameterssearchcontextsize.md: + id: 5027091000eb + last_write_checksum: sha1:d991e2b20ffbc9429e73fb765ebdfd7f05f713be + pristine_git_object: fa2885754ba70ead5f6f3492429030d00b83a1d4 + docs/models/websearchshorthandparameterstype.md: + id: 4ddbaefe8cbe + last_write_checksum: sha1:44bcebcb2942bc8b92b047d83c432b42977e6e54 + pristine_git_object: 082ce2e9b633dc707888809e85e7ddb8811e7c35 + docs/models/websearchshorthandparametersuserlocation.md: + id: 552193eec927 + last_write_checksum: sha1:6794a2f903705dd967661533a7295c70e394b077 + pristine_git_object: 3050b388615345a7d28565db91e6ced8a7540eaf + docs/models/websearchshorthandsearchcontextsize.md: + id: d8906b428b58 + last_write_checksum: sha1:86214ca00882b4c4ee09509b8ae8020ba412c7b2 + pristine_git_object: 2b8d572c4644171261d75cd6a4b6a85002f4c792 + docs/models/websearchshorthandtype.md: + id: 6fcf7f2cdefe + last_write_checksum: sha1:f46b437492ff35ee1e5faa4961c7e002abdff22a + pristine_git_object: 97342d1968647a4040a0e0c81ad904a3abc580a2 + docs/models/websearchshorthandtypeapproximate.md: + id: 189b99e367e6 + last_write_checksum: sha1:8b5e9869d93676a0a7538fd18200dd1eacc2a6bc + pristine_git_object: a1d3b1eb1652d4c0567f8c64ca457b36062ec5a0 + docs/models/websearchshorthanduserlocation.md: + id: 8ef4a31c8233 + last_write_checksum: sha1:20798cdb27868bf7b7c0d8c45a07f8be2decbce5 + pristine_git_object: 3012ff82e74f8e5ff21e23fb8db93f37ecd9f4c6 docs/models/websearchstatus.md: id: 2d69b50ae71b last_write_checksum: sha1:8a219c533251aa3c13db3d2e56c31a989c8f2a3c pristine_git_object: 6b279535767db50cb216c9de64a85a91e0481399 docs/sdks/analytics/README.md: id: 4c84abb05030 - last_write_checksum: sha1:6c26a69c2488265d934a5bd0ce8c95a6c00af98d - pristine_git_object: 116c41d9a7bb8f178551d3e0271cb60eb252c16b + last_write_checksum: sha1:4e54a77cc2c4e0231428ff27a9d20541b0f4ed7f + pristine_git_object: d74a22067d9997ec0c76f882f351ec558cd01ff1 docs/sdks/apikeys/README.md: id: e2bd25998427 - last_write_checksum: sha1:4d1d19701e54c9dce232b7c95c57b149b620f6ca - pristine_git_object: a21f23847e5222b0d2b19cf12194e7ba09f381f8 + last_write_checksum: sha1:93bb601c259c528457774cd5bd9493990a21dfce + pristine_git_object: d5424399394468280b833d9a1082c00a42c9534c docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:3a7c3e3c56d82621d5c5df04902a91cfe9f31117 - pristine_git_object: e53280e2c55d52f1ebbac57f933302d74fbad9a8 + last_write_checksum: sha1:02767811e8b5668d587c7fe2e743c849d7e8a6e7 + pristine_git_object: dba6c3a4553f9ca681fbc0a96d500a8e1d1d653b docs/sdks/credits/README.md: id: 81608135c0ff - last_write_checksum: sha1:7ebf2a794e61eba8ecbf33d2426b56e44d805913 - pristine_git_object: cff81afb801d69c2b30d9de6a1b0582130ce9a28 + last_write_checksum: sha1:4bb44b478c0d1e0423790679428c3b74d25bea07 + pristine_git_object: ee5a6600c153c598b1806cf5c216511d83a0c8d4 docs/sdks/embeddings/README.md: id: 15b5b04486c1 - last_write_checksum: sha1:85404f82829f1a28e40f947fcf011f0429c5dd47 - pristine_git_object: 075ad6e0371abca90242cc2ffa312d6ee0a59ab6 + last_write_checksum: sha1:d8e5a2c9498b1fa97d75bf4f85592630617cef29 + pristine_git_object: 286acc1a794c34d932712f41a331db5d802828bb docs/sdks/endpoints/README.md: id: 80d3fa9f5f5b - last_write_checksum: sha1:d68a028304068787331cfd8cb601bb84ec987b55 - pristine_git_object: fbf861e83e508fc07236c25817a58ada600771fb + last_write_checksum: sha1:e3ab3615747e2f29ad687ff9e6ac6e11f434556c + pristine_git_object: 6e24546b375d8ec6490dfa420f87a4c264b53f67 docs/sdks/generations/README.md: id: a7d12ae95fb1 - last_write_checksum: sha1:637782605c4772ff1378bbd0c904eff0f0acd455 - pristine_git_object: cdd2319dac36cdd2e9e2cd35a89fd3bb81044b71 + last_write_checksum: sha1:f259bf46cd7ec3b7caf5afcd9bb730e6f73d5c6f + pristine_git_object: 0667b0577924b2570ed4a32459c111383170361f docs/sdks/guardrails/README.md: id: f72b38a5a2a7 - last_write_checksum: sha1:3b33c2c8ed5688cef09c912b178378599e5d6d96 - pristine_git_object: 657c243049d0cb63c5f56f866388e7fc2c0b26ca + last_write_checksum: sha1:7dcf248293db2b4e7b762956aeebc85f8aafd450 + pristine_git_object: e55ef8b0f8783d4d3bb739a0e37e2c19cca0d1c1 docs/sdks/models/README.md: id: b35bdf4bc7ed - last_write_checksum: sha1:db39326078718e4eded940e2fbfa40f279b1f3fb - pristine_git_object: 97780185b1f6b2851305e229e86fc695db975206 + last_write_checksum: sha1:f725c16e8c418ac7cbb0b34f129f1d8c0ff6c042 + pristine_git_object: 2e4d0e645aa9c251cef6c2f028a1c6c3502ffea1 docs/sdks/oauth/README.md: id: 80ad2c1a7b62 - last_write_checksum: sha1:a0afdcc4798276258285b6c0c76fe17ce09b7891 - pristine_git_object: 186166808cbada94c25c1051c7f9e7c1be1f80aa + last_write_checksum: sha1:defbc1d8278d76e99e4eb5473f8acb048d92621b + pristine_git_object: c3e6fb2bd1f6a37436c4077e5b6aab3c2898f648 docs/sdks/providers/README.md: id: b02aa45c0093 - last_write_checksum: sha1:ca9a4139a6f23138d344d633e1852641d69e5932 - pristine_git_object: 370e1325bf3c6b521130e2ad6b4f245e95257137 + last_write_checksum: sha1:caca852ec93cf16ff32aef63832948cf43790d74 + pristine_git_object: fe849dc37ce12bac9da8cb2c47dd4c6845df0e4d docs/sdks/responses/README.md: id: e717bad14f63 - last_write_checksum: sha1:c110d888f14c4569f7118c0ab0a4c7c85e343056 - pristine_git_object: c52f6d361cf8e10838954e295cd09b9dd8695c47 + last_write_checksum: sha1:ded040062fb425ab63e1781a0a1c317ad329c922 + pristine_git_object: 09830f2e83f793d88f8ed5dfb43442c8be02bf83 eslint.config.mjs: id: 461c8d07f6da last_write_checksum: sha1:9398f326377fe47f67af2df6eb6370750c0790b4 @@ -2433,164 +2957,164 @@ trackedFiles: pristine_git_object: 3023d20d49edb84df485d98777ec339f33b5ec6b examples/betaResponsesSend.example.ts: id: 66896eb477c6 - last_write_checksum: sha1:dc9f3ab17be7138ab5e6947095fa299361feb715 - pristine_git_object: dee3ed67f94713dc99d8938fc7d2961008f5765c + last_write_checksum: sha1:abb6028790777762a065486f14369217265b1129 + pristine_git_object: 104c49cc6dc4a54ea627ad0161aee252b0e2a7df examples/package.json: id: c1d7b0ec8e7e last_write_checksum: sha1:ce55578b5e4f5ea8dbe806eff6cf5d6bdd8172ac pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:e3eabec047e2b7d51b62e21b8eec90a6acc4eed7 - pristine_git_object: 3af9b507c8459cee419a78b6baefb0530fd4a1ff + last_write_checksum: sha1:4e4b3bb975be1bda63212fcb72d3f2ea4d792510 + pristine_git_object: 4d688aa6a11085c41737ab6b359e4cd622e64380 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:96651ceac5cb2dcf8578f06712345c90a8112db8 - pristine_git_object: f9114306c28ec79977f1e43db71a1535c5276611 + last_write_checksum: sha1:f873aee02a4c8a96aa0f554093aa9d43b2f12c12 + pristine_git_object: f637d53260349af6ec9217c458ff86f11ac06cf7 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 pristine_git_object: 8747345312bcc83a569602bf521f20f0e1559fb1 src/funcs/analyticsGetUserActivity.ts: id: 6525bcc66ab5 - last_write_checksum: sha1:986fe8b69a09be11971c6193f112c5819b36ec29 - pristine_git_object: a342403b51f6f9db50136fc85d46bddd9e7b803d + last_write_checksum: sha1:3f896b945b476cb683f50e5d2e3de7aba2c90bcf + pristine_git_object: 3fb172c2b553841d1f7a8995742fd8b9ae1a4ce7 src/funcs/apiKeysCreate.ts: id: 133e2c5f487c - last_write_checksum: sha1:6606736c71075a0c5e6098c09a7bdf47e2637abf - pristine_git_object: baa091dce8b4815a1f71d55850fe4be5ff36fc56 + last_write_checksum: sha1:25ca9081e1b2850f55ff27fdd6574f476607d283 + pristine_git_object: 15302b5bf9937f57e9cf6759af7fbd7fefb088c5 src/funcs/apiKeysDelete.ts: id: c151c399f75f - last_write_checksum: sha1:780457caa0eaef9bc40a8510fdacd13f4c000293 - pristine_git_object: c8b8a78240b617d8c9f0f0aa70019ce9778bd4b7 + last_write_checksum: sha1:d2b6501f9f57544489b4c4ca87438c5f7b0b92d0 + pristine_git_object: b25c9e3377cc4e903bb6f313efce6c7f307201f5 src/funcs/apiKeysGet.ts: id: 12a5c2abbddd - last_write_checksum: sha1:289e35bbf9a4209718bf99701073cc842b4fff46 - pristine_git_object: 980213cef26815b9d05e84b195cea6b92556491d + last_write_checksum: sha1:ae580e3377632dad612c0f6e82d3efcfa41e4cbd + pristine_git_object: d651712ff6d8e1589ede08293acdde8c11c5eb24 src/funcs/apiKeysGetCurrentKeyMetadata.ts: id: d9449cb31931 - last_write_checksum: sha1:e67a242a06e88ed79030cc448b6ccb46e928c68c - pristine_git_object: 0e7f87e53a0a17f7f329f7fb77f80bc8609c2895 + last_write_checksum: sha1:b5033bfa6274202ac8f4d1f97ab4dd9cf65ae9df + pristine_git_object: 56890099630d2449f84275cb90ecca8807532135 src/funcs/apiKeysList.ts: id: 2afc8d8f1ce0 - last_write_checksum: sha1:fbf4d4208d34cfeeb3f105e6ad0259231433348f - pristine_git_object: 6abc8f05f110eb757f59ec3e54038567c56bd600 + last_write_checksum: sha1:81c624610f4aecf12d1624a5e0eede95739f66a3 + pristine_git_object: 8b2d00b569770a40463899aa1185d996bbd808b3 src/funcs/apiKeysUpdate.ts: id: 05700884934b - last_write_checksum: sha1:5677e6b1f364a984093afe6e1927ecf9715fb848 - pristine_git_object: 93d4e6eee775c3a1d23afe9ad39abc7246c9d945 + last_write_checksum: sha1:134b05b4a7faae9b19452dc98df482b58b195abf + pristine_git_object: fa94c89f136bf7795e34b845d55fb14554fc9f5b src/funcs/betaResponsesSend.ts: id: c5c4ab0c3f76 - last_write_checksum: sha1:4f3df7c330a68a347bd50f7717900b252bd46998 - pristine_git_object: ab899db5c6da144933af7b58fb2ac877050f047f + last_write_checksum: sha1:423650dcffe612e13c2a7b0a18143b4eddc10c0f + pristine_git_object: ebc3f2811cd312fc599106d35d0a4a6f4f1d6397 src/funcs/chatSend.ts: id: 8c3aa3c963bf - last_write_checksum: sha1:f4ed539490a4d3bc976e72b885891718c3b28e73 - pristine_git_object: b72b43c76d14fc161a77a07e0e5bb9e75cd93a77 + last_write_checksum: sha1:e8b960089a4333a0970c658eb00c1d9816d2eaf9 + pristine_git_object: 1a442f1cd8b4ad30935a4e4ef751e2823677b551 src/funcs/creditsCreateCoinbaseCharge.ts: id: e07ee6831da3 - last_write_checksum: sha1:0426e98e9045393f635b5af07b969dd85658f230 - pristine_git_object: 2d44a53e11663375b69a17fa93e18a76ab4dd1f1 + last_write_checksum: sha1:dcde2b49a608ff1510ea6cc7892d388e4996d6bd + pristine_git_object: 702ad6f5efe10f60f20bf52ebec604af5d4c178b src/funcs/creditsGetCredits.ts: id: 88fdc1315137 - last_write_checksum: sha1:474fd391ae81ea06a0043a510cbae0c6447cf16e - pristine_git_object: a0941e9b6489406c9eca0821bf012dedd05ccf5f + last_write_checksum: sha1:57922a22594546e3aba61884924e4e8a18df10a4 + pristine_git_object: 81708b67c7a394d1952d8bc10ab9cbb9eb502c95 src/funcs/embeddingsGenerate.ts: id: f6455fcfe2c8 - last_write_checksum: sha1:a6fe65dcb6086b008b2b788f6d2d36a747d4703f - pristine_git_object: e4884aea3b483ab93d623bc5e8288ce70707796d + last_write_checksum: sha1:00de3b29f99a6e1128fd63f1b06e09ea7631f80b + pristine_git_object: 0b51ab86c84d486568aa7d58ed22e0f28d107369 src/funcs/embeddingsListModels.ts: id: dbe9751f8369 - last_write_checksum: sha1:7acf18f3cd3355b258fda09f2ad708223734d16f - pristine_git_object: 0294a4c9edbce9e7c24ebbccb19b2b2d1a67a8ff + last_write_checksum: sha1:25fc28ea51b53bc91d00289be6eefa6957bdba0a + pristine_git_object: 03ed629fbd3893732d758e66518dabe9af07d977 src/funcs/endpointsList.ts: id: ea932ec09987 - last_write_checksum: sha1:259902acb917f5893df1a32b433e2e816249ea7f - pristine_git_object: 33c00b332b9cf32e42f1c59dabf5b5a06f8c9f90 + last_write_checksum: sha1:1d918021d97523b2cf666c4a10bb2326eeb39428 + pristine_git_object: 5e77a906543a0dc730ac1c3453d2e642b449cc9e src/funcs/endpointsListZdrEndpoints.ts: id: 4efb7ea3e48f - last_write_checksum: sha1:1d15fd8781af9144c76deebe3bb1c5563725f0c1 - pristine_git_object: e6aacef3b1e97d04791c78aa03a542d332dcbe06 + last_write_checksum: sha1:72d81dacd4f47f7a6e1f57b35dc9de6034abde85 + pristine_git_object: 2b319a71afb974b5d3ef928848e7f77de2432e5d src/funcs/generationsGetGeneration.ts: id: dac2d205a08d - last_write_checksum: sha1:6aaaafcb5b429cc9e7e06912e62728d4176cac09 - pristine_git_object: d8d9f13dde4c8e4ed7b4d4fdc0eb8cdb29f7c939 + last_write_checksum: sha1:1293a6d874484c413c1f5908394fbb91fea93a27 + pristine_git_object: 8e6648d64ea597cd1830f79e6b001e0041d27673 src/funcs/guardrailsBulkAssignKeys.ts: id: a97261f248c8 - last_write_checksum: sha1:cf627c535b3864a78ec1178a825eadfb54cfc25d - pristine_git_object: d02a781d39fe443080dfebf73078f30448472ad8 + last_write_checksum: sha1:1c8ca5fa406e42a8233c6b9a4f73f12a655546ae + pristine_git_object: cd6e8a23a0f384d0dcc00c2d60255f3702026f6b src/funcs/guardrailsBulkAssignMembers.ts: id: a1c1e49b5bfc - last_write_checksum: sha1:d69bf837e9fd64c76408ebd3ccb68f921d5e1029 - pristine_git_object: 407f2b211fd1b01bb5dcd1b490b02a3c258cb2dc + last_write_checksum: sha1:147698bd64f8a887304ad21458fb25a8c2617bda + pristine_git_object: 288819debd692ca3fed9a7bd30678c82d98e15c0 src/funcs/guardrailsBulkUnassignKeys.ts: id: 605482eb28f5 - last_write_checksum: sha1:54aa0e7bd4df0d3bdfcdffa81814c4b3d1739100 - pristine_git_object: 677a22eb03b805fc3721bd5d5d811fd104978fac + last_write_checksum: sha1:c73644c613548f5c66341f49be7c275c312a59ae + pristine_git_object: 3eee1a5bde0e68d37cf1a126495f1948ba34e67d src/funcs/guardrailsBulkUnassignMembers.ts: id: 582edea4287b - last_write_checksum: sha1:1b0a3c50a1d89c613099bdfdfe72b975fc6f9936 - pristine_git_object: a622b66432b5bfca03ac2e5ede2814ffea4db00b + last_write_checksum: sha1:5618bb8abe54534f2965dfb7a9d71a06b81cf13a + pristine_git_object: 0d2c126d02624a278089dfaa90d20b909b862a34 src/funcs/guardrailsCreate.ts: id: 6d61eb74274f - last_write_checksum: sha1:7e6cff363acdece960822653dbd339fac3e043cc - pristine_git_object: 7fa76ecc10cfed2fa42764ef63c8d7a838ae870d + last_write_checksum: sha1:64076bde775a2edb9f1b830c941cf45a67668331 + pristine_git_object: ec426bd16c28eaa957eeef4ba0bdb05bf7c4e9af src/funcs/guardrailsDelete.ts: id: 2ee7e7eaab9a - last_write_checksum: sha1:6bf0989e2cbc28a91432831608d161548099e492 - pristine_git_object: ae39fb954bcfa932c32ebd29a3b6115a25f1fef0 + last_write_checksum: sha1:5d4e5e4708c39b7b507fb74174ad0672786f8f68 + pristine_git_object: a12462a3c3bd81abb5762f8edde819c3392e9638 src/funcs/guardrailsGet.ts: id: 259eaa63a20a - last_write_checksum: sha1:da84639baf2133e3c0b481aa16842b4b668de1bf - pristine_git_object: fc214264d457b6863613cce20db4102ec05b37bb + last_write_checksum: sha1:9dee93dab74276e0df970d9e6e6c07e088507610 + pristine_git_object: 18d734c33cdd77e6498ab928e3515e9738bafe73 src/funcs/guardrailsList.ts: id: 5a0c89687e40 - last_write_checksum: sha1:2c7db9cfcd92007915df55898a4cff9a196945c7 - pristine_git_object: 3b67c71ea381af157aba6cb9f929ea3df2883d66 + last_write_checksum: sha1:dd97f1aba2c5933babb0521e07392936e5d3cf5b + pristine_git_object: e181e7f4df9d0d69a20e1e678fbe34b40313fd82 src/funcs/guardrailsListGuardrailKeyAssignments.ts: id: 524ae2fd5189 - last_write_checksum: sha1:8b7e62dba0ee600c37b569da8723fd712138f7bb - pristine_git_object: c8b53df732b3b8760469daaf5af00814e3dc6a54 + last_write_checksum: sha1:15ce0d7d2a43f923e92e20f5566a7bd2c327ee37 + pristine_git_object: 07d1b9bdeb3faa3ff7871fe14e759184bfd54a83 src/funcs/guardrailsListGuardrailMemberAssignments.ts: id: fc84c185d2b3 - last_write_checksum: sha1:4f786628885bc3fe234dd7ec5cc7ac9cc29015b4 - pristine_git_object: 2001f54aa89ba101fdb42a4d4e1663978c32973a + last_write_checksum: sha1:1032bab53f6fdbe73839bcd45c70dd679eadedc7 + pristine_git_object: 33db238f82ec4e30ea13ed4370d099023427c50e src/funcs/guardrailsListKeyAssignments.ts: id: f654b4f757b2 - last_write_checksum: sha1:2e2c2f6b87987b1a700f6f58b0ea87b29ee2ea3a - pristine_git_object: 1c3543cf6540b649f49ed706d6514b0e6fa29cdf + last_write_checksum: sha1:96c6a747b32b2d44c2ae6d94ba1520b943217ccc + pristine_git_object: b1f565043644af3cc66b8d6466c31ecde0bce81b src/funcs/guardrailsListMemberAssignments.ts: id: c2762783a96a - last_write_checksum: sha1:2d3b9de354d7204ac7b70e5470454807a7de9d7d - pristine_git_object: 8e018ce7efb36e6bbc1132fcf364220e83d0c857 + last_write_checksum: sha1:2df10691a59e187a6d8851085d13faf36d4eb136 + pristine_git_object: 44f3e6f2dec79b28670d4a1bad10b73e830f5973 src/funcs/guardrailsUpdate.ts: id: f8685ead7098 - last_write_checksum: sha1:f822815e1e118bdaa832496528a6a2fcdb590a82 - pristine_git_object: 4b1d487eb94425841f69acadddfc2225422b74b4 + last_write_checksum: sha1:d4f07c6cb0a00d3b729ea65684067ef222631832 + pristine_git_object: 3a7f4e30e55616a163db84aa8e98b606927fe4ed src/funcs/modelsCount.ts: id: 371adfc67b48 - last_write_checksum: sha1:ada410a6551615ecb0980c37ee855d0856238582 - pristine_git_object: c23a5dd452e24405813a2c1a2571d4426297ad3d + last_write_checksum: sha1:80609e415a3ce22e85911777aa92719dd2c377fb + pristine_git_object: 37341fe95b4f4e71aac9830ad89ff3c9c21729a9 src/funcs/modelsList.ts: id: deff050b46c5 - last_write_checksum: sha1:2075d0016609c5981890a678ba475618b6d95d92 - pristine_git_object: 63fb4744e829f226cb8a9fe1ebdf13a247f980b4 + last_write_checksum: sha1:9b6aa77513f2ff523095f0acc9cf6030c6a5c77b + pristine_git_object: fcae3864c7ed9843574673ba5d8cdf8ffaf6f9e1 src/funcs/modelsListForUser.ts: id: db628dd3c179 - last_write_checksum: sha1:e6181ad614339104f1ce97e5b4545515bb45cb9d - pristine_git_object: 241bf03933bbdce5980c3456242a91c34d5fa9d9 + last_write_checksum: sha1:ec1362ef8ddda13d8d30b46858b78a905b78dffe + pristine_git_object: 9b406a7f176919f9c34dac5c60e02f21e967a29f src/funcs/oAuthCreateAuthCode.ts: id: 8a79f27722c0 - last_write_checksum: sha1:51105b8fe99746576583ac1cef236c1848a56c4f - pristine_git_object: 16ff8e65d27b1df5f550b54848fec70a99211132 + last_write_checksum: sha1:a9f2a489e15a7d58b035982877ceaf70061f33b6 + pristine_git_object: deb51c7d9e41e76b94cabfa00a12bfc3743ae47d src/funcs/oAuthExchangeAuthCodeForAPIKey.ts: id: 3386ec12d934 - last_write_checksum: sha1:ac74158e544317d7b7e6fd72c0a3b0ebb670e590 - pristine_git_object: ee85e68d4946069d7363f4e7810fac30f67ec84b + last_write_checksum: sha1:cf9eb1d87a749960337500633dca8609000a5a99 + pristine_git_object: ba520dedf4ceeebb97264403d6b71d5e3ff96d9f src/funcs/providersList.ts: id: 8ad87e7210ae - last_write_checksum: sha1:75155e57368d77c4e467d6a26555a7c9e9e50625 - pristine_git_object: feca6bfe88829969a536cabaf42b7be36263ead8 + last_write_checksum: sha1:0236177ec700bd755ff51802b7af5aefab2131cb + pristine_git_object: f37022cdb99bc280d34449c87342871237462eaa src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:fca8fbb93caa95e04081273240c61985b717bd09 @@ -2613,8 +3137,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:68f9af1bba3e6eeda5e844bd3d6368b3db0ee554 - pristine_git_object: 036fd55fa68ec95f7c5691ccd88dc8e091e105f7 + last_write_checksum: sha1:bd99780ff8fe256d60087fd6368378ccc777fd2b + pristine_git_object: 96d5b0b3b6d97e2e18d28fc95ae83afb39e9186d src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -2625,8 +3149,8 @@ trackedFiles: pristine_git_object: eaa7618d906d1b67b35f478de026531df31695c7 src/lib/env.ts: id: c52972a3b198 - last_write_checksum: sha1:d06496e6dfdb7ea208fabe4cf406613c3a74e321 - pristine_git_object: 88ff8a654f83a9d36978c658c1fd0257dc95701f + last_write_checksum: sha1:ced3fcf6b5d59d6dbb6dfeab75775ae870dc4068 + pristine_git_object: 24a65d46fa18ccc897235e53d6e3f74eb2bdf5bb src/lib/event-streams.ts: id: 3f731f808a79 last_write_checksum: sha1:b553c5eaad645fe7bdc000828d644a1d9598958f @@ -2681,8 +3205,8 @@ trackedFiles: pristine_git_object: c13ce72558d6d7e328189266bca17c00b433ab2a src/models/assistantmessage.ts: id: 2147a953e992 - last_write_checksum: sha1:5e4c907af2b18e38c74684a9f20fbbc8601769f0 - pristine_git_object: 40c885cecb091997eb183d18eb664fdb3d545748 + last_write_checksum: sha1:0709100fa8bcae785b88ac8b513c37a3b33c6975 + pristine_git_object: 0c4c60c0e6f3125c99edb776c348a0f1b36581cf src/models/assistantmessageimages.ts: id: ca83bcee5e88 last_write_checksum: sha1:038cccb79c9cf80702845fce69cfda8ef2e93e8f @@ -2695,30 +3219,38 @@ trackedFiles: id: 42d173ee6203 last_write_checksum: sha1:547c4982242ba692307c23e889e309d53f7f64c4 pristine_git_object: f2adbe93cad88fc26324f6b9651e5bef9b93eb89 + src/models/chatcompletionaudiooutput.ts: + id: 7abb9a6a0221 + last_write_checksum: sha1:6eab7cd9cb0f674b3df41f72832472002667e0f1 + pristine_git_object: 6fd23d15ba5bc49b651b1597df7fa0f382034f67 src/models/chatcompletionfinishreason.ts: id: 6b06a4d1562d last_write_checksum: sha1:b8825306d92f2cb42eaf572e25e47c91b6216cda pristine_git_object: 83a32911001440f84720f01833289f1de62171fd src/models/chatgenerationparams.ts: id: f98a2a558f3f - last_write_checksum: sha1:22b149f4a05c9a8a4a2ecb408086dec4e8ef61d3 - pristine_git_object: 01d4e66171559fb56421f0e9b365d36662ca96de + last_write_checksum: sha1:4081671f9d7c0870476cafe04f26e3f49cf9d129 + pristine_git_object: 59d6c2931c7364cf60dc6d06312d08f5428a5233 src/models/chatgenerationtokenusage.ts: id: 1d57b0d238b8 last_write_checksum: sha1:68fbbb7b6843c87d8a3eceac28d9531d225fd6f1 pristine_git_object: 4509571bf0f10b40153a483ad9eaf22f245c57e7 src/models/chatmessagecontentitem.ts: id: bb7f6b29b93f - last_write_checksum: sha1:ce5c91ce0f8340fc0578c5d780e623546b542d4e - pristine_git_object: 096ae1632fd9bbedac92c721766f846e1a1fdd53 + last_write_checksum: sha1:18022beabb295b7905245ea0175cedd9bcc97ce3 + pristine_git_object: 8ac1bdcba5bc36ff6833db13733483a1e41daee8 src/models/chatmessagecontentitemaudio.ts: id: 49b1cafcb338 last_write_checksum: sha1:cbd4bd9b2d967cd172d9cd80e5debd8b8a627774 pristine_git_object: a469476879545087c5653b72e07a50a732e94558 src/models/chatmessagecontentitemcachecontrol.ts: id: b5c18e04e19c - last_write_checksum: sha1:5978d47f3c53bb2f169f56c53147c05742cfa7fc - pristine_git_object: e92d5063c9c4e1949eef7adf786fa238207ee097 + last_write_checksum: sha1:e74b90de789062d95e3092a2600da3ee1048ebad + pristine_git_object: ea644cc1a7d8a23263f6ffa1f0fee9edd1067b6f + src/models/chatmessagecontentitemfile.ts: + id: d4fc3862d927 + last_write_checksum: sha1:0d2603d4a3fa13c8bd6bd9ce0c1ab878cb625d44 + pristine_git_object: 95382925d9c9e761dfd6d0dfdbf20caf1516b7a7 src/models/chatmessagecontentitemimage.ts: id: 3989cdc41817 last_write_checksum: sha1:4b19e02a5c49a393e843a5c87f627163cc20abb8 @@ -2741,16 +3273,16 @@ trackedFiles: pristine_git_object: a07ea564a25ab8f8629ca6143afaa42ed229de69 src/models/chatmessagetokenlogprobs.ts: id: 2dbd9fc61ed8 - last_write_checksum: sha1:2fa0c0d84c843ea22c77a0d0c6ab817316927b54 - pristine_git_object: 96f62bae8536276840a740dd84a57dcd97d501dd + last_write_checksum: sha1:b09e1995e809a3d37d7026da419ea126fd45b82a + pristine_git_object: 4922b3e7fb1eac4b73d5ea0831b654fcda92edf8 src/models/chatmessagetoolcall.ts: id: b294b44052da last_write_checksum: sha1:5f4ccc6c8ae6cd7fc8d60b5bd3976887d8c46b79 pristine_git_object: baf5c348832b6668ced7e3e83e989c0e07ffa72d src/models/chatresponse.ts: id: 76c3703fa3d5 - last_write_checksum: sha1:0d34426427d9bcdb3c27ebceb51983e2250ac800 - pristine_git_object: e53973ba6a1c1c5eed7d86cd26e4057db3c04273 + last_write_checksum: sha1:75b8f1598c7c9a7390b3f1c34676a46cbe376ac1 + pristine_git_object: 99b667cbe121147d9868f3a8971fe518d796ee0b src/models/chatresponsechoice.ts: id: 7db13c3cc866 last_write_checksum: sha1:bef0f54b4d3e1dcd865839b326daf54b2e0ec15a @@ -2761,20 +3293,32 @@ trackedFiles: pristine_git_object: 376c66635fa1530ea7b1d28aeafd0652c473bc55 src/models/chatstreamingmessagechunk.ts: id: 339ee7e4b920 - last_write_checksum: sha1:6188c464f262bcd6bcba3ed275d0c2123c57090d - pristine_git_object: 343bf68cc4bc8242491cb6329b7e82cdee9be32d + last_write_checksum: sha1:73819ffec768cc743e234782e9155690f446d14e + pristine_git_object: 8382a5d489ee467aeefa0cf5a59ef2270c1f13e6 src/models/chatstreamingmessagetoolcall.ts: id: 74ba154581ba last_write_checksum: sha1:42cb94988a5b990ad5ac35ff0e616f0045473e91 pristine_git_object: bd4187bbd62cd7392584549cebbab42853b828fe src/models/chatstreamingresponsechunk.ts: id: 00bf2ea52439 - last_write_checksum: sha1:81bd01e8cb7f01c5a7bed47f2f6d9be952433516 - pristine_git_object: 9ed8b45e0f4975096d733fc1c41b8be8c3289251 + last_write_checksum: sha1:89f82418fea31ab6bb425720de67d22d14327fc1 + pristine_git_object: bbcaeceb3cffc5567ccaf6cf85f23b65023c5e90 src/models/chatstreamoptions.ts: id: 83ba1c3db4bb last_write_checksum: sha1:140bb05ede4b812704e15368a9ace4ccf3fc0a82 pristine_git_object: 41edb3f3d3b0b53241720d885cf78ece2613e3d5 + src/models/compoundfilter.ts: + id: c2780b9db4ae + last_write_checksum: sha1:a8e7dd662fc48c06ad2ef019435b069f83d56c57 + pristine_git_object: addc6873486dcd84d296da34d9995a456e4121c2 + src/models/conflictresponseerrordata.ts: + id: 6c8ea4c00fd1 + last_write_checksum: sha1:774fd194511dc1129ab0dd98385f2cc90234f250 + pristine_git_object: 4574f2e616341a3bfb2adb13cdfdee3a5f6bfb3b + src/models/contextcompressionengine.ts: + id: c80f6c3a6e09 + last_write_checksum: sha1:aa2cbcfb05deed95a942814c03aca3ad970b9207 + pristine_git_object: bf03c28d972f997f14487270f904257691bc0f52 src/models/createchargerequest.ts: id: c342dc72d1f4 last_write_checksum: sha1:c57248f3591179c079ee972d6e5fed7ae0cfa50f @@ -2783,14 +3327,18 @@ trackedFiles: id: fa417e9ad79a last_write_checksum: sha1:2245458d063c9185e8a0be3cc77fff435750853b pristine_git_object: e075ba95073bbb9e5e43b32d75dcc1c48a1cf9ce + src/models/datetimeservertool.ts: + id: a1a7d93b0f75 + last_write_checksum: sha1:7533d112dce7bb3e44a54ca57a58dad4598d57e0 + pristine_git_object: a4beff36aa8c1e2002f7b0064bd9db6bf8332913 src/models/debugoptions.ts: id: 9045b3cff3b4 last_write_checksum: sha1:4ab9b560597871feaec34fb4494959c7424b8bdd pristine_git_object: 3047d39cb709eeebd3fe0b8c9341d48d532963d8 src/models/defaultparameters.ts: id: 8da6fac53cb5 - last_write_checksum: sha1:f80ad4685bda90bbf12e6e56c20991e89839c05e - pristine_git_object: 25444216c0d85142b45910c918e47e8cd5808e42 + last_write_checksum: sha1:fd873c8ef3d94449efa3289de5a198f6d50d4c59 + pristine_git_object: b2603a4d34cf43f1eb9995ce5371630d26f3bd10 src/models/developermessage.ts: id: 358908e80669 last_write_checksum: sha1:95b5480fc0df7c12bef98197c02b891208b85019 @@ -2811,6 +3359,10 @@ trackedFiles: id: beddfd22a313 last_write_checksum: sha1:03d18a4e841ab897dc6c4a207c008def161679f8 pristine_git_object: 7d2b7ba7cc3294067cebc9cd82784971f6336183 + src/models/errors/conflictresponseerror.ts: + id: 3d49b17cca5f + last_write_checksum: sha1:c2fae1cbaa4db889def09904404b2924e517cb93 + pristine_git_object: ccc1545b697e5a0c0b60218a819b93b19afbfd56 src/models/errors/edgenetworktimeoutresponseerror.ts: id: da53f308c771 last_write_checksum: sha1:746eafb997c4d7ebcbd22327bd72f935a4fd3798 @@ -2825,8 +3377,8 @@ trackedFiles: pristine_git_object: 53bb3cfae157b89fda8e4a5b0f1dd709da82c1c9 src/models/errors/index.ts: id: c4e22507cb83 - last_write_checksum: sha1:f6d0f2c568e5fde0916684dbedc78edef3efbdf5 - pristine_git_object: 173a02ae3e0d283f0df2c1550d3590dae918600c + last_write_checksum: sha1:fc83cea33c0f71404e5517de030591196edad4f8 + pristine_git_object: a34db9ef3f226b60a95b3a8e4583c11646052f5f src/models/errors/internalserverresponseerror.ts: id: 02b76cec85f0 last_write_checksum: sha1:f1064e995c554473167d4b55284ad1e55283e4e4 @@ -2901,8 +3453,8 @@ trackedFiles: pristine_git_object: db61647cd182502b2b3b5333ee3a0bba66542645 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:06020aee0915574b89b7201e735694dfefc695cc - pristine_git_object: 7f102ce5537968a491b418722fd1d67595fe7d7c + last_write_checksum: sha1:82d8174c7516761958d1ad5a51406119a01c429f + pristine_git_object: d218789839f57237ceee2a3ed3e89db7e2a87b12 src/models/inputmodality.ts: id: 771d5d4c91ec last_write_checksum: sha1:7f742bf5a1e6b7953ea96df4c4cef29c602accad @@ -2969,8 +3521,8 @@ trackedFiles: pristine_git_object: 0e524e09e7708246e4b647b921f62cde3c580eba src/models/openairesponsesinputunion.ts: id: 0b061e126936 - last_write_checksum: sha1:1219d02cbf9dff1dc2c38c1ad938427959fba5b5 - pristine_git_object: 562b0cb26a321e84e45a0b6dc9ca7cc2fd7b5e72 + last_write_checksum: sha1:ae2c8c7dabca1ad39d36e389d42074163c3f90a1 + pristine_git_object: 2a0c6885413a26afdd3b70243bd48d8c897d5393 src/models/openairesponsesprompt.ts: id: c583d897e9d2 last_write_checksum: sha1:894340f6bb585e936e0b62459ca01521b2a420ab @@ -3003,18 +3555,42 @@ trackedFiles: id: 03de9ac74888 last_write_checksum: sha1:ff47af51453cdcd62a077ccec9e4d7c8d7fd2925 pristine_git_object: b307aa9dee0c43f804012a762e4aee6dac13b2a2 + src/models/openresponsesapplypatchtool.ts: + id: ac596a6dc61b + last_write_checksum: sha1:53d19926287d0e19b5e6da1343409c2af7c6a88b + pristine_git_object: b0b2526b9f99fb1d3393a5289620eb3350ef1ddd + src/models/openresponsescodeinterpretertool.ts: + id: ce6ca9b1d3f7 + last_write_checksum: sha1:9ded1db554c408f6db08b4b69a30d292fd29d8c2 + pristine_git_object: 136ad250a99027e7c77edae91a3d58e102e59a1a + src/models/openresponsescomputertool.ts: + id: d0b0f51cdf2f + last_write_checksum: sha1:1f9308be6d19716e5e6b66c660c54a8b68f71210 + pristine_git_object: 82ca0f38b7e29850d671b3f1f7493b8f4a3537d3 + src/models/openresponsescustomtool.ts: + id: 065f74aa12b4 + last_write_checksum: sha1:6828c8ab907aa379a5b3bc2a24a7f7a0d8326743 + pristine_git_object: 37074749febb4c4c01582aa0cee03bfc9e169da6 src/models/openresponseseasyinputmessage.ts: id: 9cae543ceb47 - last_write_checksum: sha1:7501d12b352681c5f82ca2e7a43db36d0e24572c - pristine_git_object: f8b55e634d69696c95051f5cef0b77841c61d016 + last_write_checksum: sha1:36d76ab7b5d98dca84bbfc599fd89ae29c655b7b + pristine_git_object: d8bc76a93052c9ce04c32da4597d4b46c0fe62f8 src/models/openresponseserrorevent.ts: id: 508880501ed2 last_write_checksum: sha1:f64fc658f9aa9aa938d12df43f0bb42febedeb89 pristine_git_object: 6585539c0ed65de9839ef4cc08e686ba47601b8f + src/models/openresponsesfilesearchtool.ts: + id: 3a49a4c83d2b + last_write_checksum: sha1:f7171d5a655923b26200a97b7f00ff25055e753c + pristine_git_object: b747dfdcc61ba3c692fac0998815b7de67fafe72 src/models/openresponsesfunctioncalloutput.ts: id: 5e801f7b2903 - last_write_checksum: sha1:34c7f9aafb0eb39fbd9bf25451a74655366c7c76 - pristine_git_object: 0fe2b77d6be7c11e7d622254a27eae7c0cff7372 + last_write_checksum: sha1:1a2aee5e9530eb68e26796206f4f7adaffb2070d + pristine_git_object: 745b84ed28f55c7b96c0244953497a1a6b3dc6c0 + src/models/openresponsesfunctionshelltool.ts: + id: 8caa9c43e134 + last_write_checksum: sha1:1202dd50e87923c1a67e9046878d20319871c05d + pristine_git_object: af4482cee8a4244c8f24df30de9ec92e40c81cc2 src/models/openresponsesfunctiontoolcall.ts: id: b028e3118a4e last_write_checksum: sha1:d8a6947650a52575bdd82a5506dba09ae5af9ac2 @@ -3035,22 +3611,30 @@ trackedFiles: id: 053a18912617 last_write_checksum: sha1:e3333a3fd5d2347fc2f437b39c0e3ad90d15974d pristine_git_object: aedca4024109efcfb80bb8082b57795e66b3bcc2 - src/models/openresponsesinput.ts: - id: cc6c94fdea13 - last_write_checksum: sha1:1f5ecddff0c350568af1c58addbf6fd550580a21 - pristine_git_object: 7f007b7afb5455aef6460bf3a382239e0bf6fb1b + src/models/openresponsesimagegenerationtool.ts: + id: f3d7a602bed7 + last_write_checksum: sha1:7e9301ac6886d6e1ac470e9987eeee9008dde9fa + pristine_git_object: 8f3ba25c0b1557a4e5c7e62bb285d837537c964e src/models/openresponsesinputmessageitem.ts: id: cccc4eb21a9b - last_write_checksum: sha1:438d0d769bcbf6cc0b25997f84303984202b6225 - pristine_git_object: 9dcfafb757e3d876208ff7a5116b10a373cf0910 - src/models/openresponseslogprobs.ts: - id: 7ec69a3158fc - last_write_checksum: sha1:35ad33aa6ae476ba091a2741035a9eaae2eba655 - pristine_git_object: ea0b9a92edcb6803a0f5a691859f11ec5a62561c + last_write_checksum: sha1:f7a8b922a08a2836f145129536800d090166a77e + pristine_git_object: 0428665c73929ac1081f2b879a024c6e8a1f47e5 + src/models/openresponsesinputunion.ts: + id: db248a904e50 + last_write_checksum: sha1:6b161f56c4617a0a39328f976580bf2f95c4d946 + pristine_git_object: 7ce3b9c3e474957533039c3a0483edad158b428d + src/models/openresponseslocalshelltool.ts: + id: 5c4e18c9ee0c + last_write_checksum: sha1:39276b8bb0ce3dd02cd1fae70bf90f0cefc943d7 + pristine_git_object: 216adb240358e7303a03e534450d8a40ef46a2ab + src/models/openresponsesmcptool.ts: + id: 622b9ba56ed9 + last_write_checksum: sha1:3254b3e5649eeab72691fb213460aea14aeced37 + pristine_git_object: 91fec1db68de16415953890be28b760835d7c8c2 src/models/openresponsesnonstreamingresponse.ts: id: ffd6f7198dd7 - last_write_checksum: sha1:9c5819febe88b78c289477099f1ca57178d12147 - pristine_git_object: 9843d593ae125d2ccd2afb4ded47a41e4fe83fa3 + last_write_checksum: sha1:7e18e6633efc9f4fc436b6ec7aaf2e5fec79fcd9 + pristine_git_object: 56822fe050ae8b68160febfa6fb056dbd1a19d48 src/models/openresponsesreasoning.ts: id: 296442f2d24a last_write_checksum: sha1:3ca57377ebe432fe3b31bbf4219c1a7157e137ba @@ -3081,196 +3665,204 @@ trackedFiles: pristine_git_object: 438e3268f5050c6e3e4899d019e9671f0ef9a556 src/models/openresponsesrequest.ts: id: ff8a31d46b1c - last_write_checksum: sha1:e96bec9f97c70c448d58d02ff947960779628398 - pristine_git_object: 2c89e3fb65270a464994f304d9a7551c4d54e1e3 + last_write_checksum: sha1:761c88be90645b3ce2ef759258d1f6e7af82507e + pristine_git_object: af54cd97e78e2b7e6b7b6ffa191b34adf38fee0a src/models/openresponsesresponsetext.ts: id: aded1ce23b04 last_write_checksum: sha1:5046f904e0b5db52fbae46d9bbed94d651b7b0ef pristine_git_object: 56f6d642e41d2a119132b241393635773351a023 src/models/openresponsesstreamevent.ts: id: bdd51c7b4bd0 - last_write_checksum: sha1:c153529e5933f62f3c594b7317a299d94bcae921 - pristine_git_object: 40398c799a376c4cef10861666ff9a62f2739c76 - src/models/openresponsestoplogprobs.ts: - id: 9deb0a6359d1 - last_write_checksum: sha1:4cb5a273ab1f51f765bf80e3370eaec7562a0f35 - pristine_git_object: 12a5897e511d949f84f8bf5510f754dcd28c1721 + last_write_checksum: sha1:3543520ec76fad31ebd26c4a0f5012ab91084622 + pristine_git_object: aafec6cfa28c513f16c4528c225965ee8d2ff516 src/models/openresponsesusage.ts: id: 806527de3bfd last_write_checksum: sha1:9da14e86f7f6f2dca385ee64a82e19078851ee47 pristine_git_object: 736c97893118d919b02df9604d8a92ffc469f1ab src/models/openresponseswebsearch20250826tool.ts: id: 7650f38c7184 - last_write_checksum: sha1:ec2fafa444d8b9f83c30e10116ae377974cc2504 - pristine_git_object: a8ec3ef2ef257fb04a500ccf42a5c93c2cf06e6e + last_write_checksum: sha1:f9299a27fbf580f789d33e27fa842100a8e2aa81 + pristine_git_object: 7a5b03f9e9f64a935928bb703fe0951ac7efdbf7 + src/models/openresponseswebsearchcallcompleted.ts: + id: 944bf8ec309f + last_write_checksum: sha1:d8ab2240e9ac99c7d9376d0acb0096206ea9008e + pristine_git_object: ab28f17815b3f6d87097c300eea641277a428f97 + src/models/openresponseswebsearchcallinprogress.ts: + id: 6ef0b2eb322a + last_write_checksum: sha1:dbb3d37603115accbe5a716ca08c0c67890e8ef9 + pristine_git_object: 079edb27b4e6f0b6c6ba688860c2863e2f5f10a6 + src/models/openresponseswebsearchcallsearching.ts: + id: 1ffdf52711ae + last_write_checksum: sha1:080ec135b3779a51df54169b5587b00cb7031665 + pristine_git_object: 19f129b7caa07baa4c4b3f122eac69c99ca5fcf1 src/models/openresponseswebsearchpreview20250311tool.ts: id: d450efb8b660 - last_write_checksum: sha1:dbc159c5fbd1123d49cf4982f7a79563c7182f21 - pristine_git_object: 767d79d8399fdd78d9611afdbb924e6a277de030 + last_write_checksum: sha1:076f8ccfca7ef22a63cb22c0b586d6653d0400b9 + pristine_git_object: 887dc59e8f90cb35e3194916ce721ab11f1da77e src/models/openresponseswebsearchpreviewtool.ts: id: 7d594dd37b72 - last_write_checksum: sha1:9674952f3b0e76bfdb7369b70f3323ea33c87071 - pristine_git_object: 53d80f9263b8de8f5366d25b34fa11b80dbcb385 + last_write_checksum: sha1:858bb9fd7b611a56c3d904263293157cb79d34cf + pristine_git_object: 68a9b449d98224b31f6e279d74f096fa18d4c45e src/models/openresponseswebsearchtool.ts: id: 510ab58460c2 - last_write_checksum: sha1:940de7803d5e9ee96958d6c325adf8ceee7864e6 - pristine_git_object: 187fdd5a1ce0b2c67c4b7ea37ef56a02e0c0a0a1 + last_write_checksum: sha1:9c253e1ce2cd02d4375effe45e9db99d70d8b03a + pristine_git_object: c178f95f562cbb4746ea05937e18bc70d331cd79 src/models/operations/bulkassignkeystoguardrail.ts: id: 643ef16e0881 - last_write_checksum: sha1:a555864dad812017639a963b670761d9daa04136 - pristine_git_object: 6479c53570a4b7805083b90523565de2d265708f + last_write_checksum: sha1:ad3b95dce9bb01dad606f1f91db9a3c72f814694 + pristine_git_object: 30cd72ca87a14875aeab69b731b3a794e2bb86dd src/models/operations/bulkassignmemberstoguardrail.ts: id: 5a5257c83899 - last_write_checksum: sha1:0986ec9ffffa3e43fbff35a5c04e1529cb4affa4 - pristine_git_object: a9338b1edef470a86008dfffc5a46b2dcbe8da7e + last_write_checksum: sha1:1610e53d4b0d0bd020d0c92aa4f57cfa4e1243df + pristine_git_object: f79a061b45c80aeeb2034a35b5f9f9dbd442c4a1 src/models/operations/bulkunassignkeysfromguardrail.ts: id: 7793ffc670a0 - last_write_checksum: sha1:8a7b9762d1706db6e55a9be9eb51d35a78649861 - pristine_git_object: ba26428412dc3b6cc4007d2d8fa83dd94a24a4bc + last_write_checksum: sha1:b2dcce5b0c51f8d151ce9369405ec283b5aa89da + pristine_git_object: ff7e659b8b36c8c790dfd72bbed1aae0eacf2e3c src/models/operations/bulkunassignmembersfromguardrail.ts: id: ea6be9164914 - last_write_checksum: sha1:0eada9a3fbd80f07fbecfa892113588b225b4a33 - pristine_git_object: b1cee1916f9fca2cd03b30a6723df85d89f0f028 + last_write_checksum: sha1:2238d0c87df88dcfeaa6aa30c8db2129e5477fcf + pristine_git_object: 4533c1ff5b83b562d27bc2a040723527f1eca48b src/models/operations/createauthkeyscode.ts: id: 1443f6afbf40 - last_write_checksum: sha1:00a755f7d44b65af50fc56cf92a2bfca618f0737 - pristine_git_object: 8979e7afe267d5449a312b065ab9b5c268d7ea2c + last_write_checksum: sha1:13f1d47c7810dc005d1fcc6c7b730c368f0c59a8 + pristine_git_object: 86a24a47038af242f1f1e8377d22bd8e4ae1d064 src/models/operations/createcoinbasecharge.ts: id: 1e75ac2debf2 - last_write_checksum: sha1:9da654d157dfcad5897b2d2d606827abf626fdd0 - pristine_git_object: 56f9c25644a4363da7a25e4c522959dad8573f4f + last_write_checksum: sha1:63699b92eca119687bdb7d7e62baad5195533c30 + pristine_git_object: a2a9035f4eb9ed2f6b017f6c1aa5e1f1dcdc0ec8 src/models/operations/createembeddings.ts: id: 7c210337fdff - last_write_checksum: sha1:e79de9c87b5f55a0584ec7d186261bae41314722 - pristine_git_object: ebabfe8f88294e195b6ad2c18605b754a75b4496 + last_write_checksum: sha1:afbd670d14735cad9d27256b895a0cefa1c2637c + pristine_git_object: 6664d9fe1c3091988da09ab03d4a14e7eee0b8a1 src/models/operations/createguardrail.ts: id: 36e5a2696dfd - last_write_checksum: sha1:acfd4b007d95e6b49d235a71e60ac5940dc6805d - pristine_git_object: 29cff6f4df6df91c095c336c805f97f812ea547a + last_write_checksum: sha1:7ad2f519c4771b18702d5e119f74a71d5fd1228c + pristine_git_object: 43a7341153eeabe7d7caf749a8a9d5ceeaf0c238 src/models/operations/createkeys.ts: id: e7a250c8b7bb - last_write_checksum: sha1:846acec8407ace78c6d5d88481dde4523a8e1b8f - pristine_git_object: 04d03af7e8589fba65761a6316c680a47d4f1542 + last_write_checksum: sha1:78bfff795f8bfd2ffa569c6bbdf9c80ab56387a7 + pristine_git_object: 440a8c4ab457ec362143db10483df6727f1ae622 src/models/operations/createresponses.ts: id: 7ad611b27e9d - last_write_checksum: sha1:d5f015cfc868291dc0f830948dcfb8873a383a65 - pristine_git_object: d98e036b2207144eca31b608fcd3447c25e09ecd + last_write_checksum: sha1:54f4a55a439e8b3cbefb9a659d838a728027e6eb + pristine_git_object: 461b972f5d049f89f90ac8b8d2b6d4d6fcc474e4 src/models/operations/deleteguardrail.ts: id: 767137f1b80b - last_write_checksum: sha1:1ee4e3dfff54713390208701d8a0e151bf99af24 - pristine_git_object: b0a783f320af6ca3ded875235b5ffd6c61c9bff6 + last_write_checksum: sha1:43d43f0b9edad6c7eab85267ee725b0e983373b8 + pristine_git_object: 8bd9516712fe4a7233bad70f4b478f0e1ac1309e src/models/operations/deletekeys.ts: id: efa22339a3d6 - last_write_checksum: sha1:b09a4b84411d136284101678c83d54d8c7249638 - pristine_git_object: 83a55c2fc13c39cb200a6dbb8270c689ccc9604d + last_write_checksum: sha1:b378797761e4c19909fc8889a01dce2d230c55af + pristine_git_object: 59097d42b5e61405630bd2b12b018807f7ab676e src/models/operations/exchangeauthcodeforapikey.ts: id: 440595fac2ad - last_write_checksum: sha1:579346722256223abb913415804fee4f97ed4532 - pristine_git_object: 00eece72c35def7aabc7482dc5dd2fbcc3f35779 + last_write_checksum: sha1:7771522ffd8c2fa707bfef64b819530b64f6b29c + pristine_git_object: 44356ffc1b282574365c1700ce0ae89729dc0840 src/models/operations/getcredits.ts: id: 0e5a438307ae - last_write_checksum: sha1:6292d3b14cf68637d5c47c56ae1048cc75d762ae - pristine_git_object: 5ec3b40f2bf59e1c290144f58323e9a87abcc1cc + last_write_checksum: sha1:605d3f9711e13f1eeeec2cc1e56567e01d5a0751 + pristine_git_object: 582583b06840936f57378e254912c100f7082cf8 src/models/operations/getcurrentkey.ts: id: ddb4fa558414 - last_write_checksum: sha1:34a510d24b8b10ea50a502ca539af3ee5954cb68 - pristine_git_object: 2677e460511944b9c01e063c03956af071e7f933 + last_write_checksum: sha1:4812bd932f2ebccacaf9f40e6bae3b5bab6b8057 + pristine_git_object: 21f9b0c09e65a162a77eeb7b251348e41fe7e34b src/models/operations/getgeneration.ts: id: 5cdb2959d2a5 - last_write_checksum: sha1:b47298ffe13b4d13fa4af5f8da4de3f85001d549 - pristine_git_object: d57d5fe94bdab7015433510441ec9f9f777d9c39 + last_write_checksum: sha1:82f7fd225e580313deb14a19a9c8aec73e1d3dd6 + pristine_git_object: b898552a8cd9059eb218a82f884b515246230262 src/models/operations/getguardrail.ts: id: 11c366ebdade - last_write_checksum: sha1:13348e3498ff474d192662d5e437d438d42877c2 - pristine_git_object: 602cf1f03012005f7624a10972707b23704943a5 + last_write_checksum: sha1:049a7b3e697632b01bcc408ef50d91f38d8863c7 + pristine_git_object: 78ba0d03d866d64a7d5ac105c83f9da0698f404c src/models/operations/getkey.ts: id: 27d0f86c087f - last_write_checksum: sha1:3c898ca690f69498173e00133d4cd85901100a1c - pristine_git_object: bdc97fcf2232591b77cfe4e27f1e8961a0996c57 + last_write_checksum: sha1:a9678d35951975245058ee866a1533a60ed02feb + pristine_git_object: 92929d794b7305a0faf59ac578cb95f7f0101be3 src/models/operations/getmodels.ts: id: f1343fbaaed5 - last_write_checksum: sha1:ed84efc9e2c680bf291fef5075c15355c1b80e8b - pristine_git_object: 9cec7dcc869bb2ab9bb8fa6cf78bfdd128a8177c + last_write_checksum: sha1:4f193155c4daa79ac557ce7ecb109552170b8c33 + pristine_git_object: e69ff4724376fa35c82fe44ff31700f5a583cbd9 src/models/operations/getuseractivity.ts: id: 19535b4511a4 - last_write_checksum: sha1:02ac60fab0c4ccde3ab3bdfb2ede642b1efc06c6 - pristine_git_object: cfa850a7b4cf313560886c4674f8f3c3a811c4b9 + last_write_checksum: sha1:8e27430a1680e4a9b8eaf380ef6354b9a4a3f9a1 + pristine_git_object: 801fc3396b11ba2cc8ece8d315737cc5eaf058e2 src/models/operations/index.ts: id: 0d9ffaf774d2 last_write_checksum: sha1:aebe69f14d17a59a12331923dc5a56eb0112dd3b pristine_git_object: 58437e2f5a079c1eb526aa570e47d4a0ced98a55 src/models/operations/list.ts: id: ce11386ad30f - last_write_checksum: sha1:29d677bec940e971257ff4c412c89792d676b25b - pristine_git_object: a73f912b7dcb226cd5a9ca395938e04b6c41bc0b + last_write_checksum: sha1:f093c80a70eb24abd78aa387487971ca4929c9d2 + pristine_git_object: be0ebc44a2568a3ae9784cd4701001a1ecfbefd4 src/models/operations/listembeddingsmodels.ts: id: 568d609eb99c - last_write_checksum: sha1:eaa478398524b607c8218e5b704d2dc3ddd2717a - pristine_git_object: 0ae5194499b37526c054e0506108fbaec489e743 + last_write_checksum: sha1:3e201ad1798214c57a18f46b0791b658d369a840 + pristine_git_object: 6755fab61e2a7eab563fa5a06e6d3bcdc5bb40fa src/models/operations/listendpoints.ts: id: 253a81bc10af - last_write_checksum: sha1:a6d9f2d3017de2b2c8c3604ff1af31e0ecbdbbb2 - pristine_git_object: 77cd134b34effc5c696683739c686871456b5b02 + last_write_checksum: sha1:632b2f4445e7c55a7fa93ee851c0e39290833bb1 + pristine_git_object: 26e84519be168bcd5cfc6c2f60eeda863e389aaa src/models/operations/listendpointszdr.ts: id: d52e6aeefb5e - last_write_checksum: sha1:7175147a27eea5846cc571bff910dec4a035db59 - pristine_git_object: 96d088f0a1350fcad20d25697b855e6b28a70592 + last_write_checksum: sha1:cc3ac1f58f408404223743f0d9119d12c8d8f942 + pristine_git_object: caa00bb10e50850762f9446f2674c7e71e3f3f58 src/models/operations/listguardrailkeyassignments.ts: id: 6e6e1963f3ec - last_write_checksum: sha1:4c04eb2414eb9f0c3480c229e056bb29206ae7ba - pristine_git_object: f7498794ea417dc160ad2d5c020703132abcb208 + last_write_checksum: sha1:27b158cb1499727411f1d1f80903de4a97f23267 + pristine_git_object: e5ae4cf2e332bac7498ed7bf4f273d2b06c1e6ef src/models/operations/listguardrailmemberassignments.ts: id: f92502de471d - last_write_checksum: sha1:4bc62743c9da57c23903623ab7f0d229d1ac4bbb - pristine_git_object: cb37b10d0d020b8bcef9c0d242f54dc56314ad7b + last_write_checksum: sha1:c9e610eb959d2d574241a58f856d46e353f08810 + pristine_git_object: a99c37c30a8fb06086b75ab7ab2abe9bd566726e src/models/operations/listguardrails.ts: id: 71455e4e600e - last_write_checksum: sha1:be85aa64c215ee2613c2748f9b6262834418b298 - pristine_git_object: 77bb36534cd2eb604788cbd92ed36737ae7ce7e7 + last_write_checksum: sha1:e99fe624e5e37299685d03f5a2748a8dd451f0e6 + pristine_git_object: 64618e3598bc6796aa7d04577af39dd26f66582b src/models/operations/listkeyassignments.ts: id: cf0d2f290052 - last_write_checksum: sha1:b8bcb70fa8bd28edbf0839b114e8ad90699f33c1 - pristine_git_object: 2a7fa26d2fc1be099cf24e81e8fa1a92d40b7fc5 + last_write_checksum: sha1:419579a8ac662bec00b1a6c45c43d0fc936b84b5 + pristine_git_object: 800c8962b4cae0a4da31f6384ec66676482149c6 src/models/operations/listmemberassignments.ts: id: 64c40f6dc5d8 - last_write_checksum: sha1:619c5aeb3f3db73f682c76142d48a3dd5fbe28e8 - pristine_git_object: ebdba3bd4615f0fd3cd5fa98dc4c968f7c45ca3d + last_write_checksum: sha1:0b9e9ec197d4bff0c1303af665d024b42b344a14 + pristine_git_object: 5472421e5f9af93f80f790d0bc1636e32161a8c6 src/models/operations/listmodelscount.ts: id: 7705f49b31c9 - last_write_checksum: sha1:4ab26a6dc624d533cd16b6edf034ada61feb2f2b - pristine_git_object: 4a8c595d2a7fc516a3d3aebd4a38c8231a16a234 + last_write_checksum: sha1:a10ed6ed107e2cb0556f1d26145009d0847b3372 + pristine_git_object: 331255907250e63532e621169ad5b55cad0aeed7 src/models/operations/listmodelsuser.ts: id: 0846aac6be02 - last_write_checksum: sha1:68b009aef801f4378f757aa241a5b02ce21493d0 - pristine_git_object: 2068737cc9e95f4682ab41eb72b18465f9038fcd + last_write_checksum: sha1:2217777fde0eff610e2bbf41fb71e2de1f27d1bc + pristine_git_object: f9728e0eb32d03dd07449c4f9b306e2234724f77 src/models/operations/listproviders.ts: id: 76a35169de06 - last_write_checksum: sha1:963d92a12b9eb5fc46476b5a71e1a04edbec803e - pristine_git_object: 92a8d661a49ef497b5fcbf7bfafa7592bdc3d644 + last_write_checksum: sha1:b4b0bda660a49b52e33926eca1f8ba73a23729d2 + pristine_git_object: 42fe05eef9ee74a7ad9625a82c529fe20dbc705a src/models/operations/sendchatcompletionrequest.ts: id: 52a55a780d2d - last_write_checksum: sha1:21816e5aec4a1af4237443333059a94877680a00 - pristine_git_object: 957b070c8a8bfeae36224fe10ee343cc6905fdc8 + last_write_checksum: sha1:e4b98292085a1c9232934358f084b0a228012254 + pristine_git_object: 9ac5fa7ade5bb8244d93c3713768dfa7b825291b src/models/operations/updateguardrail.ts: id: f9780f5d66dd - last_write_checksum: sha1:04dd4fbdaad754148b4915a5448aae87ff872569 - pristine_git_object: 42c7f76e36e35a9aea721e126e2958afaf26c5b8 + last_write_checksum: sha1:8572313721f26bf58ad0dbf8a6ee69e876d6bc96 + pristine_git_object: 0cc62a6cb4cb2322873b0a125f382f7c46850036 src/models/operations/updatekeys.ts: id: 30a0942aa2b9 - last_write_checksum: sha1:45499b55979e66ea0b413f8545db00e24f1ef18a - pristine_git_object: ba980797c378eaeb166c732caeff25d7ac92edbf + last_write_checksum: sha1:ea7cf8eb2d0a61fce9afb3dd787f1c9b51892731 + pristine_git_object: 000445922aeb263d74f423ad5514e469235083e1 src/models/outputitemimagegenerationcall.ts: id: 9c3ac6a7a9ad last_write_checksum: sha1:70477f8472cc02a0e13ca4f1ce5d64a87c7d49c6 pristine_git_object: 1a292f676d050c8cc0937eb3245d36af5cb47d1a src/models/outputmessage.ts: id: fa128cf87d51 - last_write_checksum: sha1:30630df21e172e6eecd829a3995ce982cd92dc81 - pristine_git_object: 76b98b2c304bc6d1221d0a07eb4a47d196f00c74 + last_write_checksum: sha1:84f6d4513ab061449fa96053822825b8395c6778 + pristine_git_object: fed678820bafe7a9b216badbc7f229d6fd129505 src/models/outputmodality.ts: id: 6b2d2af692c7 - last_write_checksum: sha1:2ab4a726757a8495caf9e4f41ca5308e1a8d39b9 - pristine_git_object: 2ac068bbe7a61f0baf4b82b3530a5400fcbb79ee + last_write_checksum: sha1:b16a042afff3cb76f26f14d1a3cdcd27881a39b6 + pristine_git_object: 143ff54c4ce0a9108daea0a7ac2d45f8d188925a src/models/parameter.ts: id: 066287ded212 last_write_checksum: sha1:7cb843fedcaccbbabc94189d512da6192cbf835d @@ -3317,24 +3909,24 @@ trackedFiles: pristine_git_object: d2180d165594e1e5a5cd373ad9b0e03b13acce61 src/models/providername.ts: id: 89e536fb023a - last_write_checksum: sha1:51c17c0de6bac78bd7536ed2361b82298a0f9494 - pristine_git_object: fb59d2498fe77061e2b1c577b60a7eeb82311c9b + last_write_checksum: sha1:228b3447d0c5ba459cfb9ac4fcb2fcd4f8220cc3 + pristine_git_object: ba9576e35863b528b571346c4e3e8e64e8a8935d src/models/provideroverloadedresponseerrordata.ts: id: 379f1256314f last_write_checksum: sha1:0458b6a8454adfa7c415e3bd7f49f2879cc6093e pristine_git_object: a42994698e17df9b87b470212766b7d9a5c0ddb8 src/models/providerpreferences.ts: id: 3a47295d7b91 - last_write_checksum: sha1:7c2d7001eef6045961f8fde2802030cb19e8f371 - pristine_git_object: 92c734108de97afc636791081c048d56712be1c4 + last_write_checksum: sha1:040730cfaa55dd66f81f4e4f7da3d94585a780f2 + pristine_git_object: da8289b456d7b2e10d1e41a59f5a5b9c5f3e1646 src/models/providersort.ts: id: 7d1e919d1ec3 - last_write_checksum: sha1:de57e6a17b835c7201fd023a739ec5eb54606716 - pristine_git_object: b0cd31cce4a9287106552a4a7f09d00004526fb7 + last_write_checksum: sha1:4c871e5fc8af6042ca41d12c54ba8640706c0863 + pristine_git_object: 75e9fce081f33ba4cb9bf713e5b1d9e38729ce4a src/models/providersortconfig.ts: id: 1491329aae16 - last_write_checksum: sha1:8055ea12b8902a8e10a7e1c38c43caafb3aa2813 - pristine_git_object: 473ed35ef4bf2b5ca589eb9af90c188b522a7c6e + last_write_checksum: sha1:433e970ee4d232d2d9881fda290815ce426e0336 + pristine_git_object: fc796682165e0c6c8f0787ee2cb37c79671557f9 src/models/publicendpoint.ts: id: 396ce3186017 last_write_checksum: sha1:b209b95d49d745546712cd8b42a5c34f9945d6c2 @@ -3425,8 +4017,8 @@ trackedFiles: pristine_git_object: fe53a06318af755ace5086ecf0dcec6ba8966986 src/models/responseoutputtext.ts: id: 2d5e61e53c46 - last_write_checksum: sha1:23003d7b339dcce2d8491d395b89503095bc1221 - pristine_git_object: 1d68d6e594449824c640bb546e697a2244b85727 + last_write_checksum: sha1:6794eb8e5293078f7089b91d9d5eea31a1a4e7e0 + pristine_git_object: d97cb1151c0000e18226f0bc7a217e1d74972751 src/models/responseserrorfield.ts: id: 830ea3d3b590 last_write_checksum: sha1:c297c3d3db7622fc157822291aeba52308394941 @@ -3445,8 +4037,8 @@ trackedFiles: pristine_git_object: c27555dd4566dbdb93b57d38a266e6b4888212f9 src/models/responsesoutputitem.ts: id: 4e7df3e415cd - last_write_checksum: sha1:df013dd26f28fce96fe9aa7c798d230d0ee08237 - pristine_git_object: 796f37fded0b21e1f72474dda0ecb24a7319e3df + last_write_checksum: sha1:bb7bc98ab59cf786b90aa7e334974f7e529c16f8 + pristine_git_object: 33a2b9f3a3a9d25b9f260fab4727388d85402492 src/models/responsesoutputitemfilesearchcall.ts: id: e5ac80adf28b last_write_checksum: sha1:4de53de9724a3188b591c02af303edda70424f26 @@ -3457,12 +4049,12 @@ trackedFiles: pristine_git_object: 4b2a84ba49afe91cfeb0b7947bf4028524b49713 src/models/responsesoutputitemreasoning.ts: id: 191f7f61ea84 - last_write_checksum: sha1:8727229259ced7e413f3606ed85366209ded5622 - pristine_git_object: daf71d478af3241411458c069b187c22966c24a6 + last_write_checksum: sha1:115eeb3a6db2657434e6aab50aa38cbfcf239b7d + pristine_git_object: 537d746195514f5751a66077a316e52d8b7d4f8b src/models/responsesoutputmessage.ts: id: 32cb33488ea2 - last_write_checksum: sha1:82e6697b5617027faa4d6e65791eebbd4c46724c - pristine_git_object: dc3999bae9a4a8783e6273f237cf5ef56c8d0973 + last_write_checksum: sha1:0d17313ca6f246246b1b0250b0c10e488986183b + pristine_git_object: f0e0b1a99e964777afc8bc9326c7eb3230f2280f src/models/responsesoutputmodality.ts: id: c42840bf36d8 last_write_checksum: sha1:ef3234c76a79663140ab9d7492bdfefa09d33579 @@ -3471,10 +4063,18 @@ trackedFiles: id: 3c1dd9e04db4 last_write_checksum: sha1:6280fd261d048367d14726add6a077657833f16f pristine_git_object: cd2595864845c232d470eb334ddd1a7fa2b5942d + src/models/responsesservertooloutput.ts: + id: 40768491f00e + last_write_checksum: sha1:5f22ee8f408e24ccac083c8564cb842d306092c4 + pristine_git_object: 0beb6377faf217812552202ab7e3b0b9d568d81a src/models/responseswebsearchcalloutput.ts: id: c1c0ab68e92c - last_write_checksum: sha1:d3d41aa388c92483e10434f52494a61ae7e4eba4 - pristine_git_object: 8858d5bba58cd344e4b5dc35b1611c4622efff38 + last_write_checksum: sha1:43bfed7d62b5aa5f9c5f7215e91428c72bfa5810 + pristine_git_object: 36d2e80fecea77d2b35518201985e51dc73105b8 + src/models/responseswebsearchservertool.ts: + id: 8ef0e49c5731 + last_write_checksum: sha1:86d8b8b0cc7b8cd7ac16566565cf6b7c7eeedd92 + pristine_git_object: c7dbabfe2560ca71abf186f7f91c6c931c678342 src/models/responseswebsearchuserlocation.ts: id: 08377a5f88b1 last_write_checksum: sha1:48aedbecb0b91d0ceb61ac25cbfbc9ea58581ed9 @@ -3505,8 +4105,8 @@ trackedFiles: pristine_git_object: 521db1d52eaacae27ee6497ccd9b4541fe6a7f6b src/models/tooldefinitionjson.ts: id: 546c340f3013 - last_write_checksum: sha1:2552b1e3ce60c5b02b5cd31d085d8572f1222aee - pristine_git_object: 9393ec424c0743062607dce3a77ac2b6692e4606 + last_write_checksum: sha1:5fc0a4a650933ebf673c3dfcf3b98acb6b44d1c7 + pristine_git_object: 341092215d359df9bd11e7154c70794765ff4640 src/models/toolresponsemessage.ts: id: 1122bbfb530b last_write_checksum: sha1:636d20f2da253a303d17abca8e064695dc10ed6b @@ -3541,12 +4141,20 @@ trackedFiles: pristine_git_object: 4489c8aebc5f654b5f389d61fa3d3e628e144de1 src/models/websearchengine.ts: id: 49b0152fd59a - last_write_checksum: sha1:78c4e85f1e3e73741af8b3ed45ce7450d1cb802f - pristine_git_object: 5d8c6ef92f077048e9585bf9744ec9b738436aff + last_write_checksum: sha1:8166273041939c547eedf9139646a9eabfd6d963 + pristine_git_object: bda19371ea861d782af3c093e476c97d62a6fc20 src/models/websearchpreviewtooluserlocation.ts: id: cb1960e09942 last_write_checksum: sha1:accf2094ffb5eaf7e43c805e079b0e2467b777fc pristine_git_object: 38b0d83fbe36702f50ab907bc0be5e4d95162a69 + src/models/websearchservertool.ts: + id: 3f6589dedf90 + last_write_checksum: sha1:3ef18cb03f24d5692efc77c4c60d22c48b0ac75d + pristine_git_object: acf763c29814a65db69410a9e4f92161a0cf13da + src/models/websearchshorthand.ts: + id: 1de0cb463e93 + last_write_checksum: sha1:107961b53983387a685474c62d582918f3c7d219 + pristine_git_object: 351e6c84317a2fa0c0fe4439ebf39997fec48456 src/models/websearchstatus.ts: id: 55795920a937 last_write_checksum: sha1:cf0c6874146a4be7c3d9cc08e2ae7eb22a0d5691 @@ -4301,7 +4909,7 @@ examples: application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} responses: "200": - application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion"} + application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "500": @@ -4391,7 +4999,7 @@ examples: id: "" responses: "200": - application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": []}} + application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": [], "user_agent": "", "http_referer": null}} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} 4XX: @@ -4423,6 +5031,8 @@ examples: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} getModels: speakeasy-default-get-models: parameters: @@ -4579,7 +5189,7 @@ examples: application/json: {"store": false, "service_tier": "auto", "stream": false} responses: "200": - application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 2510.63, "frequency_penalty": 7468.94, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"type": "message", "status": "completed"}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 2510.63, "frequency_penalty": 7468.94, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -4632,6 +5242,8 @@ examples: application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} createEmbeddings: speakeasy-default-create-embeddings: requestBody: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 856c18fe..03b5d1bc 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: preApplyUnionDiscriminators: true versioningStrategy: automatic typescript: - version: 0.9.11 + version: 0.11.0 acceptHeaderEnum: false additionalDependencies: dependencies: @@ -115,4 +115,6 @@ typescript: unionStrategy: left-to-right usageSDKInitImports: [] useIndexModules: true + useOxlint: false + useTsgo: false zodVersion: v4 diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 58e595c0..b2492179 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -209,6 +209,19 @@ components: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` + for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve + and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. required: - id - role @@ -413,15 +426,75 @@ components: - web_search_call id: type: string + action: + oneOf: + - type: object + properties: + type: + type: string + enum: + - search + query: + type: string + queries: + type: array + items: + type: string + sources: + type: array + items: + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + required: + - type + - query + - type: object + properties: + type: + type: string + enum: + - open_page + url: + type: string + nullable: true + required: + - type + - type: object + properties: + type: + type: string + enum: + - find_in_page + pattern: + type: string + url: + type: string + required: + - type + - pattern + - url status: $ref: '#/components/schemas/WebSearchStatus' required: - type - id + - action - status example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed ResponsesWebSearchCallOutput: allOf: @@ -431,6 +504,9 @@ components: example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed OutputItemFileSearchCall: type: object @@ -513,6 +589,31 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed + ResponsesServerToolOutput: + type: object + properties: + type: + type: string + pattern: '^openrouter:' + description: Server tool type (e.g. openrouter:datetime, openrouter:web_search) + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + required: + - type + - status + additionalProperties: + nullable: true + description: A generic OpenRouter server tool output item + example: + type: openrouter:web_search + id: ws_tmp_abc123 + status: completed ResponsesOutputItem: anyOf: - $ref: '#/components/schemas/ResponsesOutputMessage' @@ -521,6 +622,7 @@ components: - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ResponsesServerToolOutput' description: An output item from the response example: id: msg-abc123 @@ -785,6 +887,15 @@ components: input_file: '#/components/schemas/ResponseInputFile' input_audio: '#/components/schemas/ResponseInputAudio' - type: string + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true required: - role - content @@ -838,7 +949,20 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' status: $ref: '#/components/schemas/ToolCallStatus' required: @@ -964,6 +1088,39 @@ components: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain + filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa + engine; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration @@ -980,6 +1137,39 @@ components: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain + filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa + engine; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration (2025-03-11 version) @@ -1028,15 +1218,40 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain + filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa + engine; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration example: type: web_search + engine: auto filters: allowed_domains: - example.com @@ -1056,245 +1271,646 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain + filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa + engine; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration (2025-08-26 version) example: type: web_search_2025_08_26 + engine: auto filters: allowed_domains: - example.com - OpenAIResponsesToolChoice: - anyOf: - - type: string - enum: - - auto - - type: string - enum: - - none - - type: string - enum: - - required - - type: object - properties: - type: - type: string - enum: - - function - name: - type: string - required: - - type - - name - - type: object - properties: - type: - anyOf: - - type: string - enum: - - web_search_preview_2025_03_11 - - type: string - enum: - - web_search_preview - required: - - type - OpenAIResponsesPrompt: - type: object - nullable: true - properties: - id: - type: string - variables: - type: object - nullable: true - additionalProperties: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' - required: - - id - OpenAIResponsesReasoningEffort: - type: string - nullable: true - enum: - - xhigh - - high - - medium - - low - - minimal - - none - ReasoningSummaryVerbosity: - type: string - nullable: true - enum: - - auto - - concise - - detailed - example: auto - OpenAIResponsesReasoningConfig: - type: object - nullable: true - properties: - effort: - $ref: '#/components/schemas/OpenAIResponsesReasoningEffort' - summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosity' - OpenAIResponsesServiceTier: - type: string - nullable: true - enum: - - auto - - default - - flex - - priority - - scale - OpenAIResponsesTruncation: - type: string - nullable: true - enum: - - auto - - disabled - ResponsesFormatText: + CompoundFilter: type: object properties: type: type: string enum: - - text + - and + - or + filters: + type: array + items: + type: object + additionalProperties: + nullable: true required: - type - description: Plain text response format - example: - type: text - ResponsesFormatTextJSONSchemaConfig: + - filters + description: A compound filter that combines multiple comparison or compound filters + OpenResponsesFileSearchTool: type: object properties: type: type: string enum: - - json_schema - name: + - file_search + vector_store_ids: + type: array + items: + type: string + filters: + anyOf: + - type: object + properties: + key: + type: string + type: + type: string + enum: + - eq + - ne + - gt + - gte + - lt + - lte + value: + anyOf: + - type: string + - type: number + - type: boolean + - type: array + items: + anyOf: + - type: string + - type: number + required: + - key + - type + - value + - $ref: '#/components/schemas/CompoundFilter' + - nullable: true + max_num_results: + type: integer + minimum: 1 + maximum: 50 + ranking_options: + type: object + properties: + ranker: + type: string + enum: + - auto + - default-2024-11-15 + score_threshold: + type: number + required: + - type + - vector_store_ids + description: File search tool configuration + example: + type: file_search + vector_store_ids: + - vs_abc123 + OpenResponsesComputerTool: + type: object + properties: + type: type: string - description: + enum: + - computer_use_preview + display_height: + type: number + display_width: + type: number + environment: type: string - strict: - type: boolean - nullable: true - schema: - type: object - additionalProperties: - nullable: true + enum: + - windows + - mac + - linux + - ubuntu + - browser required: - type - - name - - schema - description: JSON schema constrained response format + - display_height + - display_width + - environment + description: Computer use preview tool configuration example: - type: json_schema - name: user_info - description: User information schema - schema: + type: computer_use_preview + display_height: 768 + display_width: 1024 + environment: linux + OpenResponsesCodeInterpreterTool: + type: object + properties: + type: + type: string + enum: + - code_interpreter + container: + anyOf: + - type: string + - type: object + properties: + type: + type: string + enum: + - auto + file_ids: + type: array + items: + type: string + memory_limit: + type: string + nullable: true + enum: + - 1g + - 4g + - 16g + - 64g + required: + - type + required: + - type + - container + description: Code interpreter tool configuration + example: + type: code_interpreter + container: auto + OpenResponsesMcpTool: + type: object + properties: + type: + type: string + enum: + - mcp + server_label: + type: string + allowed_tools: + anyOf: + - type: array + items: + type: string + - type: object + properties: + tool_names: + type: array + items: + type: string + read_only: + type: boolean + - nullable: true + - nullable: true + authorization: + type: string + connector_id: + type: string + enum: + - connector_dropbox + - connector_gmail + - connector_googlecalendar + - connector_googledrive + - connector_microsoftteams + - connector_outlookcalendar + - connector_outlookemail + - connector_sharepoint + headers: type: object - properties: - name: - type: string - age: - type: number - required: - - name - ResponseFormatTextConfig: - anyOf: - - $ref: '#/components/schemas/ResponsesFormatText' - - $ref: '#/components/schemas/ResponseFormatJSONObject' - - $ref: '#/components/schemas/ResponsesFormatTextJSONSchemaConfig' - description: Text response format configuration + nullable: true + additionalProperties: + type: string + require_approval: + anyOf: + - type: object + properties: + never: + type: object + properties: + tool_names: + type: array + items: + type: string + always: + type: object + properties: + tool_names: + type: array + items: + type: string + - type: string + enum: + - always + - type: string + enum: + - never + - nullable: true + - nullable: true + server_description: + type: string + server_url: + type: string + required: + - type + - server_label + description: MCP (Model Context Protocol) tool configuration example: - type: text - ResponseTextConfig: + type: mcp + server_label: my-server + server_url: https://example.com/mcp + OpenResponsesImageGenerationTool: type: object properties: - format: - $ref: '#/components/schemas/ResponseFormatTextConfig' - verbosity: + type: + type: string + enum: + - image_generation + background: + type: string + enum: + - transparent + - opaque + - auto + input_fidelity: type: string nullable: true enum: - high - low + input_image_mask: + type: object + properties: + image_url: + type: string + file_id: + type: string + model: + type: string + enum: + - gpt-image-1 + - gpt-image-1-mini + moderation: + type: string + enum: + - auto + - low + output_compression: + type: number + output_format: + type: string + enum: + - png + - webp + - jpeg + partial_images: + type: number + quality: + type: string + enum: + - low - medium - description: Text output configuration including format and verbosity + - high + - auto + size: + type: string + enum: + - 1024x1024 + - 1024x1536 + - 1536x1024 + - auto + required: + - type + description: Image generation tool configuration example: - format: - type: text - verbosity: medium - OpenAIResponsesNonStreamingResponse: + type: image_generation + quality: high + OpenResponsesLocalShellTool: type: object properties: - id: - type: string - object: + type: type: string enum: - - response - created_at: - type: number - model: + - local_shell + required: + - type + description: Local shell tool configuration + example: + type: local_shell + OpenResponsesFunctionShellTool: + type: object + properties: + type: type: string - status: - $ref: '#/components/schemas/OpenAIResponsesResponseStatus' - completed_at: - type: number - nullable: true - output: - type: array - items: - oneOf: - - $ref: '#/components/schemas/OutputMessage' - - $ref: '#/components/schemas/OutputItemReasoning' - - $ref: '#/components/schemas/OutputItemFunctionCall' - - $ref: '#/components/schemas/OutputItemWebSearchCall' - - $ref: '#/components/schemas/OutputItemFileSearchCall' - - $ref: '#/components/schemas/OutputItemImageGenerationCall' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OutputMessage' - reasoning: '#/components/schemas/OutputItemReasoning' - function_call: '#/components/schemas/OutputItemFunctionCall' - web_search_call: '#/components/schemas/OutputItemWebSearchCall' - file_search_call: '#/components/schemas/OutputItemFileSearchCall' - image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' - user: + enum: + - shell + required: + - type + description: Shell tool configuration + example: + type: shell + OpenResponsesApplyPatchTool: + type: object + properties: + type: type: string - nullable: true - output_text: + enum: + - apply_patch + required: + - type + description: Apply patch tool configuration + example: + type: apply_patch + OpenResponsesCustomTool: + type: object + properties: + type: type: string - prompt_cache_key: + enum: + - custom + name: type: string - nullable: true - safety_identifier: + description: type: string - nullable: true - error: - $ref: '#/components/schemas/ResponsesErrorField' - incomplete_details: - $ref: '#/components/schemas/OpenAIResponsesIncompleteDetails' - usage: - $ref: '#/components/schemas/OpenAIResponsesUsage' - max_tool_calls: - type: number - nullable: true - top_logprobs: - type: number - max_output_tokens: - type: number - nullable: true + format: + anyOf: + - type: object + properties: + type: + type: string + enum: + - text + required: + - type + - type: object + properties: + type: + type: string + enum: + - grammar + definition: + type: string + syntax: + type: string + enum: + - lark + - regex + required: + - type + - definition + - syntax + required: + - type + - name + description: Custom tool configuration + example: + type: custom + name: my_tool + OpenAIResponsesToolChoice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + OpenAIResponsesPrompt: + type: object + nullable: true + properties: + id: + type: string + variables: + type: object + nullable: true + additionalProperties: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + required: + - id + OpenAIResponsesReasoningEffort: + type: string + nullable: true + enum: + - xhigh + - high + - medium + - low + - minimal + - none + ReasoningSummaryVerbosity: + type: string + nullable: true + enum: + - auto + - concise + - detailed + example: auto + OpenAIResponsesReasoningConfig: + type: object + nullable: true + properties: + effort: + $ref: '#/components/schemas/OpenAIResponsesReasoningEffort' + summary: + $ref: '#/components/schemas/ReasoningSummaryVerbosity' + OpenAIResponsesServiceTier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + OpenAIResponsesTruncation: + type: string + nullable: true + enum: + - auto + - disabled + ResponsesFormatText: + type: object + properties: + type: + type: string + enum: + - text + required: + - type + description: Plain text response format + example: + type: text + ResponsesFormatTextJSONSchemaConfig: + type: object + properties: + type: + type: string + enum: + - json_schema + name: + type: string + description: + type: string + strict: + type: boolean + nullable: true + schema: + type: object + additionalProperties: + nullable: true + required: + - type + - name + - schema + description: JSON schema constrained response format + example: + type: json_schema + name: user_info + description: User information schema + schema: + type: object + properties: + name: + type: string + age: + type: number + required: + - name + ResponseFormatTextConfig: + anyOf: + - $ref: '#/components/schemas/ResponsesFormatText' + - $ref: '#/components/schemas/ResponseFormatJSONObject' + - $ref: '#/components/schemas/ResponsesFormatTextJSONSchemaConfig' + description: Text response format configuration + example: + type: text + ResponseTextConfig: + type: object + properties: + format: + $ref: '#/components/schemas/ResponseFormatTextConfig' + verbosity: + type: string + nullable: true + enum: + - high + - low + - medium + description: Text output configuration including format and verbosity + example: + format: + type: text + verbosity: medium + OpenAIResponsesNonStreamingResponse: + type: object + properties: + id: + type: string + object: + type: string + enum: + - response + created_at: + type: number + model: + type: string + status: + $ref: '#/components/schemas/OpenAIResponsesResponseStatus' + completed_at: + type: number + nullable: true + output: + type: array + items: + oneOf: + - $ref: '#/components/schemas/OutputMessage' + - $ref: '#/components/schemas/OutputItemReasoning' + - $ref: '#/components/schemas/OutputItemFunctionCall' + - $ref: '#/components/schemas/OutputItemWebSearchCall' + - $ref: '#/components/schemas/OutputItemFileSearchCall' + - $ref: '#/components/schemas/OutputItemImageGenerationCall' + discriminator: + propertyName: type + mapping: + message: '#/components/schemas/OutputMessage' + reasoning: '#/components/schemas/OutputItemReasoning' + function_call: '#/components/schemas/OutputItemFunctionCall' + web_search_call: '#/components/schemas/OutputItemWebSearchCall' + file_search_call: '#/components/schemas/OutputItemFileSearchCall' + image_generation_call: '#/components/schemas/OutputItemImageGenerationCall' + user: + type: string + nullable: true + output_text: + type: string + prompt_cache_key: + type: string + nullable: true + safety_identifier: + type: string + nullable: true + error: + $ref: '#/components/schemas/ResponsesErrorField' + incomplete_details: + $ref: '#/components/schemas/OpenAIResponsesIncompleteDetails' + usage: + $ref: '#/components/schemas/OpenAIResponsesUsage' + max_tool_calls: + type: number + nullable: true + top_logprobs: + type: number + max_output_tokens: + type: number + nullable: true temperature: type: number nullable: true @@ -1341,6 +1957,15 @@ components: - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/OpenResponsesFileSearchTool' + - $ref: '#/components/schemas/OpenResponsesComputerTool' + - $ref: '#/components/schemas/OpenResponsesCodeInterpreterTool' + - $ref: '#/components/schemas/OpenResponsesMcpTool' + - $ref: '#/components/schemas/OpenResponsesImageGenerationTool' + - $ref: '#/components/schemas/OpenResponsesLocalShellTool' + - $ref: '#/components/schemas/OpenResponsesFunctionShellTool' + - $ref: '#/components/schemas/OpenResponsesApplyPatchTool' + - $ref: '#/components/schemas/OpenResponsesCustomTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -1829,6 +2454,10 @@ components: type: string logprob: type: number + bytes: + type: array + items: + type: number description: Alternative token with its log probability example: token: hello @@ -1844,7 +2473,11 @@ components: type: array items: $ref: '#/components/schemas/OpenResponsesTopLogprobs' - required: + bytes: + type: array + items: + type: number + required: - logprob - token description: Log probability information for a token @@ -2482,6 +3115,93 @@ components: output_index: 0 sequence_number: 4 item_id: call-123 + OpenAIResponsesWebSearchCallInProgress: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.in_progress + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallInProgress: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress' + - type: object + properties: {} + description: Web search call in progress + example: + type: response.web_search_call.in_progress + output_index: 0 + sequence_number: 1 + item_id: ws-123 + OpenAIResponsesWebSearchCallSearching: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.searching + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallSearching: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching' + - type: object + properties: {} + description: Web search call is searching + example: + type: response.web_search_call.searching + output_index: 0 + sequence_number: 2 + item_id: ws-123 + OpenAIResponsesSearchCompleted: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.completed + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallCompleted: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' + - type: object + properties: {} + description: Web search call completed + example: + type: response.web_search_call.completed + output_index: 0 + sequence_number: 3 + item_id: ws-123 OpenResponsesStreamEvent: oneOf: - allOf: @@ -2708,7 +3428,32 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesTextDeltaEvent' - type: object - properties: {} + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 description: Event emitted when a text delta is streamed example: type: response.output_text.delta @@ -2721,7 +3466,32 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesTextDoneEvent' - type: object - properties: {} + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 description: Event emitted when text streaming is complete example: type: response.output_text.done @@ -2819,6 +3589,9 @@ components: - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallSearching' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallCompleted' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -3369,9 +4142,23 @@ components: - $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputVideo' - type: string + - nullable: true + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` + for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve + and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + example: final_answer required: - role - - content OpenResponsesInputMessageItem: type: object properties: @@ -3394,6 +4181,7 @@ components: - developer content: type: array + nullable: true items: oneOf: - $ref: '#/components/schemas/ResponseInputText' @@ -3411,7 +4199,6 @@ components: - $ref: '#/components/schemas/ResponseInputVideo' required: - role - - content OpenResponsesFunctionToolCall: type: object properties: @@ -3456,7 +4243,22 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg + - $ref: '#/components/schemas/ResponseInputFile' status: $ref: '#/components/schemas/ToolCallStatus' required: @@ -3481,16 +4283,90 @@ components: - $ref: '#/components/schemas/OpenResponsesInputMessageItem' - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' + - allOf: + - $ref: '#/components/schemas/ResponsesOutputMessage' + - type: object + properties: + content: + anyOf: + - type: array + items: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + - type: string + - nullable: true + example: + id: msg-123 + type: message + role: assistant + status: completed + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] + description: An output message item + - allOf: + - $ref: '#/components/schemas/ResponsesOutputItemReasoning' + - type: object + properties: + summary: + type: array + nullable: true + items: + $ref: '#/components/schemas/ReasoningSummaryText' + example: + id: reasoning-123 + type: reasoning + status: completed + summary: + - type: summary_text + text: Analyzed the problem and found the optimal solution. + content: + - type: reasoning_text + text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 + description: An output item containing reasoning - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ResponsesServerToolOutput' description: Input for a response request - can be a string or array of items example: - role: user content: What is the weather today? + ResponsesWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + max_results: + type: number + minimum: 1 + maximum: 25 + description: Maximum number of search results to return per search call. Defaults to 5. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. + example: 20 + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 OpenResponsesResponseText: allOf: - $ref: '#/components/schemas/ResponseTextConfig' @@ -3548,6 +4424,7 @@ components: ProviderName: type: string enum: + - AkashML - AI21 - AionLabs - Alibaba @@ -3642,6 +4519,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price ProviderSortConfig: @@ -3654,6 +4532,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price partition: @@ -3747,6 +4626,8 @@ components: enum: - native - exa + - firecrawl + - parallel description: The search engine to use for web search. PDFParserEngine: type: string @@ -3761,6 +4642,11 @@ components: engine: $ref: '#/components/schemas/PDFParserEngine' description: Options for PDF parsing. + ContextCompressionEngine: + type: string + enum: + - middle-out + description: The compression engine to use. Defaults to "middle-out". OpenResponsesRequest: type: object properties: @@ -3774,7 +4660,7 @@ components: tools: type: array items: - oneOf: + anyOf: - allOf: - $ref: '#/components/schemas/OpenResponsesFunctionTool' - type: object @@ -3801,6 +4687,17 @@ components: - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/OpenResponsesFileSearchTool' + - $ref: '#/components/schemas/OpenResponsesComputerTool' + - $ref: '#/components/schemas/OpenResponsesCodeInterpreterTool' + - $ref: '#/components/schemas/OpenResponsesMcpTool' + - $ref: '#/components/schemas/OpenResponsesImageGenerationTool' + - $ref: '#/components/schemas/OpenResponsesLocalShellTool' + - $ref: '#/components/schemas/OpenResponsesFunctionShellTool' + - $ref: '#/components/schemas/OpenResponsesApplyPatchTool' + - $ref: '#/components/schemas/OpenResponsesCustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/ResponsesWebSearchServerTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -4065,6 +4962,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -4091,6 +5010,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -4169,6 +5101,17 @@ components: type: string enum: - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at content: type: array items: @@ -4330,6 +5273,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -4337,6 +5312,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -4371,15 +5347,54 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -4387,24 +5402,56 @@ components: type: string enum: - web_search_tool_result - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: type: string url: type: string @@ -4428,470 +5475,1755 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large required: - type - error_code required: - type + - caller - tool_use_id - content - model: - type: string - stop_reason: - type: string - nullable: true - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - - pause_turn - - refusal - stop_sequence: - type: string - nullable: true - usage: - type: object - properties: - input_tokens: - type: number - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier - required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage - AnthropicMessagesResponse: - allOf: - - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' - - type: object - properties: {} - description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions - example: - id: msg_01XFDUDYJgAACzvnptvVoYEL - type: message - role: assistant - content: - - type: text - text: Hello! I'm doing well, thank you for asking. - citations: null - model: claude-sonnet-4-5-20250929 - stop_reason: end_turn - stop_sequence: null - usage: - input_tokens: 12 - output_tokens: 15 - cache_creation_input_tokens: null - cache_read_input_tokens: null - cache_creation: null - inference_geo: null - server_tool_use: null - service_tier: standard - AnthropicMessagesStreamEvent: - oneOf: - - type: object - properties: - type: - type: string - enum: - - message_start - message: - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - type: string - enum: - - assistant - content: - type: array - items: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: oneOf: - type: object properties: type: type: string enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index + - direct required: - type - - text - - citations - type: object properties: type: type: string enum: - - tool_use - id: - type: string - name: + - code_execution_20250825 + tool_id: type: string - input: - nullable: true required: - type - - id - - name + - tool_id - type: object properties: type: type: string enum: - - thinking - thinking: - type: string - signature: + - code_execution_20260120 + tool_id: type: string required: - type - - thinking - - signature + - tool_id + content: + oneOf: - type: object properties: type: type: string enum: - - redacted_thinking - data: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: type: string - required: - - type - - data - - type: object - properties: type: type: string enum: - - server_tool_use - id: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: type: string - name: + type: type: string enum: - - web_search - input: - nullable: true + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error required: + - error_code - type - - id - - name - type: object properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string type: type: string enum: - - web_search_tool_result - tool_use_id: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: content: - anyOf: - - type: array + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + type: string + nullable: true + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + - pause_turn + - refusal + stop_sequence: + type: string + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number + nullable: true + cache_read_input_tokens: + type: number + nullable: true + cache_creation: + type: object + nullable: true + properties: + ephemeral_5m_input_tokens: + type: number + ephemeral_1h_input_tokens: + type: number + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + required: + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + required: + - id + - type + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + AnthropicMessagesResponse: + allOf: + - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' + - type: object + properties: + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions + example: + id: msg_01XFDUDYJgAACzvnptvVoYEL + type: message + role: assistant + container: null + content: + - type: text + text: Hello! I'm doing well, thank you for asking. + citations: null + model: claude-sonnet-4-5-20250929 + stop_reason: end_turn + stop_sequence: null + usage: + input_tokens: 12 + output_tokens: 15 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + AnthropicMessagesMessageStartEvent: + type: object + properties: + type: + type: string + enum: + - message_start + message: + type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + type: string + enum: + - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at + content: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - file_id + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - file_id + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - file_id + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + required: + - type + - text + - citations + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array items: type: object properties: + file_id: + type: string type: type: string enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: type: string - url: + type: type: string + enum: + - tool_reference required: + - tool_name - type - - encrypted_content - - page_age - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - required: - - type - - error_code - required: - - type - - tool_use_id - - content - model: - type: string - stop_reason: + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + nullable: true + stop_sequence: + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number nullable: true - stop_sequence: + cache_read_input_tokens: + type: number nullable: true - usage: + cache_creation: type: object + nullable: true properties: - input_tokens: + ephemeral_5m_input_tokens: type: number - output_tokens: + ephemeral_1h_input_tokens: type: number - cache_creation_input_tokens: + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: type: number - nullable: true - cache_read_input_tokens: + web_fetch_requests: type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider required: + - id - type - - message + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + required: + - type + - message + description: Event sent at the start of a streaming message + AnthropicMessagesStreamEvent: + oneOf: + - $ref: '#/components/schemas/AnthropicMessagesMessageStartEvent' - type: object properties: type: @@ -4901,6 +7233,17 @@ components: delta: type: object properties: + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at stop_reason: type: string nullable: true @@ -4915,6 +7258,7 @@ components: type: string nullable: true required: + - container - stop_reason - stop_sequence usage: @@ -4937,8 +7281,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests required: - input_tokens - output_tokens @@ -5124,111 +7471,688 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string - input: - nullable: true + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string required: - type - - id - - name + - caller + - content + - tool_use_id - type: object properties: type: type: string enum: - - thinking - thinking: - type: string - signature: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: type: string required: - type - - thinking - - signature + - content + - tool_use_id - type: object properties: type: type: string enum: - - redacted_thinking - data: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: type: string required: - type - - data + - content + - tool_use_id - type: object properties: type: type: string enum: - - server_tool_use - id: - type: string - name: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: type: string - enum: - - web_search - input: - nullable: true required: - type - - id - - name + - content + - tool_use_id - type: object properties: type: type: string enum: - - web_search_tool_result - tool_use_id: - type: string + - tool_search_tool_result content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type - type: object properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type type: type: string enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long + - tool_search_tool_search_result required: + - tool_references - type - - error_code + tool_use_id: + type: string required: - type - - tool_use_id - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id required: - type - index @@ -6241,6 +9165,504 @@ components: required: - type - source + - type: object + properties: + type: + type: string + enum: + - tool_reference + tool_name: + type: string + required: + - type + - tool_name + - type: object + properties: + type: + type: string + enum: + - search_result + source: + type: string + title: + type: string + content: + type: array + items: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - text + citations: + type: object + properties: + enabled: + type: boolean + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source + - title + - content + - type: object + properties: + type: + type: string + enum: + - document + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - application/pdf + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - text + media_type: + type: string + enum: + - text/plain + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - content + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source + required: + - type + - content + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + context: + type: string + nullable: true + title: + type: string + nullable: true + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source is_error: type: boolean cache_control: @@ -6297,6 +9719,12 @@ components: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 input: nullable: true cache_control: @@ -6575,6 +10003,89 @@ components: - role - content description: Anthropic message with OpenRouter extensions + AnthropicWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and + domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the + Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native + provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native + provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 AnthropicOutputConfig: type: object properties: @@ -6587,10 +10098,28 @@ components: - high - max description: >- - How much effort the model should put into its response. Higher effort levels may result in more thorough - analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. - example: medium - description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5. + How much effort the model should put into its response. Higher effort levels may result in more thorough + analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. + example: medium + format: + type: object + nullable: true + properties: + type: + type: string + enum: + - json_schema + schema: + type: object + additionalProperties: + nullable: true + required: + - type + - schema + description: >- + A schema to specify Claude's output format in responses. See [structured + outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. AnthropicMessagesRequest: type: object properties: @@ -6600,6 +10129,7 @@ components: type: number messages: type: array + nullable: true items: $ref: '#/components/schemas/OpenRouterAnthropicMessageParam' system: @@ -6767,8 +10297,6 @@ components: type: array items: type: string - stream: - type: boolean temperature: type: number top_p: @@ -6778,7 +10306,7 @@ components: tools: type: array items: - oneOf: + anyOf: - type: object properties: name: @@ -6790,8 +10318,7 @@ components: properties: type: type: string - enum: - - object + default: object properties: nullable: true required: @@ -6799,8 +10326,6 @@ components: nullable: true items: type: string - required: - - type additionalProperties: nullable: true type: @@ -6940,6 +10465,8 @@ components: required: - type - name + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/AnthropicWebSearchServerTool' tool_choice: oneOf: - type: object @@ -7017,6 +10544,159 @@ components: enum: - auto - standard_only + output_config: + $ref: '#/components/schemas/AnthropicOutputConfig' + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + stream: + type: boolean + context_management: + type: object + nullable: true + properties: + edits: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - clear_tool_uses_20250919 + clear_at_least: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + clear_tool_inputs: + anyOf: + - type: boolean + - type: array + items: + type: string + - nullable: true + exclude_tools: + type: array + nullable: true + items: + type: string + keep: + type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + trigger: + oneOf: + - type: object + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + required: + - type + - type: object + properties: + type: + type: string + enum: + - clear_thinking_20251015 + keep: + anyOf: + - type: object + properties: + type: + type: string + enum: + - thinking_turns + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - all + required: + - type + - type: string + enum: + - all + required: + - type + - type: object + properties: + type: + type: string + enum: + - compact_20260112 + instructions: + type: string + nullable: true + pause_after_compaction: + type: boolean + trigger: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + required: + - type provider: type: object nullable: true @@ -7181,6 +10861,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -7207,6 +10909,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -7258,11 +10973,8 @@ components: type: array items: type: string - output_config: - $ref: '#/components/schemas/AnthropicOutputConfig' required: - model - - max_tokens - messages description: Request schema for Anthropic Messages API endpoint example: @@ -7527,6 +11239,34 @@ components: type: video_url video_url: url: https://example.com/video.mp4 + ChatMessageContentItemFile: + type: object + properties: + type: + type: string + enum: + - file + file: + type: object + properties: + file_data: + type: string + description: File content as base64 data URL or URL + file_id: + type: string + description: File ID for previously uploaded files + filename: + type: string + description: Original filename + required: + - type + - file + description: File content part for document processing + example: + type: file + file: + file_data: https://example.com/document.pdf + filename: document.pdf ChatMessageContentItem: oneOf: - $ref: '#/components/schemas/ChatMessageContentItemText' @@ -7540,6 +11280,7 @@ components: mapping: input_video: '#/components/schemas/ChatMessageContentItemVideoLegacy' video_url: '#/components/schemas/ChatMessageContentItemVideo' + - $ref: '#/components/schemas/ChatMessageContentItemFile' discriminator: propertyName: type description: Content part for chat completion messages @@ -7715,6 +11456,27 @@ components: example: - image_url: url: data:image/png;base64,iVBORw0KGgo... + ChatCompletionAudioOutput: + type: object + properties: + id: + type: string + description: Audio output identifier + expires_at: + type: number + description: Audio expiration timestamp + data: + type: string + description: Base64 encoded audio data + transcript: + type: string + description: Audio transcript + description: Audio output data or reference + example: + id: audio_abc123 + expires_at: 1677652400 + data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f + transcript: Hello! How can I help you today? AssistantMessage: type: object properties: @@ -7750,6 +11512,8 @@ components: $ref: '#/components/schemas/AssistantMessageReasoningDetails' images: $ref: '#/components/schemas/AssistantMessageImages' + audio: + $ref: '#/components/schemas/ChatCompletionAudioOutput' required: - role description: Assistant message for requests and responses @@ -7822,7 +11586,6 @@ components: description: Log probabilities for refusal tokens required: - content - - refusal description: Log probabilities for the completion example: content: @@ -7959,6 +11722,7 @@ components: - created - model - object + - system_fingerprint description: Chat completion response example: id: chatcmpl-123 @@ -8045,6 +11809,10 @@ components: description: Tool calls delta reasoning_details: $ref: '#/components/schemas/AssistantMessageReasoningDetails' + audio: + allOf: + - $ref: '#/components/schemas/ChatCompletionAudioOutput' + - description: Audio output data description: Delta changes in streaming response example: role: assistant @@ -8102,7 +11870,6 @@ components: - chat.completion.chunk system_fingerprint: type: string - nullable: true description: System fingerprint example: fp_44709d6fcb error: @@ -8445,67 +12212,324 @@ components: - auto - type: string enum: - - required - - $ref: '#/components/schemas/NamedToolChoice' - description: Tool choice configuration - example: auto - ToolDefinitionJson: - type: object - properties: - type: + - required + - $ref: '#/components/schemas/NamedToolChoice' + description: Tool choice configuration + example: auto + DatetimeServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + parameters: + type: object + properties: + timezone: + type: string + description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + example: America/New_York + required: + - type + description: 'OpenRouter built-in server tool: returns the current date and time' + example: + type: openrouter:datetime + parameters: + timezone: America/New_York + WebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and + domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the + Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native + provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native + provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + engine: auto + max_results: 5 + WebSearchShorthand: + type: object + properties: + type: + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain + filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa + engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic + loops. + example: 20 + search_context_size: type: string enum: - - function - function: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa + engine; ignored with native provider search. + user_location: type: object properties: - name: + type: type: string - maxLength: 64 - description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: get_weather - description: + enum: + - approximate + city: type: string - description: Function description for the model - example: Get the current weather for a location - parameters: - type: object - additionalProperties: - nullable: true - description: Function parameters as JSON Schema object - example: - type: object - properties: - location: - type: string - description: City name - required: - - location - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false - required: - - name - description: Function definition for tool calling - example: - name: get_weather - description: Get the current weather for a location - parameters: + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider + search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native + provider search. + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search (parameters like max_results, search_context_size, and + domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the + Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: type: object properties: - location: + type: type: string - description: City name - required: - - location - cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native + provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native + provider search. required: - type - - function - description: Tool definition for function calling + description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + ToolDefinitionJson: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + maxLength: 64 + description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: get_weather + description: + type: string + description: Function description for the model + example: Get the current weather for a location + parameters: + type: object + additionalProperties: + nullable: true + description: Function parameters as JSON Schema object + example: + type: object + properties: + location: + type: string + description: City name + required: + - location + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false + required: + - name + description: Function definition for tool calling + example: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + required: + - location + cache_control: + $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + required: + - type + - function + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchShorthand' + description: Tool definition for function calling (regular function or OpenRouter built-in server tool) example: type: function function: @@ -8703,6 +12727,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -8729,6 +12775,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -8823,7 +12882,7 @@ components: type: number nullable: true minimum: 1 - description: Maximum tokens (deprecated, use max_completion_tokens) + description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' example: 100 metadata: type: object @@ -8954,10 +13013,28 @@ components: enum: - text - image - description: Output modalities for the response. Supported values are "text" and "image". + - audio + description: Output modalities for the response. Supported values are "text", "image", and "audio". example: - text - image + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + description: >- + Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last + cacheable block in the request. Currently supported for Anthropic Claude models. required: - messages description: Chat completion request parameters @@ -9209,6 +13286,7 @@ components: - image - embeddings - audio + - video example: text ModelArchitecture: type: object @@ -9356,17 +13434,34 @@ components: nullable: true minimum: 0 maximum: 1 + top_k: + type: integer + nullable: true + minimum: 0 frequency_penalty: type: number nullable: true minimum: -2 maximum: 2 + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + repetition_penalty: + type: number + nullable: true + minimum: 0 + maximum: 2 additionalProperties: false description: Default parameters for this model example: temperature: 0.7 top_p: 0.9 + top_k: 0 frequency_penalty: 0 + presence_penalty: 0 + repetition_penalty: 1 Model: type: object properties: @@ -9866,6 +13961,40 @@ components: p75: 38.5 p90: 28.3 p99: 15.1 + ConflictResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for ConflictResponse + example: + code: 409 + message: Resource conflict. Please try again later. + ConflictResponse: + type: object + properties: + error: + $ref: '#/components/schemas/ConflictResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Conflict - Resource conflict or concurrent modification + example: + error: + code: 409 + message: Resource conflict. Please try again later. parameters: {} securitySchemes: apiKey: @@ -11035,6 +15164,7 @@ paths: - Together 2 - Ubicloud - 01.AI + - AkashML - AI21 - AionLabs - Alibaba @@ -11119,6 +15249,14 @@ paths: required: - status description: List of provider responses for this generation, including fallback attempts + user_agent: + type: string + nullable: true + description: User-Agent header from the request + http_referer: + type: string + nullable: true + description: Referer header from the request required: - id - upstream_id @@ -11154,6 +15292,8 @@ paths: - api_type - router - provider_responses + - user_agent + - http_referer description: Generation data required: - data @@ -11213,6 +15353,19 @@ paths: - Models x-speakeasy-name-override: count summary: Get total count of available models + parameters: + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns the total count of available models @@ -11220,6 +15373,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsCountResponse' + '400': + description: Bad Request - Invalid output_modalities value + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' '500': description: Internal Server Error content: @@ -11260,6 +15419,18 @@ paths: required: false name: supported_parameters in: query + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query - schema: type: string required: false @@ -12486,6 +16657,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12524,6 +16703,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12547,6 +16727,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12618,6 +16799,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12645,6 +16835,7 @@ paths: - openai - anthropic - deepseek + ignored_providers: null allowed_models: null enforce_zdr: false required: true @@ -12699,6 +16890,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12737,6 +16936,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12755,6 +16955,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12846,6 +17047,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12884,6 +17093,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12902,6 +17112,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12986,6 +17197,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13057,6 +17277,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13095,6 +17323,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13111,6 +17340,7 @@ paths: reset_interval: weekly allowed_providers: - openai + ignored_providers: null allowed_models: null enforce_zdr: true created_at: '2025-08-24T10:30:00Z' @@ -14301,6 +18531,12 @@ paths: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + '409': + description: Conflict - App upsert conflict during auth code creation + content: + application/json: + schema: + $ref: '#/components/schemas/ConflictResponse' '500': description: Internal Server Error - Unexpected server error content: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 7102f690..f971f61a 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -210,6 +210,17 @@ components: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. required: - id - role @@ -416,15 +427,75 @@ components: - web_search_call id: type: string + action: + oneOf: + - type: object + properties: + type: + type: string + enum: + - search + query: + type: string + queries: + type: array + items: + type: string + sources: + type: array + items: + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + required: + - type + - query + - type: object + properties: + type: + type: string + enum: + - open_page + url: + type: string + nullable: true + required: + - type + - type: object + properties: + type: + type: string + enum: + - find_in_page + pattern: + type: string + url: + type: string + required: + - type + - pattern + - url status: $ref: '#/components/schemas/WebSearchStatus' required: - type - id + - action - status example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed ResponsesWebSearchCallOutput: allOf: @@ -434,6 +505,9 @@ components: example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed OutputItemFileSearchCall: type: object @@ -517,6 +591,32 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed + ResponsesServerToolOutput: + type: object + properties: + type: + type: string + pattern: '^openrouter:' + description: Server tool type (e.g. openrouter:datetime, openrouter:web_search) + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + x-speakeasy-unknown-values: allow + required: + - type + - status + additionalProperties: + nullable: true + description: A generic OpenRouter server tool output item + example: + type: openrouter:web_search + id: ws_tmp_abc123 + status: completed ResponsesOutputItem: anyOf: - $ref: '#/components/schemas/ResponsesOutputMessage' @@ -525,6 +625,7 @@ components: - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ResponsesServerToolOutput' description: An output item from the response example: id: msg-abc123 @@ -794,6 +895,15 @@ components: input_file: '#/components/schemas/ResponseInputFile' input_audio: '#/components/schemas/ResponseInputAudio' - type: string + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true required: - role - content @@ -847,7 +957,20 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/ResponseInputText' + input_image: '#/components/schemas/ResponseInputImage' + input_file: '#/components/schemas/ResponseInputFile' status: $ref: '#/components/schemas/ToolCallStatus' required: @@ -974,6 +1097,37 @@ components: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration @@ -990,6 +1144,37 @@ components: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration (2025-03-11 version) @@ -1038,15 +1223,38 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration example: type: web_search + engine: auto filters: allowed_domains: - example.com @@ -1066,73 +1274,486 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: $ref: '#/components/schemas/ResponsesSearchContextSize' user_location: $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration (2025-08-26 version) example: type: web_search_2025_08_26 + engine: auto filters: allowed_domains: - example.com - OpenAIResponsesToolChoice: - anyOf: - - type: string - enum: - - auto - - type: string + CompoundFilter: + type: object + properties: + type: + type: string enum: - - none - - type: string + - and + - or + x-speakeasy-unknown-values: allow + filters: + type: array + items: + type: object + additionalProperties: + nullable: true + required: + - type + - filters + description: A compound filter that combines multiple comparison or compound filters + OpenResponsesFileSearchTool: + type: object + properties: + type: + type: string enum: - - required - - type: object + - file_search + vector_store_ids: + type: array + items: + type: string + filters: + anyOf: + - type: object + properties: + key: + type: string + type: + type: string + enum: + - eq + - ne + - gt + - gte + - lt + - lte + x-speakeasy-unknown-values: allow + value: + anyOf: + - type: string + - type: number + - type: boolean + - type: array + items: + anyOf: + - type: string + - type: number + required: + - key + - type + - value + - $ref: '#/components/schemas/CompoundFilter' + - nullable: true + max_num_results: + type: integer + minimum: 1 + maximum: 50 + ranking_options: + type: object properties: - type: + ranker: type: string enum: - - function - name: - type: string - required: - - type - - name - - type: object - properties: - type: - anyOf: - - type: string - enum: - - web_search_preview_2025_03_11 - - type: string - enum: - - web_search_preview - required: - - type - OpenAIResponsesPrompt: + - auto + - default-2024-11-15 + x-speakeasy-unknown-values: allow + score_threshold: + type: number + required: + - type + - vector_store_ids + description: File search tool configuration + example: + type: file_search + vector_store_ids: + - vs_abc123 + OpenResponsesComputerTool: type: object - nullable: true properties: - id: + type: type: string - variables: - type: object - nullable: true - additionalProperties: - anyOf: - - type: string - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' + enum: + - computer_use_preview + display_height: + type: number + display_width: + type: number + environment: + type: string + enum: + - windows + - mac + - linux + - ubuntu + - browser + x-speakeasy-unknown-values: allow required: - - id - OpenAIResponsesReasoningEffort: - type: string - nullable: true - enum: + - type + - display_height + - display_width + - environment + description: Computer use preview tool configuration + example: + type: computer_use_preview + display_height: 768 + display_width: 1024 + environment: linux + OpenResponsesCodeInterpreterTool: + type: object + properties: + type: + type: string + enum: + - code_interpreter + container: + anyOf: + - type: string + - type: object + properties: + type: + type: string + enum: + - auto + file_ids: + type: array + items: + type: string + memory_limit: + type: string + nullable: true + enum: + - 1g + - 4g + - 16g + - 64g + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - container + description: Code interpreter tool configuration + example: + type: code_interpreter + container: auto + OpenResponsesMcpTool: + type: object + properties: + type: + type: string + enum: + - mcp + server_label: + type: string + allowed_tools: + anyOf: + - type: array + items: + type: string + - type: object + properties: + tool_names: + type: array + items: + type: string + read_only: + type: boolean + - nullable: true + - nullable: true + authorization: + type: string + connector_id: + type: string + enum: + - connector_dropbox + - connector_gmail + - connector_googlecalendar + - connector_googledrive + - connector_microsoftteams + - connector_outlookcalendar + - connector_outlookemail + - connector_sharepoint + x-speakeasy-unknown-values: allow + headers: + type: object + nullable: true + additionalProperties: + type: string + require_approval: + anyOf: + - type: object + properties: + never: + type: object + properties: + tool_names: + type: array + items: + type: string + always: + type: object + properties: + tool_names: + type: array + items: + type: string + - type: string + enum: + - always + - type: string + enum: + - never + - nullable: true + - nullable: true + server_description: + type: string + server_url: + type: string + required: + - type + - server_label + description: MCP (Model Context Protocol) tool configuration + example: + type: mcp + server_label: my-server + server_url: https://example.com/mcp + OpenResponsesImageGenerationTool: + type: object + properties: + type: + type: string + enum: + - image_generation + background: + type: string + enum: + - transparent + - opaque + - auto + x-speakeasy-unknown-values: allow + input_fidelity: + type: string + nullable: true + enum: + - high + - low + x-speakeasy-unknown-values: allow + input_image_mask: + type: object + properties: + image_url: + type: string + file_id: + type: string + model: + type: string + enum: + - gpt-image-1 + - gpt-image-1-mini + x-speakeasy-unknown-values: allow + moderation: + type: string + enum: + - auto + - low + x-speakeasy-unknown-values: allow + output_compression: + type: number + output_format: + type: string + enum: + - png + - webp + - jpeg + x-speakeasy-unknown-values: allow + partial_images: + type: number + quality: + type: string + enum: + - low + - medium + - high + - auto + x-speakeasy-unknown-values: allow + size: + type: string + enum: + - 1024x1024 + - 1024x1536 + - 1536x1024 + - auto + x-speakeasy-unknown-values: allow + required: + - type + description: Image generation tool configuration + example: + type: image_generation + quality: high + OpenResponsesLocalShellTool: + type: object + properties: + type: + type: string + enum: + - local_shell + required: + - type + description: Local shell tool configuration + example: + type: local_shell + OpenResponsesFunctionShellTool: + type: object + properties: + type: + type: string + enum: + - shell + required: + - type + description: Shell tool configuration + example: + type: shell + OpenResponsesApplyPatchTool: + type: object + properties: + type: + type: string + enum: + - apply_patch + required: + - type + description: Apply patch tool configuration + example: + type: apply_patch + OpenResponsesCustomTool: + type: object + properties: + type: + type: string + enum: + - custom + name: + type: string + description: + type: string + format: + anyOf: + - type: object + properties: + type: + type: string + enum: + - text + required: + - type + - type: object + properties: + type: + type: string + enum: + - grammar + definition: + type: string + syntax: + type: string + enum: + - lark + - regex + x-speakeasy-unknown-values: allow + required: + - type + - definition + - syntax + required: + - type + - name + description: Custom tool configuration + example: + type: custom + name: my_tool + OpenAIResponsesToolChoice: + anyOf: + - type: string + enum: + - auto + - type: string + enum: + - none + - type: string + enum: + - required + - type: object + properties: + type: + type: string + enum: + - function + name: + type: string + required: + - type + - name + - type: object + properties: + type: + anyOf: + - type: string + enum: + - web_search_preview_2025_03_11 + - type: string + enum: + - web_search_preview + required: + - type + OpenAIResponsesPrompt: + type: object + nullable: true + properties: + id: + type: string + variables: + type: object + nullable: true + additionalProperties: + anyOf: + - type: string + - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/ResponseInputFile' + required: + - id + OpenAIResponsesReasoningEffort: + type: string + nullable: true + enum: - xhigh - high - medium @@ -1357,6 +1978,15 @@ components: - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/OpenResponsesFileSearchTool' + - $ref: '#/components/schemas/OpenResponsesComputerTool' + - $ref: '#/components/schemas/OpenResponsesCodeInterpreterTool' + - $ref: '#/components/schemas/OpenResponsesMcpTool' + - $ref: '#/components/schemas/OpenResponsesImageGenerationTool' + - $ref: '#/components/schemas/OpenResponsesLocalShellTool' + - $ref: '#/components/schemas/OpenResponsesFunctionShellTool' + - $ref: '#/components/schemas/OpenResponsesApplyPatchTool' + - $ref: '#/components/schemas/OpenResponsesCustomTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -1845,6 +2475,10 @@ components: type: string logprob: type: number + bytes: + type: array + items: + type: number description: Alternative token with its log probability example: token: hello @@ -1860,6 +2494,10 @@ components: type: array items: $ref: '#/components/schemas/OpenResponsesTopLogprobs' + bytes: + type: array + items: + type: number required: - logprob - token @@ -2498,16 +3136,103 @@ components: output_index: 0 sequence_number: 4 item_id: call-123 - OpenResponsesStreamEvent: - oneOf: - - allOf: - - $ref: '#/components/schemas/OpenResponsesCreatedEvent' - - type: object - properties: - response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' - description: Event emitted when a response is created - example: + OpenAIResponsesWebSearchCallInProgress: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.in_progress + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallInProgress: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress' + - type: object + properties: {} + description: Web search call in progress + example: + type: response.web_search_call.in_progress + output_index: 0 + sequence_number: 1 + item_id: ws-123 + OpenAIResponsesWebSearchCallSearching: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.searching + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallSearching: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching' + - type: object + properties: {} + description: Web search call is searching + example: + type: response.web_search_call.searching + output_index: 0 + sequence_number: 2 + item_id: ws-123 + OpenAIResponsesSearchCompleted: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.completed + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + OpenResponsesWebSearchCallCompleted: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' + - type: object + properties: {} + description: Web search call completed + example: + type: response.web_search_call.completed + output_index: 0 + sequence_number: 3 + item_id: ws-123 + OpenResponsesStreamEvent: + oneOf: + - allOf: + - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - type: object + properties: + response: + $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + description: Event emitted when a response is created + example: type: response.created response: id: resp-abc123 @@ -2724,7 +3449,32 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesTextDeltaEvent' - type: object - properties: {} + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 description: Event emitted when a text delta is streamed example: type: response.output_text.delta @@ -2737,7 +3487,32 @@ components: - allOf: - $ref: '#/components/schemas/OpenResponsesTextDoneEvent' - type: object - properties: {} + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 description: Event emitted when text streaming is complete example: type: response.output_text.done @@ -2835,6 +3610,9 @@ components: - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallInProgress' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallSearching' + - $ref: '#/components/schemas/OpenResponsesWebSearchCallCompleted' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -3386,9 +4164,21 @@ components: - $ref: '#/components/schemas/ResponseInputAudio' - $ref: '#/components/schemas/ResponseInputVideo' - type: string + - nullable: true + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + example: final_answer required: - role - - content OpenResponsesInputMessageItem: type: object properties: @@ -3411,6 +4201,7 @@ components: - developer content: type: array + nullable: true items: oneOf: - $ref: '#/components/schemas/ResponseInputText' @@ -3428,7 +4219,6 @@ components: - $ref: '#/components/schemas/ResponseInputVideo' required: - role - - content OpenResponsesFunctionToolCall: type: object properties: @@ -3473,7 +4263,22 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/ResponseInputText' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg + - $ref: '#/components/schemas/ResponseInputFile' status: $ref: '#/components/schemas/ToolCallStatus' required: @@ -3498,16 +4303,89 @@ components: - $ref: '#/components/schemas/OpenResponsesInputMessageItem' - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' + - allOf: + - $ref: '#/components/schemas/ResponsesOutputMessage' + - type: object + properties: + content: + anyOf: + - type: array + items: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + - type: string + - nullable: true + example: + id: msg-123 + type: message + role: assistant + status: completed + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] + description: An output message item + - allOf: + - $ref: '#/components/schemas/ResponsesOutputItemReasoning' + - type: object + properties: + summary: + type: array + nullable: true + items: + $ref: '#/components/schemas/ReasoningSummaryText' + example: + id: reasoning-123 + type: reasoning + status: completed + summary: + - type: summary_text + text: Analyzed the problem and found the optimal solution. + content: + - type: reasoning_text + text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 + description: An output item containing reasoning - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ResponsesServerToolOutput' description: Input for a response request - can be a string or array of items example: - role: user content: What is the weather today? + ResponsesWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + max_results: + type: number + minimum: 1 + maximum: 25 + description: Maximum number of search results to return per search call. Defaults to 5. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. + example: 20 + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 OpenResponsesResponseText: allOf: - $ref: '#/components/schemas/ResponseTextConfig' @@ -3567,6 +4445,7 @@ components: ProviderName: type: string enum: + - AkashML - AI21 - AionLabs - Alibaba @@ -3663,6 +4542,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price x-speakeasy-unknown-values: allow @@ -3676,6 +4556,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price x-speakeasy-unknown-values: allow @@ -3764,6 +4645,8 @@ components: enum: - native - exa + - firecrawl + - parallel description: The search engine to use for web search. x-speakeasy-unknown-values: allow PDFParserEngine: @@ -3780,6 +4663,11 @@ components: engine: $ref: '#/components/schemas/PDFParserEngine' description: Options for PDF parsing. + ContextCompressionEngine: + type: string + enum: + - middle-out + description: The compression engine to use. Defaults to "middle-out". OpenResponsesRequest: type: object properties: @@ -3793,7 +4681,7 @@ components: tools: type: array items: - oneOf: + anyOf: - allOf: - $ref: '#/components/schemas/OpenResponsesFunctionTool' - type: object @@ -3821,6 +4709,17 @@ components: - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/OpenResponsesFileSearchTool' + - $ref: '#/components/schemas/OpenResponsesComputerTool' + - $ref: '#/components/schemas/OpenResponsesCodeInterpreterTool' + - $ref: '#/components/schemas/OpenResponsesMcpTool' + - $ref: '#/components/schemas/OpenResponsesImageGenerationTool' + - $ref: '#/components/schemas/OpenResponsesLocalShellTool' + - $ref: '#/components/schemas/OpenResponsesFunctionShellTool' + - $ref: '#/components/schemas/OpenResponsesApplyPatchTool' + - $ref: '#/components/schemas/OpenResponsesCustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/ResponsesWebSearchServerTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -4072,6 +4971,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -4098,6 +5017,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -4170,6 +5102,17 @@ components: type: string enum: - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at content: type: array items: @@ -4331,6 +5274,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -4338,6 +5313,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -4372,15 +5348,55 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -4388,19 +5404,51 @@ components: type: string enum: - web_search_tool_result - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: type: string page_age: type: string @@ -4429,475 +5477,1775 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large x-speakeasy-unknown-values: allow required: - type - error_code required: - type + - caller - tool_use_id - content - model: - type: string - stop_reason: - type: string - nullable: true - enum: - - end_turn - - max_tokens - - stop_sequence - - tool_use - - pause_turn - - refusal - x-speakeasy-unknown-values: allow - stop_sequence: - type: string - nullable: true - usage: - type: object - properties: - input_tokens: - type: number - output_tokens: - type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - x-speakeasy-unknown-values: allow - required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier - required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage - AnthropicMessagesResponse: - allOf: - - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' - - type: object - properties: {} - description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions - example: - id: msg_01XFDUDYJgAACzvnptvVoYEL - type: message - role: assistant - content: - - type: text - text: Hello! I'm doing well, thank you for asking. - citations: null - model: claude-sonnet-4-5-20250929 - stop_reason: end_turn - stop_sequence: null - usage: - input_tokens: 12 - output_tokens: 15 - cache_creation_input_tokens: null - cache_read_input_tokens: null - cache_creation: null - inference_geo: null - server_tool_use: null - service_tier: standard - AnthropicMessagesStreamEvent: - oneOf: - - type: object - properties: - type: - type: string - enum: - - message_start - message: - type: object - properties: - id: - type: string - type: - type: string - enum: - - message - role: - type: string - enum: - - assistant - content: - type: array - items: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: oneOf: - type: object properties: type: type: string enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index + - direct required: - type - - text - - citations - type: object properties: type: type: string enum: - - tool_use - id: + - code_execution_20250825 + tool_id: type: string - name: - type: string - input: - nullable: true required: - type - - id - - name + - tool_id - type: object properties: type: type: string enum: - - thinking - thinking: - type: string - signature: + - code_execution_20260120 + tool_id: type: string required: - type - - thinking - - signature + - tool_id + content: + oneOf: - type: object properties: type: type: string enum: - - redacted_thinking - data: + - web_fetch_tool_result_error + error_code: type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow required: - type - - data + - error_code - type: object properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true type: type: string enum: - - server_tool_use - id: + - web_fetch_result + url: type: string - name: + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: type: string enum: - - web_search - input: - nullable: true + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result required: + - content + - return_code + - stderr + - stdout - type - - id - - name - type: object properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string type: type: string enum: - - web_search_tool_result - tool_use_id: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - x-speakeasy-unknown-values: allow - required: - - type - - error_code + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error required: + - error_code + - error_message - type - - tool_use_id + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: - content - model: - type: string - stop_reason: + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + type: string + nullable: true + enum: + - end_turn + - max_tokens + - stop_sequence + - tool_use + - pause_turn + - refusal + x-speakeasy-unknown-values: allow + stop_sequence: + type: string + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number + nullable: true + cache_read_input_tokens: + type: number + nullable: true + cache_creation: + type: object + nullable: true + properties: + ephemeral_5m_input_tokens: + type: number + ephemeral_1h_input_tokens: + type: number + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + x-speakeasy-unknown-values: allow + required: + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + required: + - id + - type + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + AnthropicMessagesResponse: + allOf: + - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' + - type: object + properties: + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + x-speakeasy-unknown-values: allow + description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions + example: + id: msg_01XFDUDYJgAACzvnptvVoYEL + type: message + role: assistant + container: null + content: + - type: text + text: Hello! I'm doing well, thank you for asking. + citations: null + model: claude-sonnet-4-5-20250929 + stop_reason: end_turn + stop_sequence: null + usage: + input_tokens: 12 + output_tokens: 15 + cache_creation_input_tokens: null + cache_read_input_tokens: null + cache_creation: null + inference_geo: null + server_tool_use: null + service_tier: standard + AnthropicMessagesMessageStartEvent: + type: object + properties: + type: + type: string + enum: + - message_start + message: + type: object + properties: + id: + type: string + type: + type: string + enum: + - message + role: + type: string + enum: + - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at + content: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - file_id + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - file_id + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - file_id + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + required: + - type + - text + - citations + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + x-speakeasy-unknown-values: allow + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + nullable: true + stop_sequence: + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number nullable: true - stop_sequence: + cache_read_input_tokens: + type: number nullable: true - usage: + cache_creation: type: object + nullable: true properties: - input_tokens: + ephemeral_5m_input_tokens: type: number - output_tokens: + ephemeral_1h_input_tokens: type: number - cache_creation_input_tokens: + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: type: number - nullable: true - cache_read_input_tokens: + web_fetch_requests: type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - x-speakeasy-unknown-values: allow required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + x-speakeasy-unknown-values: allow required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + x-speakeasy-unknown-values: allow required: + - id - type - - message + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + required: + - type + - message + description: Event sent at the start of a streaming message + AnthropicMessagesStreamEvent: + oneOf: + - $ref: '#/components/schemas/AnthropicMessagesMessageStartEvent' - type: object properties: type: @@ -4907,6 +7255,17 @@ components: delta: type: object properties: + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at stop_reason: type: string nullable: true @@ -4922,6 +7281,7 @@ components: type: string nullable: true required: + - container - stop_reason - stop_sequence usage: @@ -4944,8 +7304,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests required: - input_tokens - output_tokens @@ -5121,122 +7484,706 @@ components: - end_block_index required: - type - - text - - citations + - text + - citations + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - thinking + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + x-speakeasy-unknown-values: allow + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content - type: object properties: type: type: string enum: - - tool_use - id: - type: string - name: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: type: string - input: - nullable: true required: - type - - id - - name + - caller + - content + - tool_use_id - type: object properties: type: type: string enum: - - thinking - thinking: - type: string - signature: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: type: string required: - type - - thinking - - signature + - content + - tool_use_id - type: object properties: type: type: string enum: - - redacted_thinking - data: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: type: string required: - type - - data + - content + - tool_use_id - type: object properties: type: type: string enum: - - server_tool_use - id: - type: string - name: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: type: string - enum: - - web_search - input: - nullable: true required: - type - - id - - name + - content + - tool_use_id - type: object properties: type: type: string enum: - - web_search_tool_result - tool_use_id: - type: string + - tool_search_tool_result content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url + oneOf: - type: object properties: - type: - type: string - enum: - - web_search_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - - max_uses_exceeded - too_many_requests - - query_too_long + - execution_time_exceeded x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error required: - - type - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string required: - type - - tool_use_id - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id required: - type - index @@ -6143,49 +9090,304 @@ components: type: type: string enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + x-speakeasy-unknown-values: allow + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - source + - type: object + properties: + type: + type: string + enum: + - tool_reference + tool_name: + type: string + required: + - type + - tool_name + - type: object + properties: + type: + type: string + enum: + - search_result + source: + type: string + title: + type: string + content: + type: array + items: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: type: string enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number + - 5m + - 1h + x-speakeasy-unknown-values: allow required: - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index + required: + - type + - text + citations: + type: object + properties: + enabled: + type: boolean cache_control: type: object properties: @@ -6203,13 +9405,15 @@ components: - type required: - type - - text + - source + - title + - content - type: object properties: type: type: string enum: - - image + - document source: oneOf: - type: object @@ -6221,17 +9425,252 @@ components: media_type: type: string enum: - - image/jpeg - - image/png - - image/gif - - image/webp - x-speakeasy-unknown-values: allow + - application/pdf data: type: string required: - type - media_type - data + - type: object + properties: + type: + type: string + enum: + - text + media_type: + type: string + enum: + - text/plain + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - content + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + x-speakeasy-unknown-values: allow + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - source + required: + - type + - content - type: object properties: type: @@ -6243,6 +9682,18 @@ components: required: - type - url + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + context: + type: string + nullable: true + title: + type: string + nullable: true cache_control: type: object properties: @@ -6318,6 +9769,13 @@ components: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow input: nullable: true cache_control: @@ -6601,6 +10059,83 @@ components: - role - content description: Anthropic message with OpenRouter extensions + AnthropicWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 AnthropicOutputConfig: type: object properties: @@ -6616,7 +10151,24 @@ components: How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. example: medium x-speakeasy-unknown-values: allow - description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5. + format: + type: object + nullable: true + properties: + type: + type: string + enum: + - json_schema + schema: + type: object + additionalProperties: + nullable: true + required: + - type + - schema + description: >- + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. AnthropicMessagesRequest: type: object properties: @@ -6626,6 +10178,7 @@ components: type: number messages: type: array + nullable: true items: $ref: '#/components/schemas/OpenRouterAnthropicMessageParam' system: @@ -6794,8 +10347,6 @@ components: type: array items: type: string - stream: - type: boolean temperature: type: number top_p: @@ -6805,7 +10356,7 @@ components: tools: type: array items: - oneOf: + anyOf: - type: object properties: name: @@ -6817,8 +10368,7 @@ components: properties: type: type: string - enum: - - object + default: object properties: nullable: true required: @@ -6826,8 +10376,6 @@ components: nullable: true items: type: string - required: - - type additionalProperties: nullable: true type: @@ -6971,6 +10519,8 @@ components: required: - type - name + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/AnthropicWebSearchServerTool' tool_choice: oneOf: - type: object @@ -7049,6 +10599,160 @@ components: - auto - standard_only x-speakeasy-unknown-values: allow + output_config: + $ref: '#/components/schemas/AnthropicOutputConfig' + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + stream: + type: boolean + context_management: + type: object + nullable: true + properties: + edits: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - clear_tool_uses_20250919 + clear_at_least: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + clear_tool_inputs: + anyOf: + - type: boolean + - type: array + items: + type: string + - nullable: true + exclude_tools: + type: array + nullable: true + items: + type: string + keep: + type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + trigger: + oneOf: + - type: object + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + required: + - type + - type: object + properties: + type: + type: string + enum: + - clear_thinking_20251015 + keep: + anyOf: + - type: object + properties: + type: + type: string + enum: + - thinking_turns + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - all + required: + - type + - type: string + enum: + - all + required: + - type + - type: object + properties: + type: + type: string + enum: + - compact_20260112 + instructions: + type: string + nullable: true + pause_after_compaction: + type: boolean + trigger: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + required: + - type provider: type: object nullable: true @@ -7201,6 +10905,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -7227,6 +10951,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -7272,11 +11009,8 @@ components: type: array items: type: string - output_config: - $ref: '#/components/schemas/AnthropicOutputConfig' required: - model - - max_tokens - messages description: Request schema for Anthropic Messages API endpoint example: @@ -7543,6 +11277,34 @@ components: type: video_url video_url: url: https://example.com/video.mp4 + ChatMessageContentItemFile: + type: object + properties: + type: + type: string + enum: + - file + file: + type: object + properties: + file_data: + type: string + description: File content as base64 data URL or URL + file_id: + type: string + description: File ID for previously uploaded files + filename: + type: string + description: Original filename + required: + - type + - file + description: File content part for document processing + example: + type: file + file: + file_data: https://example.com/document.pdf + filename: document.pdf ChatMessageContentItem: oneOf: - $ref: '#/components/schemas/ChatMessageContentItemText' @@ -7556,6 +11318,7 @@ components: mapping: input_video: '#/components/schemas/ChatMessageContentItemVideoLegacy' video_url: '#/components/schemas/ChatMessageContentItemVideo' + - $ref: '#/components/schemas/ChatMessageContentItemFile' discriminator: propertyName: type description: Content part for chat completion messages @@ -7734,6 +11497,27 @@ components: example: - image_url: url: data:image/png;base64,iVBORw0KGgo... + ChatCompletionAudioOutput: + type: object + properties: + id: + type: string + description: Audio output identifier + expires_at: + type: number + description: Audio expiration timestamp + data: + type: string + description: Base64 encoded audio data + transcript: + type: string + description: Audio transcript + description: Audio output data or reference + example: + id: audio_abc123 + expires_at: 1677652400 + data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f + transcript: Hello! How can I help you today? AssistantMessage: type: object properties: @@ -7769,6 +11553,8 @@ components: $ref: '#/components/schemas/AssistantMessageReasoningDetails' images: $ref: '#/components/schemas/AssistantMessageImages' + audio: + $ref: '#/components/schemas/ChatCompletionAudioOutput' required: - role description: Assistant message for requests and responses @@ -7841,7 +11627,6 @@ components: description: Log probabilities for refusal tokens required: - content - - refusal description: Log probabilities for the completion example: content: @@ -7978,6 +11763,7 @@ components: - created - model - object + - system_fingerprint description: Chat completion response example: id: chatcmpl-123 @@ -8064,6 +11850,10 @@ components: description: Tool calls delta reasoning_details: $ref: '#/components/schemas/AssistantMessageReasoningDetails' + audio: + allOf: + - $ref: '#/components/schemas/ChatCompletionAudioOutput' + - description: Audio output data description: Delta changes in streaming response example: role: assistant @@ -8121,7 +11911,6 @@ components: - chat.completion.chunk system_fingerprint: type: string - nullable: true description: System fingerprint example: fp_44709d6fcb error: @@ -8440,91 +12229,331 @@ components: function: type: object properties: - name: + name: + type: string + description: Function name to call + example: get_weather + required: + - name + required: + - type + - function + description: Named tool choice for specific function + example: + type: function + function: + name: get_weather + ToolChoiceOption: + anyOf: + - type: string + enum: + - none + - type: string + enum: + - auto + - type: string + enum: + - required + - $ref: '#/components/schemas/NamedToolChoice' + description: Tool choice configuration + example: auto + DatetimeServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + parameters: + type: object + properties: + timezone: + type: string + description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + example: America/New_York + required: + - type + description: 'OpenRouter built-in server tool: returns the current date and time' + example: + type: openrouter:datetime + parameters: + timezone: America/New_York + WebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + engine: auto + max_results: 5 + WebSearchShorthand: + type: object + properties: + type: + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + x-speakeasy-unknown-values: allow + engine: + type: string + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + parameters: + type: object + properties: + engine: type: string - description: Function name to call - example: get_weather - required: - - name + enum: + - auto + - native + - exa + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. required: - type - - function - description: Named tool choice for specific function - example: - type: function - function: - name: get_weather - ToolChoiceOption: - anyOf: - - type: string - enum: - - none - - type: string - enum: - - auto - - type: string - enum: - - required - - $ref: '#/components/schemas/NamedToolChoice' - description: Tool choice configuration - example: auto + description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. ToolDefinitionJson: - type: object - properties: - type: - type: string - enum: - - function - function: - type: object + anyOf: + - type: object properties: - name: - type: string - maxLength: 64 - description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: get_weather - description: + type: type: string - description: Function description for the model - example: Get the current weather for a location - parameters: - type: object - additionalProperties: - nullable: true - description: Function parameters as JSON Schema object - example: - type: object - properties: - location: - type: string - description: City name - required: - - location - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false - required: - - name - description: Function definition for tool calling - example: - name: get_weather - description: Get the current weather for a location - parameters: + enum: + - function + function: type: object properties: - location: + name: type: string - description: City name + maxLength: 64 + description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: get_weather + description: + type: string + description: Function description for the model + example: Get the current weather for a location + parameters: + type: object + additionalProperties: + nullable: true + description: Function parameters as JSON Schema object + example: + type: object + properties: + location: + type: string + description: City name + required: + - location + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false required: - - location - cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' - required: - - type - - function - description: Tool definition for function calling + - name + description: Function definition for tool calling + example: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + required: + - location + cache_control: + $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + required: + - type + - function + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchShorthand' + description: Tool definition for function calling (regular function or OpenRouter built-in server tool) example: type: function function: @@ -8710,6 +12739,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -8736,6 +12785,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -8826,7 +12888,7 @@ components: type: number nullable: true minimum: 1 - description: Maximum tokens (deprecated, use max_completion_tokens) + description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' example: 100 metadata: type: object @@ -8956,11 +13018,29 @@ components: enum: - text - image + - audio x-speakeasy-unknown-values: allow - description: Output modalities for the response. Supported values are "text" and "image". + description: Output modalities for the response. Supported values are "text", "image", and "audio". example: - text - image + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + description: >- + Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. required: - messages description: Chat completion request parameters @@ -9206,6 +13286,7 @@ components: - image - embeddings - audio + - video example: text x-speakeasy-unknown-values: allow ModelArchitecture: @@ -9356,17 +13437,34 @@ components: nullable: true minimum: 0 maximum: 1 + top_k: + type: integer + nullable: true + minimum: 0 frequency_penalty: type: number nullable: true minimum: -2 maximum: 2 + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + repetition_penalty: + type: number + nullable: true + minimum: 0 + maximum: 2 additionalProperties: false description: Default parameters for this model example: temperature: 0.7 top_p: 0.9 + top_k: 0 frequency_penalty: 0 + presence_penalty: 0 + repetition_penalty: 1 Model: type: object properties: @@ -9865,6 +13963,40 @@ components: p75: 38.5 p90: 28.3 p99: 15.1 + ConflictResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for ConflictResponse + example: + code: 409 + message: Resource conflict. Please try again later. + ConflictResponse: + type: object + properties: + error: + $ref: '#/components/schemas/ConflictResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Conflict - Resource conflict or concurrent modification + example: + error: + code: 409 + message: Resource conflict. Please try again later. parameters: AppIdentifier: name: HTTP-Referer @@ -9875,12 +14007,21 @@ components: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. AppDisplayName: - name: X-Title + name: X-OpenRouter-Title in: header + x-speakeasy-name-override: appTitle schema: type: string description: | The app display name allows you to customize how your app appears in OpenRouter's dashboard. + AppCategories: + name: X-OpenRouter-Categories + in: header + x-speakeasy-name-override: appCategories + schema: + type: string + description: | + Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. securitySchemes: apiKey: type: http @@ -10003,6 +14144,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /messages: post: x-speakeasy-ignore: true @@ -10234,6 +14376,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /activity: get: tags: @@ -10306,6 +14449,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /chat/completions: post: x-speakeasy-group: chat @@ -10420,6 +14564,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /credits: get: x-speakeasy-name-override: getCredits @@ -10482,6 +14627,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /credits/coinbase: post: security: @@ -10607,6 +14753,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /embeddings: post: x-speakeasy-name-override: generate @@ -10814,6 +14961,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /embeddings/models: get: tags: @@ -10844,6 +14992,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /generation: get: tags: @@ -11071,6 +15220,7 @@ paths: - Together 2 - Ubicloud - 01.AI + - AkashML - AI21 - AionLabs - Alibaba @@ -11156,6 +15306,14 @@ paths: required: - status description: List of provider responses for this generation, including fallback attempts + user_agent: + type: string + nullable: true + description: User-Agent header from the request + http_referer: + type: string + nullable: true + description: Referer header from the request required: - id - upstream_id @@ -11191,6 +15349,8 @@ paths: - api_type - router - provider_responses + - user_agent + - http_referer description: Generation data required: - data @@ -11247,12 +15407,24 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/count: get: tags: - Models x-speakeasy-name-override: count summary: Get total count of available models + parameters: + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns the total count of available models @@ -11260,6 +15432,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsCountResponse' + '400': + description: Bad Request - Invalid output_modalities value + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' '500': description: Internal Server Error content: @@ -11270,6 +15448,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models: get: tags: @@ -11304,6 +15483,16 @@ paths: required: false name: supported_parameters in: query + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns a list of models or RSS feed @@ -11327,6 +15516,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/user: get: tags: @@ -11366,6 +15556,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/{author}/{slug}/endpoints: get: tags: @@ -11411,6 +15602,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /endpoints/zdr: get: tags: @@ -11441,6 +15633,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /providers: get: tags: @@ -11505,6 +15698,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /keys: get: operationId: list @@ -11951,6 +16145,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /keys/{hash}: patch: x-speakeasy-name-override: update @@ -12451,6 +16646,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails: get: operationId: listGuardrails @@ -12531,6 +16727,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12569,6 +16773,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12592,6 +16797,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12663,6 +16869,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12690,6 +16905,7 @@ paths: - openai - anthropic - deepseek + ignored_providers: null allowed_models: null enforce_zdr: false required: true @@ -12745,6 +16961,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12783,6 +17007,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12801,6 +17026,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12826,6 +17052,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}: get: operationId: getGuardrail @@ -12896,6 +17123,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12934,6 +17169,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12952,6 +17188,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13037,6 +17274,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13109,6 +17355,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13147,6 +17401,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13163,6 +17418,7 @@ paths: reset_interval: weekly allowed_providers: - openai + ignored_providers: null allowed_models: null enforce_zdr: true created_at: '2025-08-24T10:30:00Z' @@ -13246,6 +17502,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/assignments/keys: get: operationId: listKeyAssignments @@ -13347,6 +17604,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/assignments/members: get: operationId: listMemberAssignments @@ -13443,6 +17701,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/keys: get: operationId: listGuardrailKeyAssignments @@ -13633,6 +17892,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/members: get: operationId: listGuardrailMemberAssignments @@ -13819,6 +18079,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/keys/remove: post: operationId: bulkUnassignKeysFromGuardrail @@ -13897,6 +18158,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/members/remove: post: operationId: bulkUnassignMembersFromGuardrail @@ -13976,6 +18238,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /key: get: operationId: getCurrentKey @@ -14175,6 +18438,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /auth/keys: post: operationId: exchangeAuthCodeForAPIKey @@ -14256,6 +18520,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /auth/keys/code: post: x-speakeasy-name-override: createAuthCode @@ -14374,6 +18639,12 @@ paths: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + '409': + description: Conflict - App upsert conflict during auth code creation + content: + application/json: + schema: + $ref: '#/components/schemas/ConflictResponse' '500': description: Internal Server Error - Unexpected server error content: @@ -14384,6 +18655,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" tags: - name: API Keys description: API key management endpoints @@ -14421,3 +18693,4 @@ x-speakeasy-globals: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" diff --git a/.speakeasy/overlays/add-headers.overlay.yaml b/.speakeasy/overlays/add-headers.overlay.yaml index a6a34744..4cfc85bf 100644 --- a/.speakeasy/overlays/add-headers.overlay.yaml +++ b/.speakeasy/overlays/add-headers.overlay.yaml @@ -1,17 +1,18 @@ overlay: 1.0.0 x-speakeasy-jsonpath: rfc9535 info: - title: Add HTTP-Referer and X-Title as global parameters + title: Add HTTP-Referer and X-OpenRouter-Title as global parameters version: 0.0.0 actions: # Add global parameters for app identification - target: $ - description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers + description: Add x-speakeasy-globals for HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers update: x-speakeasy-globals: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" # Add component parameters - target: $.components @@ -27,12 +28,21 @@ actions: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. AppDisplayName: - name: X-Title + name: X-OpenRouter-Title in: header + x-speakeasy-name-override: appTitle schema: type: string description: | The app display name allows you to customize how your app appears in OpenRouter's dashboard. + AppCategories: + name: X-OpenRouter-Categories + in: header + x-speakeasy-name-override: appCategories + schema: + type: string + description: | + Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. # Add header parameters to all paths so Speakeasy matches them with globals - target: $.paths[*] @@ -41,3 +51,4 @@ actions: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f4d64869..b094a3f6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.680.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:6f9fbcafdbe166330de047288f3d8f585daca7bf610550806c3c92863a002196 - sourceBlobDigest: sha256:e0ce208ad47849584824e384d49a4614ec45778e8014e873ca6bcee48d61e0f7 + sourceRevisionDigest: sha256:144b18820cb74f7d537250a18cf95ba5e8eca7b3d908c344a97db411bdbeb8ef + sourceBlobDigest: sha256:c6da88a6496fab9ed48b6cf653984d8650d0e49e5025507d45a743b61744ba47 tags: - latest - main @@ -12,8 +12,8 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:6f9fbcafdbe166330de047288f3d8f585daca7bf610550806c3c92863a002196 - sourceBlobDigest: sha256:e0ce208ad47849584824e384d49a4614ec45778e8014e873ca6bcee48d61e0f7 + sourceRevisionDigest: sha256:144b18820cb74f7d537250a18cf95ba5e8eca7b3d908c344a97db411bdbeb8ef + sourceBlobDigest: sha256:c6da88a6496fab9ed48b6cf653984d8650d0e49e5025507d45a743b61744ba47 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/FUNCTIONS.md b/FUNCTIONS.md index cdb097a3..8688495f 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -26,7 +26,8 @@ import { betaResponsesSend } from "@openrouter/sdk/funcs/betaResponsesSend.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/USAGE.md b/USAGE.md index 76073b04..4042e92f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -4,7 +4,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/models/action.md b/docs/models/action.md new file mode 100644 index 00000000..c98359d8 --- /dev/null +++ b/docs/models/action.md @@ -0,0 +1,32 @@ +# Action + + +## Supported Types + +### `models.ActionSearch` + +```typescript +const value: models.ActionSearch = { + type: "search", + query: "", +}; +``` + +### `models.ActionOpenPage` + +```typescript +const value: models.ActionOpenPage = { + type: "open_page", +}; +``` + +### `models.ActionFindInPage` + +```typescript +const value: models.ActionFindInPage = { + type: "find_in_page", + pattern: "", + url: "https://qualified-king.org", +}; +``` + diff --git a/docs/models/actionfindinpage.md b/docs/models/actionfindinpage.md new file mode 100644 index 00000000..26959fe5 --- /dev/null +++ b/docs/models/actionfindinpage.md @@ -0,0 +1,21 @@ +# ActionFindInPage + +## Example Usage + +```typescript +import { ActionFindInPage } from "@openrouter/sdk/models"; + +let value: ActionFindInPage = { + type: "find_in_page", + pattern: "", + url: "https://qualified-king.org", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"find_in_page"* | :heavy_check_mark: | N/A | +| `pattern` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/actionopenpage.md b/docs/models/actionopenpage.md new file mode 100644 index 00000000..55636360 --- /dev/null +++ b/docs/models/actionopenpage.md @@ -0,0 +1,18 @@ +# ActionOpenPage + +## Example Usage + +```typescript +import { ActionOpenPage } from "@openrouter/sdk/models"; + +let value: ActionOpenPage = { + type: "open_page", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"open_page"* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/actionsearch.md b/docs/models/actionsearch.md new file mode 100644 index 00000000..6f80a553 --- /dev/null +++ b/docs/models/actionsearch.md @@ -0,0 +1,21 @@ +# ActionSearch + +## Example Usage + +```typescript +import { ActionSearch } from "@openrouter/sdk/models"; + +let value: ActionSearch = { + type: "search", + query: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *"search"* | :heavy_check_mark: | N/A | +| `query` | *string* | :heavy_check_mark: | N/A | +| `queries` | *string*[] | :heavy_minus_sign: | N/A | +| `sources` | [models.Source](../models/source.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/allowedtools.md b/docs/models/allowedtools.md new file mode 100644 index 00000000..c0a3f360 --- /dev/null +++ b/docs/models/allowedtools.md @@ -0,0 +1,16 @@ +# AllowedTools + +## Example Usage + +```typescript +import { AllowedTools } from "@openrouter/sdk/models"; + +let value: AllowedTools = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `toolNames` | *string*[] | :heavy_minus_sign: | N/A | +| `readOnly` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/always.md b/docs/models/always.md new file mode 100644 index 00000000..e642f971 --- /dev/null +++ b/docs/models/always.md @@ -0,0 +1,15 @@ +# Always + +## Example Usage + +```typescript +import { Always } from "@openrouter/sdk/models"; + +let value: Always = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `toolNames` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/assistantmessage.md b/docs/models/assistantmessage.md index fefb4206..2d57f04f 100644 --- a/docs/models/assistantmessage.md +++ b/docs/models/assistantmessage.md @@ -14,13 +14,14 @@ let value: AssistantMessage = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `role` | [models.AssistantMessageRole](../models/assistantmessagerole.md) | :heavy_check_mark: | N/A | | -| `content` | *models.AssistantMessageContent* | :heavy_minus_sign: | Assistant message content | | -| `name` | *string* | :heavy_minus_sign: | Optional name for the assistant | | -| `toolCalls` | [models.ChatMessageToolCall](../models/chatmessagetoolcall.md)[] | :heavy_minus_sign: | Tool calls made by the assistant | | -| `refusal` | *string* | :heavy_minus_sign: | Refusal message if content was refused | | -| `reasoning` | *string* | :heavy_minus_sign: | Reasoning output | | -| `reasoningDetails` | *models.ReasoningDetailUnion*[] | :heavy_minus_sign: | Reasoning details for extended thinking models | | -| `images` | [models.AssistantMessageImages](../models/assistantmessageimages.md)[] | :heavy_minus_sign: | Generated images from image generation models | [
{
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgo..."
}
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `role` | [models.AssistantMessageRole](../models/assistantmessagerole.md) | :heavy_check_mark: | N/A | | +| `content` | *models.AssistantMessageContent* | :heavy_minus_sign: | Assistant message content | | +| `name` | *string* | :heavy_minus_sign: | Optional name for the assistant | | +| `toolCalls` | [models.ChatMessageToolCall](../models/chatmessagetoolcall.md)[] | :heavy_minus_sign: | Tool calls made by the assistant | | +| `refusal` | *string* | :heavy_minus_sign: | Refusal message if content was refused | | +| `reasoning` | *string* | :heavy_minus_sign: | Reasoning output | | +| `reasoningDetails` | *models.ReasoningDetailUnion*[] | :heavy_minus_sign: | Reasoning details for extended thinking models | | +| `images` | [models.AssistantMessageImages](../models/assistantmessageimages.md)[] | :heavy_minus_sign: | Generated images from image generation models | [
{
"image_url": {
"url": "data:image/png;base64,iVBORw0KGgo..."
}
}
] | +| `audio` | [models.ChatCompletionAudioOutput](../models/chatcompletionaudiooutput.md) | :heavy_minus_sign: | Audio output data or reference | {
"id": "audio_abc123",
"expires_at": 1677652400,
"data": "UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f",
"transcript": "Hello! How can I help you today?"
} | \ No newline at end of file diff --git a/docs/models/background.md b/docs/models/background.md new file mode 100644 index 00000000..1f1ea308 --- /dev/null +++ b/docs/models/background.md @@ -0,0 +1,17 @@ +# Background + +## Example Usage + +```typescript +import { Background } from "@openrouter/sdk/models"; + +let value: Background = "transparent"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"transparent" | "opaque" | "auto" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/by.md b/docs/models/by.md index 8e95225b..34fc3e7f 100644 --- a/docs/models/by.md +++ b/docs/models/by.md @@ -15,5 +15,5 @@ let value: By = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/cachecontrol.md b/docs/models/cachecontrol.md new file mode 100644 index 00000000..6b395400 --- /dev/null +++ b/docs/models/cachecontrol.md @@ -0,0 +1,20 @@ +# CacheControl + +Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + +## Example Usage + +```typescript +import { CacheControl } from "@openrouter/sdk/models"; + +let value: CacheControl = { + type: "ephemeral", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `type` | [models.ChatGenerationParamsType](../models/chatgenerationparamstype.md) | :heavy_check_mark: | N/A | +| `ttl` | [models.ChatGenerationParamsTtl](../models/chatgenerationparamsttl.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletionaudiooutput.md b/docs/models/chatcompletionaudiooutput.md new file mode 100644 index 00000000..d765e784 --- /dev/null +++ b/docs/models/chatcompletionaudiooutput.md @@ -0,0 +1,20 @@ +# ChatCompletionAudioOutput + +Audio output data or reference + +## Example Usage + +```typescript +import { ChatCompletionAudioOutput } from "@openrouter/sdk/models"; + +let value: ChatCompletionAudioOutput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `id` | *string* | :heavy_minus_sign: | Audio output identifier | +| `expiresAt` | *number* | :heavy_minus_sign: | Audio expiration timestamp | +| `data` | *string* | :heavy_minus_sign: | Base64 encoded audio data | +| `transcript` | *string* | :heavy_minus_sign: | Audio transcript | \ No newline at end of file diff --git a/docs/models/chatgenerationparams.md b/docs/models/chatgenerationparams.md index c7929769..4f8bfe58 100644 --- a/docs/models/chatgenerationparams.md +++ b/docs/models/chatgenerationparams.md @@ -39,7 +39,7 @@ let value: ChatGenerationParams = { | `logprobs` | *boolean* | :heavy_minus_sign: | Return log probabilities | false | | `topLogprobs` | *number* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 | | `maxCompletionTokens` | *number* | :heavy_minus_sign: | Maximum tokens in completion | 100 | -| `maxTokens` | *number* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | 100 | +| `maxTokens` | *number* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 | | `metadata` | Record | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"user_id": "user-123",
"session_id": "session-456"
} | | `presencePenalty` | *number* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 | | `reasoning` | [models.Reasoning](../models/reasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} | @@ -51,8 +51,9 @@ let value: ChatGenerationParams = { | `temperature` | *number* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 | | `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | | `toolChoice` | *models.ToolChoiceOption* | :heavy_minus_sign: | Tool choice configuration | auto | -| `tools` | [models.ToolDefinitionJson](../models/tooldefinitionjson.md)[] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] | +| `tools` | *models.ToolDefinitionJson*[] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] | | `topP` | *number* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 | | `debug` | [models.DebugOptions](../models/debugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} | | `imageConfig` | Record | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | -| `modalities` | [models.Modality](../models/modality.md)[] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | \ No newline at end of file +| `modalities` | [models.Modality](../models/modality.md)[] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] | +| `cacheControl` | [models.CacheControl](../models/cachecontrol.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | | \ No newline at end of file diff --git a/docs/models/chatgenerationparamsby.md b/docs/models/chatgenerationparamsby.md index 77543175..94d93e32 100644 --- a/docs/models/chatgenerationparamsby.md +++ b/docs/models/chatgenerationparamsby.md @@ -15,5 +15,5 @@ let value: ChatGenerationParamsBy = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/chatgenerationparamsplugincontextcompression.md b/docs/models/chatgenerationparamsplugincontextcompression.md new file mode 100644 index 00000000..703c17ae --- /dev/null +++ b/docs/models/chatgenerationparamsplugincontextcompression.md @@ -0,0 +1,19 @@ +# ChatGenerationParamsPluginContextCompression + +## Example Usage + +```typescript +import { ChatGenerationParamsPluginContextCompression } from "@openrouter/sdk/models"; + +let value: ChatGenerationParamsPluginContextCompression = { + id: "context-compression", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *"context-compression"* | :heavy_check_mark: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the context-compression plugin for this request. Defaults to true. | +| `engine` | [models.ContextCompressionEngine](../models/contextcompressionengine.md) | :heavy_minus_sign: | The compression engine to use. Defaults to "middle-out". | \ No newline at end of file diff --git a/docs/models/chatgenerationparamspluginunion.md b/docs/models/chatgenerationparamspluginunion.md index fcecb0ab..18f608e4 100644 --- a/docs/models/chatgenerationparamspluginunion.md +++ b/docs/models/chatgenerationparamspluginunion.md @@ -43,3 +43,11 @@ const value: models.ChatGenerationParamsPluginResponseHealing = { }; ``` +### `models.ChatGenerationParamsPluginContextCompression` + +```typescript +const value: models.ChatGenerationParamsPluginContextCompression = { + id: "context-compression", +}; +``` + diff --git a/docs/models/chatgenerationparamspluginweb.md b/docs/models/chatgenerationparamspluginweb.md index cd592c9e..0ceb10c8 100644 --- a/docs/models/chatgenerationparamspluginweb.md +++ b/docs/models/chatgenerationparamspluginweb.md @@ -12,10 +12,12 @@ let value: ChatGenerationParamsPluginWeb = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `id` | *"web"* | :heavy_check_mark: | N/A | -| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | -| `maxResults` | *number* | :heavy_minus_sign: | N/A | -| `searchPrompt` | *string* | :heavy_minus_sign: | N/A | -| `engine` | [models.WebSearchEngine](../models/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *"web"* | :heavy_check_mark: | N/A | | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | | +| `maxResults` | *number* | :heavy_minus_sign: | N/A | | +| `searchPrompt` | *string* | :heavy_minus_sign: | N/A | | +| `engine` | [models.WebSearchEngine](../models/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | | +| `includeDomains` | *string*[] | :heavy_minus_sign: | A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | +| `excludeDomains` | *string*[] | :heavy_minus_sign: | A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | \ No newline at end of file diff --git a/docs/models/chatgenerationparamsprovidersort.md b/docs/models/chatgenerationparamsprovidersort.md index 49d01bd7..9ca87dfe 100644 --- a/docs/models/chatgenerationparamsprovidersort.md +++ b/docs/models/chatgenerationparamsprovidersort.md @@ -15,5 +15,5 @@ let value: ChatGenerationParamsProviderSort = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/chatgenerationparamsprovidersortconfigenum.md b/docs/models/chatgenerationparamsprovidersortconfigenum.md index a194eedc..d7335a92 100644 --- a/docs/models/chatgenerationparamsprovidersortconfigenum.md +++ b/docs/models/chatgenerationparamsprovidersortconfigenum.md @@ -11,5 +11,5 @@ let value: ChatGenerationParamsProviderSortConfigEnum = "latency"; ## Values ```typescript -"price" | "throughput" | "latency" +"price" | "throughput" | "latency" | "exacto" ``` \ No newline at end of file diff --git a/docs/models/chatgenerationparamssortenum.md b/docs/models/chatgenerationparamssortenum.md index 586baae6..713b750d 100644 --- a/docs/models/chatgenerationparamssortenum.md +++ b/docs/models/chatgenerationparamssortenum.md @@ -13,5 +13,5 @@ let value: ChatGenerationParamsSortEnum = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/ttl.md b/docs/models/chatgenerationparamsttl.md similarity index 60% rename from docs/models/ttl.md rename to docs/models/chatgenerationparamsttl.md index 34f35ace..12b1bfb7 100644 --- a/docs/models/ttl.md +++ b/docs/models/chatgenerationparamsttl.md @@ -1,11 +1,11 @@ -# Ttl +# ChatGenerationParamsTtl ## Example Usage ```typescript -import { Ttl } from "@openrouter/sdk/models"; +import { ChatGenerationParamsTtl } from "@openrouter/sdk/models"; -let value: Ttl = "5m"; +let value: ChatGenerationParamsTtl = "1h"; ``` ## Values diff --git a/docs/models/chatgenerationparamstype.md b/docs/models/chatgenerationparamstype.md new file mode 100644 index 00000000..6644af9e --- /dev/null +++ b/docs/models/chatgenerationparamstype.md @@ -0,0 +1,15 @@ +# ChatGenerationParamsType + +## Example Usage + +```typescript +import { ChatGenerationParamsType } from "@openrouter/sdk/models"; + +let value: ChatGenerationParamsType = "ephemeral"; +``` + +## Values + +```typescript +"ephemeral" +``` \ No newline at end of file diff --git a/docs/models/chatmessagecontentitem.md b/docs/models/chatmessagecontentitem.md index 60b3ec3f..22d53850 100644 --- a/docs/models/chatmessagecontentitem.md +++ b/docs/models/chatmessagecontentitem.md @@ -48,3 +48,12 @@ const value: models.ChatMessageContentItem1 = { }; ``` +### `models.ChatMessageContentItemFile` + +```typescript +const value: models.ChatMessageContentItemFile = { + type: "file", + file: {}, +}; +``` + diff --git a/docs/models/chatmessagecontentitemcachecontrol.md b/docs/models/chatmessagecontentitemcachecontrol.md index 7af306bc..af289c08 100644 --- a/docs/models/chatmessagecontentitemcachecontrol.md +++ b/docs/models/chatmessagecontentitemcachecontrol.md @@ -17,4 +17,4 @@ let value: ChatMessageContentItemCacheControl = { | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `type` | [models.ChatMessageContentItemCacheControlType](../models/chatmessagecontentitemcachecontroltype.md) | :heavy_check_mark: | N/A | -| `ttl` | [models.Ttl](../models/ttl.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `ttl` | [models.ChatMessageContentItemCacheControlTtl](../models/chatmessagecontentitemcachecontrolttl.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemcachecontrolttl.md b/docs/models/chatmessagecontentitemcachecontrolttl.md new file mode 100644 index 00000000..35793d85 --- /dev/null +++ b/docs/models/chatmessagecontentitemcachecontrolttl.md @@ -0,0 +1,17 @@ +# ChatMessageContentItemCacheControlTtl + +## Example Usage + +```typescript +import { ChatMessageContentItemCacheControlTtl } from "@openrouter/sdk/models"; + +let value: ChatMessageContentItemCacheControlTtl = "1h"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"5m" | "1h" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemfile.md b/docs/models/chatmessagecontentitemfile.md new file mode 100644 index 00000000..62fcd17c --- /dev/null +++ b/docs/models/chatmessagecontentitemfile.md @@ -0,0 +1,21 @@ +# ChatMessageContentItemFile + +File content part for document processing + +## Example Usage + +```typescript +import { ChatMessageContentItemFile } from "@openrouter/sdk/models"; + +let value: ChatMessageContentItemFile = { + type: "file", + file: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `type` | [models.ChatMessageContentItemFileType](../models/chatmessagecontentitemfiletype.md) | :heavy_check_mark: | N/A | +| `file` | [models.FileT](../models/filet.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitemfiletype.md b/docs/models/chatmessagecontentitemfiletype.md new file mode 100644 index 00000000..5f0961a9 --- /dev/null +++ b/docs/models/chatmessagecontentitemfiletype.md @@ -0,0 +1,15 @@ +# ChatMessageContentItemFileType + +## Example Usage + +```typescript +import { ChatMessageContentItemFileType } from "@openrouter/sdk/models"; + +let value: ChatMessageContentItemFileType = "file"; +``` + +## Values + +```typescript +"file" +``` \ No newline at end of file diff --git a/docs/models/chatmessagetokenlogprobs.md b/docs/models/chatmessagetokenlogprobs.md index e125f27d..732a08c6 100644 --- a/docs/models/chatmessagetokenlogprobs.md +++ b/docs/models/chatmessagetokenlogprobs.md @@ -16,7 +16,6 @@ let value: ChatMessageTokenLogprobs = { topLogprobs: [], }, ], - refusal: null, }; ``` @@ -25,4 +24,4 @@ let value: ChatMessageTokenLogprobs = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `content` | [models.ChatMessageTokenLogprob](../models/chatmessagetokenlogprob.md)[] | :heavy_check_mark: | Log probabilities for content tokens | -| `refusal` | [models.ChatMessageTokenLogprob](../models/chatmessagetokenlogprob.md)[] | :heavy_check_mark: | Log probabilities for refusal tokens | \ No newline at end of file +| `refusal` | [models.ChatMessageTokenLogprob](../models/chatmessagetokenlogprob.md)[] | :heavy_minus_sign: | Log probabilities for refusal tokens | \ No newline at end of file diff --git a/docs/models/chatresponse.md b/docs/models/chatresponse.md index 89d69ec1..a11c9bc1 100644 --- a/docs/models/chatresponse.md +++ b/docs/models/chatresponse.md @@ -21,6 +21,7 @@ let value: ChatResponse = { created: 1677652288, model: "openai/gpt-4", object: "chat.completion", + systemFingerprint: "fp_44709d6fcb", }; ``` @@ -33,5 +34,5 @@ let value: ChatResponse = { | `created` | *number* | :heavy_check_mark: | Unix timestamp of creation | 1677652288 | | `model` | *string* | :heavy_check_mark: | Model used for completion | openai/gpt-4 | | `object` | [models.ChatResponseObject](../models/chatresponseobject.md) | :heavy_check_mark: | N/A | | -| `systemFingerprint` | *string* | :heavy_minus_sign: | System fingerprint | fp_44709d6fcb | +| `systemFingerprint` | *string* | :heavy_check_mark: | System fingerprint | fp_44709d6fcb | | `usage` | [models.ChatGenerationTokenUsage](../models/chatgenerationtokenusage.md) | :heavy_minus_sign: | Token usage statistics | {
"completion_tokens": 15,
"prompt_tokens": 10,
"total_tokens": 25,
"completion_tokens_details": {
"reasoning_tokens": 5
},
"prompt_tokens_details": {
"cached_tokens": 2
}
} | \ No newline at end of file diff --git a/docs/models/chatstreamingmessagechunk.md b/docs/models/chatstreamingmessagechunk.md index 7cb663d9..167fe829 100644 --- a/docs/models/chatstreamingmessagechunk.md +++ b/docs/models/chatstreamingmessagechunk.md @@ -12,11 +12,12 @@ let value: ChatStreamingMessageChunk = {}; ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `role` | [models.ChatStreamingMessageChunkRole](../models/chatstreamingmessagechunkrole.md) | :heavy_minus_sign: | The role of the message author | assistant | -| `content` | *string* | :heavy_minus_sign: | Message content delta | Hello | -| `reasoning` | *string* | :heavy_minus_sign: | Reasoning content delta | I need to | -| `refusal` | *string* | :heavy_minus_sign: | Refusal message delta | | -| `toolCalls` | [models.ChatStreamingMessageToolCall](../models/chatstreamingmessagetoolcall.md)[] | :heavy_minus_sign: | Tool calls delta | | -| `reasoningDetails` | *models.ReasoningDetailUnion*[] | :heavy_minus_sign: | Reasoning details for extended thinking models | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `role` | [models.ChatStreamingMessageChunkRole](../models/chatstreamingmessagechunkrole.md) | :heavy_minus_sign: | The role of the message author | assistant | +| `content` | *string* | :heavy_minus_sign: | Message content delta | Hello | +| `reasoning` | *string* | :heavy_minus_sign: | Reasoning content delta | I need to | +| `refusal` | *string* | :heavy_minus_sign: | Refusal message delta | | +| `toolCalls` | [models.ChatStreamingMessageToolCall](../models/chatstreamingmessagetoolcall.md)[] | :heavy_minus_sign: | Tool calls delta | | +| `reasoningDetails` | *models.ReasoningDetailUnion*[] | :heavy_minus_sign: | Reasoning details for extended thinking models | | +| `audio` | [models.ChatCompletionAudioOutput](../models/chatcompletionaudiooutput.md) | :heavy_minus_sign: | N/A | {
"id": "audio_abc123",
"expires_at": 1677652400,
"data": "UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f",
"transcript": "Hello! How can I help you today?"
} | \ No newline at end of file diff --git a/docs/models/compoundfilter.md b/docs/models/compoundfilter.md new file mode 100644 index 00000000..34117bb8 --- /dev/null +++ b/docs/models/compoundfilter.md @@ -0,0 +1,30 @@ +# CompoundFilter + +A compound filter that combines multiple comparison or compound filters + +## Example Usage + +```typescript +import { CompoundFilter } from "@openrouter/sdk/models"; + +let value: CompoundFilter = { + type: "or", + filters: [ + {}, + { + "key": "", + }, + { + "key": "", + "key1": "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `type` | [models.CompoundFilterType](../models/compoundfiltertype.md) | :heavy_check_mark: | N/A | +| `filters` | Record[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/compoundfiltertype.md b/docs/models/compoundfiltertype.md new file mode 100644 index 00000000..2e01022e --- /dev/null +++ b/docs/models/compoundfiltertype.md @@ -0,0 +1,17 @@ +# CompoundFilterType + +## Example Usage + +```typescript +import { CompoundFilterType } from "@openrouter/sdk/models"; + +let value: CompoundFilterType = "or"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"and" | "or" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/conflictresponseerrordata.md b/docs/models/conflictresponseerrordata.md new file mode 100644 index 00000000..1a8c387f --- /dev/null +++ b/docs/models/conflictresponseerrordata.md @@ -0,0 +1,22 @@ +# ConflictResponseErrorData + +Error data for ConflictResponse + +## Example Usage + +```typescript +import { ConflictResponseErrorData } from "@openrouter/sdk/models"; + +let value: ConflictResponseErrorData = { + code: 409, + message: "Resource conflict. Please try again later.", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `code` | *number* | :heavy_check_mark: | N/A | +| `message` | *string* | :heavy_check_mark: | N/A | +| `metadata` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorid.md b/docs/models/connectorid.md new file mode 100644 index 00000000..f69435e0 --- /dev/null +++ b/docs/models/connectorid.md @@ -0,0 +1,17 @@ +# ConnectorId + +## Example Usage + +```typescript +import { ConnectorId } from "@openrouter/sdk/models"; + +let value: ConnectorId = "connector_dropbox"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/container.md b/docs/models/container.md new file mode 100644 index 00000000..399dbfe1 --- /dev/null +++ b/docs/models/container.md @@ -0,0 +1,19 @@ +# Container + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `models.ContainerAuto` + +```typescript +const value: models.ContainerAuto = { + type: "auto", +}; +``` + diff --git a/docs/models/containerauto.md b/docs/models/containerauto.md new file mode 100644 index 00000000..c3849da3 --- /dev/null +++ b/docs/models/containerauto.md @@ -0,0 +1,19 @@ +# ContainerAuto + +## Example Usage + +```typescript +import { ContainerAuto } from "@openrouter/sdk/models"; + +let value: ContainerAuto = { + type: "auto", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `type` | [models.ContainerType](../models/containertype.md) | :heavy_check_mark: | N/A | +| `fileIds` | *string*[] | :heavy_minus_sign: | N/A | +| `memoryLimit` | [models.MemoryLimit](../models/memorylimit.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/containertype.md b/docs/models/containertype.md new file mode 100644 index 00000000..4b56db20 --- /dev/null +++ b/docs/models/containertype.md @@ -0,0 +1,15 @@ +# ContainerType + +## Example Usage + +```typescript +import { ContainerType } from "@openrouter/sdk/models"; + +let value: ContainerType = "auto"; +``` + +## Values + +```typescript +"auto" +``` \ No newline at end of file diff --git a/docs/models/contextcompressionengine.md b/docs/models/contextcompressionengine.md new file mode 100644 index 00000000..52167978 --- /dev/null +++ b/docs/models/contextcompressionengine.md @@ -0,0 +1,17 @@ +# ContextCompressionEngine + +The compression engine to use. Defaults to "middle-out". + +## Example Usage + +```typescript +import { ContextCompressionEngine } from "@openrouter/sdk/models"; + +let value: ContextCompressionEngine = "middle-out"; +``` + +## Values + +```typescript +"middle-out" +``` \ No newline at end of file diff --git a/docs/models/datetimeservertool.md b/docs/models/datetimeservertool.md new file mode 100644 index 00000000..48e62c40 --- /dev/null +++ b/docs/models/datetimeservertool.md @@ -0,0 +1,20 @@ +# DatetimeServerTool + +OpenRouter built-in server tool: returns the current date and time + +## Example Usage + +```typescript +import { DatetimeServerTool } from "@openrouter/sdk/models"; + +let value: DatetimeServerTool = { + type: "openrouter:datetime", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `type` | *"openrouter:datetime"* | :heavy_check_mark: | N/A | +| `parameters` | [models.DatetimeServerToolParameters](../models/datetimeservertoolparameters.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/datetimeservertoolparameters.md b/docs/models/datetimeservertoolparameters.md new file mode 100644 index 00000000..885b1342 --- /dev/null +++ b/docs/models/datetimeservertoolparameters.md @@ -0,0 +1,15 @@ +# DatetimeServerToolParameters + +## Example Usage + +```typescript +import { DatetimeServerToolParameters } from "@openrouter/sdk/models"; + +let value: DatetimeServerToolParameters = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `timezone` | *string* | :heavy_minus_sign: | IANA timezone name (e.g. "America/New_York"). Defaults to UTC. | America/New_York | \ No newline at end of file diff --git a/docs/models/defaultparameters.md b/docs/models/defaultparameters.md index 9a80e9d9..2f1254ed 100644 --- a/docs/models/defaultparameters.md +++ b/docs/models/defaultparameters.md @@ -12,8 +12,11 @@ let value: DefaultParameters = {}; ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `temperature` | *number* | :heavy_minus_sign: | N/A | -| `topP` | *number* | :heavy_minus_sign: | N/A | -| `frequencyPenalty` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `temperature` | *number* | :heavy_minus_sign: | N/A | +| `topP` | *number* | :heavy_minus_sign: | N/A | +| `topK` | *number* | :heavy_minus_sign: | N/A | +| `frequencyPenalty` | *number* | :heavy_minus_sign: | N/A | +| `presencePenalty` | *number* | :heavy_minus_sign: | N/A | +| `repetitionPenalty` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/environment.md b/docs/models/environment.md new file mode 100644 index 00000000..466e048f --- /dev/null +++ b/docs/models/environment.md @@ -0,0 +1,17 @@ +# Environment + +## Example Usage + +```typescript +import { Environment } from "@openrouter/sdk/models"; + +let value: Environment = "ubuntu"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"windows" | "mac" | "linux" | "ubuntu" | "browser" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/errors/conflictresponseerror.md b/docs/models/errors/conflictresponseerror.md new file mode 100644 index 00000000..0ab1f628 --- /dev/null +++ b/docs/models/errors/conflictresponseerror.md @@ -0,0 +1,18 @@ +# ConflictResponseError + +Conflict - Resource conflict or concurrent modification + +## Example Usage + +```typescript +import { ConflictResponseError } from "@openrouter/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `error` | [models.ConflictResponseErrorData](../../models/conflictresponseerrordata.md) | :heavy_check_mark: | Error data for ConflictResponse | {
"code": 409,
"message": "Resource conflict. Please try again later."
} | +| `userId` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/filet.md b/docs/models/filet.md new file mode 100644 index 00000000..5a179500 --- /dev/null +++ b/docs/models/filet.md @@ -0,0 +1,17 @@ +# FileT + +## Example Usage + +```typescript +import { FileT } from "@openrouter/sdk/models"; + +let value: FileT = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `fileData` | *string* | :heavy_minus_sign: | File content as base64 data URL or URL | +| `fileId` | *string* | :heavy_minus_sign: | File ID for previously uploaded files | +| `filename` | *string* | :heavy_minus_sign: | Original filename | \ No newline at end of file diff --git a/docs/models/filters.md b/docs/models/filters.md new file mode 100644 index 00000000..654ebc52 --- /dev/null +++ b/docs/models/filters.md @@ -0,0 +1,39 @@ +# Filters + + +## Supported Types + +### `models.OpenResponsesFileSearchToolFilters` + +```typescript +const value: models.OpenResponsesFileSearchToolFilters = { + key: "", + type: "ne", + value: true, +}; +``` + +### `models.CompoundFilter` + +```typescript +const value: models.CompoundFilter = { + type: "or", + filters: [ + {}, + { + "key": "", + }, + { + "key": "", + "key1": "", + }, + ], +}; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/filterstype.md b/docs/models/filterstype.md new file mode 100644 index 00000000..4022dc5d --- /dev/null +++ b/docs/models/filterstype.md @@ -0,0 +1,17 @@ +# FiltersType + +## Example Usage + +```typescript +import { FiltersType } from "@openrouter/sdk/models"; + +let value: FiltersType = "gt"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"eq" | "ne" | "gt" | "gte" | "lt" | "lte" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/format.md b/docs/models/format.md new file mode 100644 index 00000000..9eb17e0b --- /dev/null +++ b/docs/models/format.md @@ -0,0 +1,23 @@ +# Format + + +## Supported Types + +### `models.FormatText` + +```typescript +const value: models.FormatText = { + type: "text", +}; +``` + +### `models.FormatGrammar` + +```typescript +const value: models.FormatGrammar = { + type: "grammar", + definition: "", + syntax: "lark", +}; +``` + diff --git a/docs/models/formatgrammar.md b/docs/models/formatgrammar.md new file mode 100644 index 00000000..ee56de30 --- /dev/null +++ b/docs/models/formatgrammar.md @@ -0,0 +1,21 @@ +# FormatGrammar + +## Example Usage + +```typescript +import { FormatGrammar } from "@openrouter/sdk/models"; + +let value: FormatGrammar = { + type: "grammar", + definition: "", + syntax: "lark", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *"grammar"* | :heavy_check_mark: | N/A | +| `definition` | *string* | :heavy_check_mark: | N/A | +| `syntax` | [models.Syntax](../models/syntax.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/formattext.md b/docs/models/formattext.md new file mode 100644 index 00000000..416429d8 --- /dev/null +++ b/docs/models/formattext.md @@ -0,0 +1,17 @@ +# FormatText + +## Example Usage + +```typescript +import { FormatText } from "@openrouter/sdk/models"; + +let value: FormatText = { + type: "text", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"text"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/inputfidelity.md b/docs/models/inputfidelity.md new file mode 100644 index 00000000..35299388 --- /dev/null +++ b/docs/models/inputfidelity.md @@ -0,0 +1,17 @@ +# InputFidelity + +## Example Usage + +```typescript +import { InputFidelity } from "@openrouter/sdk/models"; + +let value: InputFidelity = "high"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"high" | "low" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/inputimagemask.md b/docs/models/inputimagemask.md new file mode 100644 index 00000000..37eb5a59 --- /dev/null +++ b/docs/models/inputimagemask.md @@ -0,0 +1,16 @@ +# InputImageMask + +## Example Usage + +```typescript +import { InputImageMask } from "@openrouter/sdk/models"; + +let value: InputImageMask = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `imageUrl` | *string* | :heavy_minus_sign: | N/A | +| `fileId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/memorylimit.md b/docs/models/memorylimit.md new file mode 100644 index 00000000..961f646a --- /dev/null +++ b/docs/models/memorylimit.md @@ -0,0 +1,17 @@ +# MemoryLimit + +## Example Usage + +```typescript +import { MemoryLimit } from "@openrouter/sdk/models"; + +let value: MemoryLimit = "16g"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"1g" | "4g" | "16g" | "64g" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/modality.md b/docs/models/modality.md index 81727872..7efa7059 100644 --- a/docs/models/modality.md +++ b/docs/models/modality.md @@ -5,7 +5,7 @@ ```typescript import { Modality } from "@openrouter/sdk/models"; -let value: Modality = "image"; +let value: Modality = "audio"; ``` ## Values @@ -13,5 +13,5 @@ let value: Modality = "image"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"text" | "image" | Unrecognized +"text" | "image" | "audio" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/model.md b/docs/models/model.md index cac0629a..41ae5101 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -55,5 +55,5 @@ let value: Model = { | `topProvider` | [models.TopProviderInfo](../models/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
} | | `perRequestLimits` | [models.PerRequestLimits](../models/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"prompt_tokens": 1000,
"completion_tokens": 1000
} | | `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | List of supported parameters for this model | | -| `defaultParameters` | [models.DefaultParameters](../models/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"frequency_penalty": 0
} | +| `defaultParameters` | [models.DefaultParameters](../models/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"top_k": 0,
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1
} | | `expirationDate` | *string* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | \ No newline at end of file diff --git a/docs/models/modelenum.md b/docs/models/modelenum.md new file mode 100644 index 00000000..262038b8 --- /dev/null +++ b/docs/models/modelenum.md @@ -0,0 +1,17 @@ +# ModelEnum + +## Example Usage + +```typescript +import { ModelEnum } from "@openrouter/sdk/models"; + +let value: ModelEnum = "gpt-image-1-mini"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"gpt-image-1" | "gpt-image-1-mini" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/moderation.md b/docs/models/moderation.md new file mode 100644 index 00000000..79f8ff00 --- /dev/null +++ b/docs/models/moderation.md @@ -0,0 +1,17 @@ +# Moderation + +## Example Usage + +```typescript +import { Moderation } from "@openrouter/sdk/models"; + +let value: Moderation = "low"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "low" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/never.md b/docs/models/never.md new file mode 100644 index 00000000..fda3bdf6 --- /dev/null +++ b/docs/models/never.md @@ -0,0 +1,15 @@ +# Never + +## Example Usage + +```typescript +import { Never } from "@openrouter/sdk/models"; + +let value: Never = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `toolNames` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsesinputfunctioncalloutput.md b/docs/models/openairesponsesinputfunctioncalloutput.md index 1e95ba5b..a2589e3d 100644 --- a/docs/models/openairesponsesinputfunctioncalloutput.md +++ b/docs/models/openairesponsesinputfunctioncalloutput.md @@ -8,7 +8,7 @@ import { OpenAIResponsesInputFunctionCallOutput } from "@openrouter/sdk/models"; let value: OpenAIResponsesInputFunctionCallOutput = { type: "function_call_output", callId: "", - output: "", + output: [], }; ``` @@ -19,5 +19,5 @@ let value: OpenAIResponsesInputFunctionCallOutput = { | `type` | [models.OpenAIResponsesInputTypeFunctionCallOutput](../models/openairesponsesinputtypefunctioncalloutput.md) | :heavy_check_mark: | N/A | | | `id` | *string* | :heavy_minus_sign: | N/A | | | `callId` | *string* | :heavy_check_mark: | N/A | | -| `output` | *string* | :heavy_check_mark: | N/A | | +| `output` | *models.OpenAIResponsesInputOutput2* | :heavy_check_mark: | N/A | | | `status` | [models.ToolCallStatus](../models/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/models/openairesponsesinputmessage1.md b/docs/models/openairesponsesinputmessage1.md index 2e34a547..541430d0 100644 --- a/docs/models/openairesponsesinputmessage1.md +++ b/docs/models/openairesponsesinputmessage1.md @@ -17,4 +17,5 @@ let value: OpenAIResponsesInputMessage1 = { | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `type` | [models.OpenAIResponsesInputTypeMessage1](../models/openairesponsesinputtypemessage1.md) | :heavy_minus_sign: | N/A | | `role` | *models.OpenAIResponsesInputRoleUnion1* | :heavy_check_mark: | N/A | -| `content` | *models.OpenAIResponsesInputContent2* | :heavy_check_mark: | N/A | \ No newline at end of file +| `content` | *models.OpenAIResponsesInputContent2* | :heavy_check_mark: | N/A | +| `phase` | *models.OpenAIResponsesInputPhaseUnion* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openairesponsesinputoutput1.md b/docs/models/openairesponsesinputoutput1.md new file mode 100644 index 00000000..785eebda --- /dev/null +++ b/docs/models/openairesponsesinputoutput1.md @@ -0,0 +1,31 @@ +# OpenAIResponsesInputOutput1 + + +## Supported Types + +### `models.ResponseInputText` + +```typescript +const value: models.ResponseInputText = { + type: "input_text", + text: "Hello, how can I help you?", +}; +``` + +### `models.ResponseInputImage` + +```typescript +const value: models.ResponseInputImage = { + type: "input_image", + detail: "auto", +}; +``` + +### `models.ResponseInputFile` + +```typescript +const value: models.ResponseInputFile = { + type: "input_file", +}; +``` + diff --git a/docs/models/openairesponsesinputoutput2.md b/docs/models/openairesponsesinputoutput2.md new file mode 100644 index 00000000..0cf26c74 --- /dev/null +++ b/docs/models/openairesponsesinputoutput2.md @@ -0,0 +1,22 @@ +# OpenAIResponsesInputOutput2 + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `models.OpenAIResponsesInputOutput1[]` + +```typescript +const value: models.OpenAIResponsesInputOutput1[] = [ + { + type: "input_text", + text: "Hello, how can I help you?", + }, +]; +``` + diff --git a/docs/models/openairesponsesinputphasecommentary.md b/docs/models/openairesponsesinputphasecommentary.md new file mode 100644 index 00000000..b2aa47be --- /dev/null +++ b/docs/models/openairesponsesinputphasecommentary.md @@ -0,0 +1,15 @@ +# OpenAIResponsesInputPhaseCommentary + +## Example Usage + +```typescript +import { OpenAIResponsesInputPhaseCommentary } from "@openrouter/sdk/models"; + +let value: OpenAIResponsesInputPhaseCommentary = "commentary"; +``` + +## Values + +```typescript +"commentary" +``` \ No newline at end of file diff --git a/docs/models/openairesponsesinputphasefinalanswer.md b/docs/models/openairesponsesinputphasefinalanswer.md new file mode 100644 index 00000000..fd4df6b8 --- /dev/null +++ b/docs/models/openairesponsesinputphasefinalanswer.md @@ -0,0 +1,15 @@ +# OpenAIResponsesInputPhaseFinalAnswer + +## Example Usage + +```typescript +import { OpenAIResponsesInputPhaseFinalAnswer } from "@openrouter/sdk/models"; + +let value: OpenAIResponsesInputPhaseFinalAnswer = "final_answer"; +``` + +## Values + +```typescript +"final_answer" +``` \ No newline at end of file diff --git a/docs/models/openairesponsesinputphaseunion.md b/docs/models/openairesponsesinputphaseunion.md new file mode 100644 index 00000000..11a00d11 --- /dev/null +++ b/docs/models/openairesponsesinputphaseunion.md @@ -0,0 +1,23 @@ +# OpenAIResponsesInputPhaseUnion + + +## Supported Types + +### `models.OpenAIResponsesInputPhaseCommentary` + +```typescript +const value: models.OpenAIResponsesInputPhaseCommentary = "commentary"; +``` + +### `models.OpenAIResponsesInputPhaseFinalAnswer` + +```typescript +const value: models.OpenAIResponsesInputPhaseFinalAnswer = "final_answer"; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/openairesponsesinputunion1.md b/docs/models/openairesponsesinputunion1.md index a47c9dbf..5d6bdf26 100644 --- a/docs/models/openairesponsesinputunion1.md +++ b/docs/models/openairesponsesinputunion1.md @@ -33,7 +33,7 @@ const value: models.OpenAIResponsesInputMessage2 = { const value: models.OpenAIResponsesInputFunctionCallOutput = { type: "function_call_output", callId: "", - output: "", + output: [], }; ``` diff --git a/docs/models/openresponsesapplypatchtool.md b/docs/models/openresponsesapplypatchtool.md new file mode 100644 index 00000000..9a72c508 --- /dev/null +++ b/docs/models/openresponsesapplypatchtool.md @@ -0,0 +1,19 @@ +# OpenResponsesApplyPatchTool + +Apply patch tool configuration + +## Example Usage + +```typescript +import { OpenResponsesApplyPatchTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesApplyPatchTool = { + type: "apply_patch", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"apply_patch"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsescodeinterpretertool.md b/docs/models/openresponsescodeinterpretertool.md new file mode 100644 index 00000000..9d3ad62e --- /dev/null +++ b/docs/models/openresponsescodeinterpretertool.md @@ -0,0 +1,21 @@ +# OpenResponsesCodeInterpreterTool + +Code interpreter tool configuration + +## Example Usage + +```typescript +import { OpenResponsesCodeInterpreterTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesCodeInterpreterTool = { + type: "code_interpreter", + container: "auto", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *"code_interpreter"* | :heavy_check_mark: | N/A | +| `container` | *models.Container* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsescomputertool.md b/docs/models/openresponsescomputertool.md new file mode 100644 index 00000000..eaed857f --- /dev/null +++ b/docs/models/openresponsescomputertool.md @@ -0,0 +1,25 @@ +# OpenResponsesComputerTool + +Computer use preview tool configuration + +## Example Usage + +```typescript +import { OpenResponsesComputerTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesComputerTool = { + type: "computer_use_preview", + displayHeight: 768, + displayWidth: 1024, + environment: "linux", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `type` | *"computer_use_preview"* | :heavy_check_mark: | N/A | +| `displayHeight` | *number* | :heavy_check_mark: | N/A | +| `displayWidth` | *number* | :heavy_check_mark: | N/A | +| `environment` | [models.Environment](../models/environment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsescustomtool.md b/docs/models/openresponsescustomtool.md new file mode 100644 index 00000000..e91d343f --- /dev/null +++ b/docs/models/openresponsescustomtool.md @@ -0,0 +1,23 @@ +# OpenResponsesCustomTool + +Custom tool configuration + +## Example Usage + +```typescript +import { OpenResponsesCustomTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesCustomTool = { + type: "custom", + name: "my_tool", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"custom"* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `format` | *models.Format* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessage.md b/docs/models/openresponseseasyinputmessage.md index 98941cc6..2238757d 100644 --- a/docs/models/openresponseseasyinputmessage.md +++ b/docs/models/openresponseseasyinputmessage.md @@ -7,14 +7,14 @@ import { OpenResponsesEasyInputMessage } from "@openrouter/sdk/models"; let value: OpenResponsesEasyInputMessage = { role: "system", - content: "", }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesEasyInputMessageTypeMessage](../models/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A | -| `role` | *models.OpenResponsesEasyInputMessageRoleUnion* | :heavy_check_mark: | N/A | -| `content` | *models.OpenResponsesEasyInputMessageContentUnion2* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [models.OpenResponsesEasyInputMessageTypeMessage](../models/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A | | +| `role` | *models.OpenResponsesEasyInputMessageRoleUnion* | :heavy_check_mark: | N/A | | +| `content` | *models.OpenResponsesEasyInputMessageContentUnion2* | :heavy_minus_sign: | N/A | | +| `phase` | *models.OpenResponsesEasyInputMessagePhaseUnion* | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | final_answer | \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagecontentunion2.md b/docs/models/openresponseseasyinputmessagecontentunion2.md index e535b1b4..fc9c0cc8 100644 --- a/docs/models/openresponseseasyinputmessagecontentunion2.md +++ b/docs/models/openresponseseasyinputmessagecontentunion2.md @@ -15,3 +15,9 @@ const value: models.OpenResponsesEasyInputMessageContentUnion1[] = []; const value: string = ""; ``` +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/openresponseseasyinputmessagephasecommentary.md b/docs/models/openresponseseasyinputmessagephasecommentary.md new file mode 100644 index 00000000..d4409ea6 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagephasecommentary.md @@ -0,0 +1,15 @@ +# OpenResponsesEasyInputMessagePhaseCommentary + +## Example Usage + +```typescript +import { OpenResponsesEasyInputMessagePhaseCommentary } from "@openrouter/sdk/models"; + +let value: OpenResponsesEasyInputMessagePhaseCommentary = "commentary"; +``` + +## Values + +```typescript +"commentary" +``` \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagephasefinalanswer.md b/docs/models/openresponseseasyinputmessagephasefinalanswer.md new file mode 100644 index 00000000..b5b56695 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagephasefinalanswer.md @@ -0,0 +1,15 @@ +# OpenResponsesEasyInputMessagePhaseFinalAnswer + +## Example Usage + +```typescript +import { OpenResponsesEasyInputMessagePhaseFinalAnswer } from "@openrouter/sdk/models"; + +let value: OpenResponsesEasyInputMessagePhaseFinalAnswer = "final_answer"; +``` + +## Values + +```typescript +"final_answer" +``` \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagephaseunion.md b/docs/models/openresponseseasyinputmessagephaseunion.md new file mode 100644 index 00000000..fba351e5 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagephaseunion.md @@ -0,0 +1,26 @@ +# OpenResponsesEasyInputMessagePhaseUnion + +The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + + +## Supported Types + +### `models.OpenResponsesEasyInputMessagePhaseCommentary` + +```typescript +const value: models.OpenResponsesEasyInputMessagePhaseCommentary = "commentary"; +``` + +### `models.OpenResponsesEasyInputMessagePhaseFinalAnswer` + +```typescript +const value: models.OpenResponsesEasyInputMessagePhaseFinalAnswer = + "final_answer"; +``` + +### `any` + +```typescript +const value: any = "final_answer"; +``` + diff --git a/docs/models/openresponsesfilesearchtool.md b/docs/models/openresponsesfilesearchtool.md new file mode 100644 index 00000000..f40c21aa --- /dev/null +++ b/docs/models/openresponsesfilesearchtool.md @@ -0,0 +1,26 @@ +# OpenResponsesFileSearchTool + +File search tool configuration + +## Example Usage + +```typescript +import { OpenResponsesFileSearchTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesFileSearchTool = { + type: "file_search", + vectorStoreIds: [ + "vs_abc123", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *"file_search"* | :heavy_check_mark: | N/A | +| `vectorStoreIds` | *string*[] | :heavy_check_mark: | N/A | +| `filters` | *models.Filters* | :heavy_minus_sign: | N/A | +| `maxNumResults` | *number* | :heavy_minus_sign: | N/A | +| `rankingOptions` | [models.RankingOptions](../models/rankingoptions.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesfilesearchtoolfilters.md b/docs/models/openresponsesfilesearchtoolfilters.md new file mode 100644 index 00000000..b4a0adf1 --- /dev/null +++ b/docs/models/openresponsesfilesearchtoolfilters.md @@ -0,0 +1,21 @@ +# OpenResponsesFileSearchToolFilters + +## Example Usage + +```typescript +import { OpenResponsesFileSearchToolFilters } from "@openrouter/sdk/models"; + +let value: OpenResponsesFileSearchToolFilters = { + key: "", + type: "ne", + value: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | N/A | +| `type` | [models.FiltersType](../models/filterstype.md) | :heavy_check_mark: | N/A | +| `value` | *models.Value2* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesfunctioncalloutput.md b/docs/models/openresponsesfunctioncalloutput.md index a4ce7a72..d5836a48 100644 --- a/docs/models/openresponsesfunctioncalloutput.md +++ b/docs/models/openresponsesfunctioncalloutput.md @@ -16,10 +16,10 @@ let value: OpenResponsesFunctionCallOutput = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `type` | [models.OpenResponsesFunctionCallOutputType](../models/openresponsesfunctioncalloutputtype.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_minus_sign: | N/A | | -| `callId` | *string* | :heavy_check_mark: | N/A | | -| `output` | *string* | :heavy_check_mark: | N/A | | -| `status` | [models.ToolCallStatus](../models/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [models.OpenResponsesFunctionCallOutputTypeFunctionCallOutput](../models/openresponsesfunctioncalloutputtypefunctioncalloutput.md) | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `callId` | *string* | :heavy_check_mark: | N/A | | +| `output` | *models.OpenResponsesFunctionCallOutputOutputUnion2* | :heavy_check_mark: | N/A | | +| `status` | [models.ToolCallStatus](../models/toolcallstatus.md) | :heavy_minus_sign: | N/A | completed | \ No newline at end of file diff --git a/docs/models/openresponsesfunctioncalloutputdetail.md b/docs/models/openresponsesfunctioncalloutputdetail.md new file mode 100644 index 00000000..8c2d634c --- /dev/null +++ b/docs/models/openresponsesfunctioncalloutputdetail.md @@ -0,0 +1,17 @@ +# OpenResponsesFunctionCallOutputDetail + +## Example Usage + +```typescript +import { OpenResponsesFunctionCallOutputDetail } from "@openrouter/sdk/models"; + +let value: OpenResponsesFunctionCallOutputDetail = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "high" | "low" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponsesfunctioncalloutputoutputunion1.md b/docs/models/openresponsesfunctioncalloutputoutputunion1.md new file mode 100644 index 00000000..8f015e8f --- /dev/null +++ b/docs/models/openresponsesfunctioncalloutputoutputunion1.md @@ -0,0 +1,31 @@ +# OpenResponsesFunctionCallOutputOutputUnion1 + + +## Supported Types + +### `models.ResponseInputText` + +```typescript +const value: models.ResponseInputText = { + type: "input_text", + text: "Hello, how can I help you?", +}; +``` + +### `models.OutputInputImage` + +```typescript +const value: models.OutputInputImage = { + type: "input_image", + detail: "auto", +}; +``` + +### `models.ResponseInputFile` + +```typescript +const value: models.ResponseInputFile = { + type: "input_file", +}; +``` + diff --git a/docs/models/openresponsesfunctioncalloutputoutputunion2.md b/docs/models/openresponsesfunctioncalloutputoutputunion2.md new file mode 100644 index 00000000..e8f36d41 --- /dev/null +++ b/docs/models/openresponsesfunctioncalloutputoutputunion2.md @@ -0,0 +1,22 @@ +# OpenResponsesFunctionCallOutputOutputUnion2 + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `models.OpenResponsesFunctionCallOutputOutputUnion1[]` + +```typescript +const value: models.OpenResponsesFunctionCallOutputOutputUnion1[] = [ + { + type: "input_text", + text: "Hello, how can I help you?", + }, +]; +``` + diff --git a/docs/models/openresponsesfunctioncalloutputtype.md b/docs/models/openresponsesfunctioncalloutputtype.md deleted file mode 100644 index 78a849bb..00000000 --- a/docs/models/openresponsesfunctioncalloutputtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesFunctionCallOutputType - -## Example Usage - -```typescript -import { OpenResponsesFunctionCallOutputType } from "@openrouter/sdk/models"; - -let value: OpenResponsesFunctionCallOutputType = "function_call_output"; -``` - -## Values - -```typescript -"function_call_output" -``` \ No newline at end of file diff --git a/docs/models/openresponsesfunctioncalloutputtypefunctioncalloutput.md b/docs/models/openresponsesfunctioncalloutputtypefunctioncalloutput.md new file mode 100644 index 00000000..526ec8de --- /dev/null +++ b/docs/models/openresponsesfunctioncalloutputtypefunctioncalloutput.md @@ -0,0 +1,16 @@ +# OpenResponsesFunctionCallOutputTypeFunctionCallOutput + +## Example Usage + +```typescript +import { OpenResponsesFunctionCallOutputTypeFunctionCallOutput } from "@openrouter/sdk/models"; + +let value: OpenResponsesFunctionCallOutputTypeFunctionCallOutput = + "function_call_output"; +``` + +## Values + +```typescript +"function_call_output" +``` \ No newline at end of file diff --git a/docs/models/openresponsesfunctionshelltool.md b/docs/models/openresponsesfunctionshelltool.md new file mode 100644 index 00000000..742417c1 --- /dev/null +++ b/docs/models/openresponsesfunctionshelltool.md @@ -0,0 +1,19 @@ +# OpenResponsesFunctionShellTool + +Shell tool configuration + +## Example Usage + +```typescript +import { OpenResponsesFunctionShellTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesFunctionShellTool = { + type: "shell", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"shell"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesimagegenerationtool.md b/docs/models/openresponsesimagegenerationtool.md new file mode 100644 index 00000000..6ab5b064 --- /dev/null +++ b/docs/models/openresponsesimagegenerationtool.md @@ -0,0 +1,29 @@ +# OpenResponsesImageGenerationTool + +Image generation tool configuration + +## Example Usage + +```typescript +import { OpenResponsesImageGenerationTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesImageGenerationTool = { + type: "image_generation", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *"image_generation"* | :heavy_check_mark: | N/A | +| `background` | [models.Background](../models/background.md) | :heavy_minus_sign: | N/A | +| `inputFidelity` | [models.InputFidelity](../models/inputfidelity.md) | :heavy_minus_sign: | N/A | +| `inputImageMask` | [models.InputImageMask](../models/inputimagemask.md) | :heavy_minus_sign: | N/A | +| `model` | [models.ModelEnum](../models/modelenum.md) | :heavy_minus_sign: | N/A | +| `moderation` | [models.Moderation](../models/moderation.md) | :heavy_minus_sign: | N/A | +| `outputCompression` | *number* | :heavy_minus_sign: | N/A | +| `outputFormat` | [models.OutputFormat](../models/outputformat.md) | :heavy_minus_sign: | N/A | +| `partialImages` | *number* | :heavy_minus_sign: | N/A | +| `quality` | [models.Quality](../models/quality.md) | :heavy_minus_sign: | N/A | +| `size` | [models.Size](../models/size.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesinputcontent1.md b/docs/models/openresponsesinputcontent1.md new file mode 100644 index 00000000..f7fe8fc1 --- /dev/null +++ b/docs/models/openresponsesinputcontent1.md @@ -0,0 +1,23 @@ +# OpenResponsesInputContent1 + + +## Supported Types + +### `models.ResponseOutputText` + +```typescript +const value: models.ResponseOutputText = { + type: "output_text", + text: "The capital of France is Paris.", +}; +``` + +### `models.OpenAIResponsesRefusalContent` + +```typescript +const value: models.OpenAIResponsesRefusalContent = { + type: "refusal", + refusal: "I'm sorry, I cannot assist with that request", +}; +``` + diff --git a/docs/models/openresponsesinputcontent2.md b/docs/models/openresponsesinputcontent2.md new file mode 100644 index 00000000..babc3b90 --- /dev/null +++ b/docs/models/openresponsesinputcontent2.md @@ -0,0 +1,23 @@ +# OpenResponsesInputContent2 + + +## Supported Types + +### `models.OpenResponsesInputContent1[]` + +```typescript +const value: models.OpenResponsesInputContent1[] = []; +``` + +### `string` + +```typescript +const value: string = ""; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/openresponsesinputformat.md b/docs/models/openresponsesinputformat.md new file mode 100644 index 00000000..e0db48f9 --- /dev/null +++ b/docs/models/openresponsesinputformat.md @@ -0,0 +1,19 @@ +# OpenResponsesInputFormat + +The format of the reasoning content + +## Example Usage + +```typescript +import { OpenResponsesInputFormat } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputFormat = "anthropic-claude-v1"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"unknown" | "openai-responses-v1" | "azure-openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputmessage.md b/docs/models/openresponsesinputmessage.md new file mode 100644 index 00000000..b738bf48 --- /dev/null +++ b/docs/models/openresponsesinputmessage.md @@ -0,0 +1,32 @@ +# OpenResponsesInputMessage + +An output message item + +## Example Usage + +```typescript +import { OpenResponsesInputMessage } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputMessage = { + id: "msg-abc123", + role: "assistant", + type: "message", + content: [ + { + type: "output_text", + text: "Hello! How can I help you today?", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `role` | [models.OpenResponsesInputRole](../models/openresponsesinputrole.md) | :heavy_check_mark: | N/A | +| `type` | [models.OpenResponsesInputTypeMessage](../models/openresponsesinputtypemessage.md) | :heavy_check_mark: | N/A | +| `status` | *models.OpenResponsesInputStatusUnion1* | :heavy_minus_sign: | N/A | +| `content` | *models.OpenResponsesInputContent2* | :heavy_check_mark: | N/A | +| `phase` | *models.OpenResponsesInputPhaseUnion* | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitem.md b/docs/models/openresponsesinputmessageitem.md index cea2a827..c1a851a1 100644 --- a/docs/models/openresponsesinputmessageitem.md +++ b/docs/models/openresponsesinputmessageitem.md @@ -7,12 +7,6 @@ import { OpenResponsesInputMessageItem } from "@openrouter/sdk/models"; let value: OpenResponsesInputMessageItem = { role: "system", - content: [ - { - type: "input_text", - text: "Hello, how can I help you?", - }, - ], }; ``` @@ -23,4 +17,4 @@ let value: OpenResponsesInputMessageItem = { | `id` | *string* | :heavy_minus_sign: | N/A | | `type` | [models.OpenResponsesInputMessageItemTypeMessage](../models/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A | | `role` | *models.OpenResponsesInputMessageItemRoleUnion* | :heavy_check_mark: | N/A | -| `content` | *models.OpenResponsesInputMessageItemContentUnion*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| `content` | *models.OpenResponsesInputMessageItemContentUnion*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesinputphasecommentary.md b/docs/models/openresponsesinputphasecommentary.md new file mode 100644 index 00000000..d68ba8b8 --- /dev/null +++ b/docs/models/openresponsesinputphasecommentary.md @@ -0,0 +1,15 @@ +# OpenResponsesInputPhaseCommentary + +## Example Usage + +```typescript +import { OpenResponsesInputPhaseCommentary } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputPhaseCommentary = "commentary"; +``` + +## Values + +```typescript +"commentary" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputphasefinalanswer.md b/docs/models/openresponsesinputphasefinalanswer.md new file mode 100644 index 00000000..e403d80a --- /dev/null +++ b/docs/models/openresponsesinputphasefinalanswer.md @@ -0,0 +1,15 @@ +# OpenResponsesInputPhaseFinalAnswer + +## Example Usage + +```typescript +import { OpenResponsesInputPhaseFinalAnswer } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputPhaseFinalAnswer = "final_answer"; +``` + +## Values + +```typescript +"final_answer" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputphaseunion.md b/docs/models/openresponsesinputphaseunion.md new file mode 100644 index 00000000..b164ab9c --- /dev/null +++ b/docs/models/openresponsesinputphaseunion.md @@ -0,0 +1,25 @@ +# OpenResponsesInputPhaseUnion + +The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + + +## Supported Types + +### `models.OpenResponsesInputPhaseCommentary` + +```typescript +const value: models.OpenResponsesInputPhaseCommentary = "commentary"; +``` + +### `models.OpenResponsesInputPhaseFinalAnswer` + +```typescript +const value: models.OpenResponsesInputPhaseFinalAnswer = "final_answer"; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/openresponsesinputreasoning.md b/docs/models/openresponsesinputreasoning.md new file mode 100644 index 00000000..4e88ff6e --- /dev/null +++ b/docs/models/openresponsesinputreasoning.md @@ -0,0 +1,33 @@ +# OpenResponsesInputReasoning + +An output item containing reasoning + +## Example Usage + +```typescript +import { OpenResponsesInputReasoning } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputReasoning = { + type: "reasoning", + id: "reasoning-abc123", + summary: [ + { + type: "summary_text", + text: "Analyzed the problem using first principles", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `type` | [models.OpenResponsesInputTypeReasoning](../models/openresponsesinputtypereasoning.md) | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_check_mark: | N/A | | +| `content` | [models.ReasoningTextContent](../models/reasoningtextcontent.md)[] | :heavy_minus_sign: | N/A | | +| `summary` | [models.ReasoningSummaryText](../models/reasoningsummarytext.md)[] | :heavy_check_mark: | N/A | | +| `encryptedContent` | *string* | :heavy_minus_sign: | N/A | | +| `status` | *models.OpenResponsesInputStatusUnion2* | :heavy_minus_sign: | N/A | | +| `signature` | *string* | :heavy_minus_sign: | A signature for the reasoning content, used for verification | EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... | +| `format` | [models.OpenResponsesInputFormat](../models/openresponsesinputformat.md) | :heavy_minus_sign: | The format of the reasoning content | anthropic-claude-v1 | \ No newline at end of file diff --git a/docs/models/openresponsesinputrole.md b/docs/models/openresponsesinputrole.md new file mode 100644 index 00000000..e5a0e2d0 --- /dev/null +++ b/docs/models/openresponsesinputrole.md @@ -0,0 +1,15 @@ +# OpenResponsesInputRole + +## Example Usage + +```typescript +import { OpenResponsesInputRole } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputRole = "assistant"; +``` + +## Values + +```typescript +"assistant" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatuscompleted1.md b/docs/models/openresponsesinputstatuscompleted1.md new file mode 100644 index 00000000..4e004fea --- /dev/null +++ b/docs/models/openresponsesinputstatuscompleted1.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusCompleted1 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusCompleted1 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusCompleted1 = "completed"; +``` + +## Values + +```typescript +"completed" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatuscompleted2.md b/docs/models/openresponsesinputstatuscompleted2.md new file mode 100644 index 00000000..d966b1ef --- /dev/null +++ b/docs/models/openresponsesinputstatuscompleted2.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusCompleted2 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusCompleted2 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusCompleted2 = "completed"; +``` + +## Values + +```typescript +"completed" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatusincomplete1.md b/docs/models/openresponsesinputstatusincomplete1.md new file mode 100644 index 00000000..f08d410d --- /dev/null +++ b/docs/models/openresponsesinputstatusincomplete1.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusIncomplete1 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusIncomplete1 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusIncomplete1 = "incomplete"; +``` + +## Values + +```typescript +"incomplete" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatusincomplete2.md b/docs/models/openresponsesinputstatusincomplete2.md new file mode 100644 index 00000000..3278a25e --- /dev/null +++ b/docs/models/openresponsesinputstatusincomplete2.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusIncomplete2 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusIncomplete2 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusIncomplete2 = "incomplete"; +``` + +## Values + +```typescript +"incomplete" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatusinprogress1.md b/docs/models/openresponsesinputstatusinprogress1.md new file mode 100644 index 00000000..ec941b90 --- /dev/null +++ b/docs/models/openresponsesinputstatusinprogress1.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusInProgress1 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusInProgress1 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusInProgress1 = "in_progress"; +``` + +## Values + +```typescript +"in_progress" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatusinprogress2.md b/docs/models/openresponsesinputstatusinprogress2.md new file mode 100644 index 00000000..e00a81b2 --- /dev/null +++ b/docs/models/openresponsesinputstatusinprogress2.md @@ -0,0 +1,15 @@ +# OpenResponsesInputStatusInProgress2 + +## Example Usage + +```typescript +import { OpenResponsesInputStatusInProgress2 } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputStatusInProgress2 = "in_progress"; +``` + +## Values + +```typescript +"in_progress" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputstatusunion1.md b/docs/models/openresponsesinputstatusunion1.md new file mode 100644 index 00000000..59ff9727 --- /dev/null +++ b/docs/models/openresponsesinputstatusunion1.md @@ -0,0 +1,23 @@ +# OpenResponsesInputStatusUnion1 + + +## Supported Types + +### `models.OpenResponsesInputStatusCompleted1` + +```typescript +const value: models.OpenResponsesInputStatusCompleted1 = "completed"; +``` + +### `models.OpenResponsesInputStatusIncomplete1` + +```typescript +const value: models.OpenResponsesInputStatusIncomplete1 = "incomplete"; +``` + +### `models.OpenResponsesInputStatusInProgress1` + +```typescript +const value: models.OpenResponsesInputStatusInProgress1 = "in_progress"; +``` + diff --git a/docs/models/openresponsesinputstatusunion2.md b/docs/models/openresponsesinputstatusunion2.md new file mode 100644 index 00000000..e0580346 --- /dev/null +++ b/docs/models/openresponsesinputstatusunion2.md @@ -0,0 +1,23 @@ +# OpenResponsesInputStatusUnion2 + + +## Supported Types + +### `models.OpenResponsesInputStatusCompleted2` + +```typescript +const value: models.OpenResponsesInputStatusCompleted2 = "completed"; +``` + +### `models.OpenResponsesInputStatusIncomplete2` + +```typescript +const value: models.OpenResponsesInputStatusIncomplete2 = "incomplete"; +``` + +### `models.OpenResponsesInputStatusInProgress2` + +```typescript +const value: models.OpenResponsesInputStatusInProgress2 = "in_progress"; +``` + diff --git a/docs/models/openresponsesinputtypemessage.md b/docs/models/openresponsesinputtypemessage.md new file mode 100644 index 00000000..bf35c840 --- /dev/null +++ b/docs/models/openresponsesinputtypemessage.md @@ -0,0 +1,15 @@ +# OpenResponsesInputTypeMessage + +## Example Usage + +```typescript +import { OpenResponsesInputTypeMessage } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputTypeMessage = "message"; +``` + +## Values + +```typescript +"message" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputtypereasoning.md b/docs/models/openresponsesinputtypereasoning.md new file mode 100644 index 00000000..8bca1b66 --- /dev/null +++ b/docs/models/openresponsesinputtypereasoning.md @@ -0,0 +1,15 @@ +# OpenResponsesInputTypeReasoning + +## Example Usage + +```typescript +import { OpenResponsesInputTypeReasoning } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputTypeReasoning = "reasoning"; +``` + +## Values + +```typescript +"reasoning" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinput.md b/docs/models/openresponsesinputunion.md similarity index 64% rename from docs/models/openresponsesinput.md rename to docs/models/openresponsesinputunion.md index 379d0911..160cf986 100644 --- a/docs/models/openresponsesinput.md +++ b/docs/models/openresponsesinputunion.md @@ -1,4 +1,4 @@ -# OpenResponsesInput +# OpenResponsesInputUnion Input for a response request - can be a string or array of items @@ -12,13 +12,12 @@ const value: string = "[{\"role\":\"user\",\"content\":\"What is the weather today?\"}]"; ``` -### `models.OpenResponsesInput1[]` +### `models.OpenResponsesInputUnion1[]` ```typescript -const value: models.OpenResponsesInput1[] = [ +const value: models.OpenResponsesInputUnion1[] = [ { role: "user", - content: "What is the weather today?", }, ]; ``` diff --git a/docs/models/openresponsesinput1.md b/docs/models/openresponsesinputunion1.md similarity index 85% rename from docs/models/openresponsesinput1.md rename to docs/models/openresponsesinputunion1.md index 69c3aef4..836bcb41 100644 --- a/docs/models/openresponsesinput1.md +++ b/docs/models/openresponsesinputunion1.md @@ -1,4 +1,4 @@ -# OpenResponsesInput1 +# OpenResponsesInputUnion1 ## Supported Types @@ -23,7 +23,6 @@ const value: models.OpenResponsesReasoning = { ```typescript const value: models.OpenResponsesEasyInputMessage = { role: "system", - content: "", }; ``` @@ -32,12 +31,6 @@ const value: models.OpenResponsesEasyInputMessage = { ```typescript const value: models.OpenResponsesInputMessageItem = { role: "system", - content: [ - { - type: "input_text", - text: "Hello, how can I help you?", - }, - ], }; ``` @@ -63,10 +56,10 @@ const value: models.OpenResponsesFunctionCallOutput = { }; ``` -### `models.ResponsesOutputMessage` +### `models.OpenResponsesInputMessage` ```typescript -const value: models.ResponsesOutputMessage = { +const value: models.OpenResponsesInputMessage = { id: "msg-abc123", role: "assistant", type: "message", @@ -79,10 +72,10 @@ const value: models.ResponsesOutputMessage = { }; ``` -### `models.ResponsesOutputItemReasoning` +### `models.OpenResponsesInputReasoning` ```typescript -const value: models.ResponsesOutputItemReasoning = { +const value: models.OpenResponsesInputReasoning = { type: "reasoning", id: "reasoning-abc123", summary: [ @@ -111,6 +104,10 @@ const value: models.ResponsesOutputItemFunctionCall = { const value: models.ResponsesWebSearchCallOutput = { type: "web_search_call", id: "search-abc123", + action: { + type: "search", + query: "OpenAI API", + }, status: "completed", }; ``` @@ -141,3 +138,12 @@ const value: models.ResponsesImageGenerationCall = { }; ``` +### `models.ResponsesServerToolOutput` + +```typescript +const value: models.ResponsesServerToolOutput = { + type: "openrouter:web_search", + status: "completed", +}; +``` + diff --git a/docs/models/openresponseslocalshelltool.md b/docs/models/openresponseslocalshelltool.md new file mode 100644 index 00000000..aeebc9be --- /dev/null +++ b/docs/models/openresponseslocalshelltool.md @@ -0,0 +1,19 @@ +# OpenResponsesLocalShellTool + +Local shell tool configuration + +## Example Usage + +```typescript +import { OpenResponsesLocalShellTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesLocalShellTool = { + type: "local_shell", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *"local_shell"* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseslogprobs.md b/docs/models/openresponseslogprobs.md deleted file mode 100644 index 378b69f7..00000000 --- a/docs/models/openresponseslogprobs.md +++ /dev/null @@ -1,22 +0,0 @@ -# OpenResponsesLogProbs - -Log probability information for a token - -## Example Usage - -```typescript -import { OpenResponsesLogProbs } from "@openrouter/sdk/models"; - -let value: OpenResponsesLogProbs = { - logprob: -0.1, - token: "world", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `logprob` | *number* | :heavy_check_mark: | N/A | -| `token` | *string* | :heavy_check_mark: | N/A | -| `topLogprobs` | [models.OpenResponsesTopLogprobs](../models/openresponsestoplogprobs.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesmcptool.md b/docs/models/openresponsesmcptool.md new file mode 100644 index 00000000..776f46ff --- /dev/null +++ b/docs/models/openresponsesmcptool.md @@ -0,0 +1,28 @@ +# OpenResponsesMcpTool + +MCP (Model Context Protocol) tool configuration + +## Example Usage + +```typescript +import { OpenResponsesMcpTool } from "@openrouter/sdk/models"; + +let value: OpenResponsesMcpTool = { + type: "mcp", + serverLabel: "my-server", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `type` | *"mcp"* | :heavy_check_mark: | N/A | +| `serverLabel` | *string* | :heavy_check_mark: | N/A | +| `allowedTools` | *any* | :heavy_minus_sign: | N/A | +| `authorization` | *string* | :heavy_minus_sign: | N/A | +| `connectorId` | [models.ConnectorId](../models/connectorid.md) | :heavy_minus_sign: | N/A | +| `headers` | Record | :heavy_minus_sign: | N/A | +| `requireApproval` | *any* | :heavy_minus_sign: | N/A | +| `serverDescription` | *string* | :heavy_minus_sign: | N/A | +| `serverUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesnonstreamingresponse.md b/docs/models/openresponsesnonstreamingresponse.md index 7a9ff6c5..2247891f 100644 --- a/docs/models/openresponsesnonstreamingresponse.md +++ b/docs/models/openresponsesnonstreamingresponse.md @@ -16,15 +16,8 @@ let value: OpenResponsesNonStreamingResponse = { completedAt: null, output: [ { - id: "msg-abc123", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you today?", - }, - ], + status: "completed", }, ], error: null, diff --git a/docs/models/openresponsesnonstreamingresponsetoolunion.md b/docs/models/openresponsesnonstreamingresponsetoolunion.md index 2ae4e46d..5cb2ac77 100644 --- a/docs/models/openresponsesnonstreamingresponsetoolunion.md +++ b/docs/models/openresponsesnonstreamingresponsetoolunion.md @@ -64,3 +64,84 @@ const value: models.OpenResponsesWebSearch20250826Tool = { }; ``` +### `models.OpenResponsesFileSearchTool` + +```typescript +const value: models.OpenResponsesFileSearchTool = { + type: "file_search", + vectorStoreIds: [ + "vs_abc123", + ], +}; +``` + +### `models.OpenResponsesComputerTool` + +```typescript +const value: models.OpenResponsesComputerTool = { + type: "computer_use_preview", + displayHeight: 768, + displayWidth: 1024, + environment: "linux", +}; +``` + +### `models.OpenResponsesCodeInterpreterTool` + +```typescript +const value: models.OpenResponsesCodeInterpreterTool = { + type: "code_interpreter", + container: "auto", +}; +``` + +### `models.OpenResponsesMcpTool` + +```typescript +const value: models.OpenResponsesMcpTool = { + type: "mcp", + serverLabel: "my-server", +}; +``` + +### `models.OpenResponsesImageGenerationTool` + +```typescript +const value: models.OpenResponsesImageGenerationTool = { + type: "image_generation", +}; +``` + +### `models.OpenResponsesLocalShellTool` + +```typescript +const value: models.OpenResponsesLocalShellTool = { + type: "local_shell", +}; +``` + +### `models.OpenResponsesFunctionShellTool` + +```typescript +const value: models.OpenResponsesFunctionShellTool = { + type: "shell", +}; +``` + +### `models.OpenResponsesApplyPatchTool` + +```typescript +const value: models.OpenResponsesApplyPatchTool = { + type: "apply_patch", +}; +``` + +### `models.OpenResponsesCustomTool` + +```typescript +const value: models.OpenResponsesCustomTool = { + type: "custom", + name: "my_tool", +}; +``` + diff --git a/docs/models/openresponsesrequest.md b/docs/models/openresponsesrequest.md index 3134fc56..b31377c2 100644 --- a/docs/models/openresponsesrequest.md +++ b/docs/models/openresponsesrequest.md @@ -14,7 +14,7 @@ let value: OpenResponsesRequest = {}; | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | *models.OpenResponsesInput* | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] | +| `input` | *models.OpenResponsesInputUnion* | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] | | `instructions` | *string* | :heavy_minus_sign: | N/A | | | `metadata` | Record | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} | | `tools` | *models.OpenResponsesRequestToolUnion*[] | :heavy_minus_sign: | N/A | | diff --git a/docs/models/openresponsesrequestplugincontextcompression.md b/docs/models/openresponsesrequestplugincontextcompression.md new file mode 100644 index 00000000..02523acb --- /dev/null +++ b/docs/models/openresponsesrequestplugincontextcompression.md @@ -0,0 +1,19 @@ +# OpenResponsesRequestPluginContextCompression + +## Example Usage + +```typescript +import { OpenResponsesRequestPluginContextCompression } from "@openrouter/sdk/models"; + +let value: OpenResponsesRequestPluginContextCompression = { + id: "context-compression", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *"context-compression"* | :heavy_check_mark: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the context-compression plugin for this request. Defaults to true. | +| `engine` | [models.ContextCompressionEngine](../models/contextcompressionengine.md) | :heavy_minus_sign: | The compression engine to use. Defaults to "middle-out". | \ No newline at end of file diff --git a/docs/models/openresponsesrequestpluginunion.md b/docs/models/openresponsesrequestpluginunion.md index ebf50062..2a7b5e18 100644 --- a/docs/models/openresponsesrequestpluginunion.md +++ b/docs/models/openresponsesrequestpluginunion.md @@ -43,3 +43,11 @@ const value: models.OpenResponsesRequestPluginResponseHealing = { }; ``` +### `models.OpenResponsesRequestPluginContextCompression` + +```typescript +const value: models.OpenResponsesRequestPluginContextCompression = { + id: "context-compression", +}; +``` + diff --git a/docs/models/openresponsesrequestpluginweb.md b/docs/models/openresponsesrequestpluginweb.md index 333dc3c7..a43d3750 100644 --- a/docs/models/openresponsesrequestpluginweb.md +++ b/docs/models/openresponsesrequestpluginweb.md @@ -12,10 +12,12 @@ let value: OpenResponsesRequestPluginWeb = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `id` | *"web"* | :heavy_check_mark: | N/A | -| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | -| `maxResults` | *number* | :heavy_minus_sign: | N/A | -| `searchPrompt` | *string* | :heavy_minus_sign: | N/A | -| `engine` | [models.WebSearchEngine](../models/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *"web"* | :heavy_check_mark: | N/A | | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the web-search plugin for this request. Defaults to true. | | +| `maxResults` | *number* | :heavy_minus_sign: | N/A | | +| `searchPrompt` | *string* | :heavy_minus_sign: | N/A | | +| `engine` | [models.WebSearchEngine](../models/websearchengine.md) | :heavy_minus_sign: | The search engine to use for web search. | | +| `includeDomains` | *string*[] | :heavy_minus_sign: | A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | +| `excludeDomains` | *string*[] | :heavy_minus_sign: | A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). | [
"example.com",
"*.substack.com",
"openai.com/blog"
] | \ No newline at end of file diff --git a/docs/models/openresponsesrequesttoolunion.md b/docs/models/openresponsesrequesttoolunion.md index bcdfa06a..fa3b102e 100644 --- a/docs/models/openresponsesrequesttoolunion.md +++ b/docs/models/openresponsesrequesttoolunion.md @@ -64,3 +64,100 @@ const value: models.OpenResponsesWebSearch20250826Tool = { }; ``` +### `models.OpenResponsesFileSearchTool` + +```typescript +const value: models.OpenResponsesFileSearchTool = { + type: "file_search", + vectorStoreIds: [ + "vs_abc123", + ], +}; +``` + +### `models.OpenResponsesComputerTool` + +```typescript +const value: models.OpenResponsesComputerTool = { + type: "computer_use_preview", + displayHeight: 768, + displayWidth: 1024, + environment: "linux", +}; +``` + +### `models.OpenResponsesCodeInterpreterTool` + +```typescript +const value: models.OpenResponsesCodeInterpreterTool = { + type: "code_interpreter", + container: "auto", +}; +``` + +### `models.OpenResponsesMcpTool` + +```typescript +const value: models.OpenResponsesMcpTool = { + type: "mcp", + serverLabel: "my-server", +}; +``` + +### `models.OpenResponsesImageGenerationTool` + +```typescript +const value: models.OpenResponsesImageGenerationTool = { + type: "image_generation", +}; +``` + +### `models.OpenResponsesLocalShellTool` + +```typescript +const value: models.OpenResponsesLocalShellTool = { + type: "local_shell", +}; +``` + +### `models.OpenResponsesFunctionShellTool` + +```typescript +const value: models.OpenResponsesFunctionShellTool = { + type: "shell", +}; +``` + +### `models.OpenResponsesApplyPatchTool` + +```typescript +const value: models.OpenResponsesApplyPatchTool = { + type: "apply_patch", +}; +``` + +### `models.OpenResponsesCustomTool` + +```typescript +const value: models.OpenResponsesCustomTool = { + type: "custom", + name: "my_tool", +}; +``` + +### `models.DatetimeServerTool` + +```typescript +const value: models.DatetimeServerTool = { + type: "openrouter:datetime", +}; +``` + +### `models.ResponsesWebSearchServerTool` + +```typescript +const value: models.ResponsesWebSearchServerTool = { + type: "openrouter:web_search", +}; +``` + diff --git a/docs/models/openresponsesstreamevent.md b/docs/models/openresponsesstreamevent.md index c4ab7b80..622e7fb5 100644 --- a/docs/models/openresponsesstreamevent.md +++ b/docs/models/openresponsesstreamevent.md @@ -77,15 +77,8 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { completedAt: 3370.61, output: [ { - id: "item-1", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you?", - }, - ], + status: "completed", }, ], error: null, @@ -181,10 +174,8 @@ const value: models.OpenResponsesStreamEventResponseOutputItemAdded = { type: "response.output_item.added", outputIndex: 0, item: { - id: "item-1", - role: "assistant", type: "message", - content: [], + status: "in_progress", }, sequenceNumber: 2, }; @@ -197,15 +188,8 @@ const value: models.OpenResponsesStreamEventResponseOutputItemDone = { type: "response.output_item.done", outputIndex: 0, item: { - id: "item-1", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you?", - }, - ], + status: "completed", }, sequenceNumber: 8, }; @@ -476,3 +460,36 @@ const value: models.OpenResponsesImageGenCallCompleted = { }; ``` +### `models.OpenResponsesWebSearchCallInProgress` + +```typescript +const value: models.OpenResponsesWebSearchCallInProgress = { + type: "response.web_search_call.in_progress", + itemId: "", + outputIndex: 2400.75, + sequenceNumber: 0, +}; +``` + +### `models.OpenResponsesWebSearchCallSearching` + +```typescript +const value: models.OpenResponsesWebSearchCallSearching = { + type: "response.web_search_call.searching", + itemId: "", + outputIndex: 1886.45, + sequenceNumber: 0, +}; +``` + +### `models.OpenResponsesWebSearchCallCompleted` + +```typescript +const value: models.OpenResponsesWebSearchCallCompleted = { + type: "response.web_search_call.completed", + itemId: "", + outputIndex: 5081.49, + sequenceNumber: 0, +}; +``` + diff --git a/docs/models/openresponsesstreameventlogprob1.md b/docs/models/openresponsesstreameventlogprob1.md new file mode 100644 index 00000000..16008c00 --- /dev/null +++ b/docs/models/openresponsesstreameventlogprob1.md @@ -0,0 +1,23 @@ +# OpenResponsesStreamEventLogprob1 + +Log probability information for a token + +## Example Usage + +```typescript +import { OpenResponsesStreamEventLogprob1 } from "@openrouter/sdk/models"; + +let value: OpenResponsesStreamEventLogprob1 = { + logprob: -0.1, + token: "world", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `logprob` | *number* | :heavy_check_mark: | N/A | +| `token` | *string* | :heavy_check_mark: | N/A | +| `topLogprobs` | [models.OpenResponsesStreamEventTopLogprob1](../models/openresponsesstreameventtoplogprob1.md)[] | :heavy_minus_sign: | N/A | +| `bytes` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventlogprob2.md b/docs/models/openresponsesstreameventlogprob2.md new file mode 100644 index 00000000..0461ea09 --- /dev/null +++ b/docs/models/openresponsesstreameventlogprob2.md @@ -0,0 +1,23 @@ +# OpenResponsesStreamEventLogprob2 + +Log probability information for a token + +## Example Usage + +```typescript +import { OpenResponsesStreamEventLogprob2 } from "@openrouter/sdk/models"; + +let value: OpenResponsesStreamEventLogprob2 = { + logprob: -0.1, + token: "world", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `logprob` | *number* | :heavy_check_mark: | N/A | +| `token` | *string* | :heavy_check_mark: | N/A | +| `topLogprobs` | [models.OpenResponsesStreamEventTopLogprob2](../models/openresponsesstreameventtoplogprob2.md)[] | :heavy_minus_sign: | N/A | +| `bytes` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponsecompleted.md b/docs/models/openresponsesstreameventresponsecompleted.md index c2cccbaf..05f65263 100644 --- a/docs/models/openresponsesstreameventresponsecompleted.md +++ b/docs/models/openresponsesstreameventresponsecompleted.md @@ -18,15 +18,8 @@ let value: OpenResponsesStreamEventResponseCompleted = { completedAt: 6756.82, output: [ { - id: "item-1", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you?", - }, - ], + status: "completed", }, ], error: null, diff --git a/docs/models/openresponsesstreameventresponseoutputitemadded.md b/docs/models/openresponsesstreameventresponseoutputitemadded.md index c83b4e4c..a00e7364 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemadded.md +++ b/docs/models/openresponsesstreameventresponseoutputitemadded.md @@ -11,10 +11,8 @@ let value: OpenResponsesStreamEventResponseOutputItemAdded = { type: "response.output_item.added", outputIndex: 0, item: { - id: "item-1", - role: "assistant", type: "message", - content: [], + status: "in_progress", }, sequenceNumber: 2, }; diff --git a/docs/models/openresponsesstreameventresponseoutputitemdone.md b/docs/models/openresponsesstreameventresponseoutputitemdone.md index 3957c895..f34bbcaf 100644 --- a/docs/models/openresponsesstreameventresponseoutputitemdone.md +++ b/docs/models/openresponsesstreameventresponseoutputitemdone.md @@ -11,15 +11,8 @@ let value: OpenResponsesStreamEventResponseOutputItemDone = { type: "response.output_item.done", outputIndex: 0, item: { - id: "item-1", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you?", - }, - ], + status: "completed", }, sequenceNumber: 8, }; diff --git a/docs/models/openresponsesstreameventresponseoutputtextdelta.md b/docs/models/openresponsesstreameventresponseoutputtextdelta.md index f6253562..f58d29b9 100644 --- a/docs/models/openresponsesstreameventresponseoutputtextdelta.md +++ b/docs/models/openresponsesstreameventresponseoutputtextdelta.md @@ -20,12 +20,12 @@ let value: OpenResponsesStreamEventResponseOutputTextDelta = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `type` | *"response.output_text.delta"* | :heavy_check_mark: | N/A | -| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `delta` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `type` | *"response.output_text.delta"* | :heavy_check_mark: | N/A | +| `logprobs` | [models.OpenResponsesStreamEventLogprob1](../models/openresponsesstreameventlogprob1.md)[] | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `delta` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventresponseoutputtextdone.md b/docs/models/openresponsesstreameventresponseoutputtextdone.md index 411ff0a1..8b3ee7a9 100644 --- a/docs/models/openresponsesstreameventresponseoutputtextdone.md +++ b/docs/models/openresponsesstreameventresponseoutputtextdone.md @@ -20,12 +20,12 @@ let value: OpenResponsesStreamEventResponseOutputTextDone = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `type` | *"response.output_text.done"* | :heavy_check_mark: | N/A | -| `outputIndex` | *number* | :heavy_check_mark: | N/A | -| `itemId` | *string* | :heavy_check_mark: | N/A | -| `contentIndex` | *number* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | -| `logprobs` | [models.OpenResponsesLogProbs](../models/openresponseslogprobs.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `type` | *"response.output_text.done"* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `contentIndex` | *number* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | +| `logprobs` | [models.OpenResponsesStreamEventLogprob2](../models/openresponsesstreameventlogprob2.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsestoplogprobs.md b/docs/models/openresponsesstreameventtoplogprob1.md similarity index 63% rename from docs/models/openresponsestoplogprobs.md rename to docs/models/openresponsesstreameventtoplogprob1.md index e1258dea..9c2cd169 100644 --- a/docs/models/openresponsestoplogprobs.md +++ b/docs/models/openresponsesstreameventtoplogprob1.md @@ -1,13 +1,13 @@ -# OpenResponsesTopLogprobs +# OpenResponsesStreamEventTopLogprob1 Alternative token with its log probability ## Example Usage ```typescript -import { OpenResponsesTopLogprobs } from "@openrouter/sdk/models"; +import { OpenResponsesStreamEventTopLogprob1 } from "@openrouter/sdk/models"; -let value: OpenResponsesTopLogprobs = {}; +let value: OpenResponsesStreamEventTopLogprob1 = {}; ``` ## Fields @@ -15,4 +15,5 @@ let value: OpenResponsesTopLogprobs = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `token` | *string* | :heavy_minus_sign: | N/A | -| `logprob` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `logprob` | *number* | :heavy_minus_sign: | N/A | +| `bytes` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesstreameventtoplogprob2.md b/docs/models/openresponsesstreameventtoplogprob2.md new file mode 100644 index 00000000..3c138e0b --- /dev/null +++ b/docs/models/openresponsesstreameventtoplogprob2.md @@ -0,0 +1,19 @@ +# OpenResponsesStreamEventTopLogprob2 + +Alternative token with its log probability + +## Example Usage + +```typescript +import { OpenResponsesStreamEventTopLogprob2 } from "@openrouter/sdk/models"; + +let value: OpenResponsesStreamEventTopLogprob2 = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *string* | :heavy_minus_sign: | N/A | +| `logprob` | *number* | :heavy_minus_sign: | N/A | +| `bytes` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearch20250826tool.md b/docs/models/openresponseswebsearch20250826tool.md index 9cd8ec3a..a2ff98de 100644 --- a/docs/models/openresponseswebsearch20250826tool.md +++ b/docs/models/openresponseswebsearch20250826tool.md @@ -14,9 +14,11 @@ let value: OpenResponsesWebSearch20250826Tool = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *"web_search_2025_08_26"* | :heavy_check_mark: | N/A | | -| `filters` | [models.OpenResponsesWebSearch20250826ToolFilters](../models/openresponseswebsearch20250826toolfilters.md) | :heavy_minus_sign: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"web_search_2025_08_26"* | :heavy_check_mark: | N/A | | +| `filters` | [models.OpenResponsesWebSearch20250826ToolFilters](../models/openresponseswebsearch20250826toolfilters.md) | :heavy_minus_sign: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | +| `engine` | [models.OpenResponsesWebSearch20250826ToolEngine](../models/openresponseswebsearch20250826toolengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | \ No newline at end of file diff --git a/docs/models/openresponseswebsearch20250826toolengine.md b/docs/models/openresponseswebsearch20250826toolengine.md new file mode 100644 index 00000000..555ca651 --- /dev/null +++ b/docs/models/openresponseswebsearch20250826toolengine.md @@ -0,0 +1,19 @@ +# OpenResponsesWebSearch20250826ToolEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { OpenResponsesWebSearch20250826ToolEngine } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearch20250826ToolEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearch20250826toolfilters.md b/docs/models/openresponseswebsearch20250826toolfilters.md index 2b4a3082..8499a488 100644 --- a/docs/models/openresponseswebsearch20250826toolfilters.md +++ b/docs/models/openresponseswebsearch20250826toolfilters.md @@ -12,4 +12,5 @@ let value: OpenResponsesWebSearch20250826ToolFilters = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchcallcompleted.md b/docs/models/openresponseswebsearchcallcompleted.md new file mode 100644 index 00000000..853277fa --- /dev/null +++ b/docs/models/openresponseswebsearchcallcompleted.md @@ -0,0 +1,25 @@ +# OpenResponsesWebSearchCallCompleted + +Web search call completed + +## Example Usage + +```typescript +import { OpenResponsesWebSearchCallCompleted } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchCallCompleted = { + type: "response.web_search_call.completed", + itemId: "", + outputIndex: 3309.18, + sequenceNumber: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *"response.web_search_call.completed"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchcallinprogress.md b/docs/models/openresponseswebsearchcallinprogress.md new file mode 100644 index 00000000..6f678284 --- /dev/null +++ b/docs/models/openresponseswebsearchcallinprogress.md @@ -0,0 +1,25 @@ +# OpenResponsesWebSearchCallInProgress + +Web search call in progress + +## Example Usage + +```typescript +import { OpenResponsesWebSearchCallInProgress } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchCallInProgress = { + type: "response.web_search_call.in_progress", + itemId: "", + outputIndex: 5240.05, + sequenceNumber: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *"response.web_search_call.in_progress"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchcallsearching.md b/docs/models/openresponseswebsearchcallsearching.md new file mode 100644 index 00000000..955fff14 --- /dev/null +++ b/docs/models/openresponseswebsearchcallsearching.md @@ -0,0 +1,25 @@ +# OpenResponsesWebSearchCallSearching + +Web search call is searching + +## Example Usage + +```typescript +import { OpenResponsesWebSearchCallSearching } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchCallSearching = { + type: "response.web_search_call.searching", + itemId: "", + outputIndex: 5471.04, + sequenceNumber: 0, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | *"response.web_search_call.searching"* | :heavy_check_mark: | N/A | +| `itemId` | *string* | :heavy_check_mark: | N/A | +| `outputIndex` | *number* | :heavy_check_mark: | N/A | +| `sequenceNumber` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreview20250311tool.md b/docs/models/openresponseswebsearchpreview20250311tool.md index bb47786c..44d58a36 100644 --- a/docs/models/openresponseswebsearchpreview20250311tool.md +++ b/docs/models/openresponseswebsearchpreview20250311tool.md @@ -14,8 +14,11 @@ let value: OpenResponsesWebSearchPreview20250311Tool = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | *"web_search_preview_2025_03_11"* | :heavy_check_mark: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"web_search_preview_2025_03_11"* | :heavy_check_mark: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | +| `engine` | [models.OpenResponsesWebSearchPreview20250311ToolEngine](../models/openresponseswebsearchpreview20250311toolengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | +| `filters` | [models.OpenResponsesWebSearchPreview20250311ToolFilters](../models/openresponseswebsearchpreview20250311toolfilters.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreview20250311toolengine.md b/docs/models/openresponseswebsearchpreview20250311toolengine.md new file mode 100644 index 00000000..38289215 --- /dev/null +++ b/docs/models/openresponseswebsearchpreview20250311toolengine.md @@ -0,0 +1,19 @@ +# OpenResponsesWebSearchPreview20250311ToolEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { OpenResponsesWebSearchPreview20250311ToolEngine } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchPreview20250311ToolEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreview20250311toolfilters.md b/docs/models/openresponseswebsearchpreview20250311toolfilters.md new file mode 100644 index 00000000..c41831c3 --- /dev/null +++ b/docs/models/openresponseswebsearchpreview20250311toolfilters.md @@ -0,0 +1,16 @@ +# OpenResponsesWebSearchPreview20250311ToolFilters + +## Example Usage + +```typescript +import { OpenResponsesWebSearchPreview20250311ToolFilters } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchPreview20250311ToolFilters = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreviewtool.md b/docs/models/openresponseswebsearchpreviewtool.md index 69f214f2..ff9b0f60 100644 --- a/docs/models/openresponseswebsearchpreviewtool.md +++ b/docs/models/openresponseswebsearchpreviewtool.md @@ -14,8 +14,11 @@ let value: OpenResponsesWebSearchPreviewTool = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | *"web_search_preview"* | :heavy_check_mark: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"web_search_preview"* | :heavy_check_mark: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.WebSearchPreviewToolUserLocation](../models/websearchpreviewtooluserlocation.md) | :heavy_minus_sign: | N/A | | +| `engine` | [models.OpenResponsesWebSearchPreviewToolEngine](../models/openresponseswebsearchpreviewtoolengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | +| `filters` | [models.OpenResponsesWebSearchPreviewToolFilters](../models/openresponseswebsearchpreviewtoolfilters.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreviewtoolengine.md b/docs/models/openresponseswebsearchpreviewtoolengine.md new file mode 100644 index 00000000..13b2b9b4 --- /dev/null +++ b/docs/models/openresponseswebsearchpreviewtoolengine.md @@ -0,0 +1,19 @@ +# OpenResponsesWebSearchPreviewToolEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { OpenResponsesWebSearchPreviewToolEngine } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchPreviewToolEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchpreviewtoolfilters.md b/docs/models/openresponseswebsearchpreviewtoolfilters.md new file mode 100644 index 00000000..e84cf03e --- /dev/null +++ b/docs/models/openresponseswebsearchpreviewtoolfilters.md @@ -0,0 +1,16 @@ +# OpenResponsesWebSearchPreviewToolFilters + +## Example Usage + +```typescript +import { OpenResponsesWebSearchPreviewToolFilters } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchPreviewToolFilters = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchtool.md b/docs/models/openresponseswebsearchtool.md index 067f0c26..8c63fbc0 100644 --- a/docs/models/openresponseswebsearchtool.md +++ b/docs/models/openresponseswebsearchtool.md @@ -14,9 +14,11 @@ let value: OpenResponsesWebSearchTool = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *"web_search"* | :heavy_check_mark: | N/A | | -| `filters` | [models.OpenResponsesWebSearchToolFilters](../models/openresponseswebsearchtoolfilters.md) | :heavy_minus_sign: | N/A | | -| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | -| `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"web_search"* | :heavy_check_mark: | N/A | | +| `filters` | [models.OpenResponsesWebSearchToolFilters](../models/openresponseswebsearchtoolfilters.md) | :heavy_minus_sign: | N/A | | +| `searchContextSize` | [models.ResponsesSearchContextSize](../models/responsessearchcontextsize.md) | :heavy_minus_sign: | Size of the search context for web search tools | medium | +| `userLocation` | [models.ResponsesWebSearchUserLocation](../models/responseswebsearchuserlocation.md) | :heavy_minus_sign: | User location information for web search | {
"type": "approximate",
"city": "San Francisco",
"country": "USA",
"region": "California",
"timezone": "America/Los_Angeles"
} | +| `engine` | [models.OpenResponsesWebSearchToolEngine](../models/openresponseswebsearchtoolengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | \ No newline at end of file diff --git a/docs/models/openresponseswebsearchtoolengine.md b/docs/models/openresponseswebsearchtoolengine.md new file mode 100644 index 00000000..afc42b3f --- /dev/null +++ b/docs/models/openresponseswebsearchtoolengine.md @@ -0,0 +1,19 @@ +# OpenResponsesWebSearchToolEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { OpenResponsesWebSearchToolEngine } from "@openrouter/sdk/models"; + +let value: OpenResponsesWebSearchToolEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponseswebsearchtoolfilters.md b/docs/models/openresponseswebsearchtoolfilters.md index 69bbb263..638a257a 100644 --- a/docs/models/openresponseswebsearchtoolfilters.md +++ b/docs/models/openresponseswebsearchtoolfilters.md @@ -12,4 +12,5 @@ let value: OpenResponsesWebSearchToolFilters = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `allowedDomains` | *string*[] | :heavy_minus_sign: | N/A | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailglobals.md b/docs/models/operations/bulkassignkeystoguardrailglobals.md index e81f9220..ed0220eb 100644 --- a/docs/models/operations/bulkassignkeystoguardrailglobals.md +++ b/docs/models/operations/bulkassignkeystoguardrailglobals.md @@ -13,4 +13,5 @@ let value: BulkAssignKeysToGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/bulkassignkeystoguardrailrequest.md b/docs/models/operations/bulkassignkeystoguardrailrequest.md index 590d7e0b..bc5eaf71 100644 --- a/docs/models/operations/bulkassignkeystoguardrailrequest.md +++ b/docs/models/operations/bulkassignkeystoguardrailrequest.md @@ -20,6 +20,7 @@ let value: BulkAssignKeysToGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `requestBody` | [operations.BulkAssignKeysToGuardrailRequestBody](../../models/operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailglobals.md b/docs/models/operations/bulkassignmemberstoguardrailglobals.md index ea9b800f..67b29b9d 100644 --- a/docs/models/operations/bulkassignmemberstoguardrailglobals.md +++ b/docs/models/operations/bulkassignmemberstoguardrailglobals.md @@ -13,4 +13,5 @@ let value: BulkAssignMembersToGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/bulkassignmemberstoguardrailrequest.md b/docs/models/operations/bulkassignmemberstoguardrailrequest.md index b025c34f..fa8bb4ca 100644 --- a/docs/models/operations/bulkassignmemberstoguardrailrequest.md +++ b/docs/models/operations/bulkassignmemberstoguardrailrequest.md @@ -21,6 +21,7 @@ let value: BulkAssignMembersToGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `requestBody` | [operations.BulkAssignMembersToGuardrailRequestBody](../../models/operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailglobals.md b/docs/models/operations/bulkunassignkeysfromguardrailglobals.md index a38c80a2..d962c6e5 100644 --- a/docs/models/operations/bulkunassignkeysfromguardrailglobals.md +++ b/docs/models/operations/bulkunassignkeysfromguardrailglobals.md @@ -13,4 +13,5 @@ let value: BulkUnassignKeysFromGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md index b89f1237..a57fdea5 100644 --- a/docs/models/operations/bulkunassignkeysfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignkeysfromguardrailrequest.md @@ -20,6 +20,7 @@ let value: BulkUnassignKeysFromGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `requestBody` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../../models/operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailglobals.md b/docs/models/operations/bulkunassignmembersfromguardrailglobals.md index 833a3875..16ee3a94 100644 --- a/docs/models/operations/bulkunassignmembersfromguardrailglobals.md +++ b/docs/models/operations/bulkunassignmembersfromguardrailglobals.md @@ -13,4 +13,5 @@ let value: BulkUnassignMembersFromGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md index dc9baa29..668117d9 100644 --- a/docs/models/operations/bulkunassignmembersfromguardrailrequest.md +++ b/docs/models/operations/bulkunassignmembersfromguardrailrequest.md @@ -21,6 +21,7 @@ let value: BulkUnassignMembersFromGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `requestBody` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../../models/operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscodeglobals.md b/docs/models/operations/createauthkeyscodeglobals.md index 097f7cf0..51848f6b 100644 --- a/docs/models/operations/createauthkeyscodeglobals.md +++ b/docs/models/operations/createauthkeyscodeglobals.md @@ -13,4 +13,5 @@ let value: CreateAuthKeysCodeGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscoderequest.md b/docs/models/operations/createauthkeyscoderequest.md index 9502d9d5..2068be70 100644 --- a/docs/models/operations/createauthkeyscoderequest.md +++ b/docs/models/operations/createauthkeyscoderequest.md @@ -17,5 +17,6 @@ let value: CreateAuthKeysCodeRequest = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `requestBody` | [operations.CreateAuthKeysCodeRequestBody](../../models/operations/createauthkeyscoderequestbody.md) | :heavy_check_mark: | N/A | {
"callback_url": "https://myapp.com/auth/callback",
"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
"code_challenge_method": "S256",
"limit": 100
} | \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargeglobals.md b/docs/models/operations/createcoinbasechargeglobals.md index ccfb7937..8a57aaa6 100644 --- a/docs/models/operations/createcoinbasechargeglobals.md +++ b/docs/models/operations/createcoinbasechargeglobals.md @@ -13,4 +13,5 @@ let value: CreateCoinbaseChargeGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createcoinbasechargerequest.md b/docs/models/operations/createcoinbasechargerequest.md index cd5fbc16..7427ed1d 100644 --- a/docs/models/operations/createcoinbasechargerequest.md +++ b/docs/models/operations/createcoinbasechargerequest.md @@ -19,5 +19,6 @@ let value: CreateCoinbaseChargeRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `createChargeRequest` | [models.CreateChargeRequest](../../models/createchargerequest.md) | :heavy_check_mark: | N/A | {
"amount": 100,
"sender": "0x1234567890123456789012345678901234567890",
"chain_id": 1
} | \ No newline at end of file diff --git a/docs/models/operations/createembeddingsglobals.md b/docs/models/operations/createembeddingsglobals.md index 057ab8b5..fb4f79f4 100644 --- a/docs/models/operations/createembeddingsglobals.md +++ b/docs/models/operations/createembeddingsglobals.md @@ -13,4 +13,5 @@ let value: CreateEmbeddingsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createembeddingsrequest.md b/docs/models/operations/createembeddingsrequest.md index bbacf589..2768e50f 100644 --- a/docs/models/operations/createembeddingsrequest.md +++ b/docs/models/operations/createembeddingsrequest.md @@ -24,5 +24,6 @@ let value: CreateEmbeddingsRequest = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `requestBody` | [operations.CreateEmbeddingsRequestBody](../../models/operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createguardraildata.md b/docs/models/operations/createguardraildata.md index ed6f0ffd..e914c2f7 100644 --- a/docs/models/operations/createguardraildata.md +++ b/docs/models/operations/createguardraildata.md @@ -24,6 +24,7 @@ let value: CreateGuardrailData = { | `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | | `resetInterval` | [operations.CreateGuardrailResetIntervalResponse](../../models/operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/models/operations/createguardrailglobals.md b/docs/models/operations/createguardrailglobals.md index e24d7c6b..636614f8 100644 --- a/docs/models/operations/createguardrailglobals.md +++ b/docs/models/operations/createguardrailglobals.md @@ -13,4 +13,5 @@ let value: CreateGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createguardrailrequest.md b/docs/models/operations/createguardrailrequest.md index c1dd522c..2d9de582 100644 --- a/docs/models/operations/createguardrailrequest.md +++ b/docs/models/operations/createguardrailrequest.md @@ -14,8 +14,9 @@ let value: CreateGuardrailRequest = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `requestBody` | [operations.CreateGuardrailRequestBody](../../models/operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `requestBody` | [operations.CreateGuardrailRequestBody](../../models/operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file diff --git a/docs/models/operations/createguardrailrequestbody.md b/docs/models/operations/createguardrailrequestbody.md index f5d923c0..c55fc131 100644 --- a/docs/models/operations/createguardrailrequestbody.md +++ b/docs/models/operations/createguardrailrequestbody.md @@ -19,5 +19,6 @@ let value: CreateGuardrailRequestBody = { | `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 50 | | `resetInterval` | [operations.CreateGuardrailResetIntervalRequest](../../models/operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | \ No newline at end of file diff --git a/docs/models/operations/createguardrailresponse.md b/docs/models/operations/createguardrailresponse.md index 72be6950..82ab5e0c 100644 --- a/docs/models/operations/createguardrailresponse.md +++ b/docs/models/operations/createguardrailresponse.md @@ -18,6 +18,6 @@ let value: CreateGuardrailResponse = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateGuardrailData](../../models/operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.CreateGuardrailData](../../models/operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/createkeysglobals.md b/docs/models/operations/createkeysglobals.md index 23ad9cc3..f33e6f02 100644 --- a/docs/models/operations/createkeysglobals.md +++ b/docs/models/operations/createkeysglobals.md @@ -13,4 +13,5 @@ let value: CreateKeysGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createkeysrequest.md b/docs/models/operations/createkeysrequest.md index 8c31af46..f5db40c7 100644 --- a/docs/models/operations/createkeysrequest.md +++ b/docs/models/operations/createkeysrequest.md @@ -17,5 +17,6 @@ let value: CreateKeysRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `requestBody` | [operations.CreateKeysRequestBody](../../models/operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New API Key",
"limit": 50,
"limit_reset": "monthly",
"include_byok_in_limit": true,
"expires_at": "2027-12-31T23:59:59Z"
} | \ No newline at end of file diff --git a/docs/models/operations/createresponsesglobals.md b/docs/models/operations/createresponsesglobals.md index a3ddbc2b..5f55a504 100644 --- a/docs/models/operations/createresponsesglobals.md +++ b/docs/models/operations/createresponsesglobals.md @@ -13,4 +13,5 @@ let value: CreateResponsesGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createresponsesrequest.md b/docs/models/operations/createresponsesrequest.md index 54af75f2..10453172 100644 --- a/docs/models/operations/createresponsesrequest.md +++ b/docs/models/operations/createresponsesrequest.md @@ -15,5 +15,6 @@ let value: CreateResponsesRequest = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `openResponsesRequest` | [models.OpenResponsesRequest](../../models/openresponsesrequest.md) | :heavy_check_mark: | N/A | {
"model": "anthropic/claude-4.5-sonnet-20250929",
"input": [
{
"type": "message",
"content": "Hello, how are you?",
"role": "user"
}
],
"temperature": 0.7,
"top_p": 0.9,
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
}
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/createresponsesresponse.md b/docs/models/operations/createresponsesresponse.md index a724c72f..05b96713 100644 --- a/docs/models/operations/createresponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -15,15 +15,8 @@ const value: models.OpenResponsesNonStreamingResponse = { completedAt: 288.81, output: [ { - id: "msg-abc123", - role: "assistant", type: "message", - content: [ - { - type: "output_text", - text: "Hello! How can I help you today?", - }, - ], + status: "completed", }, ], error: null, diff --git a/docs/models/operations/deleteguardrailglobals.md b/docs/models/operations/deleteguardrailglobals.md index 5195ee31..94398fee 100644 --- a/docs/models/operations/deleteguardrailglobals.md +++ b/docs/models/operations/deleteguardrailglobals.md @@ -13,4 +13,5 @@ let value: DeleteGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/deleteguardrailrequest.md b/docs/models/operations/deleteguardrailrequest.md index cf8944c0..9989ffc9 100644 --- a/docs/models/operations/deleteguardrailrequest.md +++ b/docs/models/operations/deleteguardrailrequest.md @@ -15,5 +15,6 @@ let value: DeleteGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/models/operations/deletekeysglobals.md b/docs/models/operations/deletekeysglobals.md index 3f7678d0..5b054f28 100644 --- a/docs/models/operations/deletekeysglobals.md +++ b/docs/models/operations/deletekeysglobals.md @@ -13,4 +13,5 @@ let value: DeleteKeysGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/deletekeysrequest.md b/docs/models/operations/deletekeysrequest.md index 54f415b8..743fe271 100644 --- a/docs/models/operations/deletekeysrequest.md +++ b/docs/models/operations/deletekeysrequest.md @@ -15,5 +15,6 @@ let value: DeleteKeysRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *string* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | \ No newline at end of file diff --git a/docs/models/operations/exchangeauthcodeforapikeyglobals.md b/docs/models/operations/exchangeauthcodeforapikeyglobals.md index 0a829bb6..a520ad71 100644 --- a/docs/models/operations/exchangeauthcodeforapikeyglobals.md +++ b/docs/models/operations/exchangeauthcodeforapikeyglobals.md @@ -13,4 +13,5 @@ let value: ExchangeAuthCodeForAPIKeyGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/exchangeauthcodeforapikeyrequest.md b/docs/models/operations/exchangeauthcodeforapikeyrequest.md index f0fcc354..d67d86a0 100644 --- a/docs/models/operations/exchangeauthcodeforapikeyrequest.md +++ b/docs/models/operations/exchangeauthcodeforapikeyrequest.md @@ -17,5 +17,6 @@ let value: ExchangeAuthCodeForAPIKeyRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `requestBody` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../../models/operations/exchangeauthcodeforapikeyrequestbody.md) | :heavy_check_mark: | N/A | {
"code": "auth_code_abc123def456",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"code_challenge_method": "S256"
} | \ No newline at end of file diff --git a/docs/models/operations/getcreditsglobals.md b/docs/models/operations/getcreditsglobals.md index 8b37c23d..df019b2f 100644 --- a/docs/models/operations/getcreditsglobals.md +++ b/docs/models/operations/getcreditsglobals.md @@ -13,4 +13,5 @@ let value: GetCreditsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getcreditsrequest.md b/docs/models/operations/getcreditsrequest.md index 296fb668..44f21299 100644 --- a/docs/models/operations/getcreditsrequest.md +++ b/docs/models/operations/getcreditsrequest.md @@ -13,4 +13,5 @@ let value: GetCreditsRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getcurrentkeyglobals.md b/docs/models/operations/getcurrentkeyglobals.md index 20e7c359..be8ca1f8 100644 --- a/docs/models/operations/getcurrentkeyglobals.md +++ b/docs/models/operations/getcurrentkeyglobals.md @@ -13,4 +13,5 @@ let value: GetCurrentKeyGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getcurrentkeyrequest.md b/docs/models/operations/getcurrentkeyrequest.md index 5faddeba..788ef548 100644 --- a/docs/models/operations/getcurrentkeyrequest.md +++ b/docs/models/operations/getcurrentkeyrequest.md @@ -13,4 +13,5 @@ let value: GetCurrentKeyRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getgenerationdata.md b/docs/models/operations/getgenerationdata.md index 8443a05a..500816da 100644 --- a/docs/models/operations/getgenerationdata.md +++ b/docs/models/operations/getgenerationdata.md @@ -46,6 +46,8 @@ let value: GetGenerationData = { status: 9669.26, }, ], + userAgent: "", + httpReferer: "", }; ``` @@ -86,4 +88,6 @@ let value: GetGenerationData = { | `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | | `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | | `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | -| `providerResponses` | [operations.ProviderResponse](../../models/operations/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | \ No newline at end of file +| `providerResponses` | [operations.ProviderResponse](../../models/operations/providerresponse.md)[] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | +| `userAgent` | *string* | :heavy_check_mark: | User-Agent header from the request | | +| `httpReferer` | *string* | :heavy_check_mark: | Referer header from the request | | \ No newline at end of file diff --git a/docs/models/operations/getgenerationglobals.md b/docs/models/operations/getgenerationglobals.md index f211d392..dc1d1dbe 100644 --- a/docs/models/operations/getgenerationglobals.md +++ b/docs/models/operations/getgenerationglobals.md @@ -13,4 +13,5 @@ let value: GetGenerationGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getgenerationrequest.md b/docs/models/operations/getgenerationrequest.md index 924ad66a..721877b0 100644 --- a/docs/models/operations/getgenerationrequest.md +++ b/docs/models/operations/getgenerationrequest.md @@ -15,5 +15,6 @@ let value: GetGenerationRequest = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getgenerationresponse.md b/docs/models/operations/getgenerationresponse.md index ad8d36ec..2f82ace8 100644 --- a/docs/models/operations/getgenerationresponse.md +++ b/docs/models/operations/getgenerationresponse.md @@ -43,6 +43,8 @@ let value: GetGenerationResponse = { apiType: null, router: "openrouter/auto", providerResponses: null, + userAgent: "", + httpReferer: "", }, }; ``` diff --git a/docs/models/operations/getguardraildata.md b/docs/models/operations/getguardraildata.md index 712c360c..ed56bce7 100644 --- a/docs/models/operations/getguardraildata.md +++ b/docs/models/operations/getguardraildata.md @@ -24,6 +24,7 @@ let value: GetGuardrailData = { | `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | | `resetInterval` | [operations.GetGuardrailResetInterval](../../models/operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/models/operations/getguardrailglobals.md b/docs/models/operations/getguardrailglobals.md index 99ce3844..162123da 100644 --- a/docs/models/operations/getguardrailglobals.md +++ b/docs/models/operations/getguardrailglobals.md @@ -13,4 +13,5 @@ let value: GetGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getguardrailrequest.md b/docs/models/operations/getguardrailrequest.md index 47e81190..fdf0bcfd 100644 --- a/docs/models/operations/getguardrailrequest.md +++ b/docs/models/operations/getguardrailrequest.md @@ -15,5 +15,6 @@ let value: GetGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/models/operations/getguardrailresponse.md b/docs/models/operations/getguardrailresponse.md index 8951e641..1f501c88 100644 --- a/docs/models/operations/getguardrailresponse.md +++ b/docs/models/operations/getguardrailresponse.md @@ -18,6 +18,6 @@ let value: GetGuardrailResponse = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetGuardrailData](../../models/operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.GetGuardrailData](../../models/operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/getkeyglobals.md b/docs/models/operations/getkeyglobals.md index ed8e973a..fd0f8abb 100644 --- a/docs/models/operations/getkeyglobals.md +++ b/docs/models/operations/getkeyglobals.md @@ -13,4 +13,5 @@ let value: GetKeyGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getkeyrequest.md b/docs/models/operations/getkeyrequest.md index 9bc01978..cfbdeba6 100644 --- a/docs/models/operations/getkeyrequest.md +++ b/docs/models/operations/getkeyrequest.md @@ -15,5 +15,6 @@ let value: GetKeyRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *string* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | \ No newline at end of file diff --git a/docs/models/operations/getmodelsglobals.md b/docs/models/operations/getmodelsglobals.md index 7d365116..ff8b2176 100644 --- a/docs/models/operations/getmodelsglobals.md +++ b/docs/models/operations/getmodelsglobals.md @@ -13,4 +13,5 @@ let value: GetModelsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getmodelsrequest.md b/docs/models/operations/getmodelsrequest.md index 64aa011a..584f2c71 100644 --- a/docs/models/operations/getmodelsrequest.md +++ b/docs/models/operations/getmodelsrequest.md @@ -10,9 +10,11 @@ let value: GetModelsRequest = {}; ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `category` | [operations.Category](../../models/operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | -| `supportedParameters` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `category` | [operations.Category](../../models/operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | +| `supportedParameters` | *string* | :heavy_minus_sign: | N/A | | +| `outputModalities` | *string* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | \ No newline at end of file diff --git a/docs/models/operations/getuseractivityglobals.md b/docs/models/operations/getuseractivityglobals.md index 29571d1c..aa35304d 100644 --- a/docs/models/operations/getuseractivityglobals.md +++ b/docs/models/operations/getuseractivityglobals.md @@ -13,4 +13,5 @@ let value: GetUserActivityGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getuseractivityrequest.md b/docs/models/operations/getuseractivityrequest.md index 7b3de014..b42df01f 100644 --- a/docs/models/operations/getuseractivityrequest.md +++ b/docs/models/operations/getuseractivityrequest.md @@ -13,5 +13,6 @@ let value: GetUserActivityRequest = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `date` | *string* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | \ No newline at end of file diff --git a/docs/models/operations/listembeddingsmodelsglobals.md b/docs/models/operations/listembeddingsmodelsglobals.md index 308dda18..c7b64614 100644 --- a/docs/models/operations/listembeddingsmodelsglobals.md +++ b/docs/models/operations/listembeddingsmodelsglobals.md @@ -13,4 +13,5 @@ let value: ListEmbeddingsModelsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listembeddingsmodelsrequest.md b/docs/models/operations/listembeddingsmodelsrequest.md index c4a8c8aa..df4709a9 100644 --- a/docs/models/operations/listembeddingsmodelsrequest.md +++ b/docs/models/operations/listembeddingsmodelsrequest.md @@ -13,4 +13,5 @@ let value: ListEmbeddingsModelsRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listendpointsglobals.md b/docs/models/operations/listendpointsglobals.md index af0178d9..97ff9288 100644 --- a/docs/models/operations/listendpointsglobals.md +++ b/docs/models/operations/listendpointsglobals.md @@ -13,4 +13,5 @@ let value: ListEndpointsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listendpointsrequest.md b/docs/models/operations/listendpointsrequest.md index 5d2f6a2f..a5eecdd5 100644 --- a/docs/models/operations/listendpointsrequest.md +++ b/docs/models/operations/listendpointsrequest.md @@ -16,6 +16,7 @@ let value: ListEndpointsRequest = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `author` | *string* | :heavy_check_mark: | N/A | | `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listendpointszdrglobals.md b/docs/models/operations/listendpointszdrglobals.md index 496bf5d2..0b36a6b5 100644 --- a/docs/models/operations/listendpointszdrglobals.md +++ b/docs/models/operations/listendpointszdrglobals.md @@ -13,4 +13,5 @@ let value: ListEndpointsZdrGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listendpointszdrrequest.md b/docs/models/operations/listendpointszdrrequest.md index 2b76c98d..172a25fa 100644 --- a/docs/models/operations/listendpointszdrrequest.md +++ b/docs/models/operations/listendpointszdrrequest.md @@ -13,4 +13,5 @@ let value: ListEndpointsZdrRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listglobals.md b/docs/models/operations/listglobals.md index 1f61007c..aaf00291 100644 --- a/docs/models/operations/listglobals.md +++ b/docs/models/operations/listglobals.md @@ -13,4 +13,5 @@ let value: ListGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listguardrailkeyassignmentsglobals.md b/docs/models/operations/listguardrailkeyassignmentsglobals.md index 50b09500..4a33b887 100644 --- a/docs/models/operations/listguardrailkeyassignmentsglobals.md +++ b/docs/models/operations/listguardrailkeyassignmentsglobals.md @@ -13,4 +13,5 @@ let value: ListGuardrailKeyAssignmentsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listguardrailkeyassignmentsrequest.md b/docs/models/operations/listguardrailkeyassignmentsrequest.md index 1fb19af8..ea9fca67 100644 --- a/docs/models/operations/listguardrailkeyassignmentsrequest.md +++ b/docs/models/operations/listguardrailkeyassignmentsrequest.md @@ -15,7 +15,8 @@ let value: ListGuardrailKeyAssignmentsRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsglobals.md b/docs/models/operations/listguardrailmemberassignmentsglobals.md index 08bbbba8..932671e1 100644 --- a/docs/models/operations/listguardrailmemberassignmentsglobals.md +++ b/docs/models/operations/listguardrailmemberassignmentsglobals.md @@ -13,4 +13,5 @@ let value: ListGuardrailMemberAssignmentsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listguardrailmemberassignmentsrequest.md b/docs/models/operations/listguardrailmemberassignmentsrequest.md index 40a8add6..6c3d33e2 100644 --- a/docs/models/operations/listguardrailmemberassignmentsrequest.md +++ b/docs/models/operations/listguardrailmemberassignmentsrequest.md @@ -15,7 +15,8 @@ let value: ListGuardrailMemberAssignmentsRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listguardrailsdata.md b/docs/models/operations/listguardrailsdata.md index 4ff5e67d..d0b8b4e9 100644 --- a/docs/models/operations/listguardrailsdata.md +++ b/docs/models/operations/listguardrailsdata.md @@ -22,6 +22,7 @@ let value: ListGuardrailsData = { | `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | | `resetInterval` | [operations.ListGuardrailsResetInterval](../../models/operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/models/operations/listguardrailsglobals.md b/docs/models/operations/listguardrailsglobals.md index bcf0c856..bd212b44 100644 --- a/docs/models/operations/listguardrailsglobals.md +++ b/docs/models/operations/listguardrailsglobals.md @@ -13,4 +13,5 @@ let value: ListGuardrailsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listguardrailsrequest.md b/docs/models/operations/listguardrailsrequest.md index bd35526d..fd4c9ded 100644 --- a/docs/models/operations/listguardrailsrequest.md +++ b/docs/models/operations/listguardrailsrequest.md @@ -13,6 +13,7 @@ let value: ListGuardrailsRequest = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsglobals.md b/docs/models/operations/listkeyassignmentsglobals.md index a00477b1..fb98c566 100644 --- a/docs/models/operations/listkeyassignmentsglobals.md +++ b/docs/models/operations/listkeyassignmentsglobals.md @@ -13,4 +13,5 @@ let value: ListKeyAssignmentsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listkeyassignmentsrequest.md b/docs/models/operations/listkeyassignmentsrequest.md index 8173fed7..aee7f115 100644 --- a/docs/models/operations/listkeyassignmentsrequest.md +++ b/docs/models/operations/listkeyassignmentsrequest.md @@ -13,6 +13,7 @@ let value: ListKeyAssignmentsRequest = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsglobals.md b/docs/models/operations/listmemberassignmentsglobals.md index 8f58b2bd..464f8c7b 100644 --- a/docs/models/operations/listmemberassignmentsglobals.md +++ b/docs/models/operations/listmemberassignmentsglobals.md @@ -13,4 +13,5 @@ let value: ListMemberAssignmentsGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listmemberassignmentsrequest.md b/docs/models/operations/listmemberassignmentsrequest.md index 7954d6f2..9d8e2840 100644 --- a/docs/models/operations/listmemberassignmentsrequest.md +++ b/docs/models/operations/listmemberassignmentsrequest.md @@ -13,6 +13,7 @@ let value: ListMemberAssignmentsRequest = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *string* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *string* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/models/operations/listmodelscountglobals.md b/docs/models/operations/listmodelscountglobals.md index f0f1b87d..fa266c2f 100644 --- a/docs/models/operations/listmodelscountglobals.md +++ b/docs/models/operations/listmodelscountglobals.md @@ -13,4 +13,5 @@ let value: ListModelsCountGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listmodelscountrequest.md b/docs/models/operations/listmodelscountrequest.md index 8038a3f6..3a8a3650 100644 --- a/docs/models/operations/listmodelscountrequest.md +++ b/docs/models/operations/listmodelscountrequest.md @@ -10,7 +10,9 @@ let value: ListModelsCountRequest = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `outputModalities` | *string* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | \ No newline at end of file diff --git a/docs/models/operations/listmodelsuserglobals.md b/docs/models/operations/listmodelsuserglobals.md index fba7ca40..311817e1 100644 --- a/docs/models/operations/listmodelsuserglobals.md +++ b/docs/models/operations/listmodelsuserglobals.md @@ -13,4 +13,5 @@ let value: ListModelsUserGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listmodelsuserrequest.md b/docs/models/operations/listmodelsuserrequest.md index 2e07531d..4820e3fe 100644 --- a/docs/models/operations/listmodelsuserrequest.md +++ b/docs/models/operations/listmodelsuserrequest.md @@ -13,4 +13,5 @@ let value: ListModelsUserRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listprovidersglobals.md b/docs/models/operations/listprovidersglobals.md index 1fc43a25..dd7b707d 100644 --- a/docs/models/operations/listprovidersglobals.md +++ b/docs/models/operations/listprovidersglobals.md @@ -13,4 +13,5 @@ let value: ListProvidersGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listprovidersrequest.md b/docs/models/operations/listprovidersrequest.md index 23563a66..7078b856 100644 --- a/docs/models/operations/listprovidersrequest.md +++ b/docs/models/operations/listprovidersrequest.md @@ -13,4 +13,5 @@ let value: ListProvidersRequest = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listrequest.md b/docs/models/operations/listrequest.md index 3dbaaa9f..a29359f4 100644 --- a/docs/models/operations/listrequest.md +++ b/docs/models/operations/listrequest.md @@ -13,6 +13,7 @@ let value: ListRequest = {}; | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `includeDisabled` | *string* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | | `offset` | *string* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file diff --git a/docs/models/operations/providername.md b/docs/models/operations/providername.md index fda8d2f9..9876aadc 100644 --- a/docs/models/operations/providername.md +++ b/docs/models/operations/providername.md @@ -13,5 +13,5 @@ let value: ProviderName = "Lambda"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AnyScale" | "Atoma" | "Cent-ML" | "CrofAI" | "Enfer" | "GoPomelo" | "HuggingFace" | "Hyperbolic 2" | "InoCloud" | "Kluster" | "Lambda" | "Lepton" | "Lynn 2" | "Lynn" | "Mancer" | "Meta" | "Modal" | "Nineteen" | "OctoAI" | "Recursal" | "Reflection" | "Replicate" | "SambaNova 2" | "SF Compute" | "Targon" | "Together 2" | "Ubicloud" | "01.AI" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AnyScale" | "Atoma" | "Cent-ML" | "CrofAI" | "Enfer" | "GoPomelo" | "HuggingFace" | "Hyperbolic 2" | "InoCloud" | "Kluster" | "Lambda" | "Lepton" | "Lynn 2" | "Lynn" | "Mancer" | "Meta" | "Modal" | "Nineteen" | "OctoAI" | "Recursal" | "Reflection" | "Replicate" | "SambaNova 2" | "SF Compute" | "Targon" | "Together 2" | "Ubicloud" | "01.AI" | "AkashML" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/operations/sendchatcompletionrequestglobals.md b/docs/models/operations/sendchatcompletionrequestglobals.md index 421b6219..9f12b326 100644 --- a/docs/models/operations/sendchatcompletionrequestglobals.md +++ b/docs/models/operations/sendchatcompletionrequestglobals.md @@ -13,4 +13,5 @@ let value: SendChatCompletionRequestGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/sendchatcompletionrequestrequest.md b/docs/models/operations/sendchatcompletionrequestrequest.md index 2f37d1c2..ecbb52d0 100644 --- a/docs/models/operations/sendchatcompletionrequestrequest.md +++ b/docs/models/operations/sendchatcompletionrequestrequest.md @@ -27,5 +27,6 @@ let value: SendChatCompletionRequestRequest = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `chatGenerationParams` | [models.ChatGenerationParams](../../models/chatgenerationparams.md) | :heavy_check_mark: | N/A | {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"model": "openai/gpt-4",
"temperature": 0.7,
"max_tokens": 150
} | \ No newline at end of file diff --git a/docs/models/operations/sendchatcompletionrequestresponse.md b/docs/models/operations/sendchatcompletionrequestresponse.md index 4a5ce2ef..e1bbee85 100644 --- a/docs/models/operations/sendchatcompletionrequestresponse.md +++ b/docs/models/operations/sendchatcompletionrequestresponse.md @@ -20,6 +20,7 @@ const value: models.ChatResponse = { created: 1677652288, model: "openai/gpt-4", object: "chat.completion", + systemFingerprint: "fp_44709d6fcb", }; ``` diff --git a/docs/models/operations/updateguardraildata.md b/docs/models/operations/updateguardraildata.md index ca469f5d..22cbd14e 100644 --- a/docs/models/operations/updateguardraildata.md +++ b/docs/models/operations/updateguardraildata.md @@ -24,6 +24,7 @@ let value: UpdateGuardrailData = { | `limitUsd` | *number* | :heavy_minus_sign: | Spending limit in USD | 100 | | `resetInterval` | [operations.UpdateGuardrailResetIntervalResponse](../../models/operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/models/operations/updateguardrailglobals.md b/docs/models/operations/updateguardrailglobals.md index 15cce4f2..5f51b081 100644 --- a/docs/models/operations/updateguardrailglobals.md +++ b/docs/models/operations/updateguardrailglobals.md @@ -13,4 +13,5 @@ let value: UpdateGuardrailGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updateguardrailrequest.md b/docs/models/operations/updateguardrailrequest.md index 3ecb4cd6..1a3aa633 100644 --- a/docs/models/operations/updateguardrailrequest.md +++ b/docs/models/operations/updateguardrailrequest.md @@ -16,6 +16,7 @@ let value: UpdateGuardrailRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *string* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | | `requestBody` | [operations.UpdateGuardrailRequestBody](../../models/operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated Guardrail Name",
"description": "Updated description",
"limit_usd": 75,
"reset_interval": "weekly"
} | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailrequestbody.md b/docs/models/operations/updateguardrailrequestbody.md index dec334ee..02e8d2bc 100644 --- a/docs/models/operations/updateguardrailrequestbody.md +++ b/docs/models/operations/updateguardrailrequestbody.md @@ -17,5 +17,6 @@ let value: UpdateGuardrailRequestBody = {}; | `limitUsd` | *number* | :heavy_minus_sign: | New spending limit in USD | 75 | | `resetInterval` | [operations.UpdateGuardrailResetIntervalRequest](../../models/operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowedProviders` | *string*[] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignoredProviders` | *string*[] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowedModels` | *string*[] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | | `enforceZdr` | *boolean* | :heavy_minus_sign: | Whether to enforce zero data retention | true | \ No newline at end of file diff --git a/docs/models/operations/updateguardrailresponse.md b/docs/models/operations/updateguardrailresponse.md index 2790251c..51f061f5 100644 --- a/docs/models/operations/updateguardrailresponse.md +++ b/docs/models/operations/updateguardrailresponse.md @@ -18,6 +18,6 @@ let value: UpdateGuardrailResponse = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateGuardrailData](../../models/operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.UpdateGuardrailData](../../models/operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/updatekeysglobals.md b/docs/models/operations/updatekeysglobals.md index e7fe102b..e786a2e3 100644 --- a/docs/models/operations/updatekeysglobals.md +++ b/docs/models/operations/updatekeysglobals.md @@ -13,4 +13,5 @@ let value: UpdateKeysGlobals = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updatekeysrequest.md b/docs/models/operations/updatekeysrequest.md index 05be4f49..c58123c8 100644 --- a/docs/models/operations/updatekeysrequest.md +++ b/docs/models/operations/updatekeysrequest.md @@ -16,6 +16,7 @@ let value: UpdateKeysRequest = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `xTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *string* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | | `requestBody` | [operations.UpdateKeysRequestBody](../../models/operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated API Key Name",
"disabled": false,
"limit": 75,
"limit_reset": "daily",
"include_byok_in_limit": true
} | \ No newline at end of file diff --git a/docs/models/outputformat.md b/docs/models/outputformat.md new file mode 100644 index 00000000..ba62d3e5 --- /dev/null +++ b/docs/models/outputformat.md @@ -0,0 +1,17 @@ +# OutputFormat + +## Example Usage + +```typescript +import { OutputFormat } from "@openrouter/sdk/models"; + +let value: OutputFormat = "png"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"png" | "webp" | "jpeg" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/outputinputimage.md b/docs/models/outputinputimage.md new file mode 100644 index 00000000..50c16264 --- /dev/null +++ b/docs/models/outputinputimage.md @@ -0,0 +1,22 @@ +# OutputInputImage + +Image input content item + +## Example Usage + +```typescript +import { OutputInputImage } from "@openrouter/sdk/models"; + +let value: OutputInputImage = { + type: "input_image", + detail: "auto", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `type` | *"input_image"* | :heavy_check_mark: | N/A | +| `detail` | [models.OpenResponsesFunctionCallOutputDetail](../models/openresponsesfunctioncalloutputdetail.md) | :heavy_check_mark: | N/A | +| `imageUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/outputmessage.md b/docs/models/outputmessage.md index f5cf0ba2..e5657b7a 100644 --- a/docs/models/outputmessage.md +++ b/docs/models/outputmessage.md @@ -20,10 +20,11 @@ let value: OutputMessage = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `role` | [models.OutputMessageRole](../models/outputmessagerole.md) | :heavy_check_mark: | N/A | -| `type` | [models.OutputMessageType](../models/outputmessagetype.md) | :heavy_check_mark: | N/A | -| `status` | *models.OutputMessageStatusUnion* | :heavy_minus_sign: | N/A | -| `content` | *models.OutputMessageContent*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `role` | [models.OutputMessageRole](../models/outputmessagerole.md) | :heavy_check_mark: | N/A | +| `type` | [models.OutputMessageType](../models/outputmessagetype.md) | :heavy_check_mark: | N/A | +| `status` | *models.OutputMessageStatusUnion* | :heavy_minus_sign: | N/A | +| `content` | *models.OutputMessageContent*[] | :heavy_check_mark: | N/A | +| `phase` | *models.OutputMessagePhaseUnion* | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | \ No newline at end of file diff --git a/docs/models/outputmessagephasecommentary.md b/docs/models/outputmessagephasecommentary.md new file mode 100644 index 00000000..cb0d8814 --- /dev/null +++ b/docs/models/outputmessagephasecommentary.md @@ -0,0 +1,15 @@ +# OutputMessagePhaseCommentary + +## Example Usage + +```typescript +import { OutputMessagePhaseCommentary } from "@openrouter/sdk/models"; + +let value: OutputMessagePhaseCommentary = "commentary"; +``` + +## Values + +```typescript +"commentary" +``` \ No newline at end of file diff --git a/docs/models/outputmessagephasefinalanswer.md b/docs/models/outputmessagephasefinalanswer.md new file mode 100644 index 00000000..ff5fc926 --- /dev/null +++ b/docs/models/outputmessagephasefinalanswer.md @@ -0,0 +1,15 @@ +# OutputMessagePhaseFinalAnswer + +## Example Usage + +```typescript +import { OutputMessagePhaseFinalAnswer } from "@openrouter/sdk/models"; + +let value: OutputMessagePhaseFinalAnswer = "final_answer"; +``` + +## Values + +```typescript +"final_answer" +``` \ No newline at end of file diff --git a/docs/models/outputmessagephaseunion.md b/docs/models/outputmessagephaseunion.md new file mode 100644 index 00000000..b472eac7 --- /dev/null +++ b/docs/models/outputmessagephaseunion.md @@ -0,0 +1,25 @@ +# OutputMessagePhaseUnion + +The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + + +## Supported Types + +### `models.OutputMessagePhaseCommentary` + +```typescript +const value: models.OutputMessagePhaseCommentary = "commentary"; +``` + +### `models.OutputMessagePhaseFinalAnswer` + +```typescript +const value: models.OutputMessagePhaseFinalAnswer = "final_answer"; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/outputmodality.md b/docs/models/outputmodality.md index ec9c6f76..f0c44c3d 100644 --- a/docs/models/outputmodality.md +++ b/docs/models/outputmodality.md @@ -13,5 +13,5 @@ let value: OutputModality = "text"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"text" | "image" | "embeddings" | "audio" | Unrecognized +"text" | "image" | "embeddings" | "audio" | "video" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providername.md b/docs/models/providername.md index 17228b59..bfb21173 100644 --- a/docs/models/providername.md +++ b/docs/models/providername.md @@ -13,5 +13,5 @@ let value: ProviderName = "OpenAI"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AkashML" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Ionstream" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providerpreferencesby.md b/docs/models/providerpreferencesby.md index 3fe7a639..46e665f0 100644 --- a/docs/models/providerpreferencesby.md +++ b/docs/models/providerpreferencesby.md @@ -15,5 +15,5 @@ let value: ProviderPreferencesBy = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersort.md b/docs/models/providerpreferencesprovidersort.md index 9b947c3e..56fd7f16 100644 --- a/docs/models/providerpreferencesprovidersort.md +++ b/docs/models/providerpreferencesprovidersort.md @@ -15,5 +15,5 @@ let value: ProviderPreferencesProviderSort = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfigenum.md b/docs/models/providerpreferencesprovidersortconfigenum.md index 1fefe429..488f7814 100644 --- a/docs/models/providerpreferencesprovidersortconfigenum.md +++ b/docs/models/providerpreferencesprovidersortconfigenum.md @@ -11,5 +11,5 @@ let value: ProviderPreferencesProviderSortConfigEnum = "price"; ## Values ```typescript -"price" | "throughput" | "latency" +"price" | "throughput" | "latency" | "exacto" ``` \ No newline at end of file diff --git a/docs/models/providerpreferencesprovidersortconfigunion.md b/docs/models/providerpreferencesprovidersortconfigunion.md index 1acd3e02..a05a4239 100644 --- a/docs/models/providerpreferencesprovidersortconfigunion.md +++ b/docs/models/providerpreferencesprovidersortconfigunion.md @@ -12,6 +12,6 @@ const value: models.ProviderPreferencesProviderSortConfig = {}; ### `models.ProviderPreferencesProviderSortConfigEnum` ```typescript -const value: models.ProviderPreferencesProviderSortConfigEnum = "latency"; +const value: models.ProviderPreferencesProviderSortConfigEnum = "exacto"; ``` diff --git a/docs/models/providerpreferencessortenum.md b/docs/models/providerpreferencessortenum.md index 3feec340..f4cbbfc1 100644 --- a/docs/models/providerpreferencessortenum.md +++ b/docs/models/providerpreferencessortenum.md @@ -13,5 +13,5 @@ let value: ProviderPreferencesSortEnum = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providerpreferencessortunion.md b/docs/models/providerpreferencessortunion.md index 0532bfa0..1f9600b5 100644 --- a/docs/models/providerpreferencessortunion.md +++ b/docs/models/providerpreferencessortunion.md @@ -14,7 +14,7 @@ const value: models.ProviderPreferencesProviderSort = "price"; ### `models.ProviderPreferencesProviderSortConfigUnion` ```typescript -const value: models.ProviderPreferencesProviderSortConfigUnion = "throughput"; +const value: models.ProviderPreferencesProviderSortConfigUnion = "latency"; ``` ### `models.ProviderPreferencesSortEnum` diff --git a/docs/models/providersort.md b/docs/models/providersort.md index 33c90282..288d3aa4 100644 --- a/docs/models/providersort.md +++ b/docs/models/providersort.md @@ -15,5 +15,5 @@ let value: ProviderSort = "price"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"price" | "throughput" | "latency" | Unrecognized +"price" | "throughput" | "latency" | "exacto" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/quality.md b/docs/models/quality.md new file mode 100644 index 00000000..832f0063 --- /dev/null +++ b/docs/models/quality.md @@ -0,0 +1,17 @@ +# Quality + +## Example Usage + +```typescript +import { Quality } from "@openrouter/sdk/models"; + +let value: Quality = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"low" | "medium" | "high" | "auto" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/ranker.md b/docs/models/ranker.md new file mode 100644 index 00000000..b96517e6 --- /dev/null +++ b/docs/models/ranker.md @@ -0,0 +1,17 @@ +# Ranker + +## Example Usage + +```typescript +import { Ranker } from "@openrouter/sdk/models"; + +let value: Ranker = "default-2024-11-15"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "default-2024-11-15" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/rankingoptions.md b/docs/models/rankingoptions.md new file mode 100644 index 00000000..3adf112f --- /dev/null +++ b/docs/models/rankingoptions.md @@ -0,0 +1,16 @@ +# RankingOptions + +## Example Usage + +```typescript +import { RankingOptions } from "@openrouter/sdk/models"; + +let value: RankingOptions = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `ranker` | [models.Ranker](../models/ranker.md) | :heavy_minus_sign: | N/A | +| `scoreThreshold` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/requireapproval.md b/docs/models/requireapproval.md new file mode 100644 index 00000000..32ae10be --- /dev/null +++ b/docs/models/requireapproval.md @@ -0,0 +1,16 @@ +# RequireApproval + +## Example Usage + +```typescript +import { RequireApproval } from "@openrouter/sdk/models"; + +let value: RequireApproval = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `never` | [models.Never](../models/never.md) | :heavy_minus_sign: | N/A | +| `always` | [models.Always](../models/always.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/requireapprovalalways.md b/docs/models/requireapprovalalways.md new file mode 100644 index 00000000..a773b33e --- /dev/null +++ b/docs/models/requireapprovalalways.md @@ -0,0 +1,15 @@ +# RequireApprovalAlways + +## Example Usage + +```typescript +import { RequireApprovalAlways } from "@openrouter/sdk/models"; + +let value: RequireApprovalAlways = "always"; +``` + +## Values + +```typescript +"always" +``` \ No newline at end of file diff --git a/docs/models/requireapprovalnever.md b/docs/models/requireapprovalnever.md new file mode 100644 index 00000000..c67e97d0 --- /dev/null +++ b/docs/models/requireapprovalnever.md @@ -0,0 +1,15 @@ +# RequireApprovalNever + +## Example Usage + +```typescript +import { RequireApprovalNever } from "@openrouter/sdk/models"; + +let value: RequireApprovalNever = "never"; +``` + +## Values + +```typescript +"never" +``` \ No newline at end of file diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index c0d9c093..76338eb3 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -13,9 +13,9 @@ let value: ResponseOutputText = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `type` | *"output_text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | -| `logprobs` | [models.Logprob](../models/logprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *"output_text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | +| `logprobs` | [models.ResponseOutputTextLogprob](../models/responseoutputtextlogprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/logprob.md b/docs/models/responseoutputtextlogprob.md similarity index 92% rename from docs/models/logprob.md rename to docs/models/responseoutputtextlogprob.md index 3ba44ac2..b8f8dbd4 100644 --- a/docs/models/logprob.md +++ b/docs/models/responseoutputtextlogprob.md @@ -1,16 +1,16 @@ -# Logprob +# ResponseOutputTextLogprob ## Example Usage ```typescript -import { Logprob } from "@openrouter/sdk/models"; +import { ResponseOutputTextLogprob } from "@openrouter/sdk/models"; -let value: Logprob = { +let value: ResponseOutputTextLogprob = { token: "", bytes: [ - 3226.37, + 6812.36, ], - logprob: 2246.86, + logprob: 1738.3, topLogprobs: [], }; ``` diff --git a/docs/models/responsesoutputitem.md b/docs/models/responsesoutputitem.md index 56976cb0..1fed6af3 100644 --- a/docs/models/responsesoutputitem.md +++ b/docs/models/responsesoutputitem.md @@ -53,6 +53,10 @@ const value: models.ResponsesOutputItemFunctionCall = { const value: models.ResponsesWebSearchCallOutput = { type: "web_search_call", id: "search-abc123", + action: { + type: "search", + query: "OpenAI API", + }, status: "completed", }; ``` @@ -83,3 +87,12 @@ const value: models.ResponsesImageGenerationCall = { }; ``` +### `models.ResponsesServerToolOutput` + +```typescript +const value: models.ResponsesServerToolOutput = { + type: "openrouter:web_search", + status: "completed", +}; +``` + diff --git a/docs/models/responsesoutputmessage.md b/docs/models/responsesoutputmessage.md index 993206b5..3f6f1742 100644 --- a/docs/models/responsesoutputmessage.md +++ b/docs/models/responsesoutputmessage.md @@ -22,10 +22,11 @@ let value: ResponsesOutputMessage = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `role` | [models.ResponsesOutputMessageRole](../models/responsesoutputmessagerole.md) | :heavy_check_mark: | N/A | -| `type` | [models.ResponsesOutputMessageType](../models/responsesoutputmessagetype.md) | :heavy_check_mark: | N/A | -| `status` | *models.ResponsesOutputMessageStatusUnion* | :heavy_minus_sign: | N/A | -| `content` | *models.ResponsesOutputMessageContent*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `role` | [models.ResponsesOutputMessageRole](../models/responsesoutputmessagerole.md) | :heavy_check_mark: | N/A | +| `type` | [models.ResponsesOutputMessageType](../models/responsesoutputmessagetype.md) | :heavy_check_mark: | N/A | +| `status` | *models.ResponsesOutputMessageStatusUnion* | :heavy_minus_sign: | N/A | +| `content` | *models.ResponsesOutputMessageContent*[] | :heavy_check_mark: | N/A | +| `phase` | *models.ResponsesOutputMessagePhaseUnion* | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | \ No newline at end of file diff --git a/docs/models/responsesoutputmessagephasecommentary.md b/docs/models/responsesoutputmessagephasecommentary.md new file mode 100644 index 00000000..5fbf6852 --- /dev/null +++ b/docs/models/responsesoutputmessagephasecommentary.md @@ -0,0 +1,15 @@ +# ResponsesOutputMessagePhaseCommentary + +## Example Usage + +```typescript +import { ResponsesOutputMessagePhaseCommentary } from "@openrouter/sdk/models"; + +let value: ResponsesOutputMessagePhaseCommentary = "commentary"; +``` + +## Values + +```typescript +"commentary" +``` \ No newline at end of file diff --git a/docs/models/responsesoutputmessagephasefinalanswer.md b/docs/models/responsesoutputmessagephasefinalanswer.md new file mode 100644 index 00000000..93203fdd --- /dev/null +++ b/docs/models/responsesoutputmessagephasefinalanswer.md @@ -0,0 +1,15 @@ +# ResponsesOutputMessagePhaseFinalAnswer + +## Example Usage + +```typescript +import { ResponsesOutputMessagePhaseFinalAnswer } from "@openrouter/sdk/models"; + +let value: ResponsesOutputMessagePhaseFinalAnswer = "final_answer"; +``` + +## Values + +```typescript +"final_answer" +``` \ No newline at end of file diff --git a/docs/models/responsesoutputmessagephaseunion.md b/docs/models/responsesoutputmessagephaseunion.md new file mode 100644 index 00000000..4382fd7e --- /dev/null +++ b/docs/models/responsesoutputmessagephaseunion.md @@ -0,0 +1,25 @@ +# ResponsesOutputMessagePhaseUnion + +The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + + +## Supported Types + +### `models.ResponsesOutputMessagePhaseCommentary` + +```typescript +const value: models.ResponsesOutputMessagePhaseCommentary = "commentary"; +``` + +### `models.ResponsesOutputMessagePhaseFinalAnswer` + +```typescript +const value: models.ResponsesOutputMessagePhaseFinalAnswer = "final_answer"; +``` + +### `any` + +```typescript +const value: any = ""; +``` + diff --git a/docs/models/responsesservertooloutput.md b/docs/models/responsesservertooloutput.md new file mode 100644 index 00000000..f7f0aaca --- /dev/null +++ b/docs/models/responsesservertooloutput.md @@ -0,0 +1,23 @@ +# ResponsesServerToolOutput + +A generic OpenRouter server tool output item + +## Example Usage + +```typescript +import { ResponsesServerToolOutput } from "@openrouter/sdk/models"; + +let value: ResponsesServerToolOutput = { + type: "openrouter:web_search", + status: "completed", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | Server tool type (e.g. openrouter:datetime, openrouter:web_search) | | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `status` | [models.ResponsesServerToolOutputStatus](../models/responsesservertooloutputstatus.md) | :heavy_check_mark: | N/A | | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | {
"type": "openrouter:web_search",
"id": "ws_tmp_abc123",
"status": "completed"
} | \ No newline at end of file diff --git a/docs/models/responsesservertooloutputstatus.md b/docs/models/responsesservertooloutputstatus.md new file mode 100644 index 00000000..ca0b3c94 --- /dev/null +++ b/docs/models/responsesservertooloutputstatus.md @@ -0,0 +1,17 @@ +# ResponsesServerToolOutputStatus + +## Example Usage + +```typescript +import { ResponsesServerToolOutputStatus } from "@openrouter/sdk/models"; + +let value: ResponsesServerToolOutputStatus = "in_progress"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"completed" | "in_progress" | "incomplete" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/responseswebsearchcalloutput.md b/docs/models/responseswebsearchcalloutput.md index 875b5953..19fb9df3 100644 --- a/docs/models/responseswebsearchcalloutput.md +++ b/docs/models/responseswebsearchcalloutput.md @@ -8,14 +8,19 @@ import { ResponsesWebSearchCallOutput } from "@openrouter/sdk/models"; let value: ResponsesWebSearchCallOutput = { type: "web_search_call", id: "search-abc123", + action: { + type: "search", + query: "OpenAI API", + }, status: "completed", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [models.ResponsesWebSearchCallOutputType](../models/responseswebsearchcalloutputtype.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_check_mark: | N/A | | -| `status` | [models.WebSearchStatus](../models/websearchstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `type` | [models.TypeWebSearchCall](../models/typewebsearchcall.md) | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_check_mark: | N/A | | +| `action` | *models.Action* | :heavy_check_mark: | N/A | | +| `status` | [models.WebSearchStatus](../models/websearchstatus.md) | :heavy_check_mark: | N/A | completed | \ No newline at end of file diff --git a/docs/models/responseswebsearchcalloutputtype.md b/docs/models/responseswebsearchcalloutputtype.md deleted file mode 100644 index 267a8904..00000000 --- a/docs/models/responseswebsearchcalloutputtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResponsesWebSearchCallOutputType - -## Example Usage - -```typescript -import { ResponsesWebSearchCallOutputType } from "@openrouter/sdk/models"; - -let value: ResponsesWebSearchCallOutputType = "web_search_call"; -``` - -## Values - -```typescript -"web_search_call" -``` \ No newline at end of file diff --git a/docs/models/responseswebsearchservertool.md b/docs/models/responseswebsearchservertool.md new file mode 100644 index 00000000..7020b13d --- /dev/null +++ b/docs/models/responseswebsearchservertool.md @@ -0,0 +1,20 @@ +# ResponsesWebSearchServerTool + +OpenRouter built-in server tool: searches the web for current information + +## Example Usage + +```typescript +import { ResponsesWebSearchServerTool } from "@openrouter/sdk/models"; + +let value: ResponsesWebSearchServerTool = { + type: "openrouter:web_search", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `type` | *"openrouter:web_search"* | :heavy_check_mark: | N/A | +| `parameters` | [models.ResponsesWebSearchServerToolParameters](../models/responseswebsearchservertoolparameters.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseswebsearchservertoolparameters.md b/docs/models/responseswebsearchservertoolparameters.md new file mode 100644 index 00000000..53e9777b --- /dev/null +++ b/docs/models/responseswebsearchservertoolparameters.md @@ -0,0 +1,16 @@ +# ResponsesWebSearchServerToolParameters + +## Example Usage + +```typescript +import { ResponsesWebSearchServerToolParameters } from "@openrouter/sdk/models"; + +let value: ResponsesWebSearchServerToolParameters = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. | 5 | +| `maxTotalResults` | *number* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. | 20 | \ No newline at end of file diff --git a/docs/models/size.md b/docs/models/size.md new file mode 100644 index 00000000..03963cd1 --- /dev/null +++ b/docs/models/size.md @@ -0,0 +1,17 @@ +# Size + +## Example Usage + +```typescript +import { Size } from "@openrouter/sdk/models"; + +let value: Size = "1024x1024"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"1024x1024" | "1024x1536" | "1536x1024" | "auto" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/source.md b/docs/models/source.md new file mode 100644 index 00000000..9b64b472 --- /dev/null +++ b/docs/models/source.md @@ -0,0 +1,19 @@ +# Source + +## Example Usage + +```typescript +import { Source } from "@openrouter/sdk/models"; + +let value: Source = { + type: "url", + url: "https://brisk-hawk.org/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `type` | [models.TypeURL](../models/typeurl.md) | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/syntax.md b/docs/models/syntax.md new file mode 100644 index 00000000..18f16a8c --- /dev/null +++ b/docs/models/syntax.md @@ -0,0 +1,17 @@ +# Syntax + +## Example Usage + +```typescript +import { Syntax } from "@openrouter/sdk/models"; + +let value: Syntax = "regex"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"lark" | "regex" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/tooldefinitionjson.md b/docs/models/tooldefinitionjson.md index ab5f6870..e90d1faf 100644 --- a/docs/models/tooldefinitionjson.md +++ b/docs/models/tooldefinitionjson.md @@ -1,13 +1,14 @@ # ToolDefinitionJson -Tool definition for function calling +Tool definition for function calling (regular function or OpenRouter built-in server tool) -## Example Usage -```typescript -import { ToolDefinitionJson } from "@openrouter/sdk/models"; +## Supported Types + +### `models.ToolDefinitionJsonFunction` -let value: ToolDefinitionJson = { +```typescript +const value: models.ToolDefinitionJsonFunction = { type: "function", function: { name: "get_weather", @@ -15,10 +16,51 @@ let value: ToolDefinitionJson = { }; ``` -## Fields +### `models.DatetimeServerTool` + +```typescript +const value: models.DatetimeServerTool = { + type: "openrouter:datetime", +}; +``` + +### `models.WebSearchServerTool` + +```typescript +const value: models.WebSearchServerTool = { + type: "openrouter:web_search", +}; +``` + +### `models.WebSearchShorthand` + +```typescript +const value: models.WebSearchShorthand = { + type: "web_search_preview_2025_03_11", +}; +``` + +### `models.WebSearchShorthand` + +```typescript +const value: models.WebSearchShorthand = { + type: "web_search_preview_2025_03_11", +}; +``` + +### `models.WebSearchShorthand` + +```typescript +const value: models.WebSearchShorthand = { + type: "web_search_preview_2025_03_11", +}; +``` + +### `models.WebSearchShorthand` + +```typescript +const value: models.WebSearchShorthand = { + type: "web_search_preview_2025_03_11", +}; +``` -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [models.ToolDefinitionJsonType](../models/tooldefinitionjsontype.md) | :heavy_check_mark: | N/A | | -| `function` | [models.ToolDefinitionJsonFunction](../models/tooldefinitionjsonfunction.md) | :heavy_check_mark: | Function definition for tool calling | {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
}
} | -| `cacheControl` | [models.ChatMessageContentItemCacheControl](../models/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | Cache control for the content part | {
"type": "ephemeral",
"ttl": "5m"
} | \ No newline at end of file diff --git a/docs/models/tooldefinitionjsonfunction.md b/docs/models/tooldefinitionjsonfunction.md index 0da6b3ca..2a7ceadc 100644 --- a/docs/models/tooldefinitionjsonfunction.md +++ b/docs/models/tooldefinitionjsonfunction.md @@ -1,22 +1,22 @@ # ToolDefinitionJsonFunction -Function definition for tool calling - ## Example Usage ```typescript import { ToolDefinitionJsonFunction } from "@openrouter/sdk/models"; let value: ToolDefinitionJsonFunction = { - name: "get_weather", + type: "function", + function: { + name: "get_weather", + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) | get_weather | -| `description` | *string* | :heavy_minus_sign: | Function description for the model | Get the current weather for a location | -| `parameters` | Record | :heavy_minus_sign: | Function parameters as JSON Schema object | {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
} | -| `strict` | *boolean* | :heavy_minus_sign: | Enable strict schema adherence | false | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *"function"* | :heavy_check_mark: | N/A | | +| `function` | [models.ToolDefinitionJsonFunctionFunction](../models/tooldefinitionjsonfunctionfunction.md) | :heavy_check_mark: | Function definition for tool calling | {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
}
} | +| `cacheControl` | [models.ChatMessageContentItemCacheControl](../models/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | Cache control for the content part | {
"type": "ephemeral",
"ttl": "5m"
} | \ No newline at end of file diff --git a/docs/models/tooldefinitionjsonfunctionfunction.md b/docs/models/tooldefinitionjsonfunctionfunction.md new file mode 100644 index 00000000..feccc065 --- /dev/null +++ b/docs/models/tooldefinitionjsonfunctionfunction.md @@ -0,0 +1,22 @@ +# ToolDefinitionJsonFunctionFunction + +Function definition for tool calling + +## Example Usage + +```typescript +import { ToolDefinitionJsonFunctionFunction } from "@openrouter/sdk/models"; + +let value: ToolDefinitionJsonFunctionFunction = { + name: "get_weather", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) | get_weather | +| `description` | *string* | :heavy_minus_sign: | Function description for the model | Get the current weather for a location | +| `parameters` | Record | :heavy_minus_sign: | Function parameters as JSON Schema object | {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City name"
}
},
"required": [
"location"
]
} | +| `strict` | *boolean* | :heavy_minus_sign: | Enable strict schema adherence | false | \ No newline at end of file diff --git a/docs/models/tooldefinitionjsontype.md b/docs/models/tooldefinitionjsontype.md deleted file mode 100644 index 5a02c200..00000000 --- a/docs/models/tooldefinitionjsontype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ToolDefinitionJsonType - -## Example Usage - -```typescript -import { ToolDefinitionJsonType } from "@openrouter/sdk/models"; - -let value: ToolDefinitionJsonType = "function"; -``` - -## Values - -```typescript -"function" -``` \ No newline at end of file diff --git a/docs/models/toolresponsemessagecontent.md b/docs/models/toolresponsemessagecontent.md index 2d46ed55..ef0c99e9 100644 --- a/docs/models/toolresponsemessagecontent.md +++ b/docs/models/toolresponsemessagecontent.md @@ -16,10 +16,9 @@ const value: string = "The weather in San Francisco is 72°F and sunny."; ```typescript const value: models.ChatMessageContentItem[] = [ { - type: "input_audio", - inputAudio: { - data: "", - format: "", + type: "input_video", + videoUrl: { + url: "https://standard-step.net/", }, }, ]; diff --git a/docs/models/typeurl.md b/docs/models/typeurl.md new file mode 100644 index 00000000..f3dff172 --- /dev/null +++ b/docs/models/typeurl.md @@ -0,0 +1,15 @@ +# TypeURL + +## Example Usage + +```typescript +import { TypeURL } from "@openrouter/sdk/models"; + +let value: TypeURL = "url"; +``` + +## Values + +```typescript +"url" +``` \ No newline at end of file diff --git a/docs/models/typewebsearchcall.md b/docs/models/typewebsearchcall.md new file mode 100644 index 00000000..946c111d --- /dev/null +++ b/docs/models/typewebsearchcall.md @@ -0,0 +1,15 @@ +# TypeWebSearchCall + +## Example Usage + +```typescript +import { TypeWebSearchCall } from "@openrouter/sdk/models"; + +let value: TypeWebSearchCall = "web_search_call"; +``` + +## Values + +```typescript +"web_search_call" +``` \ No newline at end of file diff --git a/docs/models/usermessagecontent.md b/docs/models/usermessagecontent.md index 70ea3af8..fa5833b5 100644 --- a/docs/models/usermessagecontent.md +++ b/docs/models/usermessagecontent.md @@ -16,10 +16,9 @@ const value: string = "What is the capital of France?"; ```typescript const value: models.ChatMessageContentItem[] = [ { - type: "input_audio", - inputAudio: { - data: "", - format: "", + type: "input_video", + videoUrl: { + url: "https://standard-step.net/", }, }, ]; diff --git a/docs/models/value1.md b/docs/models/value1.md new file mode 100644 index 00000000..14cf6ee7 --- /dev/null +++ b/docs/models/value1.md @@ -0,0 +1,17 @@ +# Value1 + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + diff --git a/docs/models/value2.md b/docs/models/value2.md new file mode 100644 index 00000000..bc3d57a2 --- /dev/null +++ b/docs/models/value2.md @@ -0,0 +1,29 @@ +# Value2 + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + +### `boolean` + +```typescript +const value: boolean = true; +``` + +### `models.Value1[]` + +```typescript +const value: models.Value1[] = []; +``` + diff --git a/docs/models/websearchengine.md b/docs/models/websearchengine.md index d1e25e50..13b5ce05 100644 --- a/docs/models/websearchengine.md +++ b/docs/models/websearchengine.md @@ -15,5 +15,5 @@ let value: WebSearchEngine = "native"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"native" | "exa" | Unrecognized +"native" | "exa" | "firecrawl" | "parallel" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/websearchservertool.md b/docs/models/websearchservertool.md new file mode 100644 index 00000000..6cef6e62 --- /dev/null +++ b/docs/models/websearchservertool.md @@ -0,0 +1,20 @@ +# WebSearchServerTool + +OpenRouter built-in server tool: searches the web for current information + +## Example Usage + +```typescript +import { WebSearchServerTool } from "@openrouter/sdk/models"; + +let value: WebSearchServerTool = { + type: "openrouter:web_search", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `type` | *"openrouter:web_search"* | :heavy_check_mark: | N/A | +| `parameters` | [models.WebSearchServerToolParameters](../models/websearchservertoolparameters.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchservertoolengine.md b/docs/models/websearchservertoolengine.md new file mode 100644 index 00000000..1162ddb4 --- /dev/null +++ b/docs/models/websearchservertoolengine.md @@ -0,0 +1,19 @@ +# WebSearchServerToolEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { WebSearchServerToolEngine } from "@openrouter/sdk/models"; + +let value: WebSearchServerToolEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchservertoolparameters.md b/docs/models/websearchservertoolparameters.md new file mode 100644 index 00000000..22b3f8b9 --- /dev/null +++ b/docs/models/websearchservertoolparameters.md @@ -0,0 +1,21 @@ +# WebSearchServerToolParameters + +## Example Usage + +```typescript +import { WebSearchServerToolParameters } from "@openrouter/sdk/models"; + +let value: WebSearchServerToolParameters = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `engine` | [models.WebSearchServerToolEngine](../models/websearchservertoolengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | +| `maxTotalResults` | *number* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. | 20 | +| `searchContextSize` | [models.WebSearchServerToolSearchContextSize](../models/websearchservertoolsearchcontextsize.md) | :heavy_minus_sign: | How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. | | +| `userLocation` | [models.WebSearchServerToolUserLocation](../models/websearchservertooluserlocation.md) | :heavy_minus_sign: | Approximate user location for location-biased results. | | +| `allowedDomains` | *string*[] | :heavy_minus_sign: | Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. | | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. | | \ No newline at end of file diff --git a/docs/models/websearchservertoolparameterstype.md b/docs/models/websearchservertoolparameterstype.md new file mode 100644 index 00000000..a5510cea --- /dev/null +++ b/docs/models/websearchservertoolparameterstype.md @@ -0,0 +1,15 @@ +# WebSearchServerToolParametersType + +## Example Usage + +```typescript +import { WebSearchServerToolParametersType } from "@openrouter/sdk/models"; + +let value: WebSearchServerToolParametersType = "approximate"; +``` + +## Values + +```typescript +"approximate" +``` \ No newline at end of file diff --git a/docs/models/websearchservertoolsearchcontextsize.md b/docs/models/websearchservertoolsearchcontextsize.md new file mode 100644 index 00000000..ff1cd284 --- /dev/null +++ b/docs/models/websearchservertoolsearchcontextsize.md @@ -0,0 +1,19 @@ +# WebSearchServerToolSearchContextSize + +How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + +## Example Usage + +```typescript +import { WebSearchServerToolSearchContextSize } from "@openrouter/sdk/models"; + +let value: WebSearchServerToolSearchContextSize = "medium"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"low" | "medium" | "high" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchservertooluserlocation.md b/docs/models/websearchservertooluserlocation.md new file mode 100644 index 00000000..66d36df4 --- /dev/null +++ b/docs/models/websearchservertooluserlocation.md @@ -0,0 +1,21 @@ +# WebSearchServerToolUserLocation + +Approximate user location for location-biased results. + +## Example Usage + +```typescript +import { WebSearchServerToolUserLocation } from "@openrouter/sdk/models"; + +let value: WebSearchServerToolUserLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `type` | [models.WebSearchServerToolParametersType](../models/websearchservertoolparameterstype.md) | :heavy_minus_sign: | N/A | +| `city` | *string* | :heavy_minus_sign: | N/A | +| `region` | *string* | :heavy_minus_sign: | N/A | +| `country` | *string* | :heavy_minus_sign: | N/A | +| `timezone` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchshorthand.md b/docs/models/websearchshorthand.md new file mode 100644 index 00000000..250945b3 --- /dev/null +++ b/docs/models/websearchshorthand.md @@ -0,0 +1,27 @@ +# WebSearchShorthand + +Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + +## Example Usage + +```typescript +import { WebSearchShorthand } from "@openrouter/sdk/models"; + +let value: WebSearchShorthand = { + type: "web_search_preview", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [models.WebSearchShorthandType](../models/websearchshorthandtype.md) | :heavy_check_mark: | N/A | | +| `engine` | [models.WebSearchShorthandEngine](../models/websearchshorthandengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | +| `maxTotalResults` | *number* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. | 20 | +| `searchContextSize` | [models.WebSearchShorthandSearchContextSize](../models/websearchshorthandsearchcontextsize.md) | :heavy_minus_sign: | How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. | | +| `userLocation` | [models.WebSearchShorthandUserLocation](../models/websearchshorthanduserlocation.md) | :heavy_minus_sign: | Approximate user location for location-biased results. | | +| `allowedDomains` | *string*[] | :heavy_minus_sign: | Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. | | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. | | +| `parameters` | [models.WebSearchShorthandParameters](../models/websearchshorthandparameters.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/websearchshorthandengine.md b/docs/models/websearchshorthandengine.md new file mode 100644 index 00000000..d237f0bb --- /dev/null +++ b/docs/models/websearchshorthandengine.md @@ -0,0 +1,19 @@ +# WebSearchShorthandEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { WebSearchShorthandEngine } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandparameters.md b/docs/models/websearchshorthandparameters.md new file mode 100644 index 00000000..85bb6c53 --- /dev/null +++ b/docs/models/websearchshorthandparameters.md @@ -0,0 +1,21 @@ +# WebSearchShorthandParameters + +## Example Usage + +```typescript +import { WebSearchShorthandParameters } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandParameters = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `engine` | [models.WebSearchShorthandParametersEngine](../models/websearchshorthandparametersengine.md) | :heavy_minus_sign: | Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. | auto | +| `maxResults` | *number* | :heavy_minus_sign: | Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. | 5 | +| `maxTotalResults` | *number* | :heavy_minus_sign: | Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. | 20 | +| `searchContextSize` | [models.WebSearchShorthandParametersSearchContextSize](../models/websearchshorthandparameterssearchcontextsize.md) | :heavy_minus_sign: | How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. | | +| `userLocation` | [models.WebSearchShorthandParametersUserLocation](../models/websearchshorthandparametersuserlocation.md) | :heavy_minus_sign: | Approximate user location for location-biased results. | | +| `allowedDomains` | *string*[] | :heavy_minus_sign: | Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. | | +| `excludedDomains` | *string*[] | :heavy_minus_sign: | Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. | | \ No newline at end of file diff --git a/docs/models/websearchshorthandparametersengine.md b/docs/models/websearchshorthandparametersengine.md new file mode 100644 index 00000000..b193c34b --- /dev/null +++ b/docs/models/websearchshorthandparametersengine.md @@ -0,0 +1,19 @@ +# WebSearchShorthandParametersEngine + +Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + +## Example Usage + +```typescript +import { WebSearchShorthandParametersEngine } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandParametersEngine = "auto"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "native" | "exa" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandparameterssearchcontextsize.md b/docs/models/websearchshorthandparameterssearchcontextsize.md new file mode 100644 index 00000000..fa288575 --- /dev/null +++ b/docs/models/websearchshorthandparameterssearchcontextsize.md @@ -0,0 +1,19 @@ +# WebSearchShorthandParametersSearchContextSize + +How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + +## Example Usage + +```typescript +import { WebSearchShorthandParametersSearchContextSize } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandParametersSearchContextSize = "low"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"low" | "medium" | "high" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandparameterstype.md b/docs/models/websearchshorthandparameterstype.md new file mode 100644 index 00000000..082ce2e9 --- /dev/null +++ b/docs/models/websearchshorthandparameterstype.md @@ -0,0 +1,15 @@ +# WebSearchShorthandParametersType + +## Example Usage + +```typescript +import { WebSearchShorthandParametersType } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandParametersType = "approximate"; +``` + +## Values + +```typescript +"approximate" +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandparametersuserlocation.md b/docs/models/websearchshorthandparametersuserlocation.md new file mode 100644 index 00000000..3050b388 --- /dev/null +++ b/docs/models/websearchshorthandparametersuserlocation.md @@ -0,0 +1,21 @@ +# WebSearchShorthandParametersUserLocation + +Approximate user location for location-biased results. + +## Example Usage + +```typescript +import { WebSearchShorthandParametersUserLocation } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandParametersUserLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | [models.WebSearchShorthandParametersType](../models/websearchshorthandparameterstype.md) | :heavy_minus_sign: | N/A | +| `city` | *string* | :heavy_minus_sign: | N/A | +| `region` | *string* | :heavy_minus_sign: | N/A | +| `country` | *string* | :heavy_minus_sign: | N/A | +| `timezone` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchshorthandsearchcontextsize.md b/docs/models/websearchshorthandsearchcontextsize.md new file mode 100644 index 00000000..2b8d572c --- /dev/null +++ b/docs/models/websearchshorthandsearchcontextsize.md @@ -0,0 +1,19 @@ +# WebSearchShorthandSearchContextSize + +How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + +## Example Usage + +```typescript +import { WebSearchShorthandSearchContextSize } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandSearchContextSize = "high"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"low" | "medium" | "high" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandtype.md b/docs/models/websearchshorthandtype.md new file mode 100644 index 00000000..97342d19 --- /dev/null +++ b/docs/models/websearchshorthandtype.md @@ -0,0 +1,17 @@ +# WebSearchShorthandType + +## Example Usage + +```typescript +import { WebSearchShorthandType } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandType = "web_search_2025_08_26"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"web_search" | "web_search_preview" | "web_search_preview_2025_03_11" | "web_search_2025_08_26" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/websearchshorthandtypeapproximate.md b/docs/models/websearchshorthandtypeapproximate.md new file mode 100644 index 00000000..a1d3b1eb --- /dev/null +++ b/docs/models/websearchshorthandtypeapproximate.md @@ -0,0 +1,15 @@ +# WebSearchShorthandTypeApproximate + +## Example Usage + +```typescript +import { WebSearchShorthandTypeApproximate } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandTypeApproximate = "approximate"; +``` + +## Values + +```typescript +"approximate" +``` \ No newline at end of file diff --git a/docs/models/websearchshorthanduserlocation.md b/docs/models/websearchshorthanduserlocation.md new file mode 100644 index 00000000..3012ff82 --- /dev/null +++ b/docs/models/websearchshorthanduserlocation.md @@ -0,0 +1,21 @@ +# WebSearchShorthandUserLocation + +Approximate user location for location-biased results. + +## Example Usage + +```typescript +import { WebSearchShorthandUserLocation } from "@openrouter/sdk/models"; + +let value: WebSearchShorthandUserLocation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `type` | [models.WebSearchShorthandTypeApproximate](../models/websearchshorthandtypeapproximate.md) | :heavy_minus_sign: | N/A | +| `city` | *string* | :heavy_minus_sign: | N/A | +| `region` | *string* | :heavy_minus_sign: | N/A | +| `country` | *string* | :heavy_minus_sign: | N/A | +| `timezone` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 116c41d9..d74a2206 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -20,7 +20,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -45,7 +46,8 @@ import { analyticsGetUserActivity } from "@openrouter/sdk/funcs/analyticsGetUser // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index a21f2384..d5424399 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -25,7 +25,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -50,7 +51,8 @@ import { apiKeysList } from "@openrouter/sdk/funcs/apiKeysList.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -101,7 +103,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -130,7 +133,8 @@ import { apiKeysCreate } from "@openrouter/sdk/funcs/apiKeysCreate.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -186,7 +190,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -214,7 +219,8 @@ import { apiKeysUpdate } from "@openrouter/sdk/funcs/apiKeysUpdate.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -270,7 +276,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -297,7 +304,8 @@ import { apiKeysDelete } from "@openrouter/sdk/funcs/apiKeysDelete.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -351,7 +359,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -378,7 +387,8 @@ import { apiKeysGet } from "@openrouter/sdk/funcs/apiKeysGet.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -432,7 +442,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -457,7 +468,8 @@ import { apiKeysGetCurrentKeyMetadata } from "@openrouter/sdk/funcs/apiKeysGetCu // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index e53280e2..dba6c3a4 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -18,7 +18,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -57,7 +58,8 @@ import { chatSend } from "@openrouter/sdk/funcs/chatSend.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md index cff81afb..ee5a6600 100644 --- a/docs/sdks/credits/README.md +++ b/docs/sdks/credits/README.md @@ -21,7 +21,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -46,7 +47,8 @@ import { creditsGetCredits } from "@openrouter/sdk/funcs/creditsGetCredits.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -97,7 +99,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", }); async function run() { @@ -129,7 +132,8 @@ import { creditsCreateCoinbaseCharge } from "@openrouter/sdk/funcs/creditsCreate // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", }); async function run() { diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md index 075ad6e0..286acc1a 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -21,7 +21,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -51,7 +52,8 @@ import { embeddingsGenerate } from "@openrouter/sdk/funcs/embeddingsGenerate.js" // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -114,7 +116,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -139,7 +142,8 @@ import { embeddingsListModels } from "@openrouter/sdk/funcs/embeddingsListModels // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/endpoints/README.md b/docs/sdks/endpoints/README.md index fbf861e8..6e24546b 100644 --- a/docs/sdks/endpoints/README.md +++ b/docs/sdks/endpoints/README.md @@ -21,7 +21,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -49,7 +50,8 @@ import { endpointsList } from "@openrouter/sdk/funcs/endpointsList.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -102,7 +104,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -127,7 +130,8 @@ import { endpointsListZdrEndpoints } from "@openrouter/sdk/funcs/endpointsListZd // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/generations/README.md b/docs/sdks/generations/README.md index cdd2319d..0667b057 100644 --- a/docs/sdks/generations/README.md +++ b/docs/sdks/generations/README.md @@ -20,7 +20,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -47,7 +48,8 @@ import { generationsGetGeneration } from "@openrouter/sdk/funcs/generationsGetGe // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md index 657c2430..e55ef8b0 100644 --- a/docs/sdks/guardrails/README.md +++ b/docs/sdks/guardrails/README.md @@ -32,7 +32,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -57,7 +58,8 @@ import { guardrailsList } from "@openrouter/sdk/funcs/guardrailsList.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -107,7 +109,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -136,7 +139,8 @@ import { guardrailsCreate } from "@openrouter/sdk/funcs/guardrailsCreate.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -191,7 +195,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -218,7 +223,8 @@ import { guardrailsGet } from "@openrouter/sdk/funcs/guardrailsGet.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -271,7 +277,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -299,7 +306,8 @@ import { guardrailsUpdate } from "@openrouter/sdk/funcs/guardrailsUpdate.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -354,7 +362,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -381,7 +390,8 @@ import { guardrailsDelete } from "@openrouter/sdk/funcs/guardrailsDelete.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -434,7 +444,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -459,7 +470,8 @@ import { guardrailsListKeyAssignments } from "@openrouter/sdk/funcs/guardrailsLi // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -509,7 +521,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -534,7 +547,8 @@ import { guardrailsListMemberAssignments } from "@openrouter/sdk/funcs/guardrail // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -584,7 +598,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -611,7 +626,8 @@ import { guardrailsListGuardrailKeyAssignments } from "@openrouter/sdk/funcs/gua // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -664,7 +680,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -696,7 +713,8 @@ import { guardrailsBulkAssignKeys } from "@openrouter/sdk/funcs/guardrailsBulkAs // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -755,7 +773,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -782,7 +801,8 @@ import { guardrailsListGuardrailMemberAssignments } from "@openrouter/sdk/funcs/ // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -835,7 +855,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -868,7 +889,8 @@ import { guardrailsBulkAssignMembers } from "@openrouter/sdk/funcs/guardrailsBul // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -928,7 +950,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -960,7 +983,8 @@ import { guardrailsBulkUnassignKeys } from "@openrouter/sdk/funcs/guardrailsBulk // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -1019,7 +1043,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -1052,7 +1077,8 @@ import { guardrailsBulkUnassignMembers } from "@openrouter/sdk/funcs/guardrailsB // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 97780185..2e4d0e64 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -22,7 +22,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -47,7 +48,8 @@ import { modelsCount } from "@openrouter/sdk/funcs/modelsCount.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -81,6 +83,7 @@ run(); | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -96,7 +99,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -121,7 +125,8 @@ import { modelsList } from "@openrouter/sdk/funcs/modelsList.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -171,7 +176,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", }); async function run() { @@ -197,7 +203,8 @@ import { modelsListForUser } from "@openrouter/sdk/funcs/modelsListForUser.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", }); async function run() { diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md index 18616680..c3e6fb2b 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -21,7 +21,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -50,7 +51,8 @@ import { oAuthExchangeAuthCodeForAPIKey } from "@openrouter/sdk/funcs/oAuthExcha // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -105,7 +107,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -134,7 +137,8 @@ import { oAuthCreateAuthCode } from "@openrouter/sdk/funcs/oAuthCreateAuthCode.j // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -174,5 +178,6 @@ run(); | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ConflictResponseError | 409 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/providers/README.md b/docs/sdks/providers/README.md index 370e1325..fe849dc3 100644 --- a/docs/sdks/providers/README.md +++ b/docs/sdks/providers/README.md @@ -20,7 +20,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -45,7 +46,8 @@ import { providersList } from "@openrouter/sdk/funcs/providersList.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index c52f6d36..09830f2e 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -20,7 +20,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); @@ -47,7 +48,8 @@ import { betaResponsesSend } from "@openrouter/sdk/funcs/betaResponsesSend.js"; // You can create one instance of it to use across an application. const openRouter = new OpenRouterCore({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/examples/betaResponsesSend.example.ts b/examples/betaResponsesSend.example.ts index dee3ed67..104c49cc 100644 --- a/examples/betaResponsesSend.example.ts +++ b/examples/betaResponsesSend.example.ts @@ -16,7 +16,8 @@ import { OpenRouter } from "@openrouter/sdk"; const openRouter = new OpenRouter({ httpReferer: "", - xTitle: "", + appTitle: "", + appCategories: "", apiKey: process.env["OPENROUTER_API_KEY"] ?? "", }); diff --git a/jsr.json b/jsr.json index 3af9b507..4d688aa6 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.9.11", + "version": "0.11.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 5d8b42f8..0d8d135f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.9.11", + "version": "0.11.0", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ @@ -66,13 +66,16 @@ }, "scripts": { "lint": "eslint --cache --max-warnings=0 src", + "compile": "tsc", "build": "tsc", "typecheck": "tsc --noEmit", "prepublishOnly": "npm run build", "postinstall": "node scripts/check-types.js || true", "test": "vitest --run --project unit", "test:e2e": "vitest --run --project e2e", - "test:watch": "vitest --watch --project unit" + "test:watch": "vitest --watch --project unit", + "typecheck:transit": "exit 0", + "test:transit": "exit 0" }, "peerDependencies": {}, "devDependencies": { @@ -87,6 +90,5 @@ }, "dependencies": { "zod": "^3.25.0 || ^4.0.0" - }, - "packageManager": "pnpm@10.22.0" + } } diff --git a/src/funcs/analyticsGetUserActivity.ts b/src/funcs/analyticsGetUserActivity.ts index a342403b..3fb172c2 100644 --- a/src/funcs/analyticsGetUserActivity.ts +++ b/src/funcs/analyticsGetUserActivity.ts @@ -109,9 +109,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysCreate.ts b/src/funcs/apiKeysCreate.ts index baa091dc..15302b5b 100644 --- a/src/funcs/apiKeysCreate.ts +++ b/src/funcs/apiKeysCreate.ts @@ -105,9 +105,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysDelete.ts b/src/funcs/apiKeysDelete.ts index c8b8a782..b25c9e33 100644 --- a/src/funcs/apiKeysDelete.ts +++ b/src/funcs/apiKeysDelete.ts @@ -111,9 +111,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysGet.ts b/src/funcs/apiKeysGet.ts index 980213ce..d651712f 100644 --- a/src/funcs/apiKeysGet.ts +++ b/src/funcs/apiKeysGet.ts @@ -111,9 +111,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysGetCurrentKeyMetadata.ts b/src/funcs/apiKeysGetCurrentKeyMetadata.ts index 0e7f87e5..56890099 100644 --- a/src/funcs/apiKeysGetCurrentKeyMetadata.ts +++ b/src/funcs/apiKeysGetCurrentKeyMetadata.ts @@ -101,9 +101,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysList.ts b/src/funcs/apiKeysList.ts index 6abc8f05..8b2d00b5 100644 --- a/src/funcs/apiKeysList.ts +++ b/src/funcs/apiKeysList.ts @@ -107,9 +107,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/apiKeysUpdate.ts b/src/funcs/apiKeysUpdate.ts index 93d4e6ee..fa94c89f 100644 --- a/src/funcs/apiKeysUpdate.ts +++ b/src/funcs/apiKeysUpdate.ts @@ -114,9 +114,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/betaResponsesSend.ts b/src/funcs/betaResponsesSend.ts index ab899db5..ebc3f281 100644 --- a/src/funcs/betaResponsesSend.ts +++ b/src/funcs/betaResponsesSend.ts @@ -223,9 +223,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/call-model.ts b/src/funcs/call-model.ts index b57515ec..3493cd80 100644 --- a/src/funcs/call-model.ts +++ b/src/funcs/call-model.ts @@ -119,11 +119,14 @@ export type { CallModelInput } from '../lib/async-params.js'; * * Default: `stepCountIs(5)` if not specified */ -export function callModel( +export function callModel< + TTools extends readonly Tool[], + TExternal extends Record = Record, +>( client: OpenRouterCore, - request: CallModelInput, + request: CallModelInput, options?: RequestOptions, -): ModelResult { +): ModelResult { // Destructure state management options along with tools and stopWhen const { tools, @@ -132,6 +135,9 @@ export function callModel( requireApproval, approveToolCalls, rejectToolCalls, + external, + onTurnStart, + onTurnEnd, ...apiRequest } = request; @@ -149,7 +155,7 @@ export function callModel( finalRequest['tools'] = apiTools; } - return new ModelResult({ + return new ModelResult({ client, request: finalRequest, options: options ?? {}, @@ -160,5 +166,8 @@ export function callModel( ...(requireApproval !== undefined && { requireApproval }), ...(approveToolCalls !== undefined && { approveToolCalls }), ...(rejectToolCalls !== undefined && { rejectToolCalls }), - } as GetResponseOptions); + ...(external !== undefined && { external }), + ...(onTurnStart !== undefined && { onTurnStart }), + ...(onTurnEnd !== undefined && { onTurnEnd }), + } as GetResponseOptions); } diff --git a/src/funcs/chatSend.ts b/src/funcs/chatSend.ts index b72b43c7..1a442f1c 100644 --- a/src/funcs/chatSend.ts +++ b/src/funcs/chatSend.ts @@ -224,9 +224,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/creditsCreateCoinbaseCharge.ts b/src/funcs/creditsCreateCoinbaseCharge.ts index 2d44a53e..702ad6f5 100644 --- a/src/funcs/creditsCreateCoinbaseCharge.ts +++ b/src/funcs/creditsCreateCoinbaseCharge.ts @@ -111,9 +111,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/creditsGetCredits.ts b/src/funcs/creditsGetCredits.ts index a0941e9b..81708b67 100644 --- a/src/funcs/creditsGetCredits.ts +++ b/src/funcs/creditsGetCredits.ts @@ -103,9 +103,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/embeddingsGenerate.ts b/src/funcs/embeddingsGenerate.ts index e4884aea..0b51ab86 100644 --- a/src/funcs/embeddingsGenerate.ts +++ b/src/funcs/embeddingsGenerate.ts @@ -117,9 +117,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/embeddingsListModels.ts b/src/funcs/embeddingsListModels.ts index 0294a4c9..03ed629f 100644 --- a/src/funcs/embeddingsListModels.ts +++ b/src/funcs/embeddingsListModels.ts @@ -104,9 +104,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/endpointsList.ts b/src/funcs/endpointsList.ts index 33c00b33..5e77a906 100644 --- a/src/funcs/endpointsList.ts +++ b/src/funcs/endpointsList.ts @@ -108,9 +108,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/endpointsListZdrEndpoints.ts b/src/funcs/endpointsListZdrEndpoints.ts index e6aacef3..2b319a71 100644 --- a/src/funcs/endpointsListZdrEndpoints.ts +++ b/src/funcs/endpointsListZdrEndpoints.ts @@ -96,9 +96,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/generationsGetGeneration.ts b/src/funcs/generationsGetGeneration.ts index d8d9f13d..8e6648d6 100644 --- a/src/funcs/generationsGetGeneration.ts +++ b/src/funcs/generationsGetGeneration.ts @@ -113,9 +113,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsBulkAssignKeys.ts b/src/funcs/guardrailsBulkAssignKeys.ts index d02a781d..cd6e8a23 100644 --- a/src/funcs/guardrailsBulkAssignKeys.ts +++ b/src/funcs/guardrailsBulkAssignKeys.ts @@ -113,9 +113,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsBulkAssignMembers.ts b/src/funcs/guardrailsBulkAssignMembers.ts index 407f2b21..288819de 100644 --- a/src/funcs/guardrailsBulkAssignMembers.ts +++ b/src/funcs/guardrailsBulkAssignMembers.ts @@ -115,9 +115,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsBulkUnassignKeys.ts b/src/funcs/guardrailsBulkUnassignKeys.ts index 677a22eb..3eee1a5b 100644 --- a/src/funcs/guardrailsBulkUnassignKeys.ts +++ b/src/funcs/guardrailsBulkUnassignKeys.ts @@ -117,9 +117,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsBulkUnassignMembers.ts b/src/funcs/guardrailsBulkUnassignMembers.ts index a622b664..0d2c126d 100644 --- a/src/funcs/guardrailsBulkUnassignMembers.ts +++ b/src/funcs/guardrailsBulkUnassignMembers.ts @@ -117,9 +117,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsCreate.ts b/src/funcs/guardrailsCreate.ts index 7fa76ecc..ec426bd1 100644 --- a/src/funcs/guardrailsCreate.ts +++ b/src/funcs/guardrailsCreate.ts @@ -103,9 +103,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsDelete.ts b/src/funcs/guardrailsDelete.ts index ae39fb95..a12462a3 100644 --- a/src/funcs/guardrailsDelete.ts +++ b/src/funcs/guardrailsDelete.ts @@ -109,9 +109,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsGet.ts b/src/funcs/guardrailsGet.ts index fc214264..18d734c3 100644 --- a/src/funcs/guardrailsGet.ts +++ b/src/funcs/guardrailsGet.ts @@ -109,9 +109,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsList.ts b/src/funcs/guardrailsList.ts index 3b67c71e..e181e7f4 100644 --- a/src/funcs/guardrailsList.ts +++ b/src/funcs/guardrailsList.ts @@ -106,9 +106,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsListGuardrailKeyAssignments.ts b/src/funcs/guardrailsListGuardrailKeyAssignments.ts index c8b53df7..07d1b9bd 100644 --- a/src/funcs/guardrailsListGuardrailKeyAssignments.ts +++ b/src/funcs/guardrailsListGuardrailKeyAssignments.ts @@ -115,9 +115,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsListGuardrailMemberAssignments.ts b/src/funcs/guardrailsListGuardrailMemberAssignments.ts index 2001f54a..33db238f 100644 --- a/src/funcs/guardrailsListGuardrailMemberAssignments.ts +++ b/src/funcs/guardrailsListGuardrailMemberAssignments.ts @@ -117,9 +117,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsListKeyAssignments.ts b/src/funcs/guardrailsListKeyAssignments.ts index 1c3543cf..b1f56504 100644 --- a/src/funcs/guardrailsListKeyAssignments.ts +++ b/src/funcs/guardrailsListKeyAssignments.ts @@ -108,9 +108,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsListMemberAssignments.ts b/src/funcs/guardrailsListMemberAssignments.ts index 8e018ce7..44f3e6f2 100644 --- a/src/funcs/guardrailsListMemberAssignments.ts +++ b/src/funcs/guardrailsListMemberAssignments.ts @@ -108,9 +108,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/guardrailsUpdate.ts b/src/funcs/guardrailsUpdate.ts index 4b1d487e..3a7f4e30 100644 --- a/src/funcs/guardrailsUpdate.ts +++ b/src/funcs/guardrailsUpdate.ts @@ -112,9 +112,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/modelsCount.ts b/src/funcs/modelsCount.ts index c23a5dd4..37341fe9 100644 --- a/src/funcs/modelsCount.ts +++ b/src/funcs/modelsCount.ts @@ -4,7 +4,7 @@ */ import { OpenRouterCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -37,6 +37,7 @@ export function modelsCount( ): APIPromise< Result< models.ModelsCountResponse, + | errors.BadRequestResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -63,6 +64,7 @@ async function $do( [ Result< models.ModelsCountResponse, + | errors.BadRequestResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -90,6 +92,10 @@ async function $do( const path = pathToFunc("/models/count")(); + const query = encodeFormQuery({ + "output_modalities": payload?.output_modalities, + }); + const headers = new Headers(compactMap({ Accept: "application/json", "HTTP-Referer": encodeSimple( @@ -97,9 +103,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); @@ -129,6 +140,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + query: query, body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, @@ -140,7 +152,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "500", "5XX"], + errorCodes: ["400", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -155,6 +167,7 @@ async function $do( const [result] = await M.match< models.ModelsCountResponse, + | errors.BadRequestResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -166,6 +179,7 @@ async function $do( | SDKValidationError >( M.json(200, models.ModelsCountResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), diff --git a/src/funcs/modelsList.ts b/src/funcs/modelsList.ts index 63fb4744..fcae3864 100644 --- a/src/funcs/modelsList.ts +++ b/src/funcs/modelsList.ts @@ -94,6 +94,7 @@ async function $do( const query = encodeFormQuery({ "category": payload?.category, + "output_modalities": payload?.output_modalities, "supported_parameters": payload?.supported_parameters, }); @@ -104,9 +105,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/modelsListForUser.ts b/src/funcs/modelsListForUser.ts index 241bf039..9b406a7f 100644 --- a/src/funcs/modelsListForUser.ts +++ b/src/funcs/modelsListForUser.ts @@ -107,9 +107,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/oAuthCreateAuthCode.ts b/src/funcs/oAuthCreateAuthCode.ts index 16ff8e65..deb51c7d 100644 --- a/src/funcs/oAuthCreateAuthCode.ts +++ b/src/funcs/oAuthCreateAuthCode.ts @@ -41,6 +41,7 @@ export function oAuthCreateAuthCode( operations.CreateAuthKeysCodeResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -69,6 +70,7 @@ async function $do( operations.CreateAuthKeysCodeResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -103,9 +105,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); @@ -146,7 +153,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "4XX", "500", "5XX"], + errorCodes: ["400", "401", "409", "4XX", "500", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -163,6 +170,7 @@ async function $do( operations.CreateAuthKeysCodeResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError + | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError @@ -176,6 +184,7 @@ async function $do( M.json(200, operations.CreateAuthKeysCodeResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"), diff --git a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts index ee85e68d..ba520ded 100644 --- a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts +++ b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts @@ -104,9 +104,14 @@ async function $do( payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/funcs/providersList.ts b/src/funcs/providersList.ts index feca6bfe..f37022cd 100644 --- a/src/funcs/providersList.ts +++ b/src/funcs/providersList.ts @@ -96,9 +96,14 @@ async function $do( payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }, ), - "X-Title": encodeSimple( - "X-Title", - payload?.["X-Title"] ?? client._options.xTitle, + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }, ), })); diff --git a/src/index.ts b/src/index.ts index dc26bf52..ab3dfbc4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,20 +1,44 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7d15e20e3c5 */ -// Async params support -export type { - CallModelInput, - CallModelInputWithState, - FieldOrAsyncFunction, - ResolvedCallModelInput, -} from './lib/async-params.js'; -export type { Fetcher, HTTPClientOptions } from './lib/http.js'; -// Tool types +// Message format compatibility helpers +export { fromClaudeMessages, toClaudeMessage } from "./lib/anthropic-compat.js"; +export { hasAsyncFunctions, resolveAsyncFunctions } from "./lib/async-params.js"; +export type { CallModelInput, CallModelInputWithState, ResolvedCallModelInput } from "./lib/async-params.js"; +export { fromChatMessages, toChatMessage } from "./lib/chat-compat.js"; +// Claude constants and type guards +export { ClaudeContentBlockType, NonClaudeMessageRole } from "./lib/claude-constants.js"; +export { isClaudeStyleMessages } from "./lib/claude-type-guards.js"; +export * from "./lib/config.js"; +export * as files from "./lib/files.js"; +export { HTTPClient } from "./lib/http.js"; +export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; +// Next turn params helpers +export { applyNextTurnParamsToRequest, buildNextTurnParamsContext, executeNextTurnParamsFunctions } from "./lib/next-turn-params.js"; +// Stop condition helpers +export { finishReasonIs, hasToolCall, isStopConditionMet, maxCost, maxTokensUsed, stepCountIs } from "./lib/stop-conditions.js"; +export { extractUnsupportedContent, getUnsupportedContentSummary, hasUnsupportedContent } from "./lib/stream-transformers.js"; +// Tool creation helpers +export { tool } from "./lib/tool.js"; +export { + hasApprovalRequiredTools, + hasExecuteFunction, + isGeneratorTool, + isRegularExecuteTool, + isToolPreliminaryResultEvent, + isToolResultEvent, + isTurnEndEvent, + isTurnStartEvent, + toolHasApprovalConfigured, + ToolType, +} from "./lib/tool-types.js"; export type { ChatStreamEvent, ConversationState, ConversationStatus, + ResponseStreamEvent, ResponseStreamEvent as EnhancedResponseStreamEvent, HasApprovalTools, InferToolEvent, @@ -42,88 +66,15 @@ export type { ToolWithExecute, ToolWithGenerator, TurnContext, + TurnEndEvent, + TurnStartEvent, TypedToolCall, TypedToolCallUnion, UnsentToolResult, Warning, -} from './lib/tool-types.js'; -export type { BuildTurnContextOptions } from './lib/turn-context.js'; -// Claude message types -export type { - ClaudeBase64ImageSource, - ClaudeCacheControl, - ClaudeCitationCharLocation, - ClaudeCitationContentBlockLocation, - ClaudeCitationPageLocation, - ClaudeCitationSearchResultLocation, - ClaudeCitationWebSearchResultLocation, - ClaudeContentBlock, - ClaudeContentBlockParam, - ClaudeImageBlockParam, - ClaudeMessage, - ClaudeMessageParam, - ClaudeRedactedThinkingBlock, - ClaudeServerToolUseBlock, - ClaudeStopReason, - ClaudeTextBlock, - ClaudeTextBlockParam, - ClaudeTextCitation, - ClaudeThinkingBlock, - ClaudeToolResultBlockParam, - ClaudeToolUseBlock, - ClaudeToolUseBlockParam, - ClaudeURLImageSource, - ClaudeUsage, -} from './models/claude-message.js'; - -// Message format compatibility helpers -export { fromClaudeMessages, toClaudeMessage } from './lib/anthropic-compat.js'; -export { - hasAsyncFunctions, - resolveAsyncFunctions, -} from './lib/async-params.js'; -export { fromChatMessages, toChatMessage } from './lib/chat-compat.js'; -// Claude constants and type guards -export { ClaudeContentBlockType, NonClaudeMessageRole } from './lib/claude-constants.js'; -export { isClaudeStyleMessages } from './lib/claude-type-guards.js'; -export * from './lib/config.js'; -export * as files from './lib/files.js'; -export { HTTPClient } from './lib/http.js'; -// Next turn params helpers -export { - applyNextTurnParamsToRequest, - buildNextTurnParamsContext, - executeNextTurnParamsFunctions, -} from './lib/next-turn-params.js'; -// Stop condition helpers -export { - finishReasonIs, - hasToolCall, - isStopConditionMet, - maxCost, - maxTokensUsed, - stepCountIs, -} from './lib/stop-conditions.js'; -export { - extractUnsupportedContent, - getUnsupportedContentSummary, - hasUnsupportedContent, -} from './lib/stream-transformers.js'; -export type { StreamableOutputItem } from './lib/stream-transformers.js'; -// Tool creation helpers -export { tool } from './lib/tool.js'; -export { - hasApprovalRequiredTools, - hasExecuteFunction, - isGeneratorTool, - isRegularExecuteTool, - isToolPreliminaryResultEvent, - isToolResultEvent, - toolHasApprovalConfigured, - ToolType, -} from './lib/tool-types.js'; +} from "./lib/tool-types.js"; // Turn context helpers -export { buildTurnContext, normalizeInputToArray } from './lib/turn-context.js'; +export { buildTurnContext, normalizeInputToArray } from "./lib/turn-context.js"; // Conversation state helpers export { appendToMessages, @@ -134,7 +85,7 @@ export { partitionToolCalls, toolRequiresApproval, updateState, -} from './lib/conversation-state.js'; +} from "./lib/conversation-state.js"; // Real-time tool event broadcasting -export { ToolEventBroadcaster } from './lib/tool-event-broadcaster.js'; -export * from './sdk/sdk.js'; +export { ToolEventBroadcaster } from "./lib/tool-event-broadcaster.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/anthropic-compat.test.ts b/src/lib/anthropic-compat.test.ts index 731e59ec..ac414b78 100644 --- a/src/lib/anthropic-compat.test.ts +++ b/src/lib/anthropic-compat.test.ts @@ -1,6 +1,8 @@ -import { describe, expect, it } from "vitest"; -import { fromClaudeMessages, toClaudeMessage } from "./anthropic-compat.js"; -import type * as models from "../models/index.js"; +import type { ClaudeMessageParam } from '../models/claude-message.js'; +import type * as models from '../models/index.js'; + +import { describe, expect, it } from 'vitest'; +import { fromClaudeMessages, toClaudeMessage } from './anthropic-compat.js'; /** * Creates a properly typed mock OpenResponsesNonStreamingResponse for testing. @@ -8,96 +10,141 @@ import type * as models from "../models/index.js"; */ function createMockResponse( overrides: Partial & { - output: models.OpenResponsesNonStreamingResponse["output"]; - } + output: models.OpenResponsesNonStreamingResponse['output']; + }, ): models.OpenResponsesNonStreamingResponse { return { - id: "resp_test", - object: "response", + id: 'resp_test', + object: 'response', createdAt: Date.now(), completedAt: Date.now(), - model: "openai/gpt-4", - status: "completed", + model: 'openai/gpt-4', + status: 'completed', error: null, incompleteDetails: null, temperature: null, topP: null, presencePenalty: null, frequencyPenalty: null, + instructions: null, metadata: null, tools: [], - toolChoice: "auto", + toolChoice: 'auto', parallelToolCalls: false, ...overrides, }; } -describe("fromClaudeMessages", () => { - describe("basic message conversion", () => { - it("converts user message with string content", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ - { role: "user", content: "Hello, how are you?" }, +describe('fromClaudeMessages', () => { + describe('basic message conversion', () => { + it('converts user message with string content', () => { + const claudeMessages: ClaudeMessageParam[] = [ + { + role: 'user', + content: 'Hello, how are you?', + }, ]; const result = fromClaudeMessages(claudeMessages); expect(result).toEqual([ - { role: "user", content: "Hello, how are you?" }, + { + role: 'user', + content: 'Hello, how are you?', + }, ]); }); - it("converts assistant message with string content", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ - { role: "assistant", content: "I am doing well, thank you!" }, + it('converts assistant message with string content', () => { + const claudeMessages: ClaudeMessageParam[] = [ + { + role: 'assistant', + content: 'I am doing well, thank you!', + }, ]; const result = fromClaudeMessages(claudeMessages); expect(result).toEqual([ - { role: "assistant", content: "I am doing well, thank you!" }, + { + role: 'assistant', + content: 'I am doing well, thank you!', + }, ]); }); - it("converts multiple messages in conversation", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ - { role: "user", content: "Hi" }, - { role: "assistant", content: "Hello!" }, - { role: "user", content: "How are you?" }, + it('converts multiple messages in conversation', () => { + const claudeMessages: ClaudeMessageParam[] = [ + { + role: 'user', + content: 'Hi', + }, + { + role: 'assistant', + content: 'Hello!', + }, + { + role: 'user', + content: 'How are you?', + }, ]; const result = fromClaudeMessages(claudeMessages); expect(result).toEqual([ - { role: "user", content: "Hi" }, - { role: "assistant", content: "Hello!" }, - { role: "user", content: "How are you?" }, + { + role: 'user', + content: 'Hi', + }, + { + role: 'assistant', + content: 'Hello!', + }, + { + role: 'user', + content: 'How are you?', + }, ]); }); }); - describe("text block content conversion", () => { - it("converts user message with text block array", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + describe('text block content conversion', () => { + it('converts user message with text block array', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", - content: [{ type: "text", text: "Hello from text block" }], + role: 'user', + content: [ + { + type: 'text', + text: 'Hello from text block', + }, + ], }, ]; const result = fromClaudeMessages(claudeMessages); expect(result).toEqual([ - { role: "user", content: "Hello from text block" }, + { + role: 'user', + content: 'Hello from text block', + }, ]); }); - it("combines multiple text blocks into single content string", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + it('combines multiple text blocks into single content string', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", + role: 'user', content: [ - { type: "text", text: "First part. " }, - { type: "text", text: "Second part." }, + { + type: 'text', + text: 'First part. ', + }, + { + type: 'text', + text: 'Second part.', + }, ], }, ]; @@ -105,21 +152,24 @@ describe("fromClaudeMessages", () => { const result = fromClaudeMessages(claudeMessages); expect(result).toEqual([ - { role: "user", content: "First part. Second part." }, + { + role: 'user', + content: 'First part. Second part.', + }, ]); }); }); - describe("tool_result block conversion", () => { - it("converts tool_result with string content to function_call_output", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + describe('tool_result block conversion', () => { + it('converts tool_result with string content to function_call_output', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", + role: 'user', content: [ { - type: "tool_result", - tool_use_id: "tool_123", - content: "Tool execution result", + type: 'tool_result', + tool_use_id: 'tool_123', + content: 'Tool execution result', }, ], }, @@ -129,24 +179,30 @@ describe("fromClaudeMessages", () => { expect(result).toEqual([ { - type: "function_call_output", - callId: "tool_123", - output: "Tool execution result", + type: 'function_call_output', + callId: 'tool_123', + output: 'Tool execution result', }, ]); }); - it("converts tool_result with text block array to function_call_output", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + it('converts tool_result with text block array to function_call_output', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", + role: 'user', content: [ { - type: "tool_result", - tool_use_id: "tool_456", + type: 'tool_result', + tool_use_id: 'tool_456', content: [ - { type: "text", text: "Result part 1. " }, - { type: "text", text: "Result part 2." }, + { + type: 'text', + text: 'Result part 1. ', + }, + { + type: 'text', + text: 'Result part 2.', + }, ], }, ], @@ -157,25 +213,31 @@ describe("fromClaudeMessages", () => { expect(result).toEqual([ { - type: "function_call_output", - callId: "tool_456", - output: "Result part 1. Result part 2.", + type: 'function_call_output', + callId: 'tool_456', + output: 'Result part 1. Result part 2.', }, ]); }); - it("handles mixed text and tool_result blocks", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + it('handles mixed text and tool_result blocks', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", + role: 'user', content: [ - { type: "text", text: "Here is some context. " }, { - type: "tool_result", - tool_use_id: "tool_789", - content: "Tool output", + type: 'text', + text: 'Here is some context. ', + }, + { + type: 'tool_result', + tool_use_id: 'tool_789', + content: 'Tool output', + }, + { + type: 'text', + text: 'And some more text.', }, - { type: "text", text: "And some more text." }, ], }, ]; @@ -185,27 +247,35 @@ describe("fromClaudeMessages", () => { // Should produce both the text message and the function_call_output expect(result).toEqual([ { - type: "function_call_output", - callId: "tool_789", - output: "Tool output", + type: 'function_call_output', + callId: 'tool_789', + output: 'Tool output', + }, + { + role: 'user', + content: 'Here is some context. And some more text.', }, - { role: "user", content: "Here is some context. And some more text." }, ]); }); }); - describe("tool_use blocks (should be skipped)", () => { - it("skips tool_use blocks as they are output from assistant", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + describe('tool_use blocks (should be skipped)', () => { + it('skips tool_use blocks as they are output from assistant', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "assistant", + role: 'assistant', content: [ - { type: "text", text: "Let me help you with that." }, { - type: "tool_use", - id: "tool_abc", - name: "get_weather", - input: { location: "SF" }, + type: 'text', + text: 'Let me help you with that.', + }, + { + type: 'tool_use', + id: 'tool_abc', + name: 'get_weather', + input: { + location: 'SF', + }, }, ], }, @@ -215,24 +285,30 @@ describe("fromClaudeMessages", () => { // Only the text should be captured, tool_use is from previous response expect(result).toEqual([ - { role: "assistant", content: "Let me help you with that." }, + { + role: 'assistant', + content: 'Let me help you with that.', + }, ]); }); }); - describe("image blocks (should be skipped)", () => { - it("skips image blocks", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ + describe('image blocks (should be skipped)', () => { + it('skips image blocks', () => { + const claudeMessages: ClaudeMessageParam[] = [ { - role: "user", + role: 'user', content: [ - { type: "text", text: "Look at this image:" }, { - type: "image", + type: 'text', + text: 'Look at this image:', + }, + { + type: 'image', source: { - type: "base64", - media_type: "image/png", - data: "base64data...", + type: 'base64', + media_type: 'image/png', + data: 'base64data...', }, }, ], @@ -243,30 +319,44 @@ describe("fromClaudeMessages", () => { // Only the text should be captured expect(result).toEqual([ - { role: "user", content: "Look at this image:" }, + { + role: 'user', + content: 'Look at this image:', + }, ]); }); }); - describe("empty and edge cases", () => { - it("handles empty messages array", () => { + describe('empty and edge cases', () => { + it('handles empty messages array', () => { const result = fromClaudeMessages([]); expect(result).toEqual([]); }); - it("handles message with empty string content", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ - { role: "user", content: "" }, + it('handles message with empty string content', () => { + const claudeMessages: ClaudeMessageParam[] = [ + { + role: 'user', + content: '', + }, ]; const result = fromClaudeMessages(claudeMessages); - expect(result).toEqual([{ role: "user", content: "" }]); + expect(result).toEqual([ + { + role: 'user', + content: '', + }, + ]); }); - it("handles message with empty content array", () => { - const claudeMessages: models.ClaudeMessageParam[] = [ - { role: "user", content: [] }, + it('handles message with empty content array', () => { + const claudeMessages: ClaudeMessageParam[] = [ + { + role: 'user', + content: [], + }, ]; const result = fromClaudeMessages(claudeMessages); @@ -277,21 +367,21 @@ describe("fromClaudeMessages", () => { }); }); -describe("toClaudeMessage", () => { - describe("basic message conversion", () => { - it("converts response with text output to ClaudeMessage", () => { +describe('toClaudeMessage', () => { + describe('basic message conversion', () => { + it('converts response with text output to ClaudeMessage', () => { const response = createMockResponse({ - id: "resp_123", + id: 'resp_123', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', content: [ { - type: "output_text", - text: "Hello! How can I help you?", + type: 'output_text', + text: 'Hello! How can I help you?', annotations: [], }, ], @@ -301,25 +391,29 @@ describe("toClaudeMessage", () => { inputTokens: 10, outputTokens: 20, totalTokens: 30, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toClaudeMessage(response); expect(result).toEqual({ - id: "resp_123", - type: "message", - role: "assistant", - model: "openai/gpt-4", + id: 'resp_123', + type: 'message', + role: 'assistant', + model: 'openai/gpt-4', content: [ { - type: "text", - text: "Hello! How can I help you?", + type: 'text', + text: 'Hello! How can I help you?', }, ], - stop_reason: "end_turn", + stop_reason: 'end_turn', stop_sequence: null, usage: { input_tokens: 10, @@ -331,26 +425,30 @@ describe("toClaudeMessage", () => { }); }); - describe("function call conversion", () => { - it("converts function_call output to tool_use block", () => { + describe('function call conversion', () => { + it('converts function_call output to tool_use block', () => { const response = createMockResponse({ - id: "resp_456", + id: 'resp_456', output: [ { - type: "function_call", - callId: "call_abc", - name: "get_weather", + type: 'function_call', + callId: 'call_abc', + name: 'get_weather', arguments: '{"location":"San Francisco"}', - id: "fc_1", - status: "completed", + id: 'fc_1', + status: 'completed', }, ], usage: { inputTokens: 15, outputTokens: 25, totalTokens: 40, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); @@ -358,41 +456,43 @@ describe("toClaudeMessage", () => { expect(result.content).toEqual([ { - type: "tool_use", - id: "call_abc", - name: "get_weather", - input: { location: "San Francisco" }, + type: 'tool_use', + id: 'call_abc', + name: 'get_weather', + input: { + location: 'San Francisco', + }, }, ]); - expect(result.stop_reason).toBe("tool_use"); + expect(result.stop_reason).toBe('tool_use'); }); }); - describe("reasoning conversion", () => { - it("converts reasoning output to thinking block", () => { + describe('reasoning conversion', () => { + it('converts reasoning output to thinking block', () => { const response = createMockResponse({ - id: "resp_789", - model: "openai/o1", + id: 'resp_789', + model: 'openai/o1', output: [ { - type: "reasoning", - id: "reason_1", + type: 'reasoning', + id: 'reason_1', summary: [ { - type: "summary_text", - text: "I need to think about this carefully...", + type: 'summary_text', + text: 'I need to think about this carefully...', }, ], }, { - id: "msg_2", - type: "message", - role: "assistant", - status: "completed", + id: 'msg_2', + type: 'message', + role: 'assistant', + status: 'completed', content: [ { - type: "output_text", - text: "Here is my answer.", + type: 'output_text', + text: 'Here is my answer.', annotations: [], }, ], @@ -402,8 +502,12 @@ describe("toClaudeMessage", () => { inputTokens: 20, outputTokens: 100, totalTokens: 120, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); @@ -411,57 +515,73 @@ describe("toClaudeMessage", () => { expect(result.content).toEqual([ { - type: "thinking", - thinking: "I need to think about this carefully...", - signature: "", + type: 'thinking', + thinking: 'I need to think about this carefully...', + signature: '', }, { - type: "text", - text: "Here is my answer.", + type: 'text', + text: 'Here is my answer.', }, ]); }); }); - describe("stop reason mapping", () => { - it("maps completed status to end_turn", () => { + describe('stop reason mapping', () => { + it('maps completed status to end_turn', () => { const response = createMockResponse({ - id: "resp_1", + id: 'resp_1', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", - content: [{ type: "output_text", text: "Done", annotations: [] }], + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', + content: [ + { + type: 'output_text', + text: 'Done', + annotations: [], + }, + ], }, ], usage: { inputTokens: 5, outputTokens: 5, totalTokens: 10, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toClaudeMessage(response); - expect(result.stop_reason).toBe("end_turn"); + expect(result.stop_reason).toBe('end_turn'); }); - it("maps incomplete with max_output_tokens to max_tokens", () => { + it('maps incomplete with max_output_tokens to max_tokens', () => { const response = createMockResponse({ - id: "resp_2", - status: "incomplete", - incompleteDetails: { reason: "max_output_tokens" }, + id: 'resp_2', + status: 'incomplete', + incompleteDetails: { + reason: 'max_output_tokens', + }, output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "incomplete", + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'incomplete', content: [ - { type: "output_text", text: "Partial...", annotations: [] }, + { + type: 'output_text', + text: 'Partial...', + annotations: [], + }, ], }, ], @@ -469,53 +589,67 @@ describe("toClaudeMessage", () => { inputTokens: 5, outputTokens: 100, totalTokens: 105, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toClaudeMessage(response); - expect(result.stop_reason).toBe("max_tokens"); + expect(result.stop_reason).toBe('max_tokens'); }); - it("maps response with function calls to tool_use", () => { + it('maps response with function calls to tool_use', () => { const response = createMockResponse({ - id: "resp_3", + id: 'resp_3', output: [ { - type: "function_call", - callId: "call_1", - name: "test_tool", - arguments: "{}", - id: "fc_1", - status: "completed", + type: 'function_call', + callId: 'call_1', + name: 'test_tool', + arguments: '{}', + id: 'fc_1', + status: 'completed', }, ], usage: { inputTokens: 5, outputTokens: 10, totalTokens: 15, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toClaudeMessage(response); - expect(result.stop_reason).toBe("tool_use"); + expect(result.stop_reason).toBe('tool_use'); }); }); - describe("usage mapping", () => { - it("maps usage with cached tokens", () => { + describe('usage mapping', () => { + it('maps usage with cached tokens', () => { const response = createMockResponse({ - id: "resp_1", + id: 'resp_1', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", - content: [{ type: "output_text", text: "OK", annotations: [] }], + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', + content: [ + { + type: 'output_text', + text: 'OK', + annotations: [], + }, + ], }, ], usage: { @@ -525,7 +659,9 @@ describe("toClaudeMessage", () => { inputTokensDetails: { cachedTokens: 80, }, - outputTokensDetails: { reasoningTokens: 0 }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); diff --git a/src/lib/anthropic-compat.ts b/src/lib/anthropic-compat.ts index 57138bcf..cd7a1af7 100644 --- a/src/lib/anthropic-compat.ts +++ b/src/lib/anthropic-compat.ts @@ -1,10 +1,16 @@ import type * as models from '../models/index.js'; +import type { + ClaudeImageBlockParam, + ClaudeMessageParam, + ClaudeTextBlockParam, + ClaudeToolResultBlockParam, + ClaudeToolUseBlockParam, +} from '../models/claude-message.js'; import { OpenResponsesEasyInputMessageRoleAssistant, OpenResponsesEasyInputMessageRoleUser, } from '../models/openresponseseasyinputmessage.js'; -import { OpenResponsesFunctionCallOutputType } from '../models/openresponsesfunctioncalloutput.js'; import { OpenResponsesInputMessageItemRoleUser, OpenResponsesInputMessageItemRoleDeveloper } from '../models/openresponsesinputmessageitem.js'; import { convertToClaudeMessage } from './stream-transformers.js'; @@ -39,7 +45,7 @@ function createFunctionCallOutput( output: string, ): models.OpenResponsesFunctionCallOutput { return { - type: OpenResponsesFunctionCallOutputType.FunctionCallOutput, + type: "function_call_output" as const, callId, output, }; @@ -71,8 +77,8 @@ function createFunctionCallOutput( * ``` */ export function fromClaudeMessages( - messages: models.ClaudeMessageParam[], -): models.OpenResponsesInput { + messages: ClaudeMessageParam[], +): models.OpenResponsesInputUnion { const result: ( | models.OpenResponsesEasyInputMessage | models.OpenResponsesInputMessageItem @@ -90,10 +96,10 @@ export function fromClaudeMessages( } // Separate content blocks into categories for clearer processing - const textBlocks: models.ClaudeTextBlockParam[] = []; - const imageBlocks: models.ClaudeImageBlockParam[] = []; - const toolUseBlocks: models.ClaudeToolUseBlockParam[] = []; - const toolResultBlocks: models.ClaudeToolResultBlockParam[] = []; + const textBlocks: ClaudeTextBlockParam[] = []; + const imageBlocks: ClaudeImageBlockParam[] = []; + const toolUseBlocks: ClaudeToolUseBlockParam[] = []; + const toolResultBlocks: ClaudeToolResultBlockParam[] = []; for (const block of content) { switch (block.type) { @@ -138,7 +144,7 @@ export function fromClaudeMessages( } else { // Extract text and handle images separately const textParts: string[] = []; - const imageParts: models.ClaudeImageBlockParam[] = []; + const imageParts: ClaudeImageBlockParam[] = []; for (const part of toolResultBlock.content) { if (part.type === 'text') { diff --git a/src/lib/async-params.ts b/src/lib/async-params.ts index dc8a918f..ab651f06 100644 --- a/src/lib/async-params.ts +++ b/src/lib/async-params.ts @@ -1,5 +1,6 @@ import type * as models from '../models/index.js'; import type { ParsedToolCall, StateAccessor, StopWhen, Tool, TurnContext } from './tool-types.js'; +import type { OpenResponsesNonStreamingResponse } from '../models/index.js'; // Re-export Tool type for convenience export type { Tool } from './tool-types.js'; @@ -29,18 +30,21 @@ function buildResolvedRequest( /** * A field can be either a value of type T or a function that computes T */ -export type FieldOrAsyncFunction = T | ((context: TurnContext) => T | Promise); +export type FieldOrAsyncFunction = Record> = T | ((context: TurnContext) => T | Promise); /** * Base input type for callModel without approval-related fields */ -type BaseCallModelInput = { +type BaseCallModelInput = Record> = { [K in keyof Omit]?: FieldOrAsyncFunction< - models.OpenResponsesRequest[K] + models.OpenResponsesRequest[K], + TExternal >; } & { tools?: TTools; stopWhen?: StopWhen; + /** External data passed through to TurnContext for use in tool execute and async param functions */ + external?: TExternal; /** * Call-level approval check - overrides tool-level requireApproval setting * Receives the tool call and turn context, can be sync or async @@ -49,6 +53,16 @@ type BaseCallModelInput = { toolCall: ParsedToolCall, context: TurnContext ) => boolean | Promise; + /** + * Callback invoked at the start of each tool execution turn + * Receives the turn context with the current turn number + */ + onTurnStart?: (context: TurnContext) => void | Promise; + /** + * Callback invoked at the end of each tool execution turn + * Receives the turn context and the completed response for that turn + */ + onTurnEnd?: (context: TurnContext, response: OpenResponsesNonStreamingResponse) => void | Promise; }; /** @@ -84,14 +98,14 @@ type ApprovalParamsWithoutState = { * - `approveToolCalls` and `rejectToolCalls` are only valid when `state` is provided * - Using these without `state` will cause a TypeScript error */ -export type CallModelInput = - BaseCallModelInput & (ApprovalParamsWithState | ApprovalParamsWithoutState); +export type CallModelInput = Record> = + BaseCallModelInput & (ApprovalParamsWithState | ApprovalParamsWithoutState); /** * CallModelInput variant that requires state - use when approval workflows are needed */ -export type CallModelInputWithState = - BaseCallModelInput & ApprovalParamsWithState; +export type CallModelInputWithState = Record> = + BaseCallModelInput & ApprovalParamsWithState; /** * Resolved CallModelInput (all functions evaluated to values) @@ -121,9 +135,9 @@ export type ResolvedCallModelInput = Omit( - input: CallModelInput, - context: TurnContext, +export async function resolveAsyncFunctions = Record>( + input: CallModelInput, + context: TurnContext, ): Promise { // Build array of resolved entries const resolvedEntries: Array = []; @@ -135,6 +149,9 @@ export async function resolveAsyncFunctions & { - output: models.OpenResponsesNonStreamingResponse["output"]; - } + output: models.OpenResponsesNonStreamingResponse['output']; + }, ): models.OpenResponsesNonStreamingResponse { return { - id: "resp_test", - object: "response", + id: 'resp_test', + object: 'response', createdAt: Date.now(), completedAt: Date.now(), - model: "openai/gpt-4", - status: "completed", + model: 'openai/gpt-4', + status: 'completed', error: null, incompleteDetails: null, temperature: null, topP: null, presencePenalty: null, frequencyPenalty: null, + instructions: null, metadata: null, tools: [], - toolChoice: "auto", + toolChoice: 'auto', parallelToolCalls: false, ...overrides, }; } -describe("fromChatMessages", () => { - describe("basic message conversion", () => { - it("converts user message with string content", () => { +describe('fromChatMessages', () => { + describe('basic message conversion', () => { + it('converts user message with string content', () => { const messages: models.Message[] = [ - { role: "user", content: "Hello, how are you?" }, + { + role: 'user', + content: 'Hello, how are you?', + }, ]; const result = fromChatMessages(messages); expect(result).toEqual([ - { role: "user", content: "Hello, how are you?" }, + { + role: 'user', + content: 'Hello, how are you?', + }, ]); }); - it("converts assistant message with string content", () => { + it('converts assistant message with string content', () => { const messages: models.Message[] = [ - { role: "assistant", content: "I am doing well, thank you!" }, + { + role: 'assistant', + content: 'I am doing well, thank you!', + }, ]; const result = fromChatMessages(messages); expect(result).toEqual([ - { role: "assistant", content: "I am doing well, thank you!" }, + { + role: 'assistant', + content: 'I am doing well, thank you!', + }, ]); }); - it("converts system message with string content", () => { + it('converts system message with string content', () => { const messages: models.Message[] = [ - { role: "system", content: "You are a helpful assistant." }, + { + role: 'system', + content: 'You are a helpful assistant.', + }, ]; const result = fromChatMessages(messages); expect(result).toEqual([ - { role: "system", content: "You are a helpful assistant." }, + { + role: 'system', + content: 'You are a helpful assistant.', + }, ]); }); - it("converts developer message with string content", () => { + it('converts developer message with string content', () => { const messages: models.Message[] = [ - { role: "developer", content: "Developer instructions here." }, + { + role: 'developer', + content: 'Developer instructions here.', + }, ]; const result = fromChatMessages(messages); expect(result).toEqual([ - { role: "developer", content: "Developer instructions here." }, + { + role: 'developer', + content: 'Developer instructions here.', + }, ]); }); - it("converts multiple messages in conversation", () => { + it('converts multiple messages in conversation', () => { const messages: models.Message[] = [ - { role: "system", content: "You are helpful." }, - { role: "user", content: "Hi" }, - { role: "assistant", content: "Hello!" }, - { role: "user", content: "How are you?" }, + { + role: 'system', + content: 'You are helpful.', + }, + { + role: 'user', + content: 'Hi', + }, + { + role: 'assistant', + content: 'Hello!', + }, + { + role: 'user', + content: 'How are you?', + }, ]; const result = fromChatMessages(messages); expect(result).toEqual([ - { role: "system", content: "You are helpful." }, - { role: "user", content: "Hi" }, - { role: "assistant", content: "Hello!" }, - { role: "user", content: "How are you?" }, + { + role: 'system', + content: 'You are helpful.', + }, + { + role: 'user', + content: 'Hi', + }, + { + role: 'assistant', + content: 'Hello!', + }, + { + role: 'user', + content: 'How are you?', + }, ]); }); }); - describe("tool response message conversion", () => { - it("converts tool message to function_call_output", () => { + describe('tool response message conversion', () => { + it('converts tool message to function_call_output', () => { const messages: models.Message[] = [ { - role: "tool", - content: "The weather is sunny and 72F", - toolCallId: "call_abc123", + role: 'tool', + content: 'The weather is sunny and 72F', + toolCallId: 'call_abc123', }, ]; @@ -115,19 +165,24 @@ describe("fromChatMessages", () => { expect(result).toEqual([ { - type: "function_call_output", - callId: "call_abc123", - output: "The weather is sunny and 72F", + type: 'function_call_output', + callId: 'call_abc123', + output: 'The weather is sunny and 72F', }, ]); }); - it("converts tool message with object content by stringifying", () => { + it('converts tool message with object content by stringifying', () => { const messages: models.Message[] = [ { - role: "tool", - content: [{ type: "text", text: "Structured response" }], - toolCallId: "call_def456", + role: 'tool', + content: [ + { + type: 'text', + text: 'Structured response', + }, + ], + toolCallId: 'call_def456', }, ]; @@ -135,20 +190,30 @@ describe("fromChatMessages", () => { expect(result).toEqual([ { - type: "function_call_output", - callId: "call_def456", - output: JSON.stringify([{ type: "text", text: "Structured response" }]), + type: 'function_call_output', + callId: 'call_def456', + output: JSON.stringify([ + { + type: 'text', + text: 'Structured response', + }, + ]), }, ]); }); }); - describe("content array handling", () => { - it("stringifies array content for user messages", () => { + describe('content array handling', () => { + it('stringifies array content for user messages', () => { const messages: models.Message[] = [ { - role: "user", - content: [{ type: "text", text: "Hello from array" }], + role: 'user', + content: [ + { + type: 'text', + text: 'Hello from array', + }, + ], }, ]; @@ -156,17 +221,27 @@ describe("fromChatMessages", () => { expect(result).toEqual([ { - role: "user", - content: JSON.stringify([{ type: "text", text: "Hello from array" }]), + role: 'user', + content: JSON.stringify([ + { + type: 'text', + text: 'Hello from array', + }, + ]), }, ]); }); - it("stringifies array content for assistant messages", () => { + it('stringifies array content for assistant messages', () => { const messages: models.Message[] = [ { - role: "assistant", - content: [{ type: "text", text: "Response in array" }], + role: 'assistant', + content: [ + { + type: 'text', + text: 'Response in array', + }, + ], }, ]; @@ -174,55 +249,77 @@ describe("fromChatMessages", () => { expect(result).toEqual([ { - role: "assistant", - content: JSON.stringify([{ type: "text", text: "Response in array" }]), + role: 'assistant', + content: JSON.stringify([ + { + type: 'text', + text: 'Response in array', + }, + ]), }, ]); }); }); - describe("null and empty content handling", () => { - it("handles null content in assistant message", () => { + describe('null and empty content handling', () => { + it('handles null content in assistant message', () => { const messages: models.Message[] = [ - { role: "assistant", content: null }, + { + role: 'assistant', + content: null, + }, ]; const result = fromChatMessages(messages); - expect(result).toEqual([{ role: "assistant", content: "" }]); + expect(result).toEqual([ + { + role: 'assistant', + content: '', + }, + ]); }); - it("handles empty string content", () => { - const messages: models.Message[] = [{ role: "user", content: "" }]; + it('handles empty string content', () => { + const messages: models.Message[] = [ + { + role: 'user', + content: '', + }, + ]; const result = fromChatMessages(messages); - expect(result).toEqual([{ role: "user", content: "" }]); + expect(result).toEqual([ + { + role: 'user', + content: '', + }, + ]); }); - it("handles empty messages array", () => { + it('handles empty messages array', () => { const result = fromChatMessages([]); expect(result).toEqual([]); }); }); - }); -describe("toChatMessage", () => { - describe("basic message conversion", () => { - it("converts response with text output to AssistantMessage", () => { +describe('toChatMessage', () => { + describe('basic message conversion', () => { + it('converts response with text output to AssistantMessage', () => { const response = createMockResponse({ - id: "resp_123", + id: 'resp_123', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', content: [ { - type: "output_text", - text: "Hello! How can I help you?", + type: 'output_text', + text: 'Hello! How can I help you?', annotations: [], }, ], @@ -232,31 +329,43 @@ describe("toChatMessage", () => { inputTokens: 10, outputTokens: 20, totalTokens: 30, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toChatMessage(response); expect(result).toEqual({ - role: "assistant", - content: "Hello! How can I help you?", + role: 'assistant', + content: 'Hello! How can I help you?', }); }); - it("combines multiple text parts into single content string", () => { + it('combines multiple text parts into single content string', () => { const response = createMockResponse({ - id: "resp_456", + id: 'resp_456', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', content: [ - { type: "output_text", text: "Part 1. ", annotations: [] }, - { type: "output_text", text: "Part 2.", annotations: [] }, + { + type: 'output_text', + text: 'Part 1. ', + annotations: [], + }, + { + type: 'output_text', + text: 'Part 2.', + annotations: [], + }, ], }, ], @@ -264,28 +373,32 @@ describe("toChatMessage", () => { inputTokens: 5, outputTokens: 10, totalTokens: 15, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toChatMessage(response); expect(result).toEqual({ - role: "assistant", - content: "Part 1. Part 2.", + role: 'assistant', + content: 'Part 1. Part 2.', }); }); - it("returns null content when message has no text", () => { + it('returns null content when message has no text', () => { const response = createMockResponse({ - id: "resp_789", + id: 'resp_789', output: [ { - id: "msg_1", - type: "message", - role: "assistant", - status: "completed", + id: 'msg_1', + type: 'message', + role: 'assistant', + status: 'completed', content: [], }, ], @@ -293,46 +406,52 @@ describe("toChatMessage", () => { inputTokens: 5, outputTokens: 0, totalTokens: 5, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); const result = toChatMessage(response); expect(result).toEqual({ - role: "assistant", + role: 'assistant', content: null, }); }); }); - describe("error handling", () => { - it("throws error when no message found in output", () => { + describe('error handling', () => { + it('throws error when no message found in output', () => { const response = createMockResponse({ - id: "resp_err", + id: 'resp_err', output: [ { - type: "function_call", - callId: "call_1", - name: "test_tool", - arguments: "{}", - id: "fc_1", - status: "completed", + type: 'function_call', + callId: 'call_1', + name: 'test_tool', + arguments: '{}', + id: 'fc_1', + status: 'completed', }, ], usage: { inputTokens: 5, outputTokens: 10, totalTokens: 15, - inputTokensDetails: { cachedTokens: 0 }, - outputTokensDetails: { reasoningTokens: 0 }, + inputTokensDetails: { + cachedTokens: 0, + }, + outputTokensDetails: { + reasoningTokens: 0, + }, }, }); - expect(() => toChatMessage(response)).toThrow( - "No message found in response output" - ); + expect(() => toChatMessage(response)).toThrow('No message found in response output'); }); }); }); diff --git a/src/lib/chat-compat.ts b/src/lib/chat-compat.ts index d852b18a..754c2bf2 100644 --- a/src/lib/chat-compat.ts +++ b/src/lib/chat-compat.ts @@ -5,7 +5,6 @@ import { OpenResponsesEasyInputMessageRoleAssistant, OpenResponsesEasyInputMessageRoleDeveloper, } from "../models/openresponseseasyinputmessage.js"; -import { OpenResponsesFunctionCallOutputType } from "../models/openresponsesfunctioncalloutput.js"; import { extractMessageFromResponse } from "./stream-transformers.js"; /** @@ -85,7 +84,7 @@ function contentToString(content: unknown): string { */ export function fromChatMessages( messages: models.Message[] -): models.OpenResponsesInput { +): models.OpenResponsesInputUnion { return messages.map( ( msg @@ -94,7 +93,7 @@ export function fromChatMessages( | models.OpenResponsesFunctionCallOutput => { if (isToolResponseMessage(msg)) { return { - type: OpenResponsesFunctionCallOutputType.FunctionCallOutput, + type: "function_call_output" as const, callId: msg.toolCallId, output: contentToString(msg.content), }; diff --git a/src/lib/claude-type-guards.ts b/src/lib/claude-type-guards.ts index d20073d2..325203c2 100644 --- a/src/lib/claude-type-guards.ts +++ b/src/lib/claude-type-guards.ts @@ -1,4 +1,4 @@ -import type * as models from "../models/index.js"; +import type { ClaudeMessageParam } from "../models/claude-message.js"; import { ClaudeContentBlockType, NonClaudeMessageRole, @@ -57,7 +57,7 @@ function hasClaudeSpecificBlocks(content: unknown[]): boolean { */ export function isClaudeStyleMessages( input: unknown -): input is models.ClaudeMessageParam[] { +): input is ClaudeMessageParam[] { if (!Array.isArray(input) || input.length === 0) { return false; } diff --git a/src/lib/config.ts b/src/lib/config.ts index 8a1ac5b0..96d5b0b3 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -3,7 +3,6 @@ * @generated-id: 320761608fb3 */ -import type { Hook } from "../hooks/types.js"; import { HTTPClient } from "./http.js"; import { Logger } from "./logger.js"; import { RetryConfig } from "./retries.js"; @@ -29,9 +28,14 @@ export type SDKOptions = { httpReferer?: string | undefined; /** - * Allows setting the xTitle parameter for all supported operations + * Allows setting the appTitle parameter for all supported operations */ - xTitle?: string | undefined; + appTitle?: string | undefined; + + /** + * Allows setting the appCategories parameter for all supported operations + */ + appCategories?: string | undefined; httpClient?: HTTPClient; /** @@ -52,11 +56,6 @@ export type SDKOptions = { retryConfig?: RetryConfig; timeoutMs?: number; debugLogger?: Logger; - /** - * Hooks for request/response lifecycle events. - * Can be a single hook object or an array of hooks. - */ - hooks?: Hook | Hook[]; }; export function serverURLFromOptions(options: SDKOptions): URL | null { @@ -76,7 +75,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.9.11", + sdkVersion: "0.11.0", genVersion: "2.788.4", - userAgent: "speakeasy-sdk/typescript 0.9.11 2.788.4 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.11.0 2.788.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/lib/conversation-state.ts b/src/lib/conversation-state.ts index f09da670..88ea3edf 100644 --- a/src/lib/conversation-state.ts +++ b/src/lib/conversation-state.ts @@ -6,20 +6,23 @@ import type { TurnContext, UnsentToolResult, } from './tool-types.js'; + +import { isFunctionCallItem, isOutputMessage } from './stream-type-guards.js'; import { normalizeInputToArray } from './turn-context.js'; /** * Type guard to verify an object is a valid UnsentToolResult */ function isValidUnsentToolResult( - obj: unknown + obj: unknown, ): obj is UnsentToolResult { if (typeof obj !== 'object' || obj === null) return false; - const candidate = obj as Record; return ( - typeof candidate['callId'] === 'string' && - typeof candidate['name'] === 'string' && - 'output' in candidate + 'callId' in obj && + typeof obj.callId === 'string' && + 'name' in obj && + typeof obj.name === 'string' && + 'output' in obj ); } @@ -27,14 +30,15 @@ function isValidUnsentToolResult( * Type guard to verify an object is a valid ParsedToolCall */ function isValidParsedToolCall( - obj: unknown + obj: unknown, ): obj is ParsedToolCall { if (typeof obj !== 'object' || obj === null) return false; - const candidate = obj as Record; return ( - typeof candidate['id'] === 'string' && - typeof candidate['name'] === 'string' && - 'arguments' in candidate + 'id' in obj && + typeof obj.id === 'string' && + 'name' in obj && + typeof obj.name === 'string' && + 'arguments' in obj ); } @@ -55,7 +59,7 @@ export function generateConversationId(): string { * @param id - Optional custom ID, generates one if not provided */ export function createInitialState( - id?: string + id?: string, ): ConversationState { const now = Date.now(); return { @@ -73,7 +77,7 @@ export function createInitialState( state: ConversationState, - updates: Partial, 'id' | 'createdAt' | 'updatedAt'>> + updates: Partial, 'id' | 'createdAt' | 'updatedAt'>>, ): ConversationState { return { ...state, @@ -86,11 +90,14 @@ export function updateState( * Append new items to the message history */ export function appendToMessages( - current: models.OpenResponsesInput, - newItems: models.OpenResponsesInput1[] -): models.OpenResponsesInput { + current: models.OpenResponsesInputUnion, + newItems: models.OpenResponsesInputUnion1[], +): models.OpenResponsesInputUnion { const currentArray = normalizeInputToArray(current); - return [...currentArray, ...newItems]; + return [ + ...currentArray, + ...newItems, + ]; } /** @@ -104,7 +111,10 @@ export async function toolRequiresApproval( toolCall: ParsedToolCall, tools: TTools, context: TurnContext, - callLevelCheck?: (toolCall: ParsedToolCall, context: TurnContext) => boolean | Promise + callLevelCheck?: ( + toolCall: ParsedToolCall, + context: TurnContext, + ) => boolean | Promise, ): Promise { // Call-level check takes precedence if (callLevelCheck) { @@ -112,7 +122,7 @@ export async function toolRequiresApproval( } // Fall back to tool-level setting - const tool = tools.find(t => t.function.name === toolCall.name); + const tool = tools.find((t) => t.function.name === toolCall.name); if (!tool) return false; const requireApproval = tool.function.requireApproval; @@ -137,7 +147,10 @@ export async function partitionToolCalls( toolCalls: ParsedToolCall[], tools: TTools, context: TurnContext, - callLevelCheck?: (toolCall: ParsedToolCall, context: TurnContext) => boolean | Promise + callLevelCheck?: ( + toolCall: ParsedToolCall, + context: TurnContext, + ) => boolean | Promise, ): Promise<{ requiresApproval: ParsedToolCall[]; autoExecute: ParsedToolCall[]; @@ -153,7 +166,10 @@ export async function partitionToolCalls( } } - return { requiresApproval, autoExecute }; + return { + requiresApproval, + autoExecute, + }; } /** @@ -162,9 +178,13 @@ export async function partitionToolCalls( export function createUnsentResult( callId: string, name: string, - output: unknown + output: unknown, ): UnsentToolResult { - const result = { callId, name, output }; + const result = { + callId, + name, + output, + }; if (!isValidUnsentToolResult(result)) { throw new Error('Invalid UnsentToolResult structure'); } @@ -177,7 +197,7 @@ export function createUnsentResult( callId: string, name: string, - reason?: string + reason?: string, ): UnsentToolResult { const result = { callId, @@ -195,14 +215,16 @@ export function createRejectedResult ({ + return results.map((r) => ({ type: 'function_call_output' as const, id: `output_${r.callId}`, callId: r.callId, output: r.error - ? JSON.stringify({ error: r.error }) + ? JSON.stringify({ + error: r.error, + }) : JSON.stringify(r.output), })); } @@ -211,17 +233,21 @@ export function unsentResultsToAPIFormat( * Extract text content from a response */ export function extractTextFromResponse( - response: models.OpenResponsesNonStreamingResponse + response: models.OpenResponsesNonStreamingResponse, ): string { if (!response.output) { return ''; } - const outputs = Array.isArray(response.output) ? response.output : [response.output]; + const outputs = Array.isArray(response.output) + ? response.output + : [ + response.output, + ]; const textParts: string[] = []; for (const item of outputs) { - if (item.type === 'message' && item.content) { + if (isOutputMessage(item)) { for (const content of item.content) { if (content.type === 'output_text' && content.text) { textParts.push(content.text); @@ -237,42 +263,48 @@ export function extractTextFromResponse( * Extract tool calls from a response */ export function extractToolCallsFromResponse( - response: models.OpenResponsesNonStreamingResponse + response: models.OpenResponsesNonStreamingResponse, ): ParsedToolCall[] { if (!response.output) { return []; } - const outputs = Array.isArray(response.output) ? response.output : [response.output]; + const outputs = Array.isArray(response.output) + ? response.output + : [ + response.output, + ]; const toolCalls: ParsedToolCall[] = []; for (const item of outputs) { - if (item.type === 'function_call') { - let parsedArguments: unknown; - if (typeof item.arguments === 'string') { - try { - parsedArguments = JSON.parse(item.arguments); - } catch (error) { - // Log warning and skip malformed tool call, similar to stream-transformers.ts - console.warn( - `Failed to parse arguments for tool call "${item.name}": ${error instanceof Error ? error.message : String(error)}` - ); - continue; - } - } else { - parsedArguments = item.arguments; - } + if (!isFunctionCallItem(item)) { + continue; + } - const toolCall = { - id: item.callId ?? item.id ?? '', - name: item.name ?? '', - arguments: parsedArguments, - }; - if (!isValidParsedToolCall(toolCall)) { - throw new Error(`Invalid tool call structure for tool: ${item.name}`); + let parsedArguments: unknown; + if (typeof item.arguments === 'string') { + try { + parsedArguments = JSON.parse(item.arguments); + } catch (error) { + // Log warning and skip malformed tool call, similar to stream-transformers.ts + console.warn( + `Failed to parse arguments for tool call "${item.name}": ${error instanceof Error ? error.message : String(error)}`, + ); + continue; } - toolCalls.push(toolCall); + } else { + parsedArguments = item.arguments; + } + + const toolCall = { + id: item.callId ?? item.id ?? '', + name: item.name ?? '', + arguments: parsedArguments, + }; + if (!isValidParsedToolCall(toolCall)) { + throw new Error(`Invalid tool call structure for tool: ${item.name}`); } + toolCalls.push(toolCall); } return toolCalls; diff --git a/src/lib/env.ts b/src/lib/env.ts index 88ff8a65..24a65d46 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -16,9 +16,14 @@ export interface Env { OPENROUTER_HTTP_REFERER?: string | undefined; /** - * Sets the xTitle parameter for all supported operations + * Sets the appTitle parameter for all supported operations */ - OPENROUTER_X_TITLE?: string | undefined; + OPENROUTER_APP_TITLE?: string | undefined; + + /** + * Sets the appCategories parameter for all supported operations + */ + OPENROUTER_APP_CATEGORIES?: string | undefined; OPENROUTER_DEBUG?: boolean | undefined; } @@ -27,7 +32,8 @@ export const envSchema: z.ZodType = z.object({ OPENROUTER_API_KEY: z.string().optional(), OPENROUTER_HTTP_REFERER: z.string().optional(), - OPENROUTER_X_TITLE: z.string().optional(), + OPENROUTER_APP_TITLE: z.string().optional(), + OPENROUTER_APP_CATEGORIES: z.string().optional(), OPENROUTER_DEBUG: z.coerce.boolean().optional(), }); @@ -82,8 +88,11 @@ export function fillGlobals(options: SDKOptions): SDKOptions { if (typeof envVars.OPENROUTER_HTTP_REFERER !== "undefined") { clone.httpReferer ??= envVars.OPENROUTER_HTTP_REFERER; } - if (typeof envVars.OPENROUTER_X_TITLE !== "undefined") { - clone.xTitle ??= envVars.OPENROUTER_X_TITLE; + if (typeof envVars.OPENROUTER_APP_TITLE !== "undefined") { + clone.appTitle ??= envVars.OPENROUTER_APP_TITLE; + } + if (typeof envVars.OPENROUTER_APP_CATEGORIES !== "undefined") { + clone.appCategories ??= envVars.OPENROUTER_APP_CATEGORIES; } return clone; diff --git a/src/lib/model-result.ts b/src/lib/model-result.ts index b13ccf49..695f5984 100644 --- a/src/lib/model-result.ts +++ b/src/lib/model-result.ts @@ -14,6 +14,8 @@ import type { Tool, ToolStreamEvent, TurnContext, + TurnStartEvent, + TurnEndEvent, UnsentToolResult, } from './tool-types.js'; import { ToolEventBroadcaster } from './tool-event-broadcaster.js'; @@ -59,6 +61,11 @@ import { isWebSearchCallOutputItem, isFileSearchCallOutputItem, isImageGenerationCallOutputItem, + isResponseCompletedEvent, + isResponseFailedEvent, + isResponseIncompleteEvent, + isOutputTextDeltaEvent, + isReasoningDeltaEvent, hasTypeProperty, } from './stream-type-guards.js'; @@ -90,15 +97,18 @@ function isEventStream(value: unknown): value is EventStream = Record, > { // Request can have async functions that will be resolved before sending to API - request: CallModelInput; + request: CallModelInput; client: OpenRouterCore; options?: RequestOptions; tools?: TTools; stopWhen?: StopWhen; // State management for multi-turn conversations state?: StateAccessor; + /** External data passed through to TurnContext */ + external?: TExternal; /** * Call-level approval check - overrides tool-level requireApproval setting @@ -110,6 +120,11 @@ export interface GetResponseOptions< ) => boolean | Promise; approveToolCalls?: string[]; rejectToolCalls?: string[]; + + /** Callback invoked at the start of each tool execution turn */ + onTurnStart?: (context: TurnContext) => void | Promise; + /** Callback invoked at the end of each tool execution turn */ + onTurnEnd?: (context: TurnContext, response: models.OpenResponsesNonStreamingResponse) => void | Promise; } /** @@ -131,10 +146,10 @@ export interface GetResponseOptions< * * @template TTools - The tools array type to enable typed tool calls and results */ -export class ModelResult { +export class ModelResult = Record> { private reusableStream: ReusableReadableStream | null = null; private textPromise: Promise | null = null; - private options: GetResponseOptions; + private options: GetResponseOptions; private initPromise: Promise | null = null; private toolExecutionPromise: Promise | null = null; private finalResponse: models.OpenResponsesNonStreamingResponse | null = null; @@ -168,7 +183,13 @@ export class ModelResult { private rejectedToolCalls: string[] = []; private isResumingFromApproval = false; - constructor(options: GetResponseOptions) { + // Unified turn broadcaster for multi-turn streaming + private turnBroadcaster: ToolEventBroadcaster< + ResponseStreamEvent, InferToolOutputsUnion> + > | null = null; + private initialStreamPipeStarted = false; + + constructor(options: GetResponseOptions) { this.options = options; // Runtime validation: approval decisions require state @@ -191,27 +212,163 @@ export class ModelResult { } /** - * Get or create the tool event broadcaster (lazy initialization). - * Ensures only one broadcaster exists for the lifetime of this ModelResult. - * Broadcasts both preliminary results and final tool results. + * Get or create the unified turn broadcaster (lazy initialization). + * Broadcasts all API stream events, tool events, and turn delimiters across turns. */ - private ensureBroadcaster(): ToolEventBroadcaster< - | { - type: 'preliminary_result'; - toolCallId: string; - result: InferToolEventsUnion; + private ensureTurnBroadcaster(): ToolEventBroadcaster< + ResponseStreamEvent, InferToolOutputsUnion> + > { + if (!this.turnBroadcaster) { + this.turnBroadcaster = new ToolEventBroadcaster(); + } + return this.turnBroadcaster; + } + + /** + * Start piping the initial stream into the turn broadcaster. + * Idempotent — only starts once even if called multiple times. + * Wraps the initial stream events with turn.start(0) / turn.end(0) delimiters. + */ + private startInitialStreamPipe(): void { + if (this.initialStreamPipeStarted) return; + this.initialStreamPipeStarted = true; + + const broadcaster = this.ensureTurnBroadcaster(); + + if (!this.reusableStream) { + return; + } + + const stream = this.reusableStream; + + (async () => { + broadcaster.push({ + type: 'turn.start', + turnNumber: 0, + timestamp: Date.now(), + } satisfies TurnStartEvent); + + const consumer = stream.createConsumer(); + for await (const event of consumer) { + broadcaster.push(event); } - | { - type: 'tool_result'; - toolCallId: string; - result: InferToolOutputsUnion; - preliminaryResults?: InferToolEventsUnion[]; + + broadcaster.push({ + type: 'turn.end', + turnNumber: 0, + timestamp: Date.now(), + } satisfies TurnEndEvent); + })().catch((error) => { + broadcaster.complete(error instanceof Error ? error : new Error(String(error))); + }); + } + + /** + * Pipe a follow-up stream into the turn broadcaster and capture the completed response. + * Emits turn.start / turn.end delimiters around the stream events. + */ + private async pipeAndConsumeStream( + stream: ReusableReadableStream, + turnNumber: number + ): Promise { + const broadcaster = this.turnBroadcaster!; + + broadcaster.push({ + type: 'turn.start', + turnNumber, + timestamp: Date.now(), + } satisfies TurnStartEvent); + + const consumer = stream.createConsumer(); + let completedResponse: models.OpenResponsesNonStreamingResponse | null = null; + + for await (const event of consumer) { + broadcaster.push(event); + if (isResponseCompletedEvent(event)) { + completedResponse = event.response; + } + if (isResponseFailedEvent(event)) { + const errorMsg = 'message' in event ? String(event.message) : 'Response failed'; + throw new Error(errorMsg); + } + if (isResponseIncompleteEvent(event)) { + completedResponse = event.response; } - > { - if (!this.toolEventBroadcaster) { - this.toolEventBroadcaster = new ToolEventBroadcaster(); } - return this.toolEventBroadcaster; + + broadcaster.push({ + type: 'turn.end', + turnNumber, + timestamp: Date.now(), + } satisfies TurnEndEvent); + + if (!completedResponse) { + throw new Error('Follow-up stream ended without a completed response'); + } + + return completedResponse; + } + + /** + * Push a tool result event to both the legacy tool event broadcaster + * and the unified turn broadcaster. + */ + private broadcastToolResult( + toolCallId: string, + result: InferToolOutputsUnion, + preliminaryResults?: InferToolEventsUnion[] + ): void { + this.toolEventBroadcaster?.push({ + type: 'tool_result' as const, + toolCallId, + result, + ...(preliminaryResults?.length && { preliminaryResults }), + }); + this.turnBroadcaster?.push({ + type: 'tool.result' as const, + toolCallId, + result, + timestamp: Date.now(), + ...(preliminaryResults?.length && { preliminaryResults }), + }); + } + + /** + * Push a preliminary result event to both the legacy tool event broadcaster + * and the unified turn broadcaster. + */ + private broadcastPreliminaryResult( + toolCallId: string, + result: InferToolEventsUnion + ): void { + this.toolEventBroadcaster?.push({ + type: 'preliminary_result' as const, + toolCallId, + result, + }); + this.turnBroadcaster?.push({ + type: 'tool.preliminary_result' as const, + toolCallId, + result, + timestamp: Date.now(), + }); + } + + /** + * Set up the turn broadcaster with tool execution and return the consumer. + * Used by stream methods that need to iterate over all turns. + */ + private startTurnBroadcasterExecution(): { + consumer: AsyncIterableIterator, InferToolOutputsUnion>>; + executionPromise: Promise; + } { + const broadcaster = this.ensureTurnBroadcaster(); + this.startInitialStreamPipe(); + const consumer = broadcaster.createConsumer(); + const executionPromise = this.executeToolsIfNeeded().finally(() => { + broadcaster.complete(); + }); + return { consumer, executionPromise }; } /** @@ -268,7 +425,7 @@ export class ModelResult { await this.saveStateSafely({ messages: appendToMessages( this.currentState.messages, - outputItems as models.OpenResponsesInput1[] + outputItems as models.OpenResponsesInputUnion1[] ), previousResponseId: response.id, }); @@ -352,7 +509,7 @@ export class ModelResult { toolResults: round.toolResults.map((tr) => ({ toolCallId: tr.callId, toolName: round.toolCalls.find((tc) => tc.id === tr.callId)?.name ?? '', - result: JSON.parse(tr.output), + result: typeof tr.output === 'string' ? JSON.parse(tr.output) : tr.output, })), response: round.response, usage: round.response.usage, @@ -441,7 +598,10 @@ export class ModelResult { ): Promise { if (!this.options.tools) return false; - const turnContext: TurnContext = { numberOfTurns: currentRound }; + const turnContext: TurnContext = { + numberOfTurns: currentRound, + ...(this.options.external !== undefined && { external: this.options.external }), + }; const { requiresApproval: needsApproval, autoExecute } = await partitionToolCalls( toolCalls as ParsedToolCall[], @@ -504,13 +664,7 @@ export class ModelResult { `Raw arguments received: "${rawArgs}". ` + `Please provide valid JSON arguments for this tool call.`; - if (this.toolEventBroadcaster) { - this.toolEventBroadcaster.push({ - type: 'tool_result' as const, - toolCallId: toolCall.id, - result: { error: errorMessage } as InferToolOutputsUnion, - }); - } + this.broadcastToolResult(toolCall.id, { error: errorMessage } as InferToolOutputsUnion); return { type: 'parse_error' as const, @@ -526,15 +680,12 @@ export class ModelResult { const preliminaryResultsForCall: InferToolEventsUnion[] = []; - const onPreliminaryResult = this.toolEventBroadcaster + const hasBroadcaster = this.toolEventBroadcaster || this.turnBroadcaster; + const onPreliminaryResult = hasBroadcaster ? (callId: string, resultValue: unknown) => { const typedResult = resultValue as InferToolEventsUnion; preliminaryResultsForCall.push(typedResult); - this.toolEventBroadcaster?.push({ - type: 'preliminary_result' as const, - toolCallId: callId, - result: typedResult, - }); + this.broadcastPreliminaryResult(callId, typedResult); } : undefined; @@ -562,13 +713,7 @@ export class ModelResult { ? settled.reason.message : String(settled.reason); - if (this.toolEventBroadcaster) { - this.toolEventBroadcaster.push({ - type: 'tool_result' as const, - toolCallId: originalToolCall.id, - result: { error: errorMessage } as InferToolOutputsUnion, - }); - } + this.broadcastToolResult(originalToolCall.id, { error: errorMessage } as InferToolOutputsUnion); toolResults.push({ type: 'function_call_output' as const, @@ -587,18 +732,14 @@ export class ModelResult { continue; } - if (this.toolEventBroadcaster) { - this.toolEventBroadcaster.push({ - type: 'tool_result' as const, - toolCallId: value.toolCall.id, - result: (value.result.error - ? { error: value.result.error.message } - : value.result.result) as InferToolOutputsUnion, - ...(value.preliminaryResultsForCall.length > 0 && { - preliminaryResults: value.preliminaryResultsForCall, - }), - }); - } + const toolResult = (value.result.error + ? { error: value.result.error.message } + : value.result.result) as InferToolOutputsUnion; + this.broadcastToolResult( + value.toolCall.id, + toolResult, + value.preliminaryResultsForCall.length > 0 ? value.preliminaryResultsForCall : undefined + ); toolResults.push({ type: 'function_call_output' as const, @@ -619,14 +760,15 @@ export class ModelResult { * * @param turnContext - The turn context for parameter resolution */ - private async resolveAsyncFunctionsForTurn(turnContext: TurnContext): Promise { + private async resolveAsyncFunctionsForTurn(turnContext: TurnContext): Promise { if (hasAsyncFunctions(this.options.request)) { const resolved = await resolveAsyncFunctions(this.options.request, turnContext); // Preserve accumulated input from previous turns const preservedInput = this.resolvedRequest?.input; + const preservedStream = this.resolvedRequest?.stream; this.resolvedRequest = { ...resolved, - stream: false, + stream: preservedStream ?? true, ...(preservedInput !== undefined && { input: preservedInput }), }; } @@ -659,26 +801,28 @@ export class ModelResult { /** * Make a follow-up API request with tool results. - * Continues the conversation after tool execution. + * Uses streaming and pipes events through the turn broadcaster when available. * * @param currentResponse - The response that contained tool calls * @param toolResults - The results from executing those tools + * @param turnNumber - The turn number for this follow-up request * @returns The new response from the API */ private async makeFollowupRequest( currentResponse: models.OpenResponsesNonStreamingResponse, - toolResults: models.OpenResponsesFunctionCallOutput[] + toolResults: models.OpenResponsesFunctionCallOutput[], + turnNumber: number ): Promise { // Build new input preserving original conversation + tool results const originalInput = this.resolvedRequest?.input; - const normalizedOriginalInput: models.OpenResponsesInput1[] = + const normalizedOriginalInput: models.OpenResponsesInputUnion1[] = Array.isArray(originalInput) ? originalInput : originalInput ? [{ role: 'user', content: originalInput }] : []; - const newInput: models.OpenResponsesInput = [ + const newInput: models.OpenResponsesInputUnion = [ ...normalizedOriginalInput, ...(Array.isArray(currentResponse.output) ? currentResponse.output @@ -698,7 +842,7 @@ export class ModelResult { const newRequest: models.OpenResponsesRequest = { ...this.resolvedRequest, - stream: false, + stream: true, }; const newResult = await betaResponsesSend( @@ -714,8 +858,13 @@ export class ModelResult { // Handle streaming or non-streaming response const value = newResult.value; if (isEventStream(value)) { - const stream = new ReusableReadableStream(value); - return consumeStreamForCompletion(stream); + const followUpStream = new ReusableReadableStream(value); + + if (this.turnBroadcaster) { + return this.pipeAndConsumeStream(followUpStream, turnNumber); + } + + return consumeStreamForCompletion(followUpStream); } else if (this.isNonStreamingResponse(value)) { return value; } else { @@ -747,13 +896,13 @@ export class ModelResult { * @param context - The turn context for parameter resolution * @returns The resolved request without async functions */ - private async resolveRequestForContext(context: TurnContext): Promise { + private async resolveRequestForContext(context: TurnContext): Promise { if (hasAsyncFunctions(this.options.request)) { return resolveAsyncFunctions(this.options.request, context); } // Already resolved, extract non-function fields // Filter out stopWhen and state-related fields that aren't part of the API request - const { stopWhen: _, state: _s, requireApproval: _r, approveToolCalls: _a, rejectToolCalls: _rj, ...rest } = this.options.request; + const { stopWhen: _, state: _s, requireApproval: _r, approveToolCalls: _a, rejectToolCalls: _rj, external: _e, ...rest } = this.options.request; return rest as ResolvedCallModelInput; } @@ -841,9 +990,10 @@ export class ModelResult { // Resolve async functions before initial request // Build initial turn context (turn 0 for initial request) - const initialContext: TurnContext = { - numberOfTurns: 0, - }; + const initialContext: TurnContext = { numberOfTurns: 0 }; + if (this.options.external !== undefined) { + initialContext.external = this.options.external; + } // Resolve any async functions first let baseRequest = await this.resolveRequestForContext(initialContext); @@ -857,7 +1007,7 @@ export class ModelResult { const inputArray = Array.isArray(newInput) ? newInput : [newInput]; baseRequest = { ...baseRequest, - input: appendToMessages(this.currentState.messages, inputArray as models.OpenResponsesInput1[]), + input: appendToMessages(this.currentState.messages, inputArray as models.OpenResponsesInputUnion1[]), }; } else { baseRequest = { @@ -916,6 +1066,7 @@ export class ModelResult { // Build turn context - numberOfTurns represents the current turn (1-indexed after initial) const turnContext: TurnContext = { numberOfTurns: this.allToolExecutionRounds.length + 1, + ...(this.options.external !== undefined && { external: this.options.external }), }; // Process approvals - execute the approved tools @@ -1006,9 +1157,12 @@ export class ModelResult { // Build request with the updated input // numberOfTurns represents the current turn number (1-indexed after initial) - const turnContext: TurnContext = { + const turnContext: TurnContext = { numberOfTurns: this.allToolExecutionRounds.length + 1, }; + if (this.options.external !== undefined) { + turnContext.external = this.options.external; + } const baseRequest = await this.resolveRequestForContext(turnContext); @@ -1119,7 +1273,13 @@ export class ModelResult { } // Build turn context - const turnContext: TurnContext = { numberOfTurns: currentRound + 1 }; + const turnNumber = currentRound + 1; + const turnContext: TurnContext = { numberOfTurns: turnNumber }; + if (this.options.external !== undefined) { + turnContext.external = this.options.external; + } + + await this.options.onTurnStart?.(turnContext); // Resolve async functions for this turn await this.resolveAsyncFunctionsForTurn(turnContext); @@ -1141,8 +1301,9 @@ export class ModelResult { // Apply nextTurnParams await this.applyNextTurnParams(currentToolCalls); - // Make follow-up request - currentResponse = await this.makeFollowupRequest(currentResponse, toolResults); + currentResponse = await this.makeFollowupRequest(currentResponse, toolResults, turnNumber); + + await this.options.onTurnEnd?.(turnContext, currentResponse); // Save new response to state await this.saveResponseToState(currentResponse); @@ -1201,70 +1362,67 @@ export class ModelResult { } /** - * Stream all response events as they arrive. + * Stream all response events as they arrive across all turns. * Multiple consumers can iterate over this stream concurrently. - * Preliminary tool results and tool results are streamed in REAL-TIME as generator tools yield. + * Includes API events, tool events, and turn.start/turn.end delimiters. */ getFullResponsesStream(): AsyncIterableIterator, InferToolOutputsUnion>> { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } - // Get or create broadcaster for real-time tool events (lazy init prevents race conditions) - const broadcaster = this.ensureBroadcaster(); - const toolEventConsumer = broadcaster.createConsumer(); - - // Start tool execution in background (completes broadcaster when done) - const executionPromise = this.executeToolsIfNeeded().finally(() => { - broadcaster.complete(); - }); + if (!this.options.tools?.length) { + if (this.reusableStream) { + const consumer = this.reusableStream.createConsumer(); + for await (const event of consumer) { + yield event; + } + } + return; + } - const consumer = this.reusableStream.createConsumer(); + const { consumer, executionPromise } = this.startTurnBroadcasterExecution(); - // Yield original API events for await (const event of consumer) { yield event; } - // Yield tool events as they arrive (real-time!) - for await (const event of toolEventConsumer) { - if (event.type === 'preliminary_result') { - yield { - type: 'tool.preliminary_result' as const, - toolCallId: event.toolCallId, - result: event.result, - timestamp: Date.now(), - }; - } else if (event.type === 'tool_result') { - yield { - type: 'tool.result' as const, - toolCallId: event.toolCallId, - result: event.result, - timestamp: Date.now(), - ...(event.preliminaryResults && { preliminaryResults: event.preliminaryResults }), - }; - } - } - - // Ensure execution completed (handles errors) await executionPromise; }.call(this); } /** - * Stream only text deltas as they arrive. - * This filters the full event stream to only yield text content. + * Stream only text deltas as they arrive from all turns. + * This filters the full event stream to only yield text content, + * including text from follow-up responses in multi-turn tool loops. */ getTextStream(): AsyncIterableIterator { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } - yield* extractTextDeltas(this.reusableStream); + if (!this.options.tools?.length) { + if (this.reusableStream) { + yield* extractTextDeltas(this.reusableStream); + } + return; + } + + const { consumer, executionPromise } = this.startTurnBroadcasterExecution(); + + for await (const event of consumer) { + if (isOutputTextDeltaEvent(event as models.OpenResponsesStreamEvent)) { + yield (event as models.OpenResponsesStreamEventResponseOutputTextDelta).delta; + } + } + + await executionPromise; }.call(this); } @@ -1283,14 +1441,17 @@ export class ModelResult { * - function_call_output: Results from executed tools */ getItemsStream(): AsyncIterableIterator { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } // Stream all items from the API response cumulatively - yield* buildItemsStream(this.reusableStream); + if (this.reusableStream) { + yield* buildItemsStream(this.reusableStream); + } // Execute tools if needed await this.executeToolsIfNeeded(); @@ -1342,14 +1503,17 @@ export class ModelResult { getNewMessagesStream(): AsyncIterableIterator< models.ResponsesOutputMessage | models.OpenResponsesFunctionCallOutput | models.ResponsesOutputItemFunctionCall > { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } // First yield messages from the stream in responses format - yield* buildResponsesMessageStream(this.reusableStream); + if (this.reusableStream) { + yield* buildResponsesMessageStream(this.reusableStream); + } // Execute tools if needed await this.executeToolsIfNeeded(); @@ -1381,60 +1545,77 @@ export class ModelResult { }.call(this); } - /** - * Stream only reasoning deltas as they arrive. - * This filters the full event stream to only yield reasoning content. + * Stream only reasoning deltas as they arrive from all turns. + * This filters the full event stream to only yield reasoning content, + * including reasoning from follow-up responses in multi-turn tool loops. */ getReasoningStream(): AsyncIterableIterator { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } - yield* extractReasoningDeltas(this.reusableStream); + if (!this.options.tools?.length) { + if (this.reusableStream) { + yield* extractReasoningDeltas(this.reusableStream); + } + return; + } + + const { consumer, executionPromise } = this.startTurnBroadcasterExecution(); + + for await (const event of consumer) { + if (isReasoningDeltaEvent(event as models.OpenResponsesStreamEvent)) { + yield (event as models.OpenResponsesReasoningDeltaEvent).delta; + } + } + + await executionPromise; }.call(this); } /** - * Stream tool call argument deltas and preliminary results. + * Stream tool call argument deltas and preliminary results from all turns. * Preliminary results are streamed in REAL-TIME as generator tools yield. * - Tool call argument deltas as { type: "delta", content: string } * - Preliminary results as { type: "preliminary_result", toolCallId, result } */ getToolStream(): AsyncIterableIterator>> { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } - // Get or create broadcaster for real-time tool events (lazy init prevents race conditions) - const broadcaster = this.ensureBroadcaster(); - const toolEventConsumer = broadcaster.createConsumer(); - - // Start tool execution in background (completes broadcaster when done) - const executionPromise = this.executeToolsIfNeeded().finally(() => { - broadcaster.complete(); - }); - - // Yield tool deltas from API stream - for await (const delta of extractToolDeltas(this.reusableStream)) { - yield { - type: 'delta' as const, - content: delta, - }; + if (!this.options.tools?.length) { + if (this.reusableStream) { + for await (const delta of extractToolDeltas(this.reusableStream)) { + yield { type: 'delta' as const, content: delta }; + } + } + return; } - // Yield only preliminary_result events (filter out tool_result events) - for await (const event of toolEventConsumer) { - if (event.type === 'preliminary_result') { - yield event; + const { consumer, executionPromise } = this.startTurnBroadcasterExecution(); + + for await (const event of consumer) { + if (event.type === 'response.function_call_arguments.delta') { + yield { type: 'delta' as const, content: (event as { delta: string }).delta }; + continue; + } + if (event.type === 'tool.preliminary_result') { + yield { + type: 'preliminary_result' as const, + toolCallId: (event as { toolCallId: string }).toolCallId, + result: (event as { result: InferToolEventsUnion }).result, + }; } } - // Ensure execution completed (handles errors) await executionPromise; }.call(this); } @@ -1466,13 +1647,16 @@ export class ModelResult { * Each iteration yields a complete tool call with parsed arguments. */ getToolCallsStream(): AsyncIterableIterator> { - return async function* (this: ModelResult) { + return async function* (this: ModelResult) { await this.initStream(); - if (!this.reusableStream) { + + if (!this.reusableStream && !this.finalResponse) { throw new Error('Stream not initialized'); } - yield* buildToolCallStream(this.reusableStream) as AsyncIterableIterator>; + if (this.reusableStream) { + yield* buildToolCallStream(this.reusableStream) as AsyncIterableIterator>; + } }.call(this); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index a3985c5c..89074c11 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -4,7 +4,7 @@ */ import { SDKHooks } from "../hooks/hooks.js"; -import type { Hook, HookContext } from "../hooks/types.js"; +import { HookContext } from "../hooks/types.js"; import { ConnectionError, InvalidRequestError, @@ -87,19 +87,17 @@ export class ClientSDK { public readonly _options: SDKOptions & { hooks?: SDKHooks }; constructor(options: SDKOptions = {}) { - // Reuse existing SDKHooks if passed (for sub-SDKs) - if (options.hooks instanceof SDKHooks) { - this.#hooks = options.hooks; + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.#hooks = opt.hooks; } else { this.#hooks = new SDKHooks(); - if (options.hooks) { - const hooksArray = Array.isArray(options.hooks) ? options.hooks : [options.hooks]; - for (const hook of hooksArray) { - this.#registerHook(hook); - } - } } - const defaultHttpClient = new HTTPClient(); options.httpClient = options.httpClient || defaultHttpClient; options = this.#hooks.sdkInit(options); @@ -119,24 +117,6 @@ export class ClientSDK { } } - #registerHook(hook: Hook): void { - if ("sdkInit" in hook) { - this.#hooks.registerSDKInitHook(hook); - } - if ("beforeCreateRequest" in hook) { - this.#hooks.registerBeforeCreateRequestHook(hook); - } - if ("beforeRequest" in hook) { - this.#hooks.registerBeforeRequestHook(hook); - } - if ("afterSuccess" in hook) { - this.#hooks.registerAfterSuccessHook(hook); - } - if ("afterError" in hook) { - this.#hooks.registerAfterErrorHook(hook); - } - } - public _createRequest( context: HookContext, conf: RequestConfig, diff --git a/src/lib/stream-transformers.ts b/src/lib/stream-transformers.ts index 84f49ff8..d5d20fb7 100644 --- a/src/lib/stream-transformers.ts +++ b/src/lib/stream-transformers.ts @@ -1,27 +1,36 @@ +import type { + ClaudeContentBlock, + ClaudeMessage, + ClaudeStopReason, + ClaudeTextCitation, + UnsupportedContent, +} from '../models/claude-message.js'; import type * as models from '../models/index.js'; import type { ReusableReadableStream } from './reusable-stream.js'; import type { ParsedToolCall, Tool } from './tool-types.js'; + import { - isOutputTextDeltaEvent, - isReasoningDeltaEvent, + isFileCitationAnnotation, + isFilePathAnnotation, + isFileSearchCallOutputItem, isFunctionCallArgumentsDeltaEvent, - isOutputItemAddedEvent, - isOutputItemDoneEvent, - isResponseCompletedEvent, - isResponseFailedEvent, - isResponseIncompleteEvent, isFunctionCallArgumentsDoneEvent, - isOutputMessage, isFunctionCallItem, - isReasoningOutputItem, - isWebSearchCallOutputItem, - isFileSearchCallOutputItem, isImageGenerationCallOutputItem, + isServerToolOutput, + isOutputItemAddedEvent, + isOutputItemDoneEvent, + isOutputMessage, + isOutputTextDeltaEvent, isOutputTextPart, + isReasoningDeltaEvent, + isReasoningOutputItem, isRefusalPart, - isFileCitationAnnotation, + isResponseCompletedEvent, + isResponseFailedEvent, + isResponseIncompleteEvent, isURLCitationAnnotation, - isFilePathAnnotation, + isWebSearchCallOutputItem, } from './stream-type-guards.js'; /** @@ -202,9 +211,23 @@ export type StreamableOutputItem = * Each variant has only the fields relevant to that item type. */ type ItemInProgress = - | { type: 'message'; id: string; textContent: string } - | { type: 'function_call'; id: string; name: string; callId: string; argumentsAccumulated: string } - | { type: 'reasoning'; id: string; reasoningContent: string }; + | { + type: 'message'; + id: string; + textContent: string; + } + | { + type: 'function_call'; + id: string; + name: string; + callId: string; + argumentsAccumulated: string; + } + | { + type: 'reasoning'; + id: string; + reasoningContent: string; + }; /** * Handle output_item.added event - Initialize tracking for new items @@ -618,7 +641,8 @@ export function extractToolCallsFromResponse( for (const item of response.output) { if (isFunctionCallItem(item)) { try { - const parsedArguments = JSON.parse(item.arguments); + const trimmedArgs = item.arguments.trim(); + const parsedArguments = trimmedArgs ? JSON.parse(trimmedArgs) : {}; toolCalls.push({ id: item.callId, @@ -629,7 +653,7 @@ export function extractToolCallsFromResponse( console.warn( `Failed to parse tool call arguments for ${item.name}:`, error instanceof Error ? error.message : String(error), - `\nArguments: ${item.arguments.substring(0, 100)}${item.arguments.length > 100 ? '...' : ''}` + `\nArguments: ${item.arguments.substring(0, 100)}${item.arguments.length > 100 ? '...' : ''}`, ); // Include the tool call with unparsed arguments toolCalls.push({ @@ -671,7 +695,9 @@ export async function* buildToolCallStream( switch (event.type) { case 'response.output_item.added': { if (isOutputItemAddedEvent(event) && event.item && isFunctionCallItem(event.item)) { - toolCallsInProgress.set(event.item.callId, { + // Use item.id if available (matches itemId in delta events), fall back to callId + const itemKey = event.item.id ?? event.item.callId; + toolCallsInProgress.set(itemKey, { id: event.item.callId, name: event.item.name, argumentsAccumulated: '', @@ -695,9 +721,10 @@ export async function* buildToolCallStream( const toolCall = toolCallsInProgress.get(event.itemId); if (toolCall) { - // Parse complete arguments + // Parse complete arguments (empty string → empty object for no-param tools) try { - const parsedArguments = JSON.parse(event.arguments); + const trimmedArgs = event.arguments.trim(); + const parsedArguments = trimmedArgs ? JSON.parse(trimmedArgs) : {}; yield { id: toolCall.id, name: event.name, @@ -707,7 +734,7 @@ export async function* buildToolCallStream( console.warn( `Failed to parse tool call arguments for ${event.name}:`, error instanceof Error ? error.message : String(error), - `\nArguments: ${event.arguments.substring(0, 100)}${event.arguments.length > 100 ? '...' : ''}` + `\nArguments: ${event.arguments.substring(0, 100)}${event.arguments.length > 100 ? '...' : ''}`, ); // Yield with unparsed arguments if parsing fails yield { @@ -726,10 +753,13 @@ export async function* buildToolCallStream( case 'response.output_item.done': { if (isOutputItemDoneEvent(event) && event.item && isFunctionCallItem(event.item)) { + // Use item.id if available (matches itemId in delta events), fall back to callId + const itemKey = event.item.id ?? event.item.callId; // Yield final tool call if we haven't already - if (toolCallsInProgress.has(event.item.callId)) { + if (toolCallsInProgress.has(itemKey)) { try { - const parsedArguments = JSON.parse(event.item.arguments); + const trimmedArgs = event.item.arguments.trim(); + const parsedArguments = trimmedArgs ? JSON.parse(trimmedArgs) : {}; yield { id: event.item.callId, name: event.item.name, @@ -743,7 +773,7 @@ export async function* buildToolCallStream( } as ParsedToolCall; } - toolCallsInProgress.delete(event.item.callId); + toolCallsInProgress.delete(itemKey); } } break; @@ -764,12 +794,12 @@ export function responseHasToolCalls(response: models.OpenResponsesNonStreamingR */ function mapAnnotationsToCitations( annotations?: Array, -): models.ClaudeTextCitation[] | undefined { +): ClaudeTextCitation[] | undefined { if (!annotations || annotations.length === 0) { return undefined; } - const citations: models.ClaudeTextCitation[] = []; + const citations: ClaudeTextCitation[] = []; for (const annotation of annotations) { if (!('type' in annotation)) { @@ -826,8 +856,8 @@ function mapAnnotationsToCitations( // Cast to unknown for runtime debugging if type system bypassed // This should never execute - throw with JSON of the unhandled value throw new Error( - `Unhandled annotation type. This indicates a new annotation type was added. ` + - `Annotation: ${JSON.stringify(exhaustiveCheck as unknown)}` + 'Unhandled annotation type. This indicates a new annotation type was added. ' + + `Annotation: ${JSON.stringify(exhaustiveCheck as unknown)}`, ); } } @@ -841,7 +871,7 @@ function mapAnnotationsToCitations( */ function mapStopReason( response: models.OpenResponsesNonStreamingResponse, -): models.ClaudeStopReason | null { +): ClaudeStopReason | null { // Check if any tool calls exist in the response const hasToolCalls = response.output.some( (item) => 'type' in item && item.type === 'function_call', @@ -874,17 +904,20 @@ function mapStopReason( */ export function convertToClaudeMessage( response: models.OpenResponsesNonStreamingResponse, -): models.ClaudeMessage { - const content: models.ClaudeContentBlock[] = []; - const unsupportedContent: models.UnsupportedContent[] = []; +): ClaudeMessage { + const content: ClaudeContentBlock[] = []; + const unsupportedContent: UnsupportedContent[] = []; for (const item of response.output) { if (!('type' in item)) { // Handle items without type field // Convert unknown item to a record format for storage - const itemData = typeof item === 'object' && item !== null - ? item - : { value: item }; + const itemData = + typeof item === 'object' && item !== null + ? item + : { + value: item, + }; unsupportedContent.push({ original_type: 'unknown', data: itemData, @@ -893,15 +926,30 @@ export function convertToClaudeMessage( continue; } + // Server tool outputs use `openrouter:*` prefixed types (e.g. openrouter:web_search, + // openrouter:datetime). Filter them before the switch so the remaining union + // members can be discriminated by their literal `type` fields. + if (isServerToolOutput(item)) { + unsupportedContent.push({ + original_type: item.type, + data: item, + reason: 'Output type not directly mappable to Claude format', + }); + continue; + } + switch (item.type) { case 'message': { if (isOutputMessage(item)) { for (const part of item.content) { if (!('type' in part)) { // Convert unknown part to a record format for storage - const partData = typeof part === 'object' && part !== null - ? part - : { value: part }; + const partData = + typeof part === 'object' && part !== null + ? part + : { + value: part, + }; unsupportedContent.push({ original_type: 'unknown_message_part', data: partData, @@ -933,8 +981,8 @@ export function convertToClaudeMessage( const exhaustiveCheck: never = part; // This should never execute - new content type was added throw new Error( - `Unhandled message content type. This indicates a new content type was added. ` + - `Part: ${JSON.stringify(exhaustiveCheck)}` + 'Unhandled message content type. This indicates a new content type was added. ' + + `Part: ${JSON.stringify(exhaustiveCheck)}`, ); } } @@ -947,12 +995,13 @@ export function convertToClaudeMessage( let parsedInput: Record; try { - parsedInput = JSON.parse(item.arguments); + const trimmedArgs = item.arguments.trim(); + parsedInput = trimmedArgs ? JSON.parse(trimmedArgs) : {}; } catch (error) { console.warn( `Failed to parse tool call arguments for ${item.name}:`, error instanceof Error ? error.message : String(error), - `\nArguments: ${item.arguments.substring(0, 100)}${item.arguments.length > 100 ? '...' : ''}` + `\nArguments: ${item.arguments.substring(0, 100)}${item.arguments.length > 100 ? '...' : ''}`, ); // Preserve raw arguments if JSON parsing fails parsedInput = { @@ -1042,16 +1091,12 @@ export function convertToClaudeMessage( break; } - default: { - // Exhaustiveness check - if a new output type is added, TypeScript will error here - const exhaustiveCheck: never = item; - // This line should never execute - it means a new type was added to the union - // Throw an error instead of silently continuing to ensure we catch new types - throw new Error( - `Unhandled output item type. This indicates a new output type was added to the API. ` + - `Item: ${JSON.stringify(exhaustiveCheck)}` - ); - } + default: + // Exhaustiveness check — TypeScript will error here when a new + // literal-typed member is added to ResponsesOutputItem but not + // handled in a case above. + item satisfies never; + break; } } @@ -1079,9 +1124,9 @@ export function convertToClaudeMessage( * Extract unsupported content by original type */ export function extractUnsupportedContent( - message: models.ClaudeMessage, + message: ClaudeMessage, originalType: string, -): models.UnsupportedContent[] { +): UnsupportedContent[] { if (!message.unsupported_content) { return []; } @@ -1092,16 +1137,14 @@ export function extractUnsupportedContent( /** * Check if message has any unsupported content */ -export function hasUnsupportedContent(message: models.ClaudeMessage): boolean { +export function hasUnsupportedContent(message: ClaudeMessage): boolean { return !!(message.unsupported_content && message.unsupported_content.length > 0); } /** * Get summary of unsupported content types */ -export function getUnsupportedContentSummary( - message: models.ClaudeMessage, -): Record { +export function getUnsupportedContentSummary(message: ClaudeMessage): Record { if (!message.unsupported_content) { return {}; } diff --git a/src/lib/stream-type-guards.ts b/src/lib/stream-type-guards.ts index 9be765ee..e082d772 100644 --- a/src/lib/stream-type-guards.ts +++ b/src/lib/stream-type-guards.ts @@ -8,118 +8,93 @@ import type * as models from '../models/index.js'; // Stream event type guards export function isOutputTextDeltaEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseOutputTextDelta { return 'type' in event && event.type === 'response.output_text.delta'; } export function isReasoningDeltaEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesReasoningDeltaEvent { return 'type' in event && event.type === 'response.reasoning_text.delta'; } export function isFunctionCallArgumentsDeltaEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseFunctionCallArgumentsDelta { return 'type' in event && event.type === 'response.function_call_arguments.delta'; } export function isOutputItemAddedEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseOutputItemAdded { return 'type' in event && event.type === 'response.output_item.added'; } export function isOutputItemDoneEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseOutputItemDone { return 'type' in event && event.type === 'response.output_item.done'; } export function isResponseCompletedEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseCompleted { return 'type' in event && event.type === 'response.completed'; } export function isResponseFailedEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseFailed { return 'type' in event && event.type === 'response.failed'; } export function isResponseIncompleteEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseIncomplete { return 'type' in event && event.type === 'response.incomplete'; } export function isFunctionCallArgumentsDoneEvent( - event: models.OpenResponsesStreamEvent + event: models.OpenResponsesStreamEvent, ): event is models.OpenResponsesStreamEventResponseFunctionCallArgumentsDone { return 'type' in event && event.type === 'response.function_call_arguments.done'; } // Output item type guards -export function isOutputMessage( - item: unknown -): item is models.ResponsesOutputMessage { - return ( - typeof item === 'object' && - item !== null && - 'type' in item && - item.type === 'message' - ); +export function isOutputMessage(item: unknown): item is models.ResponsesOutputMessage { + return typeof item === 'object' && item !== null && 'type' in item && item.type === 'message'; } -export function isFunctionCallItem( - item: unknown -): item is models.ResponsesOutputItemFunctionCall { +export function isFunctionCallItem(item: unknown): item is models.ResponsesOutputItemFunctionCall { return ( - typeof item === 'object' && - item !== null && - 'type' in item && - item.type === 'function_call' + typeof item === 'object' && item !== null && 'type' in item && item.type === 'function_call' ); } -export function isReasoningOutputItem( - item: unknown -): item is models.ResponsesOutputItemReasoning { - return ( - typeof item === 'object' && - item !== null && - 'type' in item && - item.type === 'reasoning' - ); +export function isReasoningOutputItem(item: unknown): item is models.ResponsesOutputItemReasoning { + return typeof item === 'object' && item !== null && 'type' in item && item.type === 'reasoning'; } export function isWebSearchCallOutputItem( - item: unknown + item: unknown, ): item is models.ResponsesWebSearchCallOutput { return ( - typeof item === 'object' && - item !== null && - 'type' in item && - item.type === 'web_search_call' + typeof item === 'object' && item !== null && 'type' in item && item.type === 'web_search_call' ); } export function isFileSearchCallOutputItem( - item: unknown + item: unknown, ): item is models.ResponsesOutputItemFileSearchCall { return ( - typeof item === 'object' && - item !== null && - 'type' in item && - item.type === 'file_search_call' + typeof item === 'object' && item !== null && 'type' in item && item.type === 'file_search_call' ); } export function isImageGenerationCallOutputItem( - item: unknown + item: unknown, ): item is models.ResponsesImageGenerationCall { return ( typeof item === 'object' && @@ -129,35 +104,40 @@ export function isImageGenerationCallOutputItem( ); } +/* + * Server tool output discrimination. + * + * The API schema constrains server tool output types to `openrouter:${string}` + * (see ServerToolTypeSchema in response-output-items.ts, regex /^openrouter:/). + * Speakeasy flattens this to `type: string` in the generated SDK, breaking + * TypeScript's discriminated union narrowing. We use the prefix check here + * to mirror the schema constraint — no manually maintained type list needed. + */ + +/** + * Type guard that identifies server tool outputs by the `openrouter:` prefix + * on their `type` field. This mirrors the ServerToolTypeSchema constraint + * (regex /^openrouter:/) from the API schema. + */ +export function isServerToolOutput( + item: models.ResponsesOutputItem, +): item is models.ResponsesServerToolOutput { + return item.type.startsWith('openrouter:'); +} + // Content part type guards -export function isOutputTextPart( - part: unknown -): part is models.ResponseOutputText { - return ( - typeof part === 'object' && - part !== null && - 'type' in part && - part.type === 'output_text' - ); +export function isOutputTextPart(part: unknown): part is models.ResponseOutputText { + return typeof part === 'object' && part !== null && 'type' in part && part.type === 'output_text'; } -export function isRefusalPart( - part: unknown -): part is models.OpenAIResponsesRefusalContent { - return ( - typeof part === 'object' && - part !== null && - 'type' in part && - part.type === 'refusal' - ); +export function isRefusalPart(part: unknown): part is models.OpenAIResponsesRefusalContent { + return typeof part === 'object' && part !== null && 'type' in part && part.type === 'refusal'; } // Annotation type guards for Claude conversion -export function isFileCitationAnnotation( - annotation: unknown -): annotation is models.FileCitation { +export function isFileCitationAnnotation(annotation: unknown): annotation is models.FileCitation { return ( typeof annotation === 'object' && annotation !== null && @@ -166,9 +146,7 @@ export function isFileCitationAnnotation( ); } -export function isURLCitationAnnotation( - annotation: unknown -): annotation is models.URLCitation { +export function isURLCitationAnnotation(annotation: unknown): annotation is models.URLCitation { return ( typeof annotation === 'object' && annotation !== null && @@ -177,9 +155,7 @@ export function isURLCitationAnnotation( ); } -export function isFilePathAnnotation( - annotation: unknown -): annotation is models.FilePath { +export function isFilePathAnnotation(annotation: unknown): annotation is models.FilePath { return ( typeof annotation === 'object' && annotation !== null && @@ -193,13 +169,6 @@ export function hasTypeProperty(item: unknown): item is { type: string; } { return ( - typeof item === 'object' && - item !== null && - 'type' in item && - typeof ( - item as { - type: unknown; - } - ).type === 'string' + typeof item === 'object' && item !== null && 'type' in item && typeof item.type === 'string' ); } diff --git a/src/lib/tool-executor.ts b/src/lib/tool-executor.ts index 2d4471ef..2f4d0ac3 100644 --- a/src/lib/tool-executor.ts +++ b/src/lib/tool-executor.ts @@ -1,8 +1,8 @@ import type { $ZodType } from 'zod/v4/core'; import type { APITool, - Tool, ParsedToolCall, + Tool, ToolExecutionResult, TurnContext, } from './tool-types.js'; @@ -129,14 +129,21 @@ function tryValidate(schema: $ZodType, value: unknown): boolean { } /** - * Parse tool call arguments from JSON string + * Parse tool call arguments from JSON string. + * Treats empty/whitespace-only strings as an empty object — some providers + * return `arguments: ""` for tools that take no parameters. */ export function parseToolCallArguments(argumentsString: string): unknown { + const trimmed = argumentsString.trim(); + if (!trimmed) { + return {}; + } try { - return JSON.parse(argumentsString); + return JSON.parse(trimmed); } catch (error) { throw new Error( - `Failed to parse tool call arguments: ${error instanceof Error ? error.message : String(error) + `Failed to parse tool call arguments: ${ + error instanceof Error ? error.message : String(error) }`, ); } @@ -160,10 +167,7 @@ export async function executeRegularTool( // Validate input - the schema validation ensures type safety at runtime // validateToolInput returns z.infer // which is exactly the type expected by execute - const validatedInput = validateToolInput( - tool.function.inputSchema, - toolCall.arguments, - ); + const validatedInput = validateToolInput(tool.function.inputSchema, toolCall.arguments); // Execute tool with context const result = await Promise.resolve(tool.function.execute(validatedInput, context)); @@ -213,15 +217,12 @@ export async function executeGeneratorTool( try { // Validate input - the schema validation ensures type safety at runtime // The inputSchema's inferred type matches the execute function's parameter type by construction - const validatedInput = validateToolInput( - tool.function.inputSchema, - toolCall.arguments, - ); + const validatedInput = validateToolInput(tool.function.inputSchema, toolCall.arguments); const preliminaryResults: unknown[] = []; - let finalResult: unknown = undefined; + let finalResult: unknown; let hasFinalResult = false; - let lastEmittedValue: unknown = undefined; + let lastEmittedValue: unknown; let hasEmittedValue = false; const iterator = tool.function.execute(validatedInput, context); @@ -256,7 +257,9 @@ export async function executeGeneratorTool( if (!hasFinalResult) { if (!hasEmittedValue) { - throw new Error(`Generator tool "${toolCall.name}" completed without emitting any values or returning a result`); + throw new Error( + `Generator tool "${toolCall.name}" completed without emitting any values or returning a result`, + ); } finalResult = validateToolOutput(tool.function.outputSchema, lastEmittedValue); } diff --git a/src/lib/tool-orchestrator.ts b/src/lib/tool-orchestrator.ts index 45bc4fab..3e26a025 100644 --- a/src/lib/tool-orchestrator.ts +++ b/src/lib/tool-orchestrator.ts @@ -22,7 +22,7 @@ export interface ToolOrchestrationResult { finalResponse: models.OpenResponsesNonStreamingResponse; allResponses: models.OpenResponsesNonStreamingResponse[]; toolExecutionResults: ToolExecutionResult[]; - conversationInput: models.OpenResponsesInput; + conversationInput: models.OpenResponsesInputUnion; } /** @@ -39,10 +39,10 @@ export interface ToolOrchestrationResult { */ export async function executeToolLoop( sendRequest: ( - input: models.OpenResponsesInput, + input: models.OpenResponsesInputUnion, tools: APITool[], ) => Promise, - initialInput: models.OpenResponsesInput, + initialInput: models.OpenResponsesInputUnion, initialRequest: models.OpenResponsesRequest, tools: Tool[], apiTools: APITool[], @@ -52,7 +52,7 @@ export async function executeToolLoop( const allResponses: models.OpenResponsesNonStreamingResponse[] = []; const toolExecutionResults: ToolExecutionResult[] = []; - let conversationInput: models.OpenResponsesInput = initialInput; + let conversationInput: models.OpenResponsesInputUnion = initialInput; let currentRequest: models.OpenResponsesRequest = { ...initialRequest }; let currentRound = 0; diff --git a/src/lib/tool-types.ts b/src/lib/tool-types.ts index c107935c..9136bf85 100644 --- a/src/lib/tool-types.ts +++ b/src/lib/tool-types.ts @@ -14,13 +14,15 @@ export enum ToolType { * Turn context passed to tool execute functions and async parameter resolution * Contains information about the current conversation state */ -export interface TurnContext { +export interface TurnContext = Record> { /** The specific tool call being executed (only available during tool execution) */ toolCall?: models.OpenResponsesFunctionToolCall; /** Number of tool execution turns so far (1-indexed: first turn = 1, 0 = initial request) */ numberOfTurns: number; /** The full request being sent to the API (only available during tool execution) */ turnRequest?: models.OpenResponsesRequest; + /** External data passed through from callModel for use in tool execute and async param functions */ + external?: TExternal; } /** @@ -30,7 +32,7 @@ export interface TurnContext { */ export type NextTurnParamsContext = { /** Current input (messages) */ - input: models.OpenResponsesInput; + input: models.OpenResponsesInputUnion; /** Current model selection */ model: string; /** Current models array */ @@ -403,16 +405,38 @@ export type ToolResultEvent = preliminaryResults?: TPreliminaryResults[]; }; +/** + * Turn start event emitted at the beginning of each API turn + * Turn 0 is the initial request, subsequent turns follow tool execution + */ +export type TurnStartEvent = { + type: 'turn.start'; + turnNumber: number; + timestamp: number; +}; + +/** + * Turn end event emitted at the end of each API turn + */ +export type TurnEndEvent = { + type: 'turn.end'; + turnNumber: number; + timestamp: number; +}; + /** * Enhanced stream event types for getFullResponsesStream - * Extends OpenResponsesStreamEvent with tool preliminary results and tool results + * Extends OpenResponsesStreamEvent with tool preliminary results, tool results, + * and turn delimiter events for multi-turn streaming * @template TEvent - The event type from generator tools * @template TResult - The result type from tool execution */ export type ResponseStreamEvent = | OpenResponsesStreamEvent | ToolPreliminaryResultEvent - | ToolResultEvent; + | ToolResultEvent + | TurnStartEvent + | TurnEndEvent; /** * Type guard to check if an event is a tool preliminary result event @@ -432,6 +456,24 @@ export function isToolResultEvent = Record> { /** Number of turns so far (1-indexed for tool execution, 0 for initial request) */ numberOfTurns: number; /** The specific tool call being executed (optional for initial/async resolution contexts) */ toolCall?: models.OpenResponsesFunctionToolCall; /** The full request being sent to the API (optional for initial/async resolution contexts) */ turnRequest?: models.OpenResponsesRequest; + /** External data passed through from callModel */ + external?: TExternal; } /** @@ -34,8 +36,10 @@ export interface BuildTurnContextOptions { * }); * ``` */ -export function buildTurnContext(options: BuildTurnContextOptions): TurnContext { - const context: TurnContext = { +export function buildTurnContext = Record>( + options: BuildTurnContextOptions +): TurnContext { + const context: TurnContext = { numberOfTurns: options.numberOfTurns, }; @@ -47,6 +51,10 @@ export function buildTurnContext(options: BuildTurnContextOptions): TurnContext context.turnRequest = options.turnRequest; } + if (options.external !== undefined) { + context.external = options.external; + } + return context; } @@ -64,8 +72,8 @@ export function buildTurnContext(options: BuildTurnContextOptions): TurnContext * ``` */ export function normalizeInputToArray( - input: models.OpenResponsesInput -): Array { + input: models.OpenResponsesInputUnion +): Array { if (typeof input === 'string') { // Construct object with all required fields - type is optional const message: models.OpenResponsesEasyInputMessage = { diff --git a/src/models/assistantmessage.ts b/src/models/assistantmessage.ts index 40c885ce..0c4c60c0 100644 --- a/src/models/assistantmessage.ts +++ b/src/models/assistantmessage.ts @@ -14,6 +14,12 @@ import { AssistantMessageImages$Outbound, AssistantMessageImages$outboundSchema, } from "./assistantmessageimages.js"; +import { + ChatCompletionAudioOutput, + ChatCompletionAudioOutput$inboundSchema, + ChatCompletionAudioOutput$Outbound, + ChatCompletionAudioOutput$outboundSchema, +} from "./chatcompletionaudiooutput.js"; import { ChatMessageContentItem, ChatMessageContentItem$inboundSchema, @@ -80,6 +86,10 @@ export type AssistantMessage = { * Generated images from image generation models */ images?: Array | undefined; + /** + * Audio output data or reference + */ + audio?: ChatCompletionAudioOutput | undefined; }; /** @internal */ @@ -152,6 +162,7 @@ export const AssistantMessage$inboundSchema: z.ZodType< reasoning: z.nullable(z.string()).optional(), reasoning_details: z.array(ReasoningDetailUnion$inboundSchema).optional(), images: z.array(AssistantMessageImages$inboundSchema).optional(), + audio: ChatCompletionAudioOutput$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tool_calls": "toolCalls", @@ -173,6 +184,7 @@ export type AssistantMessage$Outbound = { reasoning?: string | null | undefined; reasoning_details?: Array | undefined; images?: Array | undefined; + audio?: ChatCompletionAudioOutput$Outbound | undefined; }; /** @internal */ @@ -194,6 +206,7 @@ export const AssistantMessage$outboundSchema: z.ZodType< reasoning: z.nullable(z.string()).optional(), reasoningDetails: z.array(ReasoningDetailUnion$outboundSchema).optional(), images: z.array(AssistantMessageImages$outboundSchema).optional(), + audio: ChatCompletionAudioOutput$outboundSchema.optional(), }).transform((v) => { return remap$(v, { toolCalls: "tool_calls", diff --git a/src/models/chatcompletionaudiooutput.ts b/src/models/chatcompletionaudiooutput.ts new file mode 100644 index 00000000..6fd23d15 --- /dev/null +++ b/src/models/chatcompletionaudiooutput.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 125d1fe30400 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Audio output data or reference + */ +export type ChatCompletionAudioOutput = { + /** + * Audio output identifier + */ + id?: string | undefined; + /** + * Audio expiration timestamp + */ + expiresAt?: number | undefined; + /** + * Base64 encoded audio data + */ + data?: string | undefined; + /** + * Audio transcript + */ + transcript?: string | undefined; +}; + +/** @internal */ +export const ChatCompletionAudioOutput$inboundSchema: z.ZodType< + ChatCompletionAudioOutput, + unknown +> = z.object({ + id: z.string().optional(), + expires_at: z.number().optional(), + data: z.string().optional(), + transcript: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "expires_at": "expiresAt", + }); +}); +/** @internal */ +export type ChatCompletionAudioOutput$Outbound = { + id?: string | undefined; + expires_at?: number | undefined; + data?: string | undefined; + transcript?: string | undefined; +}; + +/** @internal */ +export const ChatCompletionAudioOutput$outboundSchema: z.ZodType< + ChatCompletionAudioOutput$Outbound, + ChatCompletionAudioOutput +> = z.object({ + id: z.string().optional(), + expiresAt: z.number().optional(), + data: z.string().optional(), + transcript: z.string().optional(), +}).transform((v) => { + return remap$(v, { + expiresAt: "expires_at", + }); +}); + +export function chatCompletionAudioOutputToJSON( + chatCompletionAudioOutput: ChatCompletionAudioOutput, +): string { + return JSON.stringify( + ChatCompletionAudioOutput$outboundSchema.parse(chatCompletionAudioOutput), + ); +} +export function chatCompletionAudioOutputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChatCompletionAudioOutput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatCompletionAudioOutput' from JSON`, + ); +} diff --git a/src/models/chatgenerationparams.ts b/src/models/chatgenerationparams.ts index 01d4e661..59d6c293 100644 --- a/src/models/chatgenerationparams.ts +++ b/src/models/chatgenerationparams.ts @@ -12,6 +12,10 @@ import { ChatStreamOptions$Outbound, ChatStreamOptions$outboundSchema, } from "./chatstreamoptions.js"; +import { + ContextCompressionEngine, + ContextCompressionEngine$outboundSchema, +} from "./contextcompressionengine.js"; import { DataCollection, DataCollection$outboundSchema, @@ -93,6 +97,7 @@ export const ChatGenerationParamsSortEnum = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; export type ChatGenerationParamsSortEnum = OpenEnum< typeof ChatGenerationParamsSortEnum @@ -102,6 +107,7 @@ export const ChatGenerationParamsProviderSortConfigEnum = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; export type ChatGenerationParamsProviderSortConfigEnum = ClosedEnum< typeof ChatGenerationParamsProviderSortConfigEnum @@ -114,6 +120,7 @@ export const ChatGenerationParamsBy = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) @@ -156,6 +163,7 @@ export const ChatGenerationParamsProviderSort = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) @@ -257,6 +265,18 @@ export type ChatGenerationParamsProvider = { preferredMaxLatency?: PreferredMaxLatency | null | undefined; }; +export type ChatGenerationParamsPluginContextCompression = { + id: "context-compression"; + /** + * Set to false to disable the context-compression plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * The compression engine to use. Defaults to "middle-out". + */ + engine?: ContextCompressionEngine | undefined; +}; + export type ChatGenerationParamsPluginResponseHealing = { id: "response-healing"; /** @@ -289,6 +309,14 @@ export type ChatGenerationParamsPluginWeb = { * The search engine to use for web search. */ engine?: WebSearchEngine | undefined; + /** + * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + includeDomains?: Array | undefined; + /** + * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + excludeDomains?: Array | undefined; }; export type ChatGenerationParamsPluginModeration = { @@ -312,7 +340,8 @@ export type ChatGenerationParamsPluginUnion = | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser - | ChatGenerationParamsPluginResponseHealing; + | ChatGenerationParamsPluginResponseHealing + | ChatGenerationParamsPluginContextCompression; /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. @@ -376,9 +405,31 @@ export type ChatGenerationParamsImageConfig = export const Modality = { Text: "text", Image: "image", + Audio: "audio", } as const; export type Modality = OpenEnum; +export const ChatGenerationParamsType = { + Ephemeral: "ephemeral", +} as const; +export type ChatGenerationParamsType = ClosedEnum< + typeof ChatGenerationParamsType +>; + +export const ChatGenerationParamsTtl = { + Fivem: "5m", + Oneh: "1h", +} as const; +export type ChatGenerationParamsTtl = OpenEnum; + +/** + * Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + */ +export type CacheControl = { + type: ChatGenerationParamsType; + ttl?: ChatGenerationParamsTtl | undefined; +}; + /** * Chat completion request parameters */ @@ -397,6 +448,7 @@ export type ChatGenerationParams = { | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing + | ChatGenerationParamsPluginContextCompression > | undefined; /** @@ -444,7 +496,7 @@ export type ChatGenerationParams = { */ maxCompletionTokens?: number | null | undefined; /** - * Maximum tokens (deprecated, use max_completion_tokens) + * Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. */ maxTokens?: number | null | undefined; /** @@ -513,9 +565,13 @@ export type ChatGenerationParams = { | { [k: string]: string | number | Array } | undefined; /** - * Output modalities for the response. Supported values are "text" and "image". + * Output modalities for the response. Supported values are "text", "image", and "audio". */ modalities?: Array | undefined; + /** + * Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + */ + cacheControl?: CacheControl | undefined; }; /** @internal */ @@ -792,6 +848,35 @@ export function chatGenerationParamsProviderToJSON( ); } +/** @internal */ +export type ChatGenerationParamsPluginContextCompression$Outbound = { + id: "context-compression"; + enabled?: boolean | undefined; + engine?: string | undefined; +}; + +/** @internal */ +export const ChatGenerationParamsPluginContextCompression$outboundSchema: + z.ZodType< + ChatGenerationParamsPluginContextCompression$Outbound, + ChatGenerationParamsPluginContextCompression + > = z.object({ + id: z.literal("context-compression"), + enabled: z.boolean().optional(), + engine: ContextCompressionEngine$outboundSchema.optional(), + }); + +export function chatGenerationParamsPluginContextCompressionToJSON( + chatGenerationParamsPluginContextCompression: + ChatGenerationParamsPluginContextCompression, +): string { + return JSON.stringify( + ChatGenerationParamsPluginContextCompression$outboundSchema.parse( + chatGenerationParamsPluginContextCompression, + ), + ); +} + /** @internal */ export type ChatGenerationParamsPluginResponseHealing$Outbound = { id: "response-healing"; @@ -853,6 +938,8 @@ export type ChatGenerationParamsPluginWeb$Outbound = { max_results?: number | undefined; search_prompt?: string | undefined; engine?: string | undefined; + include_domains?: Array | undefined; + exclude_domains?: Array | undefined; }; /** @internal */ @@ -865,10 +952,14 @@ export const ChatGenerationParamsPluginWeb$outboundSchema: z.ZodType< maxResults: z.number().optional(), searchPrompt: z.string().optional(), engine: WebSearchEngine$outboundSchema.optional(), + includeDomains: z.array(z.string()).optional(), + excludeDomains: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { maxResults: "max_results", searchPrompt: "search_prompt", + includeDomains: "include_domains", + excludeDomains: "exclude_domains", }); }); @@ -942,7 +1033,8 @@ export type ChatGenerationParamsPluginUnion$Outbound = | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound - | ChatGenerationParamsPluginResponseHealing$Outbound; + | ChatGenerationParamsPluginResponseHealing$Outbound + | ChatGenerationParamsPluginContextCompression$Outbound; /** @internal */ export const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType< @@ -954,6 +1046,7 @@ export const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType< z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema), z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema), z.lazy(() => ChatGenerationParamsPluginResponseHealing$outboundSchema), + z.lazy(() => ChatGenerationParamsPluginContextCompression$outboundSchema), ]); export function chatGenerationParamsPluginUnionToJSON( @@ -1096,6 +1189,36 @@ export function chatGenerationParamsImageConfigToJSON( export const Modality$outboundSchema: z.ZodType = openEnums .outboundSchema(Modality); +/** @internal */ +export const ChatGenerationParamsType$outboundSchema: z.ZodEnum< + typeof ChatGenerationParamsType +> = z.enum(ChatGenerationParamsType); + +/** @internal */ +export const ChatGenerationParamsTtl$outboundSchema: z.ZodType< + string, + ChatGenerationParamsTtl +> = openEnums.outboundSchema(ChatGenerationParamsTtl); + +/** @internal */ +export type CacheControl$Outbound = { + type: string; + ttl?: string | undefined; +}; + +/** @internal */ +export const CacheControl$outboundSchema: z.ZodType< + CacheControl$Outbound, + CacheControl +> = z.object({ + type: ChatGenerationParamsType$outboundSchema, + ttl: ChatGenerationParamsTtl$outboundSchema.optional(), +}); + +export function cacheControlToJSON(cacheControl: CacheControl): string { + return JSON.stringify(CacheControl$outboundSchema.parse(cacheControl)); +} + /** @internal */ export type ChatGenerationParams$Outbound = { provider?: ChatGenerationParamsProvider$Outbound | null | undefined; @@ -1106,6 +1229,7 @@ export type ChatGenerationParams$Outbound = { | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound + | ChatGenerationParamsPluginContextCompression$Outbound > | undefined; user?: string | undefined; @@ -1144,6 +1268,7 @@ export type ChatGenerationParams$Outbound = { | { [k: string]: string | number | Array } | undefined; modalities?: Array | undefined; + cache_control?: CacheControl$Outbound | undefined; }; /** @internal */ @@ -1161,6 +1286,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema), z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema), z.lazy(() => ChatGenerationParamsPluginResponseHealing$outboundSchema), + z.lazy(() => ChatGenerationParamsPluginContextCompression$outboundSchema), ]), ).optional(), user: z.string().optional(), @@ -1201,6 +1327,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< z.union([z.string(), z.number(), z.array(z.nullable(z.any()))]), ).optional(), modalities: z.array(Modality$outboundSchema).optional(), + cacheControl: z.lazy(() => CacheControl$outboundSchema).optional(), }).transform((v) => { return remap$(v, { sessionId: "session_id", @@ -1216,6 +1343,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< toolChoice: "tool_choice", topP: "top_p", imageConfig: "image_config", + cacheControl: "cache_control", }); }); diff --git a/src/models/chatmessagecontentitem.ts b/src/models/chatmessagecontentitem.ts index 096ae163..8ac1bdcb 100644 --- a/src/models/chatmessagecontentitem.ts +++ b/src/models/chatmessagecontentitem.ts @@ -12,6 +12,12 @@ import { ChatMessageContentItemAudio$Outbound, ChatMessageContentItemAudio$outboundSchema, } from "./chatmessagecontentitemaudio.js"; +import { + ChatMessageContentItemFile, + ChatMessageContentItemFile$inboundSchema, + ChatMessageContentItemFile$Outbound, + ChatMessageContentItemFile$outboundSchema, +} from "./chatmessagecontentitemfile.js"; import { ChatMessageContentItemImage, ChatMessageContentItemImage$inboundSchema, @@ -49,6 +55,7 @@ export type ChatMessageContentItem = | ChatMessageContentItemText | ChatMessageContentItemImage | ChatMessageContentItemAudio + | ChatMessageContentItemFile | ChatMessageContentItemVideoLegacy | ChatMessageContentItemVideo; @@ -99,6 +106,7 @@ export const ChatMessageContentItem$inboundSchema: z.ZodType< ChatMessageContentItemText$inboundSchema, ChatMessageContentItemImage$inboundSchema, ChatMessageContentItemAudio$inboundSchema, + ChatMessageContentItemFile$inboundSchema, z.union([ ChatMessageContentItemVideoLegacy$inboundSchema, ChatMessageContentItemVideo$inboundSchema, @@ -109,6 +117,7 @@ export type ChatMessageContentItem$Outbound = | ChatMessageContentItemText$Outbound | ChatMessageContentItemImage$Outbound | ChatMessageContentItemAudio$Outbound + | ChatMessageContentItemFile$Outbound | ChatMessageContentItemVideoLegacy$Outbound | ChatMessageContentItemVideo$Outbound; @@ -120,6 +129,7 @@ export const ChatMessageContentItem$outboundSchema: z.ZodType< ChatMessageContentItemText$outboundSchema, ChatMessageContentItemImage$outboundSchema, ChatMessageContentItemAudio$outboundSchema, + ChatMessageContentItemFile$outboundSchema, z.union([ ChatMessageContentItemVideoLegacy$outboundSchema, ChatMessageContentItemVideo$outboundSchema, diff --git a/src/models/chatmessagecontentitemcachecontrol.ts b/src/models/chatmessagecontentitemcachecontrol.ts index e92d5063..ea644cc1 100644 --- a/src/models/chatmessagecontentitemcachecontrol.ts +++ b/src/models/chatmessagecontentitemcachecontrol.ts @@ -17,18 +17,20 @@ export type ChatMessageContentItemCacheControlType = ClosedEnum< typeof ChatMessageContentItemCacheControlType >; -export const Ttl = { +export const ChatMessageContentItemCacheControlTtl = { Fivem: "5m", Oneh: "1h", } as const; -export type Ttl = OpenEnum; +export type ChatMessageContentItemCacheControlTtl = OpenEnum< + typeof ChatMessageContentItemCacheControlTtl +>; /** * Cache control for the content part */ export type ChatMessageContentItemCacheControl = { type: ChatMessageContentItemCacheControlType; - ttl?: Ttl | undefined; + ttl?: ChatMessageContentItemCacheControlTtl | undefined; }; /** @internal */ @@ -41,11 +43,15 @@ export const ChatMessageContentItemCacheControlType$outboundSchema: z.ZodEnum< > = ChatMessageContentItemCacheControlType$inboundSchema; /** @internal */ -export const Ttl$inboundSchema: z.ZodType = openEnums - .inboundSchema(Ttl); +export const ChatMessageContentItemCacheControlTtl$inboundSchema: z.ZodType< + ChatMessageContentItemCacheControlTtl, + unknown +> = openEnums.inboundSchema(ChatMessageContentItemCacheControlTtl); /** @internal */ -export const Ttl$outboundSchema: z.ZodType = openEnums - .outboundSchema(Ttl); +export const ChatMessageContentItemCacheControlTtl$outboundSchema: z.ZodType< + string, + ChatMessageContentItemCacheControlTtl +> = openEnums.outboundSchema(ChatMessageContentItemCacheControlTtl); /** @internal */ export const ChatMessageContentItemCacheControl$inboundSchema: z.ZodType< @@ -53,7 +59,7 @@ export const ChatMessageContentItemCacheControl$inboundSchema: z.ZodType< unknown > = z.object({ type: ChatMessageContentItemCacheControlType$inboundSchema, - ttl: Ttl$inboundSchema.optional(), + ttl: ChatMessageContentItemCacheControlTtl$inboundSchema.optional(), }); /** @internal */ export type ChatMessageContentItemCacheControl$Outbound = { @@ -67,7 +73,7 @@ export const ChatMessageContentItemCacheControl$outboundSchema: z.ZodType< ChatMessageContentItemCacheControl > = z.object({ type: ChatMessageContentItemCacheControlType$outboundSchema, - ttl: Ttl$outboundSchema.optional(), + ttl: ChatMessageContentItemCacheControlTtl$outboundSchema.optional(), }); export function chatMessageContentItemCacheControlToJSON( diff --git a/src/models/chatmessagecontentitemfile.ts b/src/models/chatmessagecontentitemfile.ts new file mode 100644 index 00000000..95382925 --- /dev/null +++ b/src/models/chatmessagecontentitemfile.ts @@ -0,0 +1,133 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ec73b7087290 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { ClosedEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const ChatMessageContentItemFileType = { + File: "file", +} as const; +export type ChatMessageContentItemFileType = ClosedEnum< + typeof ChatMessageContentItemFileType +>; + +export type FileT = { + /** + * File content as base64 data URL or URL + */ + fileData?: string | undefined; + /** + * File ID for previously uploaded files + */ + fileId?: string | undefined; + /** + * Original filename + */ + filename?: string | undefined; +}; + +/** + * File content part for document processing + */ +export type ChatMessageContentItemFile = { + type: ChatMessageContentItemFileType; + file: FileT; +}; + +/** @internal */ +export const ChatMessageContentItemFileType$inboundSchema: z.ZodEnum< + typeof ChatMessageContentItemFileType +> = z.enum(ChatMessageContentItemFileType); +/** @internal */ +export const ChatMessageContentItemFileType$outboundSchema: z.ZodEnum< + typeof ChatMessageContentItemFileType +> = ChatMessageContentItemFileType$inboundSchema; + +/** @internal */ +export const FileT$inboundSchema: z.ZodType = z.object({ + file_data: z.string().optional(), + file_id: z.string().optional(), + filename: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "file_data": "fileData", + "file_id": "fileId", + }); +}); +/** @internal */ +export type FileT$Outbound = { + file_data?: string | undefined; + file_id?: string | undefined; + filename?: string | undefined; +}; + +/** @internal */ +export const FileT$outboundSchema: z.ZodType = z.object({ + fileData: z.string().optional(), + fileId: z.string().optional(), + filename: z.string().optional(), +}).transform((v) => { + return remap$(v, { + fileData: "file_data", + fileId: "file_id", + }); +}); + +export function fileToJSON(fileT: FileT): string { + return JSON.stringify(FileT$outboundSchema.parse(fileT)); +} +export function fileFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FileT$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FileT' from JSON`, + ); +} + +/** @internal */ +export const ChatMessageContentItemFile$inboundSchema: z.ZodType< + ChatMessageContentItemFile, + unknown +> = z.object({ + type: ChatMessageContentItemFileType$inboundSchema, + file: z.lazy(() => FileT$inboundSchema), +}); +/** @internal */ +export type ChatMessageContentItemFile$Outbound = { + type: string; + file: FileT$Outbound; +}; + +/** @internal */ +export const ChatMessageContentItemFile$outboundSchema: z.ZodType< + ChatMessageContentItemFile$Outbound, + ChatMessageContentItemFile +> = z.object({ + type: ChatMessageContentItemFileType$outboundSchema, + file: z.lazy(() => FileT$outboundSchema), +}); + +export function chatMessageContentItemFileToJSON( + chatMessageContentItemFile: ChatMessageContentItemFile, +): string { + return JSON.stringify( + ChatMessageContentItemFile$outboundSchema.parse(chatMessageContentItemFile), + ); +} +export function chatMessageContentItemFileFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChatMessageContentItemFile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatMessageContentItemFile' from JSON`, + ); +} diff --git a/src/models/chatmessagetokenlogprobs.ts b/src/models/chatmessagetokenlogprobs.ts index 96f62bae..4922b3e7 100644 --- a/src/models/chatmessagetokenlogprobs.ts +++ b/src/models/chatmessagetokenlogprobs.ts @@ -23,7 +23,7 @@ export type ChatMessageTokenLogprobs = { /** * Log probabilities for refusal tokens */ - refusal: Array | null; + refusal?: Array | null | undefined; }; /** @internal */ @@ -32,7 +32,8 @@ export const ChatMessageTokenLogprobs$inboundSchema: z.ZodType< unknown > = z.object({ content: z.nullable(z.array(ChatMessageTokenLogprob$inboundSchema)), - refusal: z.nullable(z.array(ChatMessageTokenLogprob$inboundSchema)), + refusal: z.nullable(z.array(ChatMessageTokenLogprob$inboundSchema)) + .optional(), }); export function chatMessageTokenLogprobsFromJSON( diff --git a/src/models/chatresponse.ts b/src/models/chatresponse.ts index e53973ba..99b667cb 100644 --- a/src/models/chatresponse.ts +++ b/src/models/chatresponse.ts @@ -47,7 +47,7 @@ export type ChatResponse = { /** * System fingerprint */ - systemFingerprint?: string | null | undefined; + systemFingerprint: string | null; /** * Token usage statistics */ @@ -67,7 +67,7 @@ export const ChatResponse$inboundSchema: z.ZodType = z created: z.number(), model: z.string(), object: ChatResponseObject$inboundSchema, - system_fingerprint: z.nullable(z.string()).optional(), + system_fingerprint: z.nullable(z.string()), usage: ChatGenerationTokenUsage$inboundSchema.optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatstreamingmessagechunk.ts b/src/models/chatstreamingmessagechunk.ts index 343bf68c..8382a5d4 100644 --- a/src/models/chatstreamingmessagechunk.ts +++ b/src/models/chatstreamingmessagechunk.ts @@ -8,6 +8,10 @@ import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; +import { + ChatCompletionAudioOutput, + ChatCompletionAudioOutput$inboundSchema, +} from "./chatcompletionaudiooutput.js"; import { ChatStreamingMessageToolCall, ChatStreamingMessageToolCall$inboundSchema, @@ -59,6 +63,7 @@ export type ChatStreamingMessageChunk = { * Reasoning details for extended thinking models */ reasoningDetails?: Array | undefined; + audio?: ChatCompletionAudioOutput | undefined; }; /** @internal */ @@ -77,6 +82,7 @@ export const ChatStreamingMessageChunk$inboundSchema: z.ZodType< refusal: z.nullable(z.string()).optional(), tool_calls: z.array(ChatStreamingMessageToolCall$inboundSchema).optional(), reasoning_details: z.array(ReasoningDetailUnion$inboundSchema).optional(), + audio: ChatCompletionAudioOutput$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tool_calls": "toolCalls", diff --git a/src/models/chatstreamingresponsechunk.ts b/src/models/chatstreamingresponsechunk.ts index 9ed8b45e..bbcaeceb 100644 --- a/src/models/chatstreamingresponsechunk.ts +++ b/src/models/chatstreamingresponsechunk.ts @@ -63,7 +63,7 @@ export type ChatStreamingResponseChunk = { /** * System fingerprint */ - systemFingerprint?: string | null | undefined; + systemFingerprint?: string | undefined; /** * Error information */ @@ -105,7 +105,7 @@ export const ChatStreamingResponseChunk$inboundSchema: z.ZodType< created: z.number(), model: z.string(), object: ChatStreamingResponseChunkObject$inboundSchema, - system_fingerprint: z.nullable(z.string()).optional(), + system_fingerprint: z.string().optional(), error: z.lazy(() => ErrorT$inboundSchema).optional(), usage: ChatGenerationTokenUsage$inboundSchema.optional(), }).transform((v) => { diff --git a/src/models/compoundfilter.ts b/src/models/compoundfilter.ts new file mode 100644 index 00000000..addc6873 --- /dev/null +++ b/src/models/compoundfilter.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: beca2c6f6a75 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const CompoundFilterType = { + And: "and", + Or: "or", +} as const; +export type CompoundFilterType = OpenEnum; + +/** + * A compound filter that combines multiple comparison or compound filters + */ +export type CompoundFilter = { + type: CompoundFilterType; + filters: Array<{ [k: string]: any | null }>; +}; + +/** @internal */ +export const CompoundFilterType$inboundSchema: z.ZodType< + CompoundFilterType, + unknown +> = openEnums.inboundSchema(CompoundFilterType); +/** @internal */ +export const CompoundFilterType$outboundSchema: z.ZodType< + string, + CompoundFilterType +> = openEnums.outboundSchema(CompoundFilterType); + +/** @internal */ +export const CompoundFilter$inboundSchema: z.ZodType = + z.object({ + type: CompoundFilterType$inboundSchema, + filters: z.array(z.record(z.string(), z.nullable(z.any()))), + }); +/** @internal */ +export type CompoundFilter$Outbound = { + type: string; + filters: Array<{ [k: string]: any | null }>; +}; + +/** @internal */ +export const CompoundFilter$outboundSchema: z.ZodType< + CompoundFilter$Outbound, + CompoundFilter +> = z.object({ + type: CompoundFilterType$outboundSchema, + filters: z.array(z.record(z.string(), z.nullable(z.any()))), +}); + +export function compoundFilterToJSON(compoundFilter: CompoundFilter): string { + return JSON.stringify(CompoundFilter$outboundSchema.parse(compoundFilter)); +} +export function compoundFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CompoundFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CompoundFilter' from JSON`, + ); +} diff --git a/src/models/conflictresponseerrordata.ts b/src/models/conflictresponseerrordata.ts new file mode 100644 index 00000000..4574f2e6 --- /dev/null +++ b/src/models/conflictresponseerrordata.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2d338e49f2cb + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Error data for ConflictResponse + */ +export type ConflictResponseErrorData = { + code: number; + message: string; + metadata?: { [k: string]: any | null } | null | undefined; +}; + +/** @internal */ +export const ConflictResponseErrorData$inboundSchema: z.ZodType< + ConflictResponseErrorData, + unknown +> = z.object({ + code: z.int(), + message: z.string(), + metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), +}); + +export function conflictResponseErrorDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConflictResponseErrorData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConflictResponseErrorData' from JSON`, + ); +} diff --git a/src/models/contextcompressionengine.ts b/src/models/contextcompressionengine.ts new file mode 100644 index 00000000..bf03c28d --- /dev/null +++ b/src/models/contextcompressionengine.ts @@ -0,0 +1,25 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 681f31ea12f7 + */ + +import * as z from "zod/v4"; +import { ClosedEnum } from "../types/enums.js"; + +/** + * The compression engine to use. Defaults to "middle-out". + */ +export const ContextCompressionEngine = { + MiddleOut: "middle-out", +} as const; +/** + * The compression engine to use. Defaults to "middle-out". + */ +export type ContextCompressionEngine = ClosedEnum< + typeof ContextCompressionEngine +>; + +/** @internal */ +export const ContextCompressionEngine$outboundSchema: z.ZodEnum< + typeof ContextCompressionEngine +> = z.enum(ContextCompressionEngine); diff --git a/src/models/datetimeservertool.ts b/src/models/datetimeservertool.ts new file mode 100644 index 00000000..a4beff36 --- /dev/null +++ b/src/models/datetimeservertool.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e4d8b08fcbb5 + */ + +import * as z from "zod/v4"; + +export type DatetimeServerToolParameters = { + /** + * IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + */ + timezone?: string | undefined; +}; + +/** + * OpenRouter built-in server tool: returns the current date and time + */ +export type DatetimeServerTool = { + type: "openrouter:datetime"; + parameters?: DatetimeServerToolParameters | undefined; +}; + +/** @internal */ +export type DatetimeServerToolParameters$Outbound = { + timezone?: string | undefined; +}; + +/** @internal */ +export const DatetimeServerToolParameters$outboundSchema: z.ZodType< + DatetimeServerToolParameters$Outbound, + DatetimeServerToolParameters +> = z.object({ + timezone: z.string().optional(), +}); + +export function datetimeServerToolParametersToJSON( + datetimeServerToolParameters: DatetimeServerToolParameters, +): string { + return JSON.stringify( + DatetimeServerToolParameters$outboundSchema.parse( + datetimeServerToolParameters, + ), + ); +} + +/** @internal */ +export type DatetimeServerTool$Outbound = { + type: "openrouter:datetime"; + parameters?: DatetimeServerToolParameters$Outbound | undefined; +}; + +/** @internal */ +export const DatetimeServerTool$outboundSchema: z.ZodType< + DatetimeServerTool$Outbound, + DatetimeServerTool +> = z.object({ + type: z.literal("openrouter:datetime"), + parameters: z.lazy(() => DatetimeServerToolParameters$outboundSchema) + .optional(), +}); + +export function datetimeServerToolToJSON( + datetimeServerTool: DatetimeServerTool, +): string { + return JSON.stringify( + DatetimeServerTool$outboundSchema.parse(datetimeServerTool), + ); +} diff --git a/src/models/defaultparameters.ts b/src/models/defaultparameters.ts index 25444216..b2603a4d 100644 --- a/src/models/defaultparameters.ts +++ b/src/models/defaultparameters.ts @@ -15,7 +15,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type DefaultParameters = { temperature?: number | null | undefined; topP?: number | null | undefined; + topK?: number | null | undefined; frequencyPenalty?: number | null | undefined; + presencePenalty?: number | null | undefined; + repetitionPenalty?: number | null | undefined; }; /** @internal */ @@ -25,11 +28,17 @@ export const DefaultParameters$inboundSchema: z.ZodType< > = z.object({ temperature: z.nullable(z.number()).optional(), top_p: z.nullable(z.number()).optional(), + top_k: z.nullable(z.int()).optional(), frequency_penalty: z.nullable(z.number()).optional(), + presence_penalty: z.nullable(z.number()).optional(), + repetition_penalty: z.nullable(z.number()).optional(), }).transform((v) => { return remap$(v, { "top_p": "topP", + "top_k": "topK", "frequency_penalty": "frequencyPenalty", + "presence_penalty": "presencePenalty", + "repetition_penalty": "repetitionPenalty", }); }); diff --git a/src/models/errors/conflictresponseerror.ts b/src/models/errors/conflictresponseerror.ts new file mode 100644 index 00000000..ccc1545b --- /dev/null +++ b/src/models/errors/conflictresponseerror.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: dd0f74c866de + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; +import { OpenRouterError } from "./openroutererror.js"; + +/** + * Conflict - Resource conflict or concurrent modification + */ +export type ConflictResponseErrorData = { + /** + * Error data for ConflictResponse + */ + error: models.ConflictResponseErrorData; + userId?: string | null | undefined; +}; + +/** + * Conflict - Resource conflict or concurrent modification + */ +export class ConflictResponseError extends OpenRouterError { + /** + * Error data for ConflictResponse + */ + error: models.ConflictResponseErrorData; + userId?: string | null | undefined; + + /** The original data that was passed to this error instance. */ + data$: ConflictResponseErrorData; + + constructor( + err: ConflictResponseErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { + const message = err.error?.message + || `API error occurred: ${JSON.stringify(err)}`; + super(message, httpMeta); + this.data$ = err; + this.error = err.error; + if (err.userId != null) this.userId = err.userId; + + this.name = "ConflictResponseError"; + } +} + +/** @internal */ +export const ConflictResponseError$inboundSchema: z.ZodType< + ConflictResponseError, + unknown +> = z.object({ + error: models.ConflictResponseErrorData$inboundSchema, + user_id: z.nullable(z.string()).optional(), + request$: z.custom(x => x instanceof Request), + response$: z.custom(x => x instanceof Response), + body$: z.string(), +}) + .transform((v) => { + const remapped = remap$(v, { + "user_id": "userId", + }); + + return new ConflictResponseError(remapped, { + request: v.request$, + response: v.response$, + body: v.body$, + }); + }); diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 173a02ae..a34db9ef 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -5,6 +5,7 @@ export * from "./badgatewayresponseerror.js"; export * from "./badrequestresponseerror.js"; +export * from "./conflictresponseerror.js"; export * from "./edgenetworktimeoutresponseerror.js"; export * from "./forbiddenresponseerror.js"; export * from "./httpclienterrors.js"; diff --git a/src/models/index.ts b/src/models/index.ts index 62a6e792..d2187898 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -8,12 +8,14 @@ export * from "./assistantmessage.js"; export * from "./assistantmessageimages.js"; export * from "./badgatewayresponseerrordata.js"; export * from "./badrequestresponseerrordata.js"; +export * from "./chatcompletionaudiooutput.js"; export * from "./chatcompletionfinishreason.js"; export * from "./chatgenerationparams.js"; export * from "./chatgenerationtokenusage.js"; export * from "./chatmessagecontentitem.js"; export * from "./chatmessagecontentitemaudio.js"; export * from "./chatmessagecontentitemcachecontrol.js"; +export * from "./chatmessagecontentitemfile.js"; export * from "./chatmessagecontentitemimage.js"; export * from "./chatmessagecontentitemtext.js"; export * from "./chatmessagecontentitemvideo.js"; @@ -28,8 +30,12 @@ export * from "./chatstreamingmessagechunk.js"; export * from "./chatstreamingmessagetoolcall.js"; export * from "./chatstreamingresponsechunk.js"; export * from "./chatstreamoptions.js"; +export * from "./compoundfilter.js"; +export * from "./conflictresponseerrordata.js"; +export * from "./contextcompressionengine.js"; export * from "./createchargerequest.js"; export * from "./datacollection.js"; +export * from "./datetimeservertool.js"; export * from "./debugoptions.js"; export * from "./defaultparameters.js"; export * from "./developermessage.js"; @@ -64,17 +70,25 @@ export * from "./openairesponsesresponsestatus.js"; export * from "./openairesponsesservicetier.js"; export * from "./openairesponsestoolchoiceunion.js"; export * from "./openairesponsestruncation.js"; +export * from "./openresponsesapplypatchtool.js"; +export * from "./openresponsescodeinterpretertool.js"; +export * from "./openresponsescomputertool.js"; +export * from "./openresponsescustomtool.js"; export * from "./openresponseseasyinputmessage.js"; export * from "./openresponseserrorevent.js"; +export * from "./openresponsesfilesearchtool.js"; export * from "./openresponsesfunctioncalloutput.js"; +export * from "./openresponsesfunctionshelltool.js"; export * from "./openresponsesfunctiontoolcall.js"; export * from "./openresponsesimagegencallcompleted.js"; export * from "./openresponsesimagegencallgenerating.js"; export * from "./openresponsesimagegencallinprogress.js"; export * from "./openresponsesimagegencallpartialimage.js"; -export * from "./openresponsesinput.js"; +export * from "./openresponsesimagegenerationtool.js"; export * from "./openresponsesinputmessageitem.js"; -export * from "./openresponseslogprobs.js"; +export * from "./openresponsesinputunion.js"; +export * from "./openresponseslocalshelltool.js"; +export * from "./openresponsesmcptool.js"; export * from "./openresponsesnonstreamingresponse.js"; export * from "./openresponsesreasoning.js"; export * from "./openresponsesreasoningconfig.js"; @@ -86,9 +100,11 @@ export * from "./openresponsesreasoningsummarytextdoneevent.js"; export * from "./openresponsesrequest.js"; export * from "./openresponsesresponsetext.js"; export * from "./openresponsesstreamevent.js"; -export * from "./openresponsestoplogprobs.js"; export * from "./openresponsesusage.js"; export * from "./openresponseswebsearch20250826tool.js"; +export * from "./openresponseswebsearchcallcompleted.js"; +export * from "./openresponseswebsearchcallinprogress.js"; +export * from "./openresponseswebsearchcallsearching.js"; export * from "./openresponseswebsearchpreview20250311tool.js"; export * from "./openresponseswebsearchpreviewtool.js"; export * from "./openresponseswebsearchtool.js"; @@ -145,7 +161,9 @@ export * from "./responsesoutputitemreasoning.js"; export * from "./responsesoutputmessage.js"; export * from "./responsesoutputmodality.js"; export * from "./responsessearchcontextsize.js"; +export * from "./responsesservertooloutput.js"; export * from "./responseswebsearchcalloutput.js"; +export * from "./responseswebsearchservertool.js"; export * from "./responseswebsearchuserlocation.js"; export * from "./responsetextconfig.js"; export * from "./security.js"; @@ -164,5 +182,6 @@ export * from "./usermessage.js"; export * from "./videoinput.js"; export * from "./websearchengine.js"; export * from "./websearchpreviewtooluserlocation.js"; +export * from "./websearchservertool.js"; +export * from "./websearchshorthand.js"; export * from "./websearchstatus.js"; -export * from "./claude-message.js"; diff --git a/src/models/openairesponsesinputunion.ts b/src/models/openairesponsesinputunion.ts index 562b0cb2..2a0c6885 100644 --- a/src/models/openairesponsesinputunion.ts +++ b/src/models/openairesponsesinputunion.ts @@ -58,11 +58,30 @@ export type OpenAIResponsesInputTypeFunctionCallOutput = ClosedEnum< typeof OpenAIResponsesInputTypeFunctionCallOutput >; +export type OpenAIResponsesInputOutput1 = + | ResponseInputText + | (ResponseInputImage & { type: "input_image" }) + | ResponseInputFile; + +export type OpenAIResponsesInputOutput2 = + | string + | Array< + | ResponseInputText + | (ResponseInputImage & { type: "input_image" }) + | ResponseInputFile + >; + export type OpenAIResponsesInputFunctionCallOutput = { type: OpenAIResponsesInputTypeFunctionCallOutput; id?: string | null | undefined; callId: string; - output: string; + output: + | string + | Array< + | ResponseInputText + | (ResponseInputImage & { type: "input_image" }) + | ResponseInputFile + >; status?: ToolCallStatus | null | undefined; }; @@ -176,6 +195,25 @@ export type OpenAIResponsesInputContent2 = > | string; +export const OpenAIResponsesInputPhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OpenAIResponsesInputPhaseFinalAnswer = ClosedEnum< + typeof OpenAIResponsesInputPhaseFinalAnswer +>; + +export const OpenAIResponsesInputPhaseCommentary = { + Commentary: "commentary", +} as const; +export type OpenAIResponsesInputPhaseCommentary = ClosedEnum< + typeof OpenAIResponsesInputPhaseCommentary +>; + +export type OpenAIResponsesInputPhaseUnion = + | OpenAIResponsesInputPhaseCommentary + | OpenAIResponsesInputPhaseFinalAnswer + | any; + export type OpenAIResponsesInputMessage1 = { type?: OpenAIResponsesInputTypeMessage1 | undefined; role: @@ -191,6 +229,12 @@ export type OpenAIResponsesInputMessage1 = { | ResponseInputAudio > | string; + phase?: + | OpenAIResponsesInputPhaseCommentary + | OpenAIResponsesInputPhaseFinalAnswer + | any + | null + | undefined; }; export type OpenAIResponsesInputUnion1 = @@ -251,6 +295,55 @@ export const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema: OpenAIResponsesInputTypeFunctionCallOutput, ); +/** @internal */ +export const OpenAIResponsesInputOutput1$inboundSchema: z.ZodType< + OpenAIResponsesInputOutput1, + unknown +> = z.union([ + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + ResponseInputFile$inboundSchema, +]); + +export function openAIResponsesInputOutput1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponsesInputOutput1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponsesInputOutput1' from JSON`, + ); +} + +/** @internal */ +export const OpenAIResponsesInputOutput2$inboundSchema: z.ZodType< + OpenAIResponsesInputOutput2, + unknown +> = z.union([ + z.string(), + z.array( + z.union([ + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + ResponseInputFile$inboundSchema, + ]), + ), +]); + +export function openAIResponsesInputOutput2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponsesInputOutput2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponsesInputOutput2' from JSON`, + ); +} + /** @internal */ export const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType< OpenAIResponsesInputFunctionCallOutput, @@ -259,7 +352,18 @@ export const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType< type: OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema, id: z.nullable(z.string()).optional(), call_id: z.string(), - output: z.string(), + output: z.union([ + z.string(), + z.array( + z.union([ + ResponseInputText$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), + ResponseInputFile$inboundSchema, + ]), + ), + ]), status: z.nullable(ToolCallStatus$inboundSchema).optional(), }).transform((v) => { return remap$(v, { @@ -472,6 +576,36 @@ export function openAIResponsesInputContent2FromJSON( ); } +/** @internal */ +export const OpenAIResponsesInputPhaseFinalAnswer$inboundSchema: z.ZodEnum< + typeof OpenAIResponsesInputPhaseFinalAnswer +> = z.enum(OpenAIResponsesInputPhaseFinalAnswer); + +/** @internal */ +export const OpenAIResponsesInputPhaseCommentary$inboundSchema: z.ZodEnum< + typeof OpenAIResponsesInputPhaseCommentary +> = z.enum(OpenAIResponsesInputPhaseCommentary); + +/** @internal */ +export const OpenAIResponsesInputPhaseUnion$inboundSchema: z.ZodType< + OpenAIResponsesInputPhaseUnion, + unknown +> = z.union([ + OpenAIResponsesInputPhaseCommentary$inboundSchema, + OpenAIResponsesInputPhaseFinalAnswer$inboundSchema, + z.any(), +]); + +export function openAIResponsesInputPhaseUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenAIResponsesInputPhaseUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenAIResponsesInputPhaseUnion' from JSON`, + ); +} + /** @internal */ export const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType< OpenAIResponsesInputMessage1, @@ -497,6 +631,13 @@ export const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType< ), z.string(), ]), + phase: z.nullable( + z.union([ + OpenAIResponsesInputPhaseCommentary$inboundSchema, + OpenAIResponsesInputPhaseFinalAnswer$inboundSchema, + z.any(), + ]), + ).optional(), }); export function openAIResponsesInputMessage1FromJSON( diff --git a/src/models/openresponsesapplypatchtool.ts b/src/models/openresponsesapplypatchtool.ts new file mode 100644 index 00000000..b0b2526b --- /dev/null +++ b/src/models/openresponsesapplypatchtool.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 84640a5e950b + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Apply patch tool configuration + */ +export type OpenResponsesApplyPatchTool = { + type: "apply_patch"; +}; + +/** @internal */ +export const OpenResponsesApplyPatchTool$inboundSchema: z.ZodType< + OpenResponsesApplyPatchTool, + unknown +> = z.object({ + type: z.literal("apply_patch"), +}); +/** @internal */ +export type OpenResponsesApplyPatchTool$Outbound = { + type: "apply_patch"; +}; + +/** @internal */ +export const OpenResponsesApplyPatchTool$outboundSchema: z.ZodType< + OpenResponsesApplyPatchTool$Outbound, + OpenResponsesApplyPatchTool +> = z.object({ + type: z.literal("apply_patch"), +}); + +export function openResponsesApplyPatchToolToJSON( + openResponsesApplyPatchTool: OpenResponsesApplyPatchTool, +): string { + return JSON.stringify( + OpenResponsesApplyPatchTool$outboundSchema.parse( + openResponsesApplyPatchTool, + ), + ); +} +export function openResponsesApplyPatchToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesApplyPatchTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesApplyPatchTool' from JSON`, + ); +} diff --git a/src/models/openresponsescodeinterpretertool.ts b/src/models/openresponsescodeinterpretertool.ts new file mode 100644 index 00000000..136ad250 --- /dev/null +++ b/src/models/openresponsescodeinterpretertool.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8d6c57413f99 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const ContainerType = { + Auto: "auto", +} as const; +export type ContainerType = ClosedEnum; + +export const MemoryLimit = { + Oneg: "1g", + Fourg: "4g", + Sixteeng: "16g", + SixtyFourg: "64g", +} as const; +export type MemoryLimit = OpenEnum; + +export type ContainerAuto = { + type: ContainerType; + fileIds?: Array | undefined; + memoryLimit?: MemoryLimit | null | undefined; +}; + +export type Container = ContainerAuto | string; + +/** + * Code interpreter tool configuration + */ +export type OpenResponsesCodeInterpreterTool = { + type: "code_interpreter"; + container: ContainerAuto | string; +}; + +/** @internal */ +export const ContainerType$inboundSchema: z.ZodEnum = z + .enum(ContainerType); +/** @internal */ +export const ContainerType$outboundSchema: z.ZodEnum = + ContainerType$inboundSchema; + +/** @internal */ +export const MemoryLimit$inboundSchema: z.ZodType = + openEnums.inboundSchema(MemoryLimit); +/** @internal */ +export const MemoryLimit$outboundSchema: z.ZodType = + openEnums.outboundSchema(MemoryLimit); + +/** @internal */ +export const ContainerAuto$inboundSchema: z.ZodType = z + .object({ + type: ContainerType$inboundSchema, + file_ids: z.array(z.string()).optional(), + memory_limit: z.nullable(MemoryLimit$inboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + "file_ids": "fileIds", + "memory_limit": "memoryLimit", + }); + }); +/** @internal */ +export type ContainerAuto$Outbound = { + type: string; + file_ids?: Array | undefined; + memory_limit?: string | null | undefined; +}; + +/** @internal */ +export const ContainerAuto$outboundSchema: z.ZodType< + ContainerAuto$Outbound, + ContainerAuto +> = z.object({ + type: ContainerType$outboundSchema, + fileIds: z.array(z.string()).optional(), + memoryLimit: z.nullable(MemoryLimit$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + fileIds: "file_ids", + memoryLimit: "memory_limit", + }); +}); + +export function containerAutoToJSON(containerAuto: ContainerAuto): string { + return JSON.stringify(ContainerAuto$outboundSchema.parse(containerAuto)); +} +export function containerAutoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ContainerAuto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ContainerAuto' from JSON`, + ); +} + +/** @internal */ +export const Container$inboundSchema: z.ZodType = z.union([ + z.lazy(() => ContainerAuto$inboundSchema), + z.string(), +]); +/** @internal */ +export type Container$Outbound = ContainerAuto$Outbound | string; + +/** @internal */ +export const Container$outboundSchema: z.ZodType< + Container$Outbound, + Container +> = z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]); + +export function containerToJSON(container: Container): string { + return JSON.stringify(Container$outboundSchema.parse(container)); +} +export function containerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Container$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Container' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesCodeInterpreterTool$inboundSchema: z.ZodType< + OpenResponsesCodeInterpreterTool, + unknown +> = z.object({ + type: z.literal("code_interpreter"), + container: z.union([z.lazy(() => ContainerAuto$inboundSchema), z.string()]), +}); +/** @internal */ +export type OpenResponsesCodeInterpreterTool$Outbound = { + type: "code_interpreter"; + container: ContainerAuto$Outbound | string; +}; + +/** @internal */ +export const OpenResponsesCodeInterpreterTool$outboundSchema: z.ZodType< + OpenResponsesCodeInterpreterTool$Outbound, + OpenResponsesCodeInterpreterTool +> = z.object({ + type: z.literal("code_interpreter"), + container: z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]), +}); + +export function openResponsesCodeInterpreterToolToJSON( + openResponsesCodeInterpreterTool: OpenResponsesCodeInterpreterTool, +): string { + return JSON.stringify( + OpenResponsesCodeInterpreterTool$outboundSchema.parse( + openResponsesCodeInterpreterTool, + ), + ); +} +export function openResponsesCodeInterpreterToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesCodeInterpreterTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesCodeInterpreterTool' from JSON`, + ); +} diff --git a/src/models/openresponsescomputertool.ts b/src/models/openresponsescomputertool.ts new file mode 100644 index 00000000..82ca0f38 --- /dev/null +++ b/src/models/openresponsescomputertool.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4cd864e2c4f2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const Environment = { + Windows: "windows", + Mac: "mac", + Linux: "linux", + Ubuntu: "ubuntu", + Browser: "browser", +} as const; +export type Environment = OpenEnum; + +/** + * Computer use preview tool configuration + */ +export type OpenResponsesComputerTool = { + type: "computer_use_preview"; + displayHeight: number; + displayWidth: number; + environment: Environment; +}; + +/** @internal */ +export const Environment$inboundSchema: z.ZodType = + openEnums.inboundSchema(Environment); +/** @internal */ +export const Environment$outboundSchema: z.ZodType = + openEnums.outboundSchema(Environment); + +/** @internal */ +export const OpenResponsesComputerTool$inboundSchema: z.ZodType< + OpenResponsesComputerTool, + unknown +> = z.object({ + type: z.literal("computer_use_preview"), + display_height: z.number(), + display_width: z.number(), + environment: Environment$inboundSchema, +}).transform((v) => { + return remap$(v, { + "display_height": "displayHeight", + "display_width": "displayWidth", + }); +}); +/** @internal */ +export type OpenResponsesComputerTool$Outbound = { + type: "computer_use_preview"; + display_height: number; + display_width: number; + environment: string; +}; + +/** @internal */ +export const OpenResponsesComputerTool$outboundSchema: z.ZodType< + OpenResponsesComputerTool$Outbound, + OpenResponsesComputerTool +> = z.object({ + type: z.literal("computer_use_preview"), + displayHeight: z.number(), + displayWidth: z.number(), + environment: Environment$outboundSchema, +}).transform((v) => { + return remap$(v, { + displayHeight: "display_height", + displayWidth: "display_width", + }); +}); + +export function openResponsesComputerToolToJSON( + openResponsesComputerTool: OpenResponsesComputerTool, +): string { + return JSON.stringify( + OpenResponsesComputerTool$outboundSchema.parse(openResponsesComputerTool), + ); +} +export function openResponsesComputerToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesComputerTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesComputerTool' from JSON`, + ); +} diff --git a/src/models/openresponsescustomtool.ts b/src/models/openresponsescustomtool.ts new file mode 100644 index 00000000..37074749 --- /dev/null +++ b/src/models/openresponsescustomtool.ts @@ -0,0 +1,194 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9f957484e6a0 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const Syntax = { + Lark: "lark", + Regex: "regex", +} as const; +export type Syntax = OpenEnum; + +export type FormatGrammar = { + type: "grammar"; + definition: string; + syntax: Syntax; +}; + +export type FormatText = { + type: "text"; +}; + +export type Format = FormatText | FormatGrammar; + +/** + * Custom tool configuration + */ +export type OpenResponsesCustomTool = { + type: "custom"; + name: string; + description?: string | undefined; + format?: FormatText | FormatGrammar | undefined; +}; + +/** @internal */ +export const Syntax$inboundSchema: z.ZodType = openEnums + .inboundSchema(Syntax); +/** @internal */ +export const Syntax$outboundSchema: z.ZodType = openEnums + .outboundSchema(Syntax); + +/** @internal */ +export const FormatGrammar$inboundSchema: z.ZodType = z + .object({ + type: z.literal("grammar"), + definition: z.string(), + syntax: Syntax$inboundSchema, + }); +/** @internal */ +export type FormatGrammar$Outbound = { + type: "grammar"; + definition: string; + syntax: string; +}; + +/** @internal */ +export const FormatGrammar$outboundSchema: z.ZodType< + FormatGrammar$Outbound, + FormatGrammar +> = z.object({ + type: z.literal("grammar"), + definition: z.string(), + syntax: Syntax$outboundSchema, +}); + +export function formatGrammarToJSON(formatGrammar: FormatGrammar): string { + return JSON.stringify(FormatGrammar$outboundSchema.parse(formatGrammar)); +} +export function formatGrammarFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FormatGrammar$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FormatGrammar' from JSON`, + ); +} + +/** @internal */ +export const FormatText$inboundSchema: z.ZodType = z + .object({ + type: z.literal("text"), + }); +/** @internal */ +export type FormatText$Outbound = { + type: "text"; +}; + +/** @internal */ +export const FormatText$outboundSchema: z.ZodType< + FormatText$Outbound, + FormatText +> = z.object({ + type: z.literal("text"), +}); + +export function formatTextToJSON(formatText: FormatText): string { + return JSON.stringify(FormatText$outboundSchema.parse(formatText)); +} +export function formatTextFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FormatText$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FormatText' from JSON`, + ); +} + +/** @internal */ +export const Format$inboundSchema: z.ZodType = z.union([ + z.lazy(() => FormatText$inboundSchema), + z.lazy(() => FormatGrammar$inboundSchema), +]); +/** @internal */ +export type Format$Outbound = FormatText$Outbound | FormatGrammar$Outbound; + +/** @internal */ +export const Format$outboundSchema: z.ZodType = z + .union([ + z.lazy(() => FormatText$outboundSchema), + z.lazy(() => FormatGrammar$outboundSchema), + ]); + +export function formatToJSON(format: Format): string { + return JSON.stringify(Format$outboundSchema.parse(format)); +} +export function formatFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Format$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Format' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesCustomTool$inboundSchema: z.ZodType< + OpenResponsesCustomTool, + unknown +> = z.object({ + type: z.literal("custom"), + name: z.string(), + description: z.string().optional(), + format: z.union([ + z.lazy(() => FormatText$inboundSchema), + z.lazy(() => FormatGrammar$inboundSchema), + ]).optional(), +}); +/** @internal */ +export type OpenResponsesCustomTool$Outbound = { + type: "custom"; + name: string; + description?: string | undefined; + format?: FormatText$Outbound | FormatGrammar$Outbound | undefined; +}; + +/** @internal */ +export const OpenResponsesCustomTool$outboundSchema: z.ZodType< + OpenResponsesCustomTool$Outbound, + OpenResponsesCustomTool +> = z.object({ + type: z.literal("custom"), + name: z.string(), + description: z.string().optional(), + format: z.union([ + z.lazy(() => FormatText$outboundSchema), + z.lazy(() => FormatGrammar$outboundSchema), + ]).optional(), +}); + +export function openResponsesCustomToolToJSON( + openResponsesCustomTool: OpenResponsesCustomTool, +): string { + return JSON.stringify( + OpenResponsesCustomTool$outboundSchema.parse(openResponsesCustomTool), + ); +} +export function openResponsesCustomToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesCustomTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesCustomTool' from JSON`, + ); +} diff --git a/src/models/openresponseseasyinputmessage.ts b/src/models/openresponseseasyinputmessage.ts index f8b55e63..d8bc76a9 100644 --- a/src/models/openresponseseasyinputmessage.ts +++ b/src/models/openresponseseasyinputmessage.ts @@ -102,7 +102,30 @@ export type OpenResponsesEasyInputMessageContentUnion2 = | ResponseInputAudio | ResponseInputVideo > - | string; + | string + | any; + +export const OpenResponsesEasyInputMessagePhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OpenResponsesEasyInputMessagePhaseFinalAnswer = ClosedEnum< + typeof OpenResponsesEasyInputMessagePhaseFinalAnswer +>; + +export const OpenResponsesEasyInputMessagePhaseCommentary = { + Commentary: "commentary", +} as const; +export type OpenResponsesEasyInputMessagePhaseCommentary = ClosedEnum< + typeof OpenResponsesEasyInputMessagePhaseCommentary +>; + +/** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ +export type OpenResponsesEasyInputMessagePhaseUnion = + | OpenResponsesEasyInputMessagePhaseCommentary + | OpenResponsesEasyInputMessagePhaseFinalAnswer + | any; export type OpenResponsesEasyInputMessage = { type?: OpenResponsesEasyInputMessageTypeMessage | undefined; @@ -111,7 +134,7 @@ export type OpenResponsesEasyInputMessage = { | OpenResponsesEasyInputMessageRoleSystem | OpenResponsesEasyInputMessageRoleAssistant | OpenResponsesEasyInputMessageRoleDeveloper; - content: + content?: | Array< | ResponseInputText | OpenResponsesEasyInputMessageContentInputImage @@ -119,7 +142,19 @@ export type OpenResponsesEasyInputMessage = { | ResponseInputAudio | ResponseInputVideo > - | string; + | string + | any + | null + | undefined; + /** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ + phase?: + | OpenResponsesEasyInputMessagePhaseCommentary + | OpenResponsesEasyInputMessagePhaseFinalAnswer + | any + | null + | undefined; }; /** @internal */ @@ -258,7 +293,8 @@ export type OpenResponsesEasyInputMessageContentUnion2$Outbound = | ResponseInputAudio$Outbound | ResponseInputVideo$Outbound > - | string; + | string + | any; /** @internal */ export const OpenResponsesEasyInputMessageContentUnion2$outboundSchema: @@ -276,6 +312,7 @@ export const OpenResponsesEasyInputMessageContentUnion2$outboundSchema: ResponseInputVideo$outboundSchema, ])), z.string(), + z.any(), ]); export function openResponsesEasyInputMessageContentUnion2ToJSON( @@ -289,11 +326,50 @@ export function openResponsesEasyInputMessageContentUnion2ToJSON( ); } +/** @internal */ +export const OpenResponsesEasyInputMessagePhaseFinalAnswer$outboundSchema: + z.ZodEnum = z.enum( + OpenResponsesEasyInputMessagePhaseFinalAnswer, + ); + +/** @internal */ +export const OpenResponsesEasyInputMessagePhaseCommentary$outboundSchema: + z.ZodEnum = z.enum( + OpenResponsesEasyInputMessagePhaseCommentary, + ); + +/** @internal */ +export type OpenResponsesEasyInputMessagePhaseUnion$Outbound = + | string + | string + | any; + +/** @internal */ +export const OpenResponsesEasyInputMessagePhaseUnion$outboundSchema: z.ZodType< + OpenResponsesEasyInputMessagePhaseUnion$Outbound, + OpenResponsesEasyInputMessagePhaseUnion +> = z.union([ + OpenResponsesEasyInputMessagePhaseCommentary$outboundSchema, + OpenResponsesEasyInputMessagePhaseFinalAnswer$outboundSchema, + z.any(), +]); + +export function openResponsesEasyInputMessagePhaseUnionToJSON( + openResponsesEasyInputMessagePhaseUnion: + OpenResponsesEasyInputMessagePhaseUnion, +): string { + return JSON.stringify( + OpenResponsesEasyInputMessagePhaseUnion$outboundSchema.parse( + openResponsesEasyInputMessagePhaseUnion, + ), + ); +} + /** @internal */ export type OpenResponsesEasyInputMessage$Outbound = { type?: string | undefined; role: string | string | string | string; - content: + content?: | Array< | ResponseInputText$Outbound | OpenResponsesEasyInputMessageContentInputImage$Outbound @@ -301,7 +377,11 @@ export type OpenResponsesEasyInputMessage$Outbound = { | ResponseInputAudio$Outbound | ResponseInputVideo$Outbound > - | string; + | string + | any + | null + | undefined; + phase?: string | string | any | null | undefined; }; /** @internal */ @@ -316,18 +396,28 @@ export const OpenResponsesEasyInputMessage$outboundSchema: z.ZodType< OpenResponsesEasyInputMessageRoleAssistant$outboundSchema, OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema, ]), - content: z.union([ - z.array(z.union([ - ResponseInputText$outboundSchema, - z.lazy(() => - OpenResponsesEasyInputMessageContentInputImage$outboundSchema - ), - ResponseInputFile$outboundSchema, - ResponseInputAudio$outboundSchema, - ResponseInputVideo$outboundSchema, - ])), - z.string(), - ]), + content: z.nullable( + z.union([ + z.array(z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => + OpenResponsesEasyInputMessageContentInputImage$outboundSchema + ), + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, + ResponseInputVideo$outboundSchema, + ])), + z.string(), + z.any(), + ]), + ).optional(), + phase: z.nullable( + z.union([ + OpenResponsesEasyInputMessagePhaseCommentary$outboundSchema, + OpenResponsesEasyInputMessagePhaseFinalAnswer$outboundSchema, + z.any(), + ]), + ).optional(), }); export function openResponsesEasyInputMessageToJSON( diff --git a/src/models/openresponsesfilesearchtool.ts b/src/models/openresponsesfilesearchtool.ts new file mode 100644 index 00000000..b747dfdc --- /dev/null +++ b/src/models/openresponsesfilesearchtool.ts @@ -0,0 +1,353 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0f461c2f2470 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + CompoundFilter, + CompoundFilter$inboundSchema, + CompoundFilter$Outbound, + CompoundFilter$outboundSchema, +} from "./compoundfilter.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const FiltersType = { + Eq: "eq", + Ne: "ne", + Gt: "gt", + Gte: "gte", + Lt: "lt", + Lte: "lte", +} as const; +export type FiltersType = OpenEnum; + +export type Value1 = string | number; + +export type Value2 = string | number | boolean | Array; + +export type OpenResponsesFileSearchToolFilters = { + key: string; + type: FiltersType; + value: string | number | boolean | Array; +}; + +export type Filters = OpenResponsesFileSearchToolFilters | CompoundFilter | any; + +export const Ranker = { + Auto: "auto", + Default20241115: "default-2024-11-15", +} as const; +export type Ranker = OpenEnum; + +export type RankingOptions = { + ranker?: Ranker | undefined; + scoreThreshold?: number | undefined; +}; + +/** + * File search tool configuration + */ +export type OpenResponsesFileSearchTool = { + type: "file_search"; + vectorStoreIds: Array; + filters?: + | OpenResponsesFileSearchToolFilters + | CompoundFilter + | any + | null + | undefined; + maxNumResults?: number | undefined; + rankingOptions?: RankingOptions | undefined; +}; + +/** @internal */ +export const FiltersType$inboundSchema: z.ZodType = + openEnums.inboundSchema(FiltersType); +/** @internal */ +export const FiltersType$outboundSchema: z.ZodType = + openEnums.outboundSchema(FiltersType); + +/** @internal */ +export const Value1$inboundSchema: z.ZodType = z.union([ + z.string(), + z.number(), +]); +/** @internal */ +export type Value1$Outbound = string | number; + +/** @internal */ +export const Value1$outboundSchema: z.ZodType = z + .union([z.string(), z.number()]); + +export function value1ToJSON(value1: Value1): string { + return JSON.stringify(Value1$outboundSchema.parse(value1)); +} +export function value1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Value1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Value1' from JSON`, + ); +} + +/** @internal */ +export const Value2$inboundSchema: z.ZodType = z.union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), +]); +/** @internal */ +export type Value2$Outbound = + | string + | number + | boolean + | Array; + +/** @internal */ +export const Value2$outboundSchema: z.ZodType = z + .union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), + ]); + +export function value2ToJSON(value2: Value2): string { + return JSON.stringify(Value2$outboundSchema.parse(value2)); +} +export function value2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Value2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Value2' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesFileSearchToolFilters$inboundSchema: z.ZodType< + OpenResponsesFileSearchToolFilters, + unknown +> = z.object({ + key: z.string(), + type: FiltersType$inboundSchema, + value: z.union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), + ]), +}); +/** @internal */ +export type OpenResponsesFileSearchToolFilters$Outbound = { + key: string; + type: string; + value: string | number | boolean | Array; +}; + +/** @internal */ +export const OpenResponsesFileSearchToolFilters$outboundSchema: z.ZodType< + OpenResponsesFileSearchToolFilters$Outbound, + OpenResponsesFileSearchToolFilters +> = z.object({ + key: z.string(), + type: FiltersType$outboundSchema, + value: z.union([ + z.string(), + z.number(), + z.boolean(), + z.array(z.union([z.string(), z.number()])), + ]), +}); + +export function openResponsesFileSearchToolFiltersToJSON( + openResponsesFileSearchToolFilters: OpenResponsesFileSearchToolFilters, +): string { + return JSON.stringify( + OpenResponsesFileSearchToolFilters$outboundSchema.parse( + openResponsesFileSearchToolFilters, + ), + ); +} +export function openResponsesFileSearchToolFiltersFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesFileSearchToolFilters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesFileSearchToolFilters' from JSON`, + ); +} + +/** @internal */ +export const Filters$inboundSchema: z.ZodType = z.union([ + z.lazy(() => OpenResponsesFileSearchToolFilters$inboundSchema), + CompoundFilter$inboundSchema, + z.any(), +]); +/** @internal */ +export type Filters$Outbound = + | OpenResponsesFileSearchToolFilters$Outbound + | CompoundFilter$Outbound + | any; + +/** @internal */ +export const Filters$outboundSchema: z.ZodType = z + .union([ + z.lazy(() => OpenResponsesFileSearchToolFilters$outboundSchema), + CompoundFilter$outboundSchema, + z.any(), + ]); + +export function filtersToJSON(filters: Filters): string { + return JSON.stringify(Filters$outboundSchema.parse(filters)); +} +export function filtersFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Filters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Filters' from JSON`, + ); +} + +/** @internal */ +export const Ranker$inboundSchema: z.ZodType = openEnums + .inboundSchema(Ranker); +/** @internal */ +export const Ranker$outboundSchema: z.ZodType = openEnums + .outboundSchema(Ranker); + +/** @internal */ +export const RankingOptions$inboundSchema: z.ZodType = + z.object({ + ranker: Ranker$inboundSchema.optional(), + score_threshold: z.number().optional(), + }).transform((v) => { + return remap$(v, { + "score_threshold": "scoreThreshold", + }); + }); +/** @internal */ +export type RankingOptions$Outbound = { + ranker?: string | undefined; + score_threshold?: number | undefined; +}; + +/** @internal */ +export const RankingOptions$outboundSchema: z.ZodType< + RankingOptions$Outbound, + RankingOptions +> = z.object({ + ranker: Ranker$outboundSchema.optional(), + scoreThreshold: z.number().optional(), +}).transform((v) => { + return remap$(v, { + scoreThreshold: "score_threshold", + }); +}); + +export function rankingOptionsToJSON(rankingOptions: RankingOptions): string { + return JSON.stringify(RankingOptions$outboundSchema.parse(rankingOptions)); +} +export function rankingOptionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RankingOptions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RankingOptions' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesFileSearchTool$inboundSchema: z.ZodType< + OpenResponsesFileSearchTool, + unknown +> = z.object({ + type: z.literal("file_search"), + vector_store_ids: z.array(z.string()), + filters: z.nullable( + z.union([ + z.lazy(() => OpenResponsesFileSearchToolFilters$inboundSchema), + CompoundFilter$inboundSchema, + z.any(), + ]), + ).optional(), + max_num_results: z.int().optional(), + ranking_options: z.lazy(() => RankingOptions$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "vector_store_ids": "vectorStoreIds", + "max_num_results": "maxNumResults", + "ranking_options": "rankingOptions", + }); +}); +/** @internal */ +export type OpenResponsesFileSearchTool$Outbound = { + type: "file_search"; + vector_store_ids: Array; + filters?: + | OpenResponsesFileSearchToolFilters$Outbound + | CompoundFilter$Outbound + | any + | null + | undefined; + max_num_results?: number | undefined; + ranking_options?: RankingOptions$Outbound | undefined; +}; + +/** @internal */ +export const OpenResponsesFileSearchTool$outboundSchema: z.ZodType< + OpenResponsesFileSearchTool$Outbound, + OpenResponsesFileSearchTool +> = z.object({ + type: z.literal("file_search"), + vectorStoreIds: z.array(z.string()), + filters: z.nullable( + z.union([ + z.lazy(() => OpenResponsesFileSearchToolFilters$outboundSchema), + CompoundFilter$outboundSchema, + z.any(), + ]), + ).optional(), + maxNumResults: z.int().optional(), + rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + vectorStoreIds: "vector_store_ids", + maxNumResults: "max_num_results", + rankingOptions: "ranking_options", + }); +}); + +export function openResponsesFileSearchToolToJSON( + openResponsesFileSearchTool: OpenResponsesFileSearchTool, +): string { + return JSON.stringify( + OpenResponsesFileSearchTool$outboundSchema.parse( + openResponsesFileSearchTool, + ), + ); +} +export function openResponsesFileSearchToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesFileSearchTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesFileSearchTool' from JSON`, + ); +} diff --git a/src/models/openresponsesfunctioncalloutput.ts b/src/models/openresponsesfunctioncalloutput.ts index 0fe2b77d..745b84ed 100644 --- a/src/models/openresponsesfunctioncalloutput.ts +++ b/src/models/openresponsesfunctioncalloutput.ts @@ -5,41 +5,184 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { ClosedEnum } from "../types/enums.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { + ResponseInputFile, + ResponseInputFile$Outbound, + ResponseInputFile$outboundSchema, +} from "./responseinputfile.js"; +import { + ResponseInputText, + ResponseInputText$Outbound, + ResponseInputText$outboundSchema, +} from "./responseinputtext.js"; import { ToolCallStatus, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js"; -export const OpenResponsesFunctionCallOutputType = { +export const OpenResponsesFunctionCallOutputTypeFunctionCallOutput = { FunctionCallOutput: "function_call_output", } as const; -export type OpenResponsesFunctionCallOutputType = ClosedEnum< - typeof OpenResponsesFunctionCallOutputType +export type OpenResponsesFunctionCallOutputTypeFunctionCallOutput = ClosedEnum< + typeof OpenResponsesFunctionCallOutputTypeFunctionCallOutput +>; + +export const OpenResponsesFunctionCallOutputDetail = { + Auto: "auto", + High: "high", + Low: "low", +} as const; +export type OpenResponsesFunctionCallOutputDetail = OpenEnum< + typeof OpenResponsesFunctionCallOutputDetail >; +/** + * Image input content item + */ +export type OutputInputImage = { + type: "input_image"; + detail: OpenResponsesFunctionCallOutputDetail; + imageUrl?: string | null | undefined; +}; + +export type OpenResponsesFunctionCallOutputOutputUnion1 = + | ResponseInputText + | OutputInputImage + | ResponseInputFile; + +export type OpenResponsesFunctionCallOutputOutputUnion2 = + | string + | Array; + /** * The output from a function call execution */ export type OpenResponsesFunctionCallOutput = { - type: OpenResponsesFunctionCallOutputType; + type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput; id?: string | null | undefined; callId: string; - output: string; + output: + | string + | Array; status?: ToolCallStatus | null | undefined; }; /** @internal */ -export const OpenResponsesFunctionCallOutputType$outboundSchema: z.ZodEnum< - typeof OpenResponsesFunctionCallOutputType -> = z.enum(OpenResponsesFunctionCallOutputType); +export const OpenResponsesFunctionCallOutputTypeFunctionCallOutput$outboundSchema: + z.ZodEnum = z + .enum(OpenResponsesFunctionCallOutputTypeFunctionCallOutput); + +/** @internal */ +export const OpenResponsesFunctionCallOutputDetail$outboundSchema: z.ZodType< + string, + OpenResponsesFunctionCallOutputDetail +> = openEnums.outboundSchema(OpenResponsesFunctionCallOutputDetail); + +/** @internal */ +export type OutputInputImage$Outbound = { + type: "input_image"; + detail: string; + image_url?: string | null | undefined; +}; + +/** @internal */ +export const OutputInputImage$outboundSchema: z.ZodType< + OutputInputImage$Outbound, + OutputInputImage +> = z.object({ + type: z.literal("input_image"), + detail: OpenResponsesFunctionCallOutputDetail$outboundSchema, + imageUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + }); +}); + +export function outputInputImageToJSON( + outputInputImage: OutputInputImage, +): string { + return JSON.stringify( + OutputInputImage$outboundSchema.parse(outputInputImage), + ); +} + +/** @internal */ +export type OpenResponsesFunctionCallOutputOutputUnion1$Outbound = + | ResponseInputText$Outbound + | OutputInputImage$Outbound + | ResponseInputFile$Outbound; + +/** @internal */ +export const OpenResponsesFunctionCallOutputOutputUnion1$outboundSchema: + z.ZodType< + OpenResponsesFunctionCallOutputOutputUnion1$Outbound, + OpenResponsesFunctionCallOutputOutputUnion1 + > = z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => OutputInputImage$outboundSchema), + ResponseInputFile$outboundSchema, + ]); + +export function openResponsesFunctionCallOutputOutputUnion1ToJSON( + openResponsesFunctionCallOutputOutputUnion1: + OpenResponsesFunctionCallOutputOutputUnion1, +): string { + return JSON.stringify( + OpenResponsesFunctionCallOutputOutputUnion1$outboundSchema.parse( + openResponsesFunctionCallOutputOutputUnion1, + ), + ); +} + +/** @internal */ +export type OpenResponsesFunctionCallOutputOutputUnion2$Outbound = + | string + | Array< + | ResponseInputText$Outbound + | OutputInputImage$Outbound + | ResponseInputFile$Outbound + >; + +/** @internal */ +export const OpenResponsesFunctionCallOutputOutputUnion2$outboundSchema: + z.ZodType< + OpenResponsesFunctionCallOutputOutputUnion2$Outbound, + OpenResponsesFunctionCallOutputOutputUnion2 + > = z.union([ + z.string(), + z.array(z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => OutputInputImage$outboundSchema), + ResponseInputFile$outboundSchema, + ])), + ]); + +export function openResponsesFunctionCallOutputOutputUnion2ToJSON( + openResponsesFunctionCallOutputOutputUnion2: + OpenResponsesFunctionCallOutputOutputUnion2, +): string { + return JSON.stringify( + OpenResponsesFunctionCallOutputOutputUnion2$outboundSchema.parse( + openResponsesFunctionCallOutputOutputUnion2, + ), + ); +} /** @internal */ export type OpenResponsesFunctionCallOutput$Outbound = { type: string; id?: string | null | undefined; call_id: string; - output: string; + output: + | string + | Array< + | ResponseInputText$Outbound + | OutputInputImage$Outbound + | ResponseInputFile$Outbound + >; status?: string | null | undefined; }; @@ -48,10 +191,17 @@ export const OpenResponsesFunctionCallOutput$outboundSchema: z.ZodType< OpenResponsesFunctionCallOutput$Outbound, OpenResponsesFunctionCallOutput > = z.object({ - type: OpenResponsesFunctionCallOutputType$outboundSchema, + type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput$outboundSchema, id: z.nullable(z.string()).optional(), callId: z.string(), - output: z.string(), + output: z.union([ + z.string(), + z.array(z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => OutputInputImage$outboundSchema), + ResponseInputFile$outboundSchema, + ])), + ]), status: z.nullable(ToolCallStatus$outboundSchema).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/openresponsesfunctionshelltool.ts b/src/models/openresponsesfunctionshelltool.ts new file mode 100644 index 00000000..af4482ce --- /dev/null +++ b/src/models/openresponsesfunctionshelltool.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d23282e24d97 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Shell tool configuration + */ +export type OpenResponsesFunctionShellTool = { + type: "shell"; +}; + +/** @internal */ +export const OpenResponsesFunctionShellTool$inboundSchema: z.ZodType< + OpenResponsesFunctionShellTool, + unknown +> = z.object({ + type: z.literal("shell"), +}); +/** @internal */ +export type OpenResponsesFunctionShellTool$Outbound = { + type: "shell"; +}; + +/** @internal */ +export const OpenResponsesFunctionShellTool$outboundSchema: z.ZodType< + OpenResponsesFunctionShellTool$Outbound, + OpenResponsesFunctionShellTool +> = z.object({ + type: z.literal("shell"), +}); + +export function openResponsesFunctionShellToolToJSON( + openResponsesFunctionShellTool: OpenResponsesFunctionShellTool, +): string { + return JSON.stringify( + OpenResponsesFunctionShellTool$outboundSchema.parse( + openResponsesFunctionShellTool, + ), + ); +} +export function openResponsesFunctionShellToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesFunctionShellTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesFunctionShellTool' from JSON`, + ); +} diff --git a/src/models/openresponsesimagegenerationtool.ts b/src/models/openresponsesimagegenerationtool.ts new file mode 100644 index 00000000..8f3ba25c --- /dev/null +++ b/src/models/openresponsesimagegenerationtool.ts @@ -0,0 +1,260 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 149a19208595 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const Background = { + Transparent: "transparent", + Opaque: "opaque", + Auto: "auto", +} as const; +export type Background = OpenEnum; + +export const InputFidelity = { + High: "high", + Low: "low", +} as const; +export type InputFidelity = OpenEnum; + +export type InputImageMask = { + imageUrl?: string | undefined; + fileId?: string | undefined; +}; + +export const ModelEnum = { + GptImage1: "gpt-image-1", + GptImage1Mini: "gpt-image-1-mini", +} as const; +export type ModelEnum = OpenEnum; + +export const Moderation = { + Auto: "auto", + Low: "low", +} as const; +export type Moderation = OpenEnum; + +export const OutputFormat = { + Png: "png", + Webp: "webp", + Jpeg: "jpeg", +} as const; +export type OutputFormat = OpenEnum; + +export const Quality = { + Low: "low", + Medium: "medium", + High: "high", + Auto: "auto", +} as const; +export type Quality = OpenEnum; + +export const Size = { + OneThousandAndTwentyFourx1024: "1024x1024", + OneThousandAndTwentyFourx1536: "1024x1536", + OneThousandFiveHundredAndThirtySixx1024: "1536x1024", + Auto: "auto", +} as const; +export type Size = OpenEnum; + +/** + * Image generation tool configuration + */ +export type OpenResponsesImageGenerationTool = { + type: "image_generation"; + background?: Background | undefined; + inputFidelity?: InputFidelity | null | undefined; + inputImageMask?: InputImageMask | undefined; + model?: ModelEnum | undefined; + moderation?: Moderation | undefined; + outputCompression?: number | undefined; + outputFormat?: OutputFormat | undefined; + partialImages?: number | undefined; + quality?: Quality | undefined; + size?: Size | undefined; +}; + +/** @internal */ +export const Background$inboundSchema: z.ZodType = + openEnums.inboundSchema(Background); +/** @internal */ +export const Background$outboundSchema: z.ZodType = + openEnums.outboundSchema(Background); + +/** @internal */ +export const InputFidelity$inboundSchema: z.ZodType = + openEnums.inboundSchema(InputFidelity); +/** @internal */ +export const InputFidelity$outboundSchema: z.ZodType = + openEnums.outboundSchema(InputFidelity); + +/** @internal */ +export const InputImageMask$inboundSchema: z.ZodType = + z.object({ + image_url: z.string().optional(), + file_id: z.string().optional(), + }).transform((v) => { + return remap$(v, { + "image_url": "imageUrl", + "file_id": "fileId", + }); + }); +/** @internal */ +export type InputImageMask$Outbound = { + image_url?: string | undefined; + file_id?: string | undefined; +}; + +/** @internal */ +export const InputImageMask$outboundSchema: z.ZodType< + InputImageMask$Outbound, + InputImageMask +> = z.object({ + imageUrl: z.string().optional(), + fileId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + fileId: "file_id", + }); +}); + +export function inputImageMaskToJSON(inputImageMask: InputImageMask): string { + return JSON.stringify(InputImageMask$outboundSchema.parse(inputImageMask)); +} +export function inputImageMaskFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => InputImageMask$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'InputImageMask' from JSON`, + ); +} + +/** @internal */ +export const ModelEnum$inboundSchema: z.ZodType = openEnums + .inboundSchema(ModelEnum); +/** @internal */ +export const ModelEnum$outboundSchema: z.ZodType = openEnums + .outboundSchema(ModelEnum); + +/** @internal */ +export const Moderation$inboundSchema: z.ZodType = + openEnums.inboundSchema(Moderation); +/** @internal */ +export const Moderation$outboundSchema: z.ZodType = + openEnums.outboundSchema(Moderation); + +/** @internal */ +export const OutputFormat$inboundSchema: z.ZodType = + openEnums.inboundSchema(OutputFormat); +/** @internal */ +export const OutputFormat$outboundSchema: z.ZodType = + openEnums.outboundSchema(OutputFormat); + +/** @internal */ +export const Quality$inboundSchema: z.ZodType = openEnums + .inboundSchema(Quality); +/** @internal */ +export const Quality$outboundSchema: z.ZodType = openEnums + .outboundSchema(Quality); + +/** @internal */ +export const Size$inboundSchema: z.ZodType = openEnums + .inboundSchema(Size); +/** @internal */ +export const Size$outboundSchema: z.ZodType = openEnums + .outboundSchema(Size); + +/** @internal */ +export const OpenResponsesImageGenerationTool$inboundSchema: z.ZodType< + OpenResponsesImageGenerationTool, + unknown +> = z.object({ + type: z.literal("image_generation"), + background: Background$inboundSchema.optional(), + input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(), + input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(), + model: ModelEnum$inboundSchema.optional(), + moderation: Moderation$inboundSchema.optional(), + output_compression: z.number().optional(), + output_format: OutputFormat$inboundSchema.optional(), + partial_images: z.number().optional(), + quality: Quality$inboundSchema.optional(), + size: Size$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "input_fidelity": "inputFidelity", + "input_image_mask": "inputImageMask", + "output_compression": "outputCompression", + "output_format": "outputFormat", + "partial_images": "partialImages", + }); +}); +/** @internal */ +export type OpenResponsesImageGenerationTool$Outbound = { + type: "image_generation"; + background?: string | undefined; + input_fidelity?: string | null | undefined; + input_image_mask?: InputImageMask$Outbound | undefined; + model?: string | undefined; + moderation?: string | undefined; + output_compression?: number | undefined; + output_format?: string | undefined; + partial_images?: number | undefined; + quality?: string | undefined; + size?: string | undefined; +}; + +/** @internal */ +export const OpenResponsesImageGenerationTool$outboundSchema: z.ZodType< + OpenResponsesImageGenerationTool$Outbound, + OpenResponsesImageGenerationTool +> = z.object({ + type: z.literal("image_generation"), + background: Background$outboundSchema.optional(), + inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(), + inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(), + model: ModelEnum$outboundSchema.optional(), + moderation: Moderation$outboundSchema.optional(), + outputCompression: z.number().optional(), + outputFormat: OutputFormat$outboundSchema.optional(), + partialImages: z.number().optional(), + quality: Quality$outboundSchema.optional(), + size: Size$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + inputFidelity: "input_fidelity", + inputImageMask: "input_image_mask", + outputCompression: "output_compression", + outputFormat: "output_format", + partialImages: "partial_images", + }); +}); + +export function openResponsesImageGenerationToolToJSON( + openResponsesImageGenerationTool: OpenResponsesImageGenerationTool, +): string { + return JSON.stringify( + OpenResponsesImageGenerationTool$outboundSchema.parse( + openResponsesImageGenerationTool, + ), + ); +} +export function openResponsesImageGenerationToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesImageGenerationTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesImageGenerationTool' from JSON`, + ); +} diff --git a/src/models/openresponsesinput.ts b/src/models/openresponsesinput.ts deleted file mode 100644 index 7f007b7a..00000000 --- a/src/models/openresponsesinput.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: cc6c94fdea13 - */ - -import * as z from "zod/v4"; -import { - OpenResponsesEasyInputMessage, - OpenResponsesEasyInputMessage$Outbound, - OpenResponsesEasyInputMessage$outboundSchema, -} from "./openresponseseasyinputmessage.js"; -import { - OpenResponsesFunctionCallOutput, - OpenResponsesFunctionCallOutput$Outbound, - OpenResponsesFunctionCallOutput$outboundSchema, -} from "./openresponsesfunctioncalloutput.js"; -import { - OpenResponsesFunctionToolCall, - OpenResponsesFunctionToolCall$Outbound, - OpenResponsesFunctionToolCall$outboundSchema, -} from "./openresponsesfunctiontoolcall.js"; -import { - OpenResponsesInputMessageItem, - OpenResponsesInputMessageItem$Outbound, - OpenResponsesInputMessageItem$outboundSchema, -} from "./openresponsesinputmessageitem.js"; -import { - OpenResponsesReasoning, - OpenResponsesReasoning$Outbound, - OpenResponsesReasoning$outboundSchema, -} from "./openresponsesreasoning.js"; -import { - ResponsesImageGenerationCall, - ResponsesImageGenerationCall$Outbound, - ResponsesImageGenerationCall$outboundSchema, -} from "./responsesimagegenerationcall.js"; -import { - ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCall$Outbound, - ResponsesOutputItemFileSearchCall$outboundSchema, -} from "./responsesoutputitemfilesearchcall.js"; -import { - ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCall$Outbound, - ResponsesOutputItemFunctionCall$outboundSchema, -} from "./responsesoutputitemfunctioncall.js"; -import { - ResponsesOutputItemReasoning, - ResponsesOutputItemReasoning$Outbound, - ResponsesOutputItemReasoning$outboundSchema, -} from "./responsesoutputitemreasoning.js"; -import { - ResponsesOutputMessage, - ResponsesOutputMessage$Outbound, - ResponsesOutputMessage$outboundSchema, -} from "./responsesoutputmessage.js"; -import { - ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutput$Outbound, - ResponsesWebSearchCallOutput$outboundSchema, -} from "./responseswebsearchcalloutput.js"; - -export type OpenResponsesInput1 = - | OpenResponsesFunctionToolCall - | ResponsesOutputMessage - | ResponsesOutputItemFunctionCall - | ResponsesOutputItemFileSearchCall - | OpenResponsesReasoning - | OpenResponsesFunctionCallOutput - | ResponsesOutputItemReasoning - | ResponsesWebSearchCallOutput - | ResponsesImageGenerationCall - | OpenResponsesEasyInputMessage - | OpenResponsesInputMessageItem; - -/** - * Input for a response request - can be a string or array of items - */ -export type OpenResponsesInput = - | string - | Array< - | OpenResponsesFunctionToolCall - | ResponsesOutputMessage - | ResponsesOutputItemFunctionCall - | ResponsesOutputItemFileSearchCall - | OpenResponsesReasoning - | OpenResponsesFunctionCallOutput - | ResponsesOutputItemReasoning - | ResponsesWebSearchCallOutput - | ResponsesImageGenerationCall - | OpenResponsesEasyInputMessage - | OpenResponsesInputMessageItem - >; - -/** @internal */ -export type OpenResponsesInput1$Outbound = - | OpenResponsesFunctionToolCall$Outbound - | ResponsesOutputMessage$Outbound - | ResponsesOutputItemFunctionCall$Outbound - | ResponsesOutputItemFileSearchCall$Outbound - | OpenResponsesReasoning$Outbound - | OpenResponsesFunctionCallOutput$Outbound - | ResponsesOutputItemReasoning$Outbound - | ResponsesWebSearchCallOutput$Outbound - | ResponsesImageGenerationCall$Outbound - | OpenResponsesEasyInputMessage$Outbound - | OpenResponsesInputMessageItem$Outbound; - -/** @internal */ -export const OpenResponsesInput1$outboundSchema: z.ZodType< - OpenResponsesInput1$Outbound, - OpenResponsesInput1 -> = z.union([ - OpenResponsesFunctionToolCall$outboundSchema, - ResponsesOutputMessage$outboundSchema, - ResponsesOutputItemFunctionCall$outboundSchema, - ResponsesOutputItemFileSearchCall$outboundSchema, - OpenResponsesReasoning$outboundSchema, - OpenResponsesFunctionCallOutput$outboundSchema, - ResponsesOutputItemReasoning$outboundSchema, - ResponsesWebSearchCallOutput$outboundSchema, - ResponsesImageGenerationCall$outboundSchema, - OpenResponsesEasyInputMessage$outboundSchema, - OpenResponsesInputMessageItem$outboundSchema, -]); - -export function openResponsesInput1ToJSON( - openResponsesInput1: OpenResponsesInput1, -): string { - return JSON.stringify( - OpenResponsesInput1$outboundSchema.parse(openResponsesInput1), - ); -} - -/** @internal */ -export type OpenResponsesInput$Outbound = - | string - | Array< - | OpenResponsesFunctionToolCall$Outbound - | ResponsesOutputMessage$Outbound - | ResponsesOutputItemFunctionCall$Outbound - | ResponsesOutputItemFileSearchCall$Outbound - | OpenResponsesReasoning$Outbound - | OpenResponsesFunctionCallOutput$Outbound - | ResponsesOutputItemReasoning$Outbound - | ResponsesWebSearchCallOutput$Outbound - | ResponsesImageGenerationCall$Outbound - | OpenResponsesEasyInputMessage$Outbound - | OpenResponsesInputMessageItem$Outbound - >; - -/** @internal */ -export const OpenResponsesInput$outboundSchema: z.ZodType< - OpenResponsesInput$Outbound, - OpenResponsesInput -> = z.union([ - z.string(), - z.array( - z.union([ - OpenResponsesFunctionToolCall$outboundSchema, - ResponsesOutputMessage$outboundSchema, - ResponsesOutputItemFunctionCall$outboundSchema, - ResponsesOutputItemFileSearchCall$outboundSchema, - OpenResponsesReasoning$outboundSchema, - OpenResponsesFunctionCallOutput$outboundSchema, - ResponsesOutputItemReasoning$outboundSchema, - ResponsesWebSearchCallOutput$outboundSchema, - ResponsesImageGenerationCall$outboundSchema, - OpenResponsesEasyInputMessage$outboundSchema, - OpenResponsesInputMessageItem$outboundSchema, - ]), - ), -]); - -export function openResponsesInputToJSON( - openResponsesInput: OpenResponsesInput, -): string { - return JSON.stringify( - OpenResponsesInput$outboundSchema.parse(openResponsesInput), - ); -} diff --git a/src/models/openresponsesinputmessageitem.ts b/src/models/openresponsesinputmessageitem.ts index 9dcfafb7..0428665c 100644 --- a/src/models/openresponsesinputmessageitem.ts +++ b/src/models/openresponsesinputmessageitem.ts @@ -93,13 +93,16 @@ export type OpenResponsesInputMessageItem = { | OpenResponsesInputMessageItemRoleUser | OpenResponsesInputMessageItemRoleSystem | OpenResponsesInputMessageItemRoleDeveloper; - content: Array< - | ResponseInputText - | OpenResponsesInputMessageItemContentInputImage - | ResponseInputFile - | ResponseInputAudio - | ResponseInputVideo - >; + content?: + | Array< + | ResponseInputText + | OpenResponsesInputMessageItemContentInputImage + | ResponseInputFile + | ResponseInputAudio + | ResponseInputVideo + > + | null + | undefined; }; /** @internal */ @@ -226,13 +229,16 @@ export type OpenResponsesInputMessageItem$Outbound = { id?: string | undefined; type?: string | undefined; role: string | string | string; - content: Array< - | ResponseInputText$Outbound - | OpenResponsesInputMessageItemContentInputImage$Outbound - | ResponseInputFile$Outbound - | ResponseInputAudio$Outbound - | ResponseInputVideo$Outbound - >; + content?: + | Array< + | ResponseInputText$Outbound + | OpenResponsesInputMessageItemContentInputImage$Outbound + | ResponseInputFile$Outbound + | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound + > + | null + | undefined; }; /** @internal */ @@ -247,8 +253,8 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< OpenResponsesInputMessageItemRoleSystem$outboundSchema, OpenResponsesInputMessageItemRoleDeveloper$outboundSchema, ]), - content: z.array( - z.union([ + content: z.nullable( + z.array(z.union([ ResponseInputText$outboundSchema, z.lazy(() => OpenResponsesInputMessageItemContentInputImage$outboundSchema @@ -256,8 +262,8 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< ResponseInputFile$outboundSchema, ResponseInputAudio$outboundSchema, ResponseInputVideo$outboundSchema, - ]), - ), + ])), + ).optional(), }); export function openResponsesInputMessageItemToJSON( diff --git a/src/models/openresponsesinputunion.ts b/src/models/openresponsesinputunion.ts new file mode 100644 index 00000000..7ce3b9c3 --- /dev/null +++ b/src/models/openresponsesinputunion.ts @@ -0,0 +1,661 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b2182cf1a268 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContent$Outbound, + OpenAIResponsesRefusalContent$outboundSchema, +} from "./openairesponsesrefusalcontent.js"; +import { + OpenResponsesEasyInputMessage, + OpenResponsesEasyInputMessage$Outbound, + OpenResponsesEasyInputMessage$outboundSchema, +} from "./openresponseseasyinputmessage.js"; +import { + OpenResponsesFunctionCallOutput, + OpenResponsesFunctionCallOutput$Outbound, + OpenResponsesFunctionCallOutput$outboundSchema, +} from "./openresponsesfunctioncalloutput.js"; +import { + OpenResponsesFunctionToolCall, + OpenResponsesFunctionToolCall$Outbound, + OpenResponsesFunctionToolCall$outboundSchema, +} from "./openresponsesfunctiontoolcall.js"; +import { + OpenResponsesInputMessageItem, + OpenResponsesInputMessageItem$Outbound, + OpenResponsesInputMessageItem$outboundSchema, +} from "./openresponsesinputmessageitem.js"; +import { + OpenResponsesReasoning, + OpenResponsesReasoning$Outbound, + OpenResponsesReasoning$outboundSchema, +} from "./openresponsesreasoning.js"; +import { + ReasoningSummaryText, + ReasoningSummaryText$Outbound, + ReasoningSummaryText$outboundSchema, +} from "./reasoningsummarytext.js"; +import { + ReasoningTextContent, + ReasoningTextContent$Outbound, + ReasoningTextContent$outboundSchema, +} from "./reasoningtextcontent.js"; +import { + ResponseOutputText, + ResponseOutputText$Outbound, + ResponseOutputText$outboundSchema, +} from "./responseoutputtext.js"; +import { + ResponsesImageGenerationCall, + ResponsesImageGenerationCall$Outbound, + ResponsesImageGenerationCall$outboundSchema, +} from "./responsesimagegenerationcall.js"; +import { + ResponsesOutputItemFileSearchCall, + ResponsesOutputItemFileSearchCall$Outbound, + ResponsesOutputItemFileSearchCall$outboundSchema, +} from "./responsesoutputitemfilesearchcall.js"; +import { + ResponsesOutputItemFunctionCall, + ResponsesOutputItemFunctionCall$Outbound, + ResponsesOutputItemFunctionCall$outboundSchema, +} from "./responsesoutputitemfunctioncall.js"; +import { + ResponsesServerToolOutput, + ResponsesServerToolOutput$Outbound, + ResponsesServerToolOutput$outboundSchema, +} from "./responsesservertooloutput.js"; +import { + ResponsesWebSearchCallOutput, + ResponsesWebSearchCallOutput$Outbound, + ResponsesWebSearchCallOutput$outboundSchema, +} from "./responseswebsearchcalloutput.js"; + +export const OpenResponsesInputTypeReasoning = { + Reasoning: "reasoning", +} as const; +export type OpenResponsesInputTypeReasoning = ClosedEnum< + typeof OpenResponsesInputTypeReasoning +>; + +export const OpenResponsesInputStatusInProgress2 = { + InProgress: "in_progress", +} as const; +export type OpenResponsesInputStatusInProgress2 = ClosedEnum< + typeof OpenResponsesInputStatusInProgress2 +>; + +export const OpenResponsesInputStatusIncomplete2 = { + Incomplete: "incomplete", +} as const; +export type OpenResponsesInputStatusIncomplete2 = ClosedEnum< + typeof OpenResponsesInputStatusIncomplete2 +>; + +export const OpenResponsesInputStatusCompleted2 = { + Completed: "completed", +} as const; +export type OpenResponsesInputStatusCompleted2 = ClosedEnum< + typeof OpenResponsesInputStatusCompleted2 +>; + +export type OpenResponsesInputStatusUnion2 = + | OpenResponsesInputStatusCompleted2 + | OpenResponsesInputStatusIncomplete2 + | OpenResponsesInputStatusInProgress2; + +/** + * The format of the reasoning content + */ +export const OpenResponsesInputFormat = { + Unknown: "unknown", + OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", + XaiResponsesV1: "xai-responses-v1", + AnthropicClaudeV1: "anthropic-claude-v1", + GoogleGeminiV1: "google-gemini-v1", +} as const; +/** + * The format of the reasoning content + */ +export type OpenResponsesInputFormat = OpenEnum< + typeof OpenResponsesInputFormat +>; + +/** + * An output item containing reasoning + */ +export type OpenResponsesInputReasoning = { + type: OpenResponsesInputTypeReasoning; + id: string; + content?: Array | null | undefined; + summary: Array | null; + encryptedContent?: string | null | undefined; + status?: + | OpenResponsesInputStatusCompleted2 + | OpenResponsesInputStatusIncomplete2 + | OpenResponsesInputStatusInProgress2 + | undefined; + /** + * A signature for the reasoning content, used for verification + */ + signature?: string | null | undefined; + /** + * The format of the reasoning content + */ + format?: OpenResponsesInputFormat | null | undefined; +}; + +export const OpenResponsesInputRole = { + Assistant: "assistant", +} as const; +export type OpenResponsesInputRole = ClosedEnum; + +export const OpenResponsesInputTypeMessage = { + Message: "message", +} as const; +export type OpenResponsesInputTypeMessage = ClosedEnum< + typeof OpenResponsesInputTypeMessage +>; + +export const OpenResponsesInputStatusInProgress1 = { + InProgress: "in_progress", +} as const; +export type OpenResponsesInputStatusInProgress1 = ClosedEnum< + typeof OpenResponsesInputStatusInProgress1 +>; + +export const OpenResponsesInputStatusIncomplete1 = { + Incomplete: "incomplete", +} as const; +export type OpenResponsesInputStatusIncomplete1 = ClosedEnum< + typeof OpenResponsesInputStatusIncomplete1 +>; + +export const OpenResponsesInputStatusCompleted1 = { + Completed: "completed", +} as const; +export type OpenResponsesInputStatusCompleted1 = ClosedEnum< + typeof OpenResponsesInputStatusCompleted1 +>; + +export type OpenResponsesInputStatusUnion1 = + | OpenResponsesInputStatusCompleted1 + | OpenResponsesInputStatusIncomplete1 + | OpenResponsesInputStatusInProgress1; + +export type OpenResponsesInputContent1 = + | ResponseOutputText + | OpenAIResponsesRefusalContent; + +export type OpenResponsesInputContent2 = + | Array + | string + | any; + +export const OpenResponsesInputPhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OpenResponsesInputPhaseFinalAnswer = ClosedEnum< + typeof OpenResponsesInputPhaseFinalAnswer +>; + +export const OpenResponsesInputPhaseCommentary = { + Commentary: "commentary", +} as const; +export type OpenResponsesInputPhaseCommentary = ClosedEnum< + typeof OpenResponsesInputPhaseCommentary +>; + +/** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ +export type OpenResponsesInputPhaseUnion = + | OpenResponsesInputPhaseCommentary + | OpenResponsesInputPhaseFinalAnswer + | any; + +/** + * An output message item + */ +export type OpenResponsesInputMessage = { + id: string; + role: OpenResponsesInputRole; + type: OpenResponsesInputTypeMessage; + status?: + | OpenResponsesInputStatusCompleted1 + | OpenResponsesInputStatusIncomplete1 + | OpenResponsesInputStatusInProgress1 + | undefined; + content?: + | Array + | string + | any + | null + | undefined; + /** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ + phase?: + | OpenResponsesInputPhaseCommentary + | OpenResponsesInputPhaseFinalAnswer + | any + | null + | undefined; +}; + +export type OpenResponsesInputUnion1 = + | OpenResponsesFunctionToolCall + | OpenResponsesInputMessage + | ResponsesOutputItemFunctionCall + | ResponsesWebSearchCallOutput + | ResponsesOutputItemFileSearchCall + | OpenResponsesReasoning + | OpenResponsesFunctionCallOutput + | OpenResponsesInputReasoning + | ResponsesImageGenerationCall + | ResponsesServerToolOutput + | OpenResponsesEasyInputMessage + | OpenResponsesInputMessageItem; + +/** + * Input for a response request - can be a string or array of items + */ +export type OpenResponsesInputUnion = + | string + | Array< + | OpenResponsesFunctionToolCall + | OpenResponsesInputMessage + | ResponsesOutputItemFunctionCall + | ResponsesWebSearchCallOutput + | ResponsesOutputItemFileSearchCall + | OpenResponsesReasoning + | OpenResponsesFunctionCallOutput + | OpenResponsesInputReasoning + | ResponsesImageGenerationCall + | ResponsesServerToolOutput + | OpenResponsesEasyInputMessage + | OpenResponsesInputMessageItem + >; + +/** @internal */ +export const OpenResponsesInputTypeReasoning$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputTypeReasoning +> = z.enum(OpenResponsesInputTypeReasoning); + +/** @internal */ +export const OpenResponsesInputStatusInProgress2$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusInProgress2 +> = z.enum(OpenResponsesInputStatusInProgress2); + +/** @internal */ +export const OpenResponsesInputStatusIncomplete2$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusIncomplete2 +> = z.enum(OpenResponsesInputStatusIncomplete2); + +/** @internal */ +export const OpenResponsesInputStatusCompleted2$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusCompleted2 +> = z.enum(OpenResponsesInputStatusCompleted2); + +/** @internal */ +export type OpenResponsesInputStatusUnion2$Outbound = string | string | string; + +/** @internal */ +export const OpenResponsesInputStatusUnion2$outboundSchema: z.ZodType< + OpenResponsesInputStatusUnion2$Outbound, + OpenResponsesInputStatusUnion2 +> = z.union([ + OpenResponsesInputStatusCompleted2$outboundSchema, + OpenResponsesInputStatusIncomplete2$outboundSchema, + OpenResponsesInputStatusInProgress2$outboundSchema, +]); + +export function openResponsesInputStatusUnion2ToJSON( + openResponsesInputStatusUnion2: OpenResponsesInputStatusUnion2, +): string { + return JSON.stringify( + OpenResponsesInputStatusUnion2$outboundSchema.parse( + openResponsesInputStatusUnion2, + ), + ); +} + +/** @internal */ +export const OpenResponsesInputFormat$outboundSchema: z.ZodType< + string, + OpenResponsesInputFormat +> = openEnums.outboundSchema(OpenResponsesInputFormat); + +/** @internal */ +export type OpenResponsesInputReasoning$Outbound = { + type: string; + id: string; + content?: Array | null | undefined; + summary: Array | null; + encrypted_content?: string | null | undefined; + status?: string | string | string | undefined; + signature?: string | null | undefined; + format?: string | null | undefined; +}; + +/** @internal */ +export const OpenResponsesInputReasoning$outboundSchema: z.ZodType< + OpenResponsesInputReasoning$Outbound, + OpenResponsesInputReasoning +> = z.object({ + type: OpenResponsesInputTypeReasoning$outboundSchema, + id: z.string(), + content: z.nullable(z.array(ReasoningTextContent$outboundSchema)).optional(), + summary: z.nullable(z.array(ReasoningSummaryText$outboundSchema)), + encryptedContent: z.nullable(z.string()).optional(), + status: z.union([ + OpenResponsesInputStatusCompleted2$outboundSchema, + OpenResponsesInputStatusIncomplete2$outboundSchema, + OpenResponsesInputStatusInProgress2$outboundSchema, + ]).optional(), + signature: z.nullable(z.string()).optional(), + format: z.nullable(OpenResponsesInputFormat$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + encryptedContent: "encrypted_content", + }); +}); + +export function openResponsesInputReasoningToJSON( + openResponsesInputReasoning: OpenResponsesInputReasoning, +): string { + return JSON.stringify( + OpenResponsesInputReasoning$outboundSchema.parse( + openResponsesInputReasoning, + ), + ); +} + +/** @internal */ +export const OpenResponsesInputRole$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputRole +> = z.enum(OpenResponsesInputRole); + +/** @internal */ +export const OpenResponsesInputTypeMessage$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputTypeMessage +> = z.enum(OpenResponsesInputTypeMessage); + +/** @internal */ +export const OpenResponsesInputStatusInProgress1$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusInProgress1 +> = z.enum(OpenResponsesInputStatusInProgress1); + +/** @internal */ +export const OpenResponsesInputStatusIncomplete1$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusIncomplete1 +> = z.enum(OpenResponsesInputStatusIncomplete1); + +/** @internal */ +export const OpenResponsesInputStatusCompleted1$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputStatusCompleted1 +> = z.enum(OpenResponsesInputStatusCompleted1); + +/** @internal */ +export type OpenResponsesInputStatusUnion1$Outbound = string | string | string; + +/** @internal */ +export const OpenResponsesInputStatusUnion1$outboundSchema: z.ZodType< + OpenResponsesInputStatusUnion1$Outbound, + OpenResponsesInputStatusUnion1 +> = z.union([ + OpenResponsesInputStatusCompleted1$outboundSchema, + OpenResponsesInputStatusIncomplete1$outboundSchema, + OpenResponsesInputStatusInProgress1$outboundSchema, +]); + +export function openResponsesInputStatusUnion1ToJSON( + openResponsesInputStatusUnion1: OpenResponsesInputStatusUnion1, +): string { + return JSON.stringify( + OpenResponsesInputStatusUnion1$outboundSchema.parse( + openResponsesInputStatusUnion1, + ), + ); +} + +/** @internal */ +export type OpenResponsesInputContent1$Outbound = + | ResponseOutputText$Outbound + | OpenAIResponsesRefusalContent$Outbound; + +/** @internal */ +export const OpenResponsesInputContent1$outboundSchema: z.ZodType< + OpenResponsesInputContent1$Outbound, + OpenResponsesInputContent1 +> = z.union([ + ResponseOutputText$outboundSchema, + OpenAIResponsesRefusalContent$outboundSchema, +]); + +export function openResponsesInputContent1ToJSON( + openResponsesInputContent1: OpenResponsesInputContent1, +): string { + return JSON.stringify( + OpenResponsesInputContent1$outboundSchema.parse(openResponsesInputContent1), + ); +} + +/** @internal */ +export type OpenResponsesInputContent2$Outbound = + | Array + | string + | any; + +/** @internal */ +export const OpenResponsesInputContent2$outboundSchema: z.ZodType< + OpenResponsesInputContent2$Outbound, + OpenResponsesInputContent2 +> = z.union([ + z.array( + z.union([ + ResponseOutputText$outboundSchema, + OpenAIResponsesRefusalContent$outboundSchema, + ]), + ), + z.string(), + z.any(), +]); + +export function openResponsesInputContent2ToJSON( + openResponsesInputContent2: OpenResponsesInputContent2, +): string { + return JSON.stringify( + OpenResponsesInputContent2$outboundSchema.parse(openResponsesInputContent2), + ); +} + +/** @internal */ +export const OpenResponsesInputPhaseFinalAnswer$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputPhaseFinalAnswer +> = z.enum(OpenResponsesInputPhaseFinalAnswer); + +/** @internal */ +export const OpenResponsesInputPhaseCommentary$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputPhaseCommentary +> = z.enum(OpenResponsesInputPhaseCommentary); + +/** @internal */ +export type OpenResponsesInputPhaseUnion$Outbound = string | string | any; + +/** @internal */ +export const OpenResponsesInputPhaseUnion$outboundSchema: z.ZodType< + OpenResponsesInputPhaseUnion$Outbound, + OpenResponsesInputPhaseUnion +> = z.union([ + OpenResponsesInputPhaseCommentary$outboundSchema, + OpenResponsesInputPhaseFinalAnswer$outboundSchema, + z.any(), +]); + +export function openResponsesInputPhaseUnionToJSON( + openResponsesInputPhaseUnion: OpenResponsesInputPhaseUnion, +): string { + return JSON.stringify( + OpenResponsesInputPhaseUnion$outboundSchema.parse( + openResponsesInputPhaseUnion, + ), + ); +} + +/** @internal */ +export type OpenResponsesInputMessage$Outbound = { + id: string; + role: string; + type: string; + status?: string | string | string | undefined; + content?: + | Array< + ResponseOutputText$Outbound | OpenAIResponsesRefusalContent$Outbound + > + | string + | any + | null + | undefined; + phase?: string | string | any | null | undefined; +}; + +/** @internal */ +export const OpenResponsesInputMessage$outboundSchema: z.ZodType< + OpenResponsesInputMessage$Outbound, + OpenResponsesInputMessage +> = z.object({ + id: z.string(), + role: OpenResponsesInputRole$outboundSchema, + type: OpenResponsesInputTypeMessage$outboundSchema, + status: z.union([ + OpenResponsesInputStatusCompleted1$outboundSchema, + OpenResponsesInputStatusIncomplete1$outboundSchema, + OpenResponsesInputStatusInProgress1$outboundSchema, + ]).optional(), + content: z.nullable( + z.union([ + z.array( + z.union([ + ResponseOutputText$outboundSchema, + OpenAIResponsesRefusalContent$outboundSchema, + ]), + ), + z.string(), + z.any(), + ]), + ).optional(), + phase: z.nullable( + z.union([ + OpenResponsesInputPhaseCommentary$outboundSchema, + OpenResponsesInputPhaseFinalAnswer$outboundSchema, + z.any(), + ]), + ).optional(), +}); + +export function openResponsesInputMessageToJSON( + openResponsesInputMessage: OpenResponsesInputMessage, +): string { + return JSON.stringify( + OpenResponsesInputMessage$outboundSchema.parse(openResponsesInputMessage), + ); +} + +/** @internal */ +export type OpenResponsesInputUnion1$Outbound = + | OpenResponsesFunctionToolCall$Outbound + | OpenResponsesInputMessage$Outbound + | ResponsesOutputItemFunctionCall$Outbound + | ResponsesWebSearchCallOutput$Outbound + | ResponsesOutputItemFileSearchCall$Outbound + | OpenResponsesReasoning$Outbound + | OpenResponsesFunctionCallOutput$Outbound + | OpenResponsesInputReasoning$Outbound + | ResponsesImageGenerationCall$Outbound + | ResponsesServerToolOutput$Outbound + | OpenResponsesEasyInputMessage$Outbound + | OpenResponsesInputMessageItem$Outbound; + +/** @internal */ +export const OpenResponsesInputUnion1$outboundSchema: z.ZodType< + OpenResponsesInputUnion1$Outbound, + OpenResponsesInputUnion1 +> = z.union([ + OpenResponsesFunctionToolCall$outboundSchema, + z.lazy(() => OpenResponsesInputMessage$outboundSchema), + ResponsesOutputItemFunctionCall$outboundSchema, + ResponsesWebSearchCallOutput$outboundSchema, + ResponsesOutputItemFileSearchCall$outboundSchema, + OpenResponsesReasoning$outboundSchema, + OpenResponsesFunctionCallOutput$outboundSchema, + z.lazy(() => OpenResponsesInputReasoning$outboundSchema), + ResponsesImageGenerationCall$outboundSchema, + ResponsesServerToolOutput$outboundSchema, + OpenResponsesEasyInputMessage$outboundSchema, + OpenResponsesInputMessageItem$outboundSchema, +]); + +export function openResponsesInputUnion1ToJSON( + openResponsesInputUnion1: OpenResponsesInputUnion1, +): string { + return JSON.stringify( + OpenResponsesInputUnion1$outboundSchema.parse(openResponsesInputUnion1), + ); +} + +/** @internal */ +export type OpenResponsesInputUnion$Outbound = + | string + | Array< + | OpenResponsesFunctionToolCall$Outbound + | OpenResponsesInputMessage$Outbound + | ResponsesOutputItemFunctionCall$Outbound + | ResponsesWebSearchCallOutput$Outbound + | ResponsesOutputItemFileSearchCall$Outbound + | OpenResponsesReasoning$Outbound + | OpenResponsesFunctionCallOutput$Outbound + | OpenResponsesInputReasoning$Outbound + | ResponsesImageGenerationCall$Outbound + | ResponsesServerToolOutput$Outbound + | OpenResponsesEasyInputMessage$Outbound + | OpenResponsesInputMessageItem$Outbound + >; + +/** @internal */ +export const OpenResponsesInputUnion$outboundSchema: z.ZodType< + OpenResponsesInputUnion$Outbound, + OpenResponsesInputUnion +> = z.union([ + z.string(), + z.array(z.union([ + OpenResponsesFunctionToolCall$outboundSchema, + z.lazy(() => OpenResponsesInputMessage$outboundSchema), + ResponsesOutputItemFunctionCall$outboundSchema, + ResponsesWebSearchCallOutput$outboundSchema, + ResponsesOutputItemFileSearchCall$outboundSchema, + OpenResponsesReasoning$outboundSchema, + OpenResponsesFunctionCallOutput$outboundSchema, + z.lazy(() => OpenResponsesInputReasoning$outboundSchema), + ResponsesImageGenerationCall$outboundSchema, + ResponsesServerToolOutput$outboundSchema, + OpenResponsesEasyInputMessage$outboundSchema, + OpenResponsesInputMessageItem$outboundSchema, + ])), +]); + +export function openResponsesInputUnionToJSON( + openResponsesInputUnion: OpenResponsesInputUnion, +): string { + return JSON.stringify( + OpenResponsesInputUnion$outboundSchema.parse(openResponsesInputUnion), + ); +} diff --git a/src/models/openresponseslocalshelltool.ts b/src/models/openresponseslocalshelltool.ts new file mode 100644 index 00000000..216adb24 --- /dev/null +++ b/src/models/openresponseslocalshelltool.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 58ca583ee9ac + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Local shell tool configuration + */ +export type OpenResponsesLocalShellTool = { + type: "local_shell"; +}; + +/** @internal */ +export const OpenResponsesLocalShellTool$inboundSchema: z.ZodType< + OpenResponsesLocalShellTool, + unknown +> = z.object({ + type: z.literal("local_shell"), +}); +/** @internal */ +export type OpenResponsesLocalShellTool$Outbound = { + type: "local_shell"; +}; + +/** @internal */ +export const OpenResponsesLocalShellTool$outboundSchema: z.ZodType< + OpenResponsesLocalShellTool$Outbound, + OpenResponsesLocalShellTool +> = z.object({ + type: z.literal("local_shell"), +}); + +export function openResponsesLocalShellToolToJSON( + openResponsesLocalShellTool: OpenResponsesLocalShellTool, +): string { + return JSON.stringify( + OpenResponsesLocalShellTool$outboundSchema.parse( + openResponsesLocalShellTool, + ), + ); +} +export function openResponsesLocalShellToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesLocalShellTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesLocalShellTool' from JSON`, + ); +} diff --git a/src/models/openresponseslogprobs.ts b/src/models/openresponseslogprobs.ts deleted file mode 100644 index ea0b9a92..00000000 --- a/src/models/openresponseslogprobs.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 7ec69a3158fc - */ - -import * as z from "zod/v4"; -import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { - OpenResponsesTopLogprobs, - OpenResponsesTopLogprobs$inboundSchema, -} from "./openresponsestoplogprobs.js"; - -/** - * Log probability information for a token - */ -export type OpenResponsesLogProbs = { - logprob: number; - token: string; - topLogprobs?: Array | undefined; -}; - -/** @internal */ -export const OpenResponsesLogProbs$inboundSchema: z.ZodType< - OpenResponsesLogProbs, - unknown -> = z.object({ - logprob: z.number(), - token: z.string(), - top_logprobs: z.array(OpenResponsesTopLogprobs$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "top_logprobs": "topLogprobs", - }); -}); - -export function openResponsesLogProbsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesLogProbs$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesLogProbs' from JSON`, - ); -} diff --git a/src/models/openresponsesmcptool.ts b/src/models/openresponsesmcptool.ts new file mode 100644 index 00000000..91fec1db --- /dev/null +++ b/src/models/openresponsesmcptool.ts @@ -0,0 +1,324 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1693a27fc478 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type AllowedTools = { + toolNames?: Array | undefined; + readOnly?: boolean | undefined; +}; + +export const ConnectorId = { + ConnectorDropbox: "connector_dropbox", + ConnectorGmail: "connector_gmail", + ConnectorGooglecalendar: "connector_googlecalendar", + ConnectorGoogledrive: "connector_googledrive", + ConnectorMicrosoftteams: "connector_microsoftteams", + ConnectorOutlookcalendar: "connector_outlookcalendar", + ConnectorOutlookemail: "connector_outlookemail", + ConnectorSharepoint: "connector_sharepoint", +} as const; +export type ConnectorId = OpenEnum; + +export const RequireApprovalNever = { + Never: "never", +} as const; +export type RequireApprovalNever = ClosedEnum; + +export const RequireApprovalAlways = { + Always: "always", +} as const; +export type RequireApprovalAlways = ClosedEnum; + +export type Never = { + toolNames?: Array | undefined; +}; + +export type Always = { + toolNames?: Array | undefined; +}; + +export type RequireApproval = { + never?: Never | undefined; + always?: Always | undefined; +}; + +/** + * MCP (Model Context Protocol) tool configuration + */ +export type OpenResponsesMcpTool = { + type: "mcp"; + serverLabel: string; + allowedTools?: any | null | undefined; + authorization?: string | undefined; + connectorId?: ConnectorId | undefined; + headers?: { [k: string]: string } | null | undefined; + requireApproval?: any | null | undefined; + serverDescription?: string | undefined; + serverUrl?: string | undefined; +}; + +/** @internal */ +export const AllowedTools$inboundSchema: z.ZodType = z + .object({ + tool_names: z.array(z.string()).optional(), + read_only: z.boolean().optional(), + }).transform((v) => { + return remap$(v, { + "tool_names": "toolNames", + "read_only": "readOnly", + }); + }); +/** @internal */ +export type AllowedTools$Outbound = { + tool_names?: Array | undefined; + read_only?: boolean | undefined; +}; + +/** @internal */ +export const AllowedTools$outboundSchema: z.ZodType< + AllowedTools$Outbound, + AllowedTools +> = z.object({ + toolNames: z.array(z.string()).optional(), + readOnly: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + toolNames: "tool_names", + readOnly: "read_only", + }); +}); + +export function allowedToolsToJSON(allowedTools: AllowedTools): string { + return JSON.stringify(AllowedTools$outboundSchema.parse(allowedTools)); +} +export function allowedToolsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AllowedTools$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AllowedTools' from JSON`, + ); +} + +/** @internal */ +export const ConnectorId$inboundSchema: z.ZodType = + openEnums.inboundSchema(ConnectorId); +/** @internal */ +export const ConnectorId$outboundSchema: z.ZodType = + openEnums.outboundSchema(ConnectorId); + +/** @internal */ +export const RequireApprovalNever$inboundSchema: z.ZodEnum< + typeof RequireApprovalNever +> = z.enum(RequireApprovalNever); +/** @internal */ +export const RequireApprovalNever$outboundSchema: z.ZodEnum< + typeof RequireApprovalNever +> = RequireApprovalNever$inboundSchema; + +/** @internal */ +export const RequireApprovalAlways$inboundSchema: z.ZodEnum< + typeof RequireApprovalAlways +> = z.enum(RequireApprovalAlways); +/** @internal */ +export const RequireApprovalAlways$outboundSchema: z.ZodEnum< + typeof RequireApprovalAlways +> = RequireApprovalAlways$inboundSchema; + +/** @internal */ +export const Never$inboundSchema: z.ZodType = z.object({ + tool_names: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "tool_names": "toolNames", + }); +}); +/** @internal */ +export type Never$Outbound = { + tool_names?: Array | undefined; +}; + +/** @internal */ +export const Never$outboundSchema: z.ZodType = z.object({ + toolNames: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + toolNames: "tool_names", + }); +}); + +export function neverToJSON(never: Never): string { + return JSON.stringify(Never$outboundSchema.parse(never)); +} +export function neverFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Never$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Never' from JSON`, + ); +} + +/** @internal */ +export const Always$inboundSchema: z.ZodType = z.object({ + tool_names: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "tool_names": "toolNames", + }); +}); +/** @internal */ +export type Always$Outbound = { + tool_names?: Array | undefined; +}; + +/** @internal */ +export const Always$outboundSchema: z.ZodType = z + .object({ + toolNames: z.array(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + toolNames: "tool_names", + }); + }); + +export function alwaysToJSON(always: Always): string { + return JSON.stringify(Always$outboundSchema.parse(always)); +} +export function alwaysFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Always$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Always' from JSON`, + ); +} + +/** @internal */ +export const RequireApproval$inboundSchema: z.ZodType< + RequireApproval, + unknown +> = z.object({ + never: z.lazy(() => Never$inboundSchema).optional(), + always: z.lazy(() => Always$inboundSchema).optional(), +}); +/** @internal */ +export type RequireApproval$Outbound = { + never?: Never$Outbound | undefined; + always?: Always$Outbound | undefined; +}; + +/** @internal */ +export const RequireApproval$outboundSchema: z.ZodType< + RequireApproval$Outbound, + RequireApproval +> = z.object({ + never: z.lazy(() => Never$outboundSchema).optional(), + always: z.lazy(() => Always$outboundSchema).optional(), +}); + +export function requireApprovalToJSON( + requireApproval: RequireApproval, +): string { + return JSON.stringify(RequireApproval$outboundSchema.parse(requireApproval)); +} +export function requireApprovalFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequireApproval$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequireApproval' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesMcpTool$inboundSchema: z.ZodType< + OpenResponsesMcpTool, + unknown +> = z.object({ + type: z.literal("mcp"), + server_label: z.string(), + allowed_tools: z.nullable(z.any()).optional(), + authorization: z.string().optional(), + connector_id: ConnectorId$inboundSchema.optional(), + headers: z.nullable(z.record(z.string(), z.string())).optional(), + require_approval: z.nullable(z.any()).optional(), + server_description: z.string().optional(), + server_url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "server_label": "serverLabel", + "allowed_tools": "allowedTools", + "connector_id": "connectorId", + "require_approval": "requireApproval", + "server_description": "serverDescription", + "server_url": "serverUrl", + }); +}); +/** @internal */ +export type OpenResponsesMcpTool$Outbound = { + type: "mcp"; + server_label: string; + allowed_tools?: any | null | undefined; + authorization?: string | undefined; + connector_id?: string | undefined; + headers?: { [k: string]: string } | null | undefined; + require_approval?: any | null | undefined; + server_description?: string | undefined; + server_url?: string | undefined; +}; + +/** @internal */ +export const OpenResponsesMcpTool$outboundSchema: z.ZodType< + OpenResponsesMcpTool$Outbound, + OpenResponsesMcpTool +> = z.object({ + type: z.literal("mcp"), + serverLabel: z.string(), + allowedTools: z.nullable(z.any()).optional(), + authorization: z.string().optional(), + connectorId: ConnectorId$outboundSchema.optional(), + headers: z.nullable(z.record(z.string(), z.string())).optional(), + requireApproval: z.nullable(z.any()).optional(), + serverDescription: z.string().optional(), + serverUrl: z.string().optional(), +}).transform((v) => { + return remap$(v, { + serverLabel: "server_label", + allowedTools: "allowed_tools", + connectorId: "connector_id", + requireApproval: "require_approval", + serverDescription: "server_description", + serverUrl: "server_url", + }); +}); + +export function openResponsesMcpToolToJSON( + openResponsesMcpTool: OpenResponsesMcpTool, +): string { + return JSON.stringify( + OpenResponsesMcpTool$outboundSchema.parse(openResponsesMcpTool), + ); +} +export function openResponsesMcpToolFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesMcpTool$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesMcpTool' from JSON`, + ); +} diff --git a/src/models/openresponsesnonstreamingresponse.ts b/src/models/openresponsesnonstreamingresponse.ts index 9843d593..56822fe0 100644 --- a/src/models/openresponsesnonstreamingresponse.ts +++ b/src/models/openresponsesnonstreamingresponse.ts @@ -41,6 +41,42 @@ import { OpenAIResponsesTruncation, OpenAIResponsesTruncation$inboundSchema, } from "./openairesponsestruncation.js"; +import { + OpenResponsesApplyPatchTool, + OpenResponsesApplyPatchTool$inboundSchema, +} from "./openresponsesapplypatchtool.js"; +import { + OpenResponsesCodeInterpreterTool, + OpenResponsesCodeInterpreterTool$inboundSchema, +} from "./openresponsescodeinterpretertool.js"; +import { + OpenResponsesComputerTool, + OpenResponsesComputerTool$inboundSchema, +} from "./openresponsescomputertool.js"; +import { + OpenResponsesCustomTool, + OpenResponsesCustomTool$inboundSchema, +} from "./openresponsescustomtool.js"; +import { + OpenResponsesFileSearchTool, + OpenResponsesFileSearchTool$inboundSchema, +} from "./openresponsesfilesearchtool.js"; +import { + OpenResponsesFunctionShellTool, + OpenResponsesFunctionShellTool$inboundSchema, +} from "./openresponsesfunctionshelltool.js"; +import { + OpenResponsesImageGenerationTool, + OpenResponsesImageGenerationTool$inboundSchema, +} from "./openresponsesimagegenerationtool.js"; +import { + OpenResponsesLocalShellTool, + OpenResponsesLocalShellTool$inboundSchema, +} from "./openresponseslocalshelltool.js"; +import { + OpenResponsesMcpTool, + OpenResponsesMcpTool$inboundSchema, +} from "./openresponsesmcptool.js"; import { OpenResponsesUsage, OpenResponsesUsage$inboundSchema, @@ -97,7 +133,16 @@ export type OpenResponsesNonStreamingResponseToolUnion = | OpenResponsesWebSearchPreviewTool | OpenResponsesWebSearchPreview20250311Tool | OpenResponsesWebSearchTool - | OpenResponsesWebSearch20250826Tool; + | OpenResponsesWebSearch20250826Tool + | OpenResponsesFileSearchTool + | OpenResponsesComputerTool + | OpenResponsesCodeInterpreterTool + | OpenResponsesMcpTool + | OpenResponsesImageGenerationTool + | OpenResponsesLocalShellTool + | OpenResponsesFunctionShellTool + | OpenResponsesApplyPatchTool + | OpenResponsesCustomTool; /** * Complete non-streaming response from the Responses API @@ -141,6 +186,15 @@ export type OpenResponsesNonStreamingResponse = { | OpenResponsesWebSearchPreview20250311Tool | OpenResponsesWebSearchTool | OpenResponsesWebSearch20250826Tool + | OpenResponsesFileSearchTool + | OpenResponsesComputerTool + | OpenResponsesCodeInterpreterTool + | OpenResponsesMcpTool + | OpenResponsesImageGenerationTool + | OpenResponsesLocalShellTool + | OpenResponsesFunctionShellTool + | OpenResponsesApplyPatchTool + | OpenResponsesCustomTool >; toolChoice: OpenAIResponsesToolChoiceUnion; parallelToolCalls: boolean; @@ -196,6 +250,15 @@ export const OpenResponsesNonStreamingResponseToolUnion$inboundSchema: OpenResponsesWebSearchPreview20250311Tool$inboundSchema, OpenResponsesWebSearchTool$inboundSchema, OpenResponsesWebSearch20250826Tool$inboundSchema, + OpenResponsesFileSearchTool$inboundSchema, + OpenResponsesComputerTool$inboundSchema, + OpenResponsesCodeInterpreterTool$inboundSchema, + OpenResponsesMcpTool$inboundSchema, + OpenResponsesImageGenerationTool$inboundSchema, + OpenResponsesLocalShellTool$inboundSchema, + OpenResponsesFunctionShellTool$inboundSchema, + OpenResponsesApplyPatchTool$inboundSchema, + OpenResponsesCustomTool$inboundSchema, ]); export function openResponsesNonStreamingResponseToolUnionFromJSON( @@ -251,6 +314,15 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool$inboundSchema, OpenResponsesWebSearchTool$inboundSchema, OpenResponsesWebSearch20250826Tool$inboundSchema, + OpenResponsesFileSearchTool$inboundSchema, + OpenResponsesComputerTool$inboundSchema, + OpenResponsesCodeInterpreterTool$inboundSchema, + OpenResponsesMcpTool$inboundSchema, + OpenResponsesImageGenerationTool$inboundSchema, + OpenResponsesLocalShellTool$inboundSchema, + OpenResponsesFunctionShellTool$inboundSchema, + OpenResponsesApplyPatchTool$inboundSchema, + OpenResponsesCustomTool$inboundSchema, ]), ), tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema, diff --git a/src/models/openresponsesrequest.ts b/src/models/openresponsesrequest.ts index 2c89e3fb..af54cd97 100644 --- a/src/models/openresponsesrequest.ts +++ b/src/models/openresponsesrequest.ts @@ -7,10 +7,19 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import * as openEnums from "../types/enums.js"; import { ClosedEnum, OpenEnum } from "../types/enums.js"; +import { + ContextCompressionEngine, + ContextCompressionEngine$outboundSchema, +} from "./contextcompressionengine.js"; import { DataCollection, DataCollection$outboundSchema, } from "./datacollection.js"; +import { + DatetimeServerTool, + DatetimeServerTool$Outbound, + DatetimeServerTool$outboundSchema, +} from "./datetimeservertool.js"; import { OpenAIResponsesIncludable, OpenAIResponsesIncludable$outboundSchema, @@ -26,10 +35,55 @@ import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js"; import { - OpenResponsesInput, - OpenResponsesInput$Outbound, - OpenResponsesInput$outboundSchema, -} from "./openresponsesinput.js"; + OpenResponsesApplyPatchTool, + OpenResponsesApplyPatchTool$Outbound, + OpenResponsesApplyPatchTool$outboundSchema, +} from "./openresponsesapplypatchtool.js"; +import { + OpenResponsesCodeInterpreterTool, + OpenResponsesCodeInterpreterTool$Outbound, + OpenResponsesCodeInterpreterTool$outboundSchema, +} from "./openresponsescodeinterpretertool.js"; +import { + OpenResponsesComputerTool, + OpenResponsesComputerTool$Outbound, + OpenResponsesComputerTool$outboundSchema, +} from "./openresponsescomputertool.js"; +import { + OpenResponsesCustomTool, + OpenResponsesCustomTool$Outbound, + OpenResponsesCustomTool$outboundSchema, +} from "./openresponsescustomtool.js"; +import { + OpenResponsesFileSearchTool, + OpenResponsesFileSearchTool$Outbound, + OpenResponsesFileSearchTool$outboundSchema, +} from "./openresponsesfilesearchtool.js"; +import { + OpenResponsesFunctionShellTool, + OpenResponsesFunctionShellTool$Outbound, + OpenResponsesFunctionShellTool$outboundSchema, +} from "./openresponsesfunctionshelltool.js"; +import { + OpenResponsesImageGenerationTool, + OpenResponsesImageGenerationTool$Outbound, + OpenResponsesImageGenerationTool$outboundSchema, +} from "./openresponsesimagegenerationtool.js"; +import { + OpenResponsesInputUnion, + OpenResponsesInputUnion$Outbound, + OpenResponsesInputUnion$outboundSchema, +} from "./openresponsesinputunion.js"; +import { + OpenResponsesLocalShellTool, + OpenResponsesLocalShellTool$Outbound, + OpenResponsesLocalShellTool$outboundSchema, +} from "./openresponseslocalshelltool.js"; +import { + OpenResponsesMcpTool, + OpenResponsesMcpTool$Outbound, + OpenResponsesMcpTool$outboundSchema, +} from "./openresponsesmcptool.js"; import { OpenResponsesReasoningConfig, OpenResponsesReasoningConfig$Outbound, @@ -87,6 +141,11 @@ import { ResponsesOutputModality, ResponsesOutputModality$outboundSchema, } from "./responsesoutputmodality.js"; +import { + ResponsesWebSearchServerTool, + ResponsesWebSearchServerTool$Outbound, + ResponsesWebSearchServerTool$outboundSchema, +} from "./responseswebsearchservertool.js"; import { WebSearchEngine, WebSearchEngine$outboundSchema, @@ -108,7 +167,18 @@ export type OpenResponsesRequestToolUnion = | OpenResponsesWebSearchPreviewTool | OpenResponsesWebSearchPreview20250311Tool | OpenResponsesWebSearchTool - | OpenResponsesWebSearch20250826Tool; + | OpenResponsesWebSearch20250826Tool + | OpenResponsesFileSearchTool + | OpenResponsesComputerTool + | OpenResponsesCodeInterpreterTool + | OpenResponsesMcpTool + | OpenResponsesImageGenerationTool + | OpenResponsesLocalShellTool + | OpenResponsesFunctionShellTool + | OpenResponsesApplyPatchTool + | OpenResponsesCustomTool + | DatetimeServerTool + | ResponsesWebSearchServerTool; export type OpenResponsesRequestImageConfig = string | number; @@ -215,6 +285,18 @@ export type OpenResponsesRequestProvider = { preferredMaxLatency?: PreferredMaxLatency | null | undefined; }; +export type OpenResponsesRequestPluginContextCompression = { + id: "context-compression"; + /** + * Set to false to disable the context-compression plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * The compression engine to use. Defaults to "middle-out". + */ + engine?: ContextCompressionEngine | undefined; +}; + export type OpenResponsesRequestPluginResponseHealing = { id: "response-healing"; /** @@ -247,6 +329,14 @@ export type OpenResponsesRequestPluginWeb = { * The search engine to use for web search. */ engine?: WebSearchEngine | undefined; + /** + * A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + includeDomains?: Array | undefined; + /** + * A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + */ + excludeDomains?: Array | undefined; }; export type OpenResponsesRequestPluginModeration = { @@ -270,7 +360,8 @@ export type OpenResponsesRequestPluginUnion = | OpenResponsesRequestPluginModeration | OpenResponsesRequestPluginWeb | OpenResponsesRequestPluginFileParser - | OpenResponsesRequestPluginResponseHealing; + | OpenResponsesRequestPluginResponseHealing + | OpenResponsesRequestPluginContextCompression; /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. @@ -291,7 +382,7 @@ export type OpenResponsesRequest = { /** * Input for a response request - can be a string or array of items */ - input?: OpenResponsesInput | undefined; + input?: OpenResponsesInputUnion | undefined; instructions?: string | null | undefined; /** * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. @@ -304,6 +395,17 @@ export type OpenResponsesRequest = { | OpenResponsesWebSearchPreview20250311Tool | OpenResponsesWebSearchTool | OpenResponsesWebSearch20250826Tool + | OpenResponsesFileSearchTool + | OpenResponsesComputerTool + | OpenResponsesCodeInterpreterTool + | OpenResponsesMcpTool + | OpenResponsesImageGenerationTool + | OpenResponsesLocalShellTool + | OpenResponsesFunctionShellTool + | OpenResponsesApplyPatchTool + | OpenResponsesCustomTool + | DatetimeServerTool + | ResponsesWebSearchServerTool > | undefined; toolChoice?: OpenAIResponsesToolChoiceUnion | undefined; @@ -358,6 +460,7 @@ export type OpenResponsesRequest = { | OpenResponsesRequestPluginWeb | OpenResponsesRequestPluginFileParser | OpenResponsesRequestPluginResponseHealing + | OpenResponsesRequestPluginContextCompression > | undefined; /** @@ -411,7 +514,18 @@ export type OpenResponsesRequestToolUnion$Outbound = | OpenResponsesWebSearchPreviewTool$Outbound | OpenResponsesWebSearchPreview20250311Tool$Outbound | OpenResponsesWebSearchTool$Outbound - | OpenResponsesWebSearch20250826Tool$Outbound; + | OpenResponsesWebSearch20250826Tool$Outbound + | OpenResponsesFileSearchTool$Outbound + | OpenResponsesComputerTool$Outbound + | OpenResponsesCodeInterpreterTool$Outbound + | OpenResponsesMcpTool$Outbound + | OpenResponsesImageGenerationTool$Outbound + | OpenResponsesLocalShellTool$Outbound + | OpenResponsesFunctionShellTool$Outbound + | OpenResponsesApplyPatchTool$Outbound + | OpenResponsesCustomTool$Outbound + | DatetimeServerTool$Outbound + | ResponsesWebSearchServerTool$Outbound; /** @internal */ export const OpenResponsesRequestToolUnion$outboundSchema: z.ZodType< @@ -423,6 +537,17 @@ export const OpenResponsesRequestToolUnion$outboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool$outboundSchema, OpenResponsesWebSearchTool$outboundSchema, OpenResponsesWebSearch20250826Tool$outboundSchema, + OpenResponsesFileSearchTool$outboundSchema, + OpenResponsesComputerTool$outboundSchema, + OpenResponsesCodeInterpreterTool$outboundSchema, + OpenResponsesMcpTool$outboundSchema, + OpenResponsesImageGenerationTool$outboundSchema, + OpenResponsesLocalShellTool$outboundSchema, + OpenResponsesFunctionShellTool$outboundSchema, + OpenResponsesApplyPatchTool$outboundSchema, + OpenResponsesCustomTool$outboundSchema, + DatetimeServerTool$outboundSchema, + ResponsesWebSearchServerTool$outboundSchema, ]); export function openResponsesRequestToolUnionToJSON( @@ -639,6 +764,35 @@ export function openResponsesRequestProviderToJSON( ); } +/** @internal */ +export type OpenResponsesRequestPluginContextCompression$Outbound = { + id: "context-compression"; + enabled?: boolean | undefined; + engine?: string | undefined; +}; + +/** @internal */ +export const OpenResponsesRequestPluginContextCompression$outboundSchema: + z.ZodType< + OpenResponsesRequestPluginContextCompression$Outbound, + OpenResponsesRequestPluginContextCompression + > = z.object({ + id: z.literal("context-compression"), + enabled: z.boolean().optional(), + engine: ContextCompressionEngine$outboundSchema.optional(), + }); + +export function openResponsesRequestPluginContextCompressionToJSON( + openResponsesRequestPluginContextCompression: + OpenResponsesRequestPluginContextCompression, +): string { + return JSON.stringify( + OpenResponsesRequestPluginContextCompression$outboundSchema.parse( + openResponsesRequestPluginContextCompression, + ), + ); +} + /** @internal */ export type OpenResponsesRequestPluginResponseHealing$Outbound = { id: "response-healing"; @@ -700,6 +854,8 @@ export type OpenResponsesRequestPluginWeb$Outbound = { max_results?: number | undefined; search_prompt?: string | undefined; engine?: string | undefined; + include_domains?: Array | undefined; + exclude_domains?: Array | undefined; }; /** @internal */ @@ -712,10 +868,14 @@ export const OpenResponsesRequestPluginWeb$outboundSchema: z.ZodType< maxResults: z.number().optional(), searchPrompt: z.string().optional(), engine: WebSearchEngine$outboundSchema.optional(), + includeDomains: z.array(z.string()).optional(), + excludeDomains: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { maxResults: "max_results", searchPrompt: "search_prompt", + includeDomains: "include_domains", + excludeDomains: "exclude_domains", }); }); @@ -789,7 +949,8 @@ export type OpenResponsesRequestPluginUnion$Outbound = | OpenResponsesRequestPluginModeration$Outbound | OpenResponsesRequestPluginWeb$Outbound | OpenResponsesRequestPluginFileParser$Outbound - | OpenResponsesRequestPluginResponseHealing$Outbound; + | OpenResponsesRequestPluginResponseHealing$Outbound + | OpenResponsesRequestPluginContextCompression$Outbound; /** @internal */ export const OpenResponsesRequestPluginUnion$outboundSchema: z.ZodType< @@ -801,6 +962,7 @@ export const OpenResponsesRequestPluginUnion$outboundSchema: z.ZodType< z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema), z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema), z.lazy(() => OpenResponsesRequestPluginResponseHealing$outboundSchema), + z.lazy(() => OpenResponsesRequestPluginContextCompression$outboundSchema), ]); export function openResponsesRequestPluginUnionToJSON( @@ -858,7 +1020,7 @@ export function openResponsesRequestTraceToJSON( /** @internal */ export type OpenResponsesRequest$Outbound = { - input?: OpenResponsesInput$Outbound | undefined; + input?: OpenResponsesInputUnion$Outbound | undefined; instructions?: string | null | undefined; metadata?: { [k: string]: string } | null | undefined; tools?: @@ -868,6 +1030,17 @@ export type OpenResponsesRequest$Outbound = { | OpenResponsesWebSearchPreview20250311Tool$Outbound | OpenResponsesWebSearchTool$Outbound | OpenResponsesWebSearch20250826Tool$Outbound + | OpenResponsesFileSearchTool$Outbound + | OpenResponsesComputerTool$Outbound + | OpenResponsesCodeInterpreterTool$Outbound + | OpenResponsesMcpTool$Outbound + | OpenResponsesImageGenerationTool$Outbound + | OpenResponsesLocalShellTool$Outbound + | OpenResponsesFunctionShellTool$Outbound + | OpenResponsesApplyPatchTool$Outbound + | OpenResponsesCustomTool$Outbound + | DatetimeServerTool$Outbound + | ResponsesWebSearchServerTool$Outbound > | undefined; tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined; @@ -904,6 +1077,7 @@ export type OpenResponsesRequest$Outbound = { | OpenResponsesRequestPluginWeb$Outbound | OpenResponsesRequestPluginFileParser$Outbound | OpenResponsesRequestPluginResponseHealing$Outbound + | OpenResponsesRequestPluginContextCompression$Outbound > | undefined; user?: string | undefined; @@ -916,7 +1090,7 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< OpenResponsesRequest$Outbound, OpenResponsesRequest > = z.object({ - input: OpenResponsesInput$outboundSchema.optional(), + input: OpenResponsesInputUnion$outboundSchema.optional(), instructions: z.nullable(z.string()).optional(), metadata: z.nullable(z.record(z.string(), z.string())).optional(), tools: z.array( @@ -926,6 +1100,17 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool$outboundSchema, OpenResponsesWebSearchTool$outboundSchema, OpenResponsesWebSearch20250826Tool$outboundSchema, + OpenResponsesFileSearchTool$outboundSchema, + OpenResponsesComputerTool$outboundSchema, + OpenResponsesCodeInterpreterTool$outboundSchema, + OpenResponsesMcpTool$outboundSchema, + OpenResponsesImageGenerationTool$outboundSchema, + OpenResponsesLocalShellTool$outboundSchema, + OpenResponsesFunctionShellTool$outboundSchema, + OpenResponsesApplyPatchTool$outboundSchema, + OpenResponsesCustomTool$outboundSchema, + DatetimeServerTool$outboundSchema, + ResponsesWebSearchServerTool$outboundSchema, ]), ).optional(), toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema.optional(), @@ -966,6 +1151,7 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema), z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema), z.lazy(() => OpenResponsesRequestPluginResponseHealing$outboundSchema), + z.lazy(() => OpenResponsesRequestPluginContextCompression$outboundSchema), ]), ).optional(), user: z.string().optional(), diff --git a/src/models/openresponsesstreamevent.ts b/src/models/openresponsesstreamevent.ts index 40398c79..aafec6cf 100644 --- a/src/models/openresponsesstreamevent.ts +++ b/src/models/openresponsesstreamevent.ts @@ -36,10 +36,6 @@ import { OpenResponsesImageGenCallPartialImage, OpenResponsesImageGenCallPartialImage$inboundSchema, } from "./openresponsesimagegencallpartialimage.js"; -import { - OpenResponsesLogProbs, - OpenResponsesLogProbs$inboundSchema, -} from "./openresponseslogprobs.js"; import { OpenResponsesNonStreamingResponse, OpenResponsesNonStreamingResponse$inboundSchema, @@ -64,6 +60,18 @@ import { OpenResponsesReasoningSummaryTextDoneEvent, OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema, } from "./openresponsesreasoningsummarytextdoneevent.js"; +import { + OpenResponsesWebSearchCallCompleted, + OpenResponsesWebSearchCallCompleted$inboundSchema, +} from "./openresponseswebsearchcallcompleted.js"; +import { + OpenResponsesWebSearchCallInProgress, + OpenResponsesWebSearchCallInProgress$inboundSchema, +} from "./openresponseswebsearchcallinprogress.js"; +import { + OpenResponsesWebSearchCallSearching, + OpenResponsesWebSearchCallSearching$inboundSchema, +} from "./openresponseswebsearchcallsearching.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, @@ -153,6 +161,25 @@ export type OpenResponsesStreamEventResponseRefusalDelta = { sequenceNumber: number; }; +/** + * Alternative token with its log probability + */ +export type OpenResponsesStreamEventTopLogprob2 = { + token?: string | undefined; + logprob?: number | undefined; + bytes?: Array | undefined; +}; + +/** + * Log probability information for a token + */ +export type OpenResponsesStreamEventLogprob2 = { + logprob: number; + token: string; + topLogprobs?: Array | undefined; + bytes?: Array | undefined; +}; + /** * Event emitted when text streaming is complete */ @@ -163,7 +190,26 @@ export type OpenResponsesStreamEventResponseOutputTextDone = { contentIndex: number; text: string; sequenceNumber: number; - logprobs: Array; + logprobs: Array; +}; + +/** + * Alternative token with its log probability + */ +export type OpenResponsesStreamEventTopLogprob1 = { + token?: string | undefined; + logprob?: number | undefined; + bytes?: Array | undefined; +}; + +/** + * Log probability information for a token + */ +export type OpenResponsesStreamEventLogprob1 = { + logprob: number; + token: string; + topLogprobs?: Array | undefined; + bytes?: Array | undefined; }; /** @@ -171,7 +217,7 @@ export type OpenResponsesStreamEventResponseOutputTextDone = { */ export type OpenResponsesStreamEventResponseOutputTextDelta = { type: "response.output_text.delta"; - logprobs: Array; + logprobs: Array; outputIndex: number; itemId: string; contentIndex: number; @@ -335,7 +381,10 @@ export type OpenResponsesStreamEvent = | OpenResponsesImageGenCallInProgress | OpenResponsesImageGenCallGenerating | OpenResponsesImageGenCallPartialImage - | OpenResponsesImageGenCallCompleted; + | OpenResponsesImageGenCallCompleted + | OpenResponsesWebSearchCallInProgress + | OpenResponsesWebSearchCallSearching + | OpenResponsesWebSearchCallCompleted; /** @internal */ export const OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSchema: @@ -546,6 +595,54 @@ export function openResponsesStreamEventResponseRefusalDeltaFromJSON( ); } +/** @internal */ +export const OpenResponsesStreamEventTopLogprob2$inboundSchema: z.ZodType< + OpenResponsesStreamEventTopLogprob2, + unknown +> = z.object({ + token: z.string().optional(), + logprob: z.number().optional(), + bytes: z.array(z.number()).optional(), +}); + +export function openResponsesStreamEventTopLogprob2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesStreamEventTopLogprob2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesStreamEventTopLogprob2' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesStreamEventLogprob2$inboundSchema: z.ZodType< + OpenResponsesStreamEventLogprob2, + unknown +> = z.object({ + logprob: z.number(), + token: z.string(), + top_logprobs: z.array( + z.lazy(() => OpenResponsesStreamEventTopLogprob2$inboundSchema), + ).optional(), + bytes: z.array(z.number()).optional(), +}).transform((v) => { + return remap$(v, { + "top_logprobs": "topLogprobs", + }); +}); + +export function openResponsesStreamEventLogprob2FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesStreamEventLogprob2$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesStreamEventLogprob2' from JSON`, + ); +} + /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDone$inboundSchema: z.ZodType = z.object( @@ -556,7 +653,9 @@ export const OpenResponsesStreamEventResponseOutputTextDone$inboundSchema: content_index: z.number(), text: z.string(), sequence_number: z.number(), - logprobs: z.array(OpenResponsesLogProbs$inboundSchema), + logprobs: z.array(z.lazy(() => + OpenResponsesStreamEventLogprob2$inboundSchema + )), }, ).transform((v) => { return remap$(v, { @@ -583,12 +682,62 @@ export function openResponsesStreamEventResponseOutputTextDoneFromJSON( ); } +/** @internal */ +export const OpenResponsesStreamEventTopLogprob1$inboundSchema: z.ZodType< + OpenResponsesStreamEventTopLogprob1, + unknown +> = z.object({ + token: z.string().optional(), + logprob: z.number().optional(), + bytes: z.array(z.number()).optional(), +}); + +export function openResponsesStreamEventTopLogprob1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesStreamEventTopLogprob1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesStreamEventTopLogprob1' from JSON`, + ); +} + +/** @internal */ +export const OpenResponsesStreamEventLogprob1$inboundSchema: z.ZodType< + OpenResponsesStreamEventLogprob1, + unknown +> = z.object({ + logprob: z.number(), + token: z.string(), + top_logprobs: z.array( + z.lazy(() => OpenResponsesStreamEventTopLogprob1$inboundSchema), + ).optional(), + bytes: z.array(z.number()).optional(), +}).transform((v) => { + return remap$(v, { + "top_logprobs": "topLogprobs", + }); +}); + +export function openResponsesStreamEventLogprob1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpenResponsesStreamEventLogprob1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesStreamEventLogprob1' from JSON`, + ); +} + /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema: z.ZodType = z .object({ type: z.literal("response.output_text.delta"), - logprobs: z.array(OpenResponsesLogProbs$inboundSchema), + logprobs: z.array( + z.lazy(() => OpenResponsesStreamEventLogprob1$inboundSchema), + ), output_index: z.number(), item_id: z.string(), content_index: z.number(), @@ -983,6 +1132,9 @@ export const OpenResponsesStreamEvent$inboundSchema: z.ZodType< OpenResponsesImageGenCallGenerating$inboundSchema, OpenResponsesImageGenCallPartialImage$inboundSchema, OpenResponsesImageGenCallCompleted$inboundSchema, + OpenResponsesWebSearchCallInProgress$inboundSchema, + OpenResponsesWebSearchCallSearching$inboundSchema, + OpenResponsesWebSearchCallCompleted$inboundSchema, ]); export function openResponsesStreamEventFromJSON( diff --git a/src/models/openresponsestoplogprobs.ts b/src/models/openresponsestoplogprobs.ts deleted file mode 100644 index 12a5897e..00000000 --- a/src/models/openresponsestoplogprobs.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - * @generated-id: 9deb0a6359d1 - */ - -import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -/** - * Alternative token with its log probability - */ -export type OpenResponsesTopLogprobs = { - token?: string | undefined; - logprob?: number | undefined; -}; - -/** @internal */ -export const OpenResponsesTopLogprobs$inboundSchema: z.ZodType< - OpenResponsesTopLogprobs, - unknown -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), -}); - -export function openResponsesTopLogprobsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesTopLogprobs$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesTopLogprobs' from JSON`, - ); -} diff --git a/src/models/openresponseswebsearch20250826tool.ts b/src/models/openresponseswebsearch20250826tool.ts index a8ec3ef2..7a5b03f9 100644 --- a/src/models/openresponseswebsearch20250826tool.ts +++ b/src/models/openresponseswebsearch20250826tool.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -22,8 +24,24 @@ import { export type OpenResponsesWebSearch20250826ToolFilters = { allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; }; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const OpenResponsesWebSearch20250826ToolEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type OpenResponsesWebSearch20250826ToolEngine = OpenEnum< + typeof OpenResponsesWebSearch20250826ToolEngine +>; + /** * Web search tool configuration (2025-08-26 version) */ @@ -38,6 +56,14 @@ export type OpenResponsesWebSearch20250826Tool = { * User location information for web search */ userLocation?: ResponsesWebSearchUserLocation | null | undefined; + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: OpenResponsesWebSearch20250826ToolEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; }; /** @internal */ @@ -46,14 +72,17 @@ export const OpenResponsesWebSearch20250826ToolFilters$inboundSchema: z.ZodType< unknown > = z.object({ allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", }); }); /** @internal */ export type OpenResponsesWebSearch20250826ToolFilters$Outbound = { allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; }; /** @internal */ @@ -63,9 +92,11 @@ export const OpenResponsesWebSearch20250826ToolFilters$outboundSchema: OpenResponsesWebSearch20250826ToolFilters > = z.object({ allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", }); }); @@ -95,6 +126,17 @@ export function openResponsesWebSearch20250826ToolFiltersFromJSON( ); } +/** @internal */ +export const OpenResponsesWebSearch20250826ToolEngine$inboundSchema: z.ZodType< + OpenResponsesWebSearch20250826ToolEngine, + unknown +> = openEnums.inboundSchema(OpenResponsesWebSearch20250826ToolEngine); +/** @internal */ +export const OpenResponsesWebSearch20250826ToolEngine$outboundSchema: z.ZodType< + string, + OpenResponsesWebSearch20250826ToolEngine +> = openEnums.outboundSchema(OpenResponsesWebSearch20250826ToolEngine); + /** @internal */ export const OpenResponsesWebSearch20250826Tool$inboundSchema: z.ZodType< OpenResponsesWebSearch20250826Tool, @@ -107,10 +149,13 @@ export const OpenResponsesWebSearch20250826Tool$inboundSchema: z.ZodType< search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(ResponsesWebSearchUserLocation$inboundSchema) .optional(), + engine: OpenResponsesWebSearch20250826ToolEngine$inboundSchema.optional(), + max_results: z.number().optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", "user_location": "userLocation", + "max_results": "maxResults", }); }); /** @internal */ @@ -122,6 +167,8 @@ export type OpenResponsesWebSearch20250826Tool$Outbound = { | undefined; search_context_size?: string | undefined; user_location?: ResponsesWebSearchUserLocation$Outbound | null | undefined; + engine?: string | undefined; + max_results?: number | undefined; }; /** @internal */ @@ -136,10 +183,13 @@ export const OpenResponsesWebSearch20250826Tool$outboundSchema: z.ZodType< searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(ResponsesWebSearchUserLocation$outboundSchema) .optional(), + engine: OpenResponsesWebSearch20250826ToolEngine$outboundSchema.optional(), + maxResults: z.number().optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", userLocation: "user_location", + maxResults: "max_results", }); }); diff --git a/src/models/openresponseswebsearchcallcompleted.ts b/src/models/openresponseswebsearchcallcompleted.ts new file mode 100644 index 00000000..ab28f178 --- /dev/null +++ b/src/models/openresponseswebsearchcallcompleted.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4ad49b3f7a3d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Web search call completed + */ +export type OpenResponsesWebSearchCallCompleted = { + type: "response.web_search_call.completed"; + itemId: string; + outputIndex: number; + sequenceNumber: number; +}; + +/** @internal */ +export const OpenResponsesWebSearchCallCompleted$inboundSchema: z.ZodType< + OpenResponsesWebSearchCallCompleted, + unknown +> = z.object({ + type: z.literal("response.web_search_call.completed"), + item_id: z.string(), + output_index: z.number(), + sequence_number: z.number(), +}).transform((v) => { + return remap$(v, { + "item_id": "itemId", + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesWebSearchCallCompletedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesWebSearchCallCompleted$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesWebSearchCallCompleted' from JSON`, + ); +} diff --git a/src/models/openresponseswebsearchcallinprogress.ts b/src/models/openresponseswebsearchcallinprogress.ts new file mode 100644 index 00000000..079edb27 --- /dev/null +++ b/src/models/openresponseswebsearchcallinprogress.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5ca24ba4cf86 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Web search call in progress + */ +export type OpenResponsesWebSearchCallInProgress = { + type: "response.web_search_call.in_progress"; + itemId: string; + outputIndex: number; + sequenceNumber: number; +}; + +/** @internal */ +export const OpenResponsesWebSearchCallInProgress$inboundSchema: z.ZodType< + OpenResponsesWebSearchCallInProgress, + unknown +> = z.object({ + type: z.literal("response.web_search_call.in_progress"), + item_id: z.string(), + output_index: z.number(), + sequence_number: z.number(), +}).transform((v) => { + return remap$(v, { + "item_id": "itemId", + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesWebSearchCallInProgressFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesWebSearchCallInProgress$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesWebSearchCallInProgress' from JSON`, + ); +} diff --git a/src/models/openresponseswebsearchcallsearching.ts b/src/models/openresponseswebsearchcallsearching.ts new file mode 100644 index 00000000..19f129b7 --- /dev/null +++ b/src/models/openresponseswebsearchcallsearching.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9701019db8ec + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Web search call is searching + */ +export type OpenResponsesWebSearchCallSearching = { + type: "response.web_search_call.searching"; + itemId: string; + outputIndex: number; + sequenceNumber: number; +}; + +/** @internal */ +export const OpenResponsesWebSearchCallSearching$inboundSchema: z.ZodType< + OpenResponsesWebSearchCallSearching, + unknown +> = z.object({ + type: z.literal("response.web_search_call.searching"), + item_id: z.string(), + output_index: z.number(), + sequence_number: z.number(), +}).transform((v) => { + return remap$(v, { + "item_id": "itemId", + "output_index": "outputIndex", + "sequence_number": "sequenceNumber", + }); +}); + +export function openResponsesWebSearchCallSearchingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + OpenResponsesWebSearchCallSearching$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenResponsesWebSearchCallSearching' from JSON`, + ); +} diff --git a/src/models/openresponseswebsearchpreview20250311tool.ts b/src/models/openresponseswebsearchpreview20250311tool.ts index 767d79d8..887dc59e 100644 --- a/src/models/openresponseswebsearchpreview20250311tool.ts +++ b/src/models/openresponseswebsearchpreview20250311tool.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,6 +22,26 @@ import { WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js"; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const OpenResponsesWebSearchPreview20250311ToolEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type OpenResponsesWebSearchPreview20250311ToolEngine = OpenEnum< + typeof OpenResponsesWebSearchPreview20250311ToolEngine +>; + +export type OpenResponsesWebSearchPreview20250311ToolFilters = { + allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; +}; + /** * Web search preview tool configuration (2025-03-11 version) */ @@ -30,8 +52,85 @@ export type OpenResponsesWebSearchPreview20250311Tool = { */ searchContextSize?: ResponsesSearchContextSize | undefined; userLocation?: WebSearchPreviewToolUserLocation | null | undefined; + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: OpenResponsesWebSearchPreview20250311ToolEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; + filters?: OpenResponsesWebSearchPreview20250311ToolFilters | null | undefined; +}; + +/** @internal */ +export const OpenResponsesWebSearchPreview20250311ToolEngine$inboundSchema: + z.ZodType = + openEnums.inboundSchema(OpenResponsesWebSearchPreview20250311ToolEngine); +/** @internal */ +export const OpenResponsesWebSearchPreview20250311ToolEngine$outboundSchema: + z.ZodType = openEnums + .outboundSchema(OpenResponsesWebSearchPreview20250311ToolEngine); + +/** @internal */ +export const OpenResponsesWebSearchPreview20250311ToolFilters$inboundSchema: + z.ZodType = z + .object({ + allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), + }).transform((v) => { + return remap$(v, { + "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", + }); + }); +/** @internal */ +export type OpenResponsesWebSearchPreview20250311ToolFilters$Outbound = { + allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; }; +/** @internal */ +export const OpenResponsesWebSearchPreview20250311ToolFilters$outboundSchema: + z.ZodType< + OpenResponsesWebSearchPreview20250311ToolFilters$Outbound, + OpenResponsesWebSearchPreview20250311ToolFilters + > = z.object({ + allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), + }).transform((v) => { + return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); + }); + +export function openResponsesWebSearchPreview20250311ToolFiltersToJSON( + openResponsesWebSearchPreview20250311ToolFilters: + OpenResponsesWebSearchPreview20250311ToolFilters, +): string { + return JSON.stringify( + OpenResponsesWebSearchPreview20250311ToolFilters$outboundSchema.parse( + openResponsesWebSearchPreview20250311ToolFilters, + ), + ); +} +export function openResponsesWebSearchPreview20250311ToolFiltersFromJSON( + jsonString: string, +): SafeParseResult< + OpenResponsesWebSearchPreview20250311ToolFilters, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenResponsesWebSearchPreview20250311ToolFilters$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenResponsesWebSearchPreview20250311ToolFilters' from JSON`, + ); +} + /** @internal */ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool, @@ -41,10 +140,19 @@ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema) .optional(), + engine: OpenResponsesWebSearchPreview20250311ToolEngine$inboundSchema + .optional(), + max_results: z.number().optional(), + filters: z.nullable( + z.lazy(() => + OpenResponsesWebSearchPreview20250311ToolFilters$inboundSchema + ), + ).optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", "user_location": "userLocation", + "max_results": "maxResults", }); }); /** @internal */ @@ -52,6 +160,12 @@ export type OpenResponsesWebSearchPreview20250311Tool$Outbound = { type: "web_search_preview_2025_03_11"; search_context_size?: string | undefined; user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined; + engine?: string | undefined; + max_results?: number | undefined; + filters?: + | OpenResponsesWebSearchPreview20250311ToolFilters$Outbound + | null + | undefined; }; /** @internal */ @@ -64,10 +178,19 @@ export const OpenResponsesWebSearchPreview20250311Tool$outboundSchema: searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema) .optional(), + engine: OpenResponsesWebSearchPreview20250311ToolEngine$outboundSchema + .optional(), + maxResults: z.number().optional(), + filters: z.nullable( + z.lazy(() => + OpenResponsesWebSearchPreview20250311ToolFilters$outboundSchema + ), + ).optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", userLocation: "user_location", + maxResults: "max_results", }); }); diff --git a/src/models/openresponseswebsearchpreviewtool.ts b/src/models/openresponseswebsearchpreviewtool.ts index 53d80f92..68a9b449 100644 --- a/src/models/openresponseswebsearchpreviewtool.ts +++ b/src/models/openresponseswebsearchpreviewtool.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -20,6 +22,26 @@ import { WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js"; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const OpenResponsesWebSearchPreviewToolEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type OpenResponsesWebSearchPreviewToolEngine = OpenEnum< + typeof OpenResponsesWebSearchPreviewToolEngine +>; + +export type OpenResponsesWebSearchPreviewToolFilters = { + allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; +}; + /** * Web search preview tool configuration */ @@ -30,8 +52,87 @@ export type OpenResponsesWebSearchPreviewTool = { */ searchContextSize?: ResponsesSearchContextSize | undefined; userLocation?: WebSearchPreviewToolUserLocation | null | undefined; + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: OpenResponsesWebSearchPreviewToolEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; + filters?: OpenResponsesWebSearchPreviewToolFilters | null | undefined; }; +/** @internal */ +export const OpenResponsesWebSearchPreviewToolEngine$inboundSchema: z.ZodType< + OpenResponsesWebSearchPreviewToolEngine, + unknown +> = openEnums.inboundSchema(OpenResponsesWebSearchPreviewToolEngine); +/** @internal */ +export const OpenResponsesWebSearchPreviewToolEngine$outboundSchema: z.ZodType< + string, + OpenResponsesWebSearchPreviewToolEngine +> = openEnums.outboundSchema(OpenResponsesWebSearchPreviewToolEngine); + +/** @internal */ +export const OpenResponsesWebSearchPreviewToolFilters$inboundSchema: z.ZodType< + OpenResponsesWebSearchPreviewToolFilters, + unknown +> = z.object({ + allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", + }); +}); +/** @internal */ +export type OpenResponsesWebSearchPreviewToolFilters$Outbound = { + allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; +}; + +/** @internal */ +export const OpenResponsesWebSearchPreviewToolFilters$outboundSchema: z.ZodType< + OpenResponsesWebSearchPreviewToolFilters$Outbound, + OpenResponsesWebSearchPreviewToolFilters +> = z.object({ + allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function openResponsesWebSearchPreviewToolFiltersToJSON( + openResponsesWebSearchPreviewToolFilters: + OpenResponsesWebSearchPreviewToolFilters, +): string { + return JSON.stringify( + OpenResponsesWebSearchPreviewToolFilters$outboundSchema.parse( + openResponsesWebSearchPreviewToolFilters, + ), + ); +} +export function openResponsesWebSearchPreviewToolFiltersFromJSON( + jsonString: string, +): SafeParseResult< + OpenResponsesWebSearchPreviewToolFilters, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + OpenResponsesWebSearchPreviewToolFilters$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'OpenResponsesWebSearchPreviewToolFilters' from JSON`, + ); +} + /** @internal */ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreviewTool, @@ -41,10 +142,16 @@ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema) .optional(), + engine: OpenResponsesWebSearchPreviewToolEngine$inboundSchema.optional(), + max_results: z.number().optional(), + filters: z.nullable( + z.lazy(() => OpenResponsesWebSearchPreviewToolFilters$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", "user_location": "userLocation", + "max_results": "maxResults", }); }); /** @internal */ @@ -52,6 +159,12 @@ export type OpenResponsesWebSearchPreviewTool$Outbound = { type: "web_search_preview"; search_context_size?: string | undefined; user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined; + engine?: string | undefined; + max_results?: number | undefined; + filters?: + | OpenResponsesWebSearchPreviewToolFilters$Outbound + | null + | undefined; }; /** @internal */ @@ -63,10 +176,16 @@ export const OpenResponsesWebSearchPreviewTool$outboundSchema: z.ZodType< searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema) .optional(), + engine: OpenResponsesWebSearchPreviewToolEngine$outboundSchema.optional(), + maxResults: z.number().optional(), + filters: z.nullable( + z.lazy(() => OpenResponsesWebSearchPreviewToolFilters$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", userLocation: "user_location", + maxResults: "max_results", }); }); diff --git a/src/models/openresponseswebsearchtool.ts b/src/models/openresponseswebsearchtool.ts index 187fdd5a..c178f95f 100644 --- a/src/models/openresponseswebsearchtool.ts +++ b/src/models/openresponseswebsearchtool.ts @@ -6,6 +6,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { @@ -22,8 +24,24 @@ import { export type OpenResponsesWebSearchToolFilters = { allowedDomains?: Array | null | undefined; + excludedDomains?: Array | null | undefined; }; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const OpenResponsesWebSearchToolEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type OpenResponsesWebSearchToolEngine = OpenEnum< + typeof OpenResponsesWebSearchToolEngine +>; + /** * Web search tool configuration */ @@ -38,6 +56,14 @@ export type OpenResponsesWebSearchTool = { * User location information for web search */ userLocation?: ResponsesWebSearchUserLocation | null | undefined; + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: OpenResponsesWebSearchToolEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; }; /** @internal */ @@ -46,14 +72,17 @@ export const OpenResponsesWebSearchToolFilters$inboundSchema: z.ZodType< unknown > = z.object({ allowed_domains: z.nullable(z.array(z.string())).optional(), + excluded_domains: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "allowed_domains": "allowedDomains", + "excluded_domains": "excludedDomains", }); }); /** @internal */ export type OpenResponsesWebSearchToolFilters$Outbound = { allowed_domains?: Array | null | undefined; + excluded_domains?: Array | null | undefined; }; /** @internal */ @@ -62,9 +91,11 @@ export const OpenResponsesWebSearchToolFilters$outboundSchema: z.ZodType< OpenResponsesWebSearchToolFilters > = z.object({ allowedDomains: z.nullable(z.array(z.string())).optional(), + excludedDomains: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", }); }); @@ -87,6 +118,17 @@ export function openResponsesWebSearchToolFiltersFromJSON( ); } +/** @internal */ +export const OpenResponsesWebSearchToolEngine$inboundSchema: z.ZodType< + OpenResponsesWebSearchToolEngine, + unknown +> = openEnums.inboundSchema(OpenResponsesWebSearchToolEngine); +/** @internal */ +export const OpenResponsesWebSearchToolEngine$outboundSchema: z.ZodType< + string, + OpenResponsesWebSearchToolEngine +> = openEnums.outboundSchema(OpenResponsesWebSearchToolEngine); + /** @internal */ export const OpenResponsesWebSearchTool$inboundSchema: z.ZodType< OpenResponsesWebSearchTool, @@ -99,10 +141,13 @@ export const OpenResponsesWebSearchTool$inboundSchema: z.ZodType< search_context_size: ResponsesSearchContextSize$inboundSchema.optional(), user_location: z.nullable(ResponsesWebSearchUserLocation$inboundSchema) .optional(), + engine: OpenResponsesWebSearchToolEngine$inboundSchema.optional(), + max_results: z.number().optional(), }).transform((v) => { return remap$(v, { "search_context_size": "searchContextSize", "user_location": "userLocation", + "max_results": "maxResults", }); }); /** @internal */ @@ -111,6 +156,8 @@ export type OpenResponsesWebSearchTool$Outbound = { filters?: OpenResponsesWebSearchToolFilters$Outbound | null | undefined; search_context_size?: string | undefined; user_location?: ResponsesWebSearchUserLocation$Outbound | null | undefined; + engine?: string | undefined; + max_results?: number | undefined; }; /** @internal */ @@ -125,10 +172,13 @@ export const OpenResponsesWebSearchTool$outboundSchema: z.ZodType< searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(), userLocation: z.nullable(ResponsesWebSearchUserLocation$outboundSchema) .optional(), + engine: OpenResponsesWebSearchToolEngine$outboundSchema.optional(), + maxResults: z.number().optional(), }).transform((v) => { return remap$(v, { searchContextSize: "search_context_size", userLocation: "user_location", + maxResults: "max_results", }); }); diff --git a/src/models/operations/bulkassignkeystoguardrail.ts b/src/models/operations/bulkassignkeystoguardrail.ts index 6479c535..30cd72ca 100644 --- a/src/models/operations/bulkassignkeystoguardrail.ts +++ b/src/models/operations/bulkassignkeystoguardrail.ts @@ -22,7 +22,13 @@ export type BulkAssignKeysToGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type BulkAssignKeysToGuardrailRequestBody = { @@ -45,7 +51,13 @@ export type BulkAssignKeysToGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -93,7 +105,8 @@ export function bulkAssignKeysToGuardrailRequestBodyToJSON( /** @internal */ export type BulkAssignKeysToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; RequestBody: BulkAssignKeysToGuardrailRequestBody$Outbound; }; @@ -104,7 +117,8 @@ export const BulkAssignKeysToGuardrailRequest$outboundSchema: z.ZodType< BulkAssignKeysToGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), requestBody: z.lazy(() => BulkAssignKeysToGuardrailRequestBody$outboundSchema @@ -112,7 +126,6 @@ export const BulkAssignKeysToGuardrailRequest$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/bulkassignmemberstoguardrail.ts b/src/models/operations/bulkassignmemberstoguardrail.ts index a9338b1e..f79a061b 100644 --- a/src/models/operations/bulkassignmemberstoguardrail.ts +++ b/src/models/operations/bulkassignmemberstoguardrail.ts @@ -22,7 +22,13 @@ export type BulkAssignMembersToGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type BulkAssignMembersToGuardrailRequestBody = { @@ -45,7 +51,13 @@ export type BulkAssignMembersToGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -94,7 +106,8 @@ export function bulkAssignMembersToGuardrailRequestBodyToJSON( /** @internal */ export type BulkAssignMembersToGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; RequestBody: BulkAssignMembersToGuardrailRequestBody$Outbound; }; @@ -105,7 +118,8 @@ export const BulkAssignMembersToGuardrailRequest$outboundSchema: z.ZodType< BulkAssignMembersToGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), requestBody: z.lazy(() => BulkAssignMembersToGuardrailRequestBody$outboundSchema @@ -113,7 +127,6 @@ export const BulkAssignMembersToGuardrailRequest$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/bulkunassignkeysfromguardrail.ts b/src/models/operations/bulkunassignkeysfromguardrail.ts index ba264284..ff7e659b 100644 --- a/src/models/operations/bulkunassignkeysfromguardrail.ts +++ b/src/models/operations/bulkunassignkeysfromguardrail.ts @@ -22,7 +22,13 @@ export type BulkUnassignKeysFromGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type BulkUnassignKeysFromGuardrailRequestBody = { @@ -45,7 +51,13 @@ export type BulkUnassignKeysFromGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -94,7 +106,8 @@ export function bulkUnassignKeysFromGuardrailRequestBodyToJSON( /** @internal */ export type BulkUnassignKeysFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; RequestBody: BulkUnassignKeysFromGuardrailRequestBody$Outbound; }; @@ -105,7 +118,8 @@ export const BulkUnassignKeysFromGuardrailRequest$outboundSchema: z.ZodType< BulkUnassignKeysFromGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), requestBody: z.lazy(() => BulkUnassignKeysFromGuardrailRequestBody$outboundSchema @@ -113,7 +127,6 @@ export const BulkUnassignKeysFromGuardrailRequest$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/bulkunassignmembersfromguardrail.ts b/src/models/operations/bulkunassignmembersfromguardrail.ts index b1cee191..4533c1ff 100644 --- a/src/models/operations/bulkunassignmembersfromguardrail.ts +++ b/src/models/operations/bulkunassignmembersfromguardrail.ts @@ -22,7 +22,13 @@ export type BulkUnassignMembersFromGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type BulkUnassignMembersFromGuardrailRequestBody = { @@ -45,7 +51,13 @@ export type BulkUnassignMembersFromGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -95,7 +107,8 @@ export function bulkUnassignMembersFromGuardrailRequestBodyToJSON( /** @internal */ export type BulkUnassignMembersFromGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; RequestBody: BulkUnassignMembersFromGuardrailRequestBody$Outbound; }; @@ -106,7 +119,8 @@ export const BulkUnassignMembersFromGuardrailRequest$outboundSchema: z.ZodType< BulkUnassignMembersFromGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), requestBody: z.lazy(() => BulkUnassignMembersFromGuardrailRequestBody$outboundSchema @@ -114,7 +128,6 @@ export const BulkUnassignMembersFromGuardrailRequest$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts index 8979e7af..86a24a47 100644 --- a/src/models/operations/createauthkeyscode.ts +++ b/src/models/operations/createauthkeyscode.ts @@ -24,7 +24,13 @@ export type CreateAuthKeysCodeGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -98,7 +104,13 @@ export type CreateAuthKeysCodeRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; requestBody: CreateAuthKeysCodeRequestBody; }; @@ -188,7 +200,8 @@ export function createAuthKeysCodeRequestBodyToJSON( /** @internal */ export type CreateAuthKeysCodeRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; RequestBody: CreateAuthKeysCodeRequestBody$Outbound; }; @@ -198,12 +211,12 @@ export const CreateAuthKeysCodeRequest$outboundSchema: z.ZodType< CreateAuthKeysCodeRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), requestBody: z.lazy(() => CreateAuthKeysCodeRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/createcoinbasecharge.ts b/src/models/operations/createcoinbasecharge.ts index 56f9c256..a2a9035f 100644 --- a/src/models/operations/createcoinbasecharge.ts +++ b/src/models/operations/createcoinbasecharge.ts @@ -23,7 +23,13 @@ export type CreateCoinbaseChargeGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type CreateCoinbaseChargeSecurity = { @@ -43,7 +49,13 @@ export type CreateCoinbaseChargeRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; createChargeRequest: models.CreateChargeRequest; }; @@ -115,7 +127,8 @@ export function createCoinbaseChargeSecurityToJSON( /** @internal */ export type CreateCoinbaseChargeRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; CreateChargeRequest: models.CreateChargeRequest$Outbound; }; @@ -125,12 +138,12 @@ export const CreateCoinbaseChargeRequest$outboundSchema: z.ZodType< CreateCoinbaseChargeRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), createChargeRequest: models.CreateChargeRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", createChargeRequest: "CreateChargeRequest", }); }); diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index ebabfe8f..6664d9fe 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -25,7 +25,13 @@ export type CreateEmbeddingsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ImageUrl = { @@ -92,7 +98,13 @@ export type CreateEmbeddingsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; requestBody: CreateEmbeddingsRequestBody; }; @@ -307,7 +319,8 @@ export function createEmbeddingsRequestBodyToJSON( /** @internal */ export type CreateEmbeddingsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; RequestBody: CreateEmbeddingsRequestBody$Outbound; }; @@ -317,12 +330,12 @@ export const CreateEmbeddingsRequest$outboundSchema: z.ZodType< CreateEmbeddingsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), requestBody: z.lazy(() => CreateEmbeddingsRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/createguardrail.ts b/src/models/operations/createguardrail.ts index 29cff6f4..43a73411 100644 --- a/src/models/operations/createguardrail.ts +++ b/src/models/operations/createguardrail.ts @@ -24,7 +24,13 @@ export type CreateGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -63,6 +69,10 @@ export type CreateGuardrailRequestBody = { * List of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model identifiers (slug or canonical_slug accepted) */ @@ -86,7 +96,13 @@ export type CreateGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; requestBody: CreateGuardrailRequestBody; }; @@ -133,6 +149,10 @@ export type CreateGuardrailData = { * List of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model canonical_slugs (immutable identifiers) */ @@ -174,6 +194,7 @@ export type CreateGuardrailRequestBody$Outbound = { limit_usd?: number | null | undefined; reset_interval?: string | null | undefined; allowed_providers?: Array | null | undefined; + ignored_providers?: Array | null | undefined; allowed_models?: Array | null | undefined; enforce_zdr?: boolean | null | undefined; }; @@ -189,6 +210,7 @@ export const CreateGuardrailRequestBody$outboundSchema: z.ZodType< resetInterval: z.nullable(CreateGuardrailResetIntervalRequest$outboundSchema) .optional(), allowedProviders: z.nullable(z.array(z.string())).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), allowedModels: z.nullable(z.array(z.string())).optional(), enforceZdr: z.nullable(z.boolean()).optional(), }).transform((v) => { @@ -196,6 +218,7 @@ export const CreateGuardrailRequestBody$outboundSchema: z.ZodType< limitUsd: "limit_usd", resetInterval: "reset_interval", allowedProviders: "allowed_providers", + ignoredProviders: "ignored_providers", allowedModels: "allowed_models", enforceZdr: "enforce_zdr", }); @@ -212,7 +235,8 @@ export function createGuardrailRequestBodyToJSON( /** @internal */ export type CreateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; RequestBody: CreateGuardrailRequestBody$Outbound; }; @@ -222,12 +246,12 @@ export const CreateGuardrailRequest$outboundSchema: z.ZodType< CreateGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), requestBody: z.lazy(() => CreateGuardrailRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); @@ -258,6 +282,7 @@ export const CreateGuardrailData$inboundSchema: z.ZodType< reset_interval: z.nullable(CreateGuardrailResetIntervalResponse$inboundSchema) .optional(), allowed_providers: z.nullable(z.array(z.string())).optional(), + ignored_providers: z.nullable(z.array(z.string())).optional(), allowed_models: z.nullable(z.array(z.string())).optional(), enforce_zdr: z.nullable(z.boolean()).optional(), created_at: z.string(), @@ -267,6 +292,7 @@ export const CreateGuardrailData$inboundSchema: z.ZodType< "limit_usd": "limitUsd", "reset_interval": "resetInterval", "allowed_providers": "allowedProviders", + "ignored_providers": "ignoredProviders", "allowed_models": "allowedModels", "enforce_zdr": "enforceZdr", "created_at": "createdAt", diff --git a/src/models/operations/createkeys.ts b/src/models/operations/createkeys.ts index 04d03af7..440a8c4a 100644 --- a/src/models/operations/createkeys.ts +++ b/src/models/operations/createkeys.ts @@ -24,7 +24,13 @@ export type CreateKeysGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -76,7 +82,13 @@ export type CreateKeysRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; requestBody: CreateKeysRequestBody; }; @@ -220,7 +232,8 @@ export function createKeysRequestBodyToJSON( /** @internal */ export type CreateKeysRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; RequestBody: CreateKeysRequestBody$Outbound; }; @@ -230,12 +243,12 @@ export const CreateKeysRequest$outboundSchema: z.ZodType< CreateKeysRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), requestBody: z.lazy(() => CreateKeysRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/createresponses.ts b/src/models/operations/createresponses.ts index d98e036b..461b972f 100644 --- a/src/models/operations/createresponses.ts +++ b/src/models/operations/createresponses.ts @@ -24,7 +24,13 @@ export type CreateResponsesGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type CreateResponsesRequest = { @@ -40,7 +46,13 @@ export type CreateResponsesRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; openResponsesRequest: models.OpenResponsesRequest; }; @@ -61,7 +73,8 @@ export type CreateResponsesResponse = /** @internal */ export type CreateResponsesRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; OpenResponsesRequest: models.OpenResponsesRequest$Outbound; }; @@ -71,12 +84,12 @@ export const CreateResponsesRequest$outboundSchema: z.ZodType< CreateResponsesRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), openResponsesRequest: models.OpenResponsesRequest$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", openResponsesRequest: "OpenResponsesRequest", }); }); diff --git a/src/models/operations/deleteguardrail.ts b/src/models/operations/deleteguardrail.ts index b0a783f3..8bd95167 100644 --- a/src/models/operations/deleteguardrail.ts +++ b/src/models/operations/deleteguardrail.ts @@ -22,7 +22,13 @@ export type DeleteGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type DeleteGuardrailRequest = { @@ -38,7 +44,13 @@ export type DeleteGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail to delete */ @@ -58,7 +70,8 @@ export type DeleteGuardrailResponse = { /** @internal */ export type DeleteGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; }; @@ -68,12 +81,12 @@ export const DeleteGuardrailRequest$outboundSchema: z.ZodType< DeleteGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/deletekeys.ts b/src/models/operations/deletekeys.ts index 83a55c2f..59097d42 100644 --- a/src/models/operations/deletekeys.ts +++ b/src/models/operations/deletekeys.ts @@ -22,7 +22,13 @@ export type DeleteKeysGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type DeleteKeysRequest = { @@ -38,7 +44,13 @@ export type DeleteKeysRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The hash identifier of the API key to delete */ @@ -58,7 +70,8 @@ export type DeleteKeysResponse = { /** @internal */ export type DeleteKeysRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; hash: string; }; @@ -68,12 +81,12 @@ export const DeleteKeysRequest$outboundSchema: z.ZodType< DeleteKeysRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), hash: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/exchangeauthcodeforapikey.ts b/src/models/operations/exchangeauthcodeforapikey.ts index 00eece72..44356ffc 100644 --- a/src/models/operations/exchangeauthcodeforapikey.ts +++ b/src/models/operations/exchangeauthcodeforapikey.ts @@ -24,7 +24,13 @@ export type ExchangeAuthCodeForAPIKeyGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -72,7 +78,13 @@ export type ExchangeAuthCodeForAPIKeyRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; requestBody: ExchangeAuthCodeForAPIKeyRequestBody; }; @@ -132,7 +144,8 @@ export function exchangeAuthCodeForAPIKeyRequestBodyToJSON( /** @internal */ export type ExchangeAuthCodeForAPIKeyRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; RequestBody: ExchangeAuthCodeForAPIKeyRequestBody$Outbound; }; @@ -142,14 +155,14 @@ export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema: z.ZodType< ExchangeAuthCodeForAPIKeyRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), requestBody: z.lazy(() => ExchangeAuthCodeForAPIKeyRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/operations/getcredits.ts b/src/models/operations/getcredits.ts index 5ec3b40f..582583b0 100644 --- a/src/models/operations/getcredits.ts +++ b/src/models/operations/getcredits.ts @@ -22,7 +22,13 @@ export type GetCreditsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetCreditsRequest = { @@ -38,7 +44,13 @@ export type GetCreditsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetCreditsData = { @@ -62,7 +74,8 @@ export type GetCreditsResponse = { /** @internal */ export type GetCreditsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -71,11 +84,11 @@ export const GetCreditsRequest$outboundSchema: z.ZodType< GetCreditsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/getcurrentkey.ts b/src/models/operations/getcurrentkey.ts index 2677e460..21f9b0c0 100644 --- a/src/models/operations/getcurrentkey.ts +++ b/src/models/operations/getcurrentkey.ts @@ -22,7 +22,13 @@ export type GetCurrentKeyGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetCurrentKeyRequest = { @@ -38,7 +44,13 @@ export type GetCurrentKeyRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -156,7 +168,8 @@ export type GetCurrentKeyResponse = { /** @internal */ export type GetCurrentKeyRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -165,11 +178,11 @@ export const GetCurrentKeyRequest$outboundSchema: z.ZodType< GetCurrentKeyRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index d57d5fe9..b898552a 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -24,7 +24,13 @@ export type GetGenerationGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetGenerationRequest = { @@ -40,7 +46,13 @@ export type GetGenerationRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; id: string; }; @@ -85,6 +97,7 @@ export const ProviderName = { Together2: "Together 2", Ubicloud: "Ubicloud", OneDotAI: "01.AI", + AkashML: "AkashML", Ai21: "AI21", AionLabs: "AionLabs", Alibaba: "Alibaba", @@ -312,6 +325,14 @@ export type GetGenerationData = { * List of provider responses for this generation, including fallback attempts */ providerResponses: Array | null; + /** + * User-Agent header from the request + */ + userAgent: string | null; + /** + * Referer header from the request + */ + httpReferer: string | null; }; /** @@ -327,7 +348,8 @@ export type GetGenerationResponse = { /** @internal */ export type GetGenerationRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; }; @@ -337,12 +359,12 @@ export const GetGenerationRequest$outboundSchema: z.ZodType< GetGenerationRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); @@ -434,6 +456,8 @@ export const GetGenerationData$inboundSchema: z.ZodType< provider_responses: z.nullable( z.array(z.lazy(() => ProviderResponse$inboundSchema)), ), + user_agent: z.nullable(z.string()), + http_referer: z.nullable(z.string()), }).transform((v) => { return remap$(v, { "upstream_id": "upstreamId", @@ -462,6 +486,8 @@ export const GetGenerationData$inboundSchema: z.ZodType< "external_user": "externalUser", "api_type": "apiType", "provider_responses": "providerResponses", + "user_agent": "userAgent", + "http_referer": "httpReferer", }); }); diff --git a/src/models/operations/getguardrail.ts b/src/models/operations/getguardrail.ts index 602cf1f0..78ba0d03 100644 --- a/src/models/operations/getguardrail.ts +++ b/src/models/operations/getguardrail.ts @@ -24,7 +24,13 @@ export type GetGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetGuardrailRequest = { @@ -40,7 +46,13 @@ export type GetGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail to retrieve */ @@ -90,6 +102,10 @@ export type GetGuardrailData = { * List of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model canonical_slugs (immutable identifiers) */ @@ -121,7 +137,8 @@ export type GetGuardrailResponse = { /** @internal */ export type GetGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; }; @@ -131,12 +148,12 @@ export const GetGuardrailRequest$outboundSchema: z.ZodType< GetGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); @@ -166,6 +183,7 @@ export const GetGuardrailData$inboundSchema: z.ZodType< reset_interval: z.nullable(GetGuardrailResetInterval$inboundSchema) .optional(), allowed_providers: z.nullable(z.array(z.string())).optional(), + ignored_providers: z.nullable(z.array(z.string())).optional(), allowed_models: z.nullable(z.array(z.string())).optional(), enforce_zdr: z.nullable(z.boolean()).optional(), created_at: z.string(), @@ -175,6 +193,7 @@ export const GetGuardrailData$inboundSchema: z.ZodType< "limit_usd": "limitUsd", "reset_interval": "resetInterval", "allowed_providers": "allowedProviders", + "ignored_providers": "ignoredProviders", "allowed_models": "allowedModels", "enforce_zdr": "enforceZdr", "created_at": "createdAt", diff --git a/src/models/operations/getkey.ts b/src/models/operations/getkey.ts index bdc97fcf..92929d79 100644 --- a/src/models/operations/getkey.ts +++ b/src/models/operations/getkey.ts @@ -22,7 +22,13 @@ export type GetKeyGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetKeyRequest = { @@ -38,7 +44,13 @@ export type GetKeyRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The hash identifier of the API key to retrieve */ @@ -140,7 +152,8 @@ export type GetKeyResponse = { /** @internal */ export type GetKeyRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; hash: string; }; @@ -150,12 +163,12 @@ export const GetKeyRequest$outboundSchema: z.ZodType< GetKeyRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), hash: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/getmodels.ts b/src/models/operations/getmodels.ts index 9cec7dcc..e69ff472 100644 --- a/src/models/operations/getmodels.ts +++ b/src/models/operations/getmodels.ts @@ -21,7 +21,13 @@ export type GetModelsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -59,12 +65,22 @@ export type GetModelsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Filter models by use case category */ category?: Category | undefined; supportedParameters?: string | undefined; + /** + * Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + */ + outputModalities?: string | undefined; }; /** @internal */ @@ -74,9 +90,11 @@ export const Category$outboundSchema: z.ZodType = openEnums /** @internal */ export type GetModelsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; category?: string | undefined; supported_parameters?: string | undefined; + output_modalities?: string | undefined; }; /** @internal */ @@ -85,14 +103,16 @@ export const GetModelsRequest$outboundSchema: z.ZodType< GetModelsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), category: Category$outboundSchema.optional(), supportedParameters: z.string().optional(), + outputModalities: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", supportedParameters: "supported_parameters", + outputModalities: "output_modalities", }); }); diff --git a/src/models/operations/getuseractivity.ts b/src/models/operations/getuseractivity.ts index cfa850a7..801fc339 100644 --- a/src/models/operations/getuseractivity.ts +++ b/src/models/operations/getuseractivity.ts @@ -23,7 +23,13 @@ export type GetUserActivityGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type GetUserActivityRequest = { @@ -39,7 +45,13 @@ export type GetUserActivityRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). */ @@ -59,7 +71,8 @@ export type GetUserActivityResponse = { /** @internal */ export type GetUserActivityRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; date?: string | undefined; }; @@ -69,12 +82,12 @@ export const GetUserActivityRequest$outboundSchema: z.ZodType< GetUserActivityRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), date: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/list.ts b/src/models/operations/list.ts index a73f912b..be0ebc44 100644 --- a/src/models/operations/list.ts +++ b/src/models/operations/list.ts @@ -22,7 +22,13 @@ export type ListGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListRequest = { @@ -38,7 +44,13 @@ export type ListRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Whether to include disabled API keys in the response */ @@ -141,7 +153,8 @@ export type ListResponse = { /** @internal */ export type ListRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; include_disabled?: string | undefined; offset?: string | undefined; }; @@ -152,13 +165,13 @@ export const ListRequest$outboundSchema: z.ZodType< ListRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), includeDisabled: z.string().optional(), offset: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", includeDisabled: "include_disabled", }); }); diff --git a/src/models/operations/listembeddingsmodels.ts b/src/models/operations/listembeddingsmodels.ts index 0ae51944..6755fab6 100644 --- a/src/models/operations/listembeddingsmodels.ts +++ b/src/models/operations/listembeddingsmodels.ts @@ -19,7 +19,13 @@ export type ListEmbeddingsModelsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListEmbeddingsModelsRequest = { @@ -35,13 +41,20 @@ export type ListEmbeddingsModelsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @internal */ export type ListEmbeddingsModelsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -50,11 +63,11 @@ export const ListEmbeddingsModelsRequest$outboundSchema: z.ZodType< ListEmbeddingsModelsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listendpoints.ts b/src/models/operations/listendpoints.ts index 77cd134b..26e84519 100644 --- a/src/models/operations/listendpoints.ts +++ b/src/models/operations/listendpoints.ts @@ -23,7 +23,13 @@ export type ListEndpointsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListEndpointsRequest = { @@ -39,7 +45,13 @@ export type ListEndpointsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; author: string; slug: string; }; @@ -57,7 +69,8 @@ export type ListEndpointsResponse = { /** @internal */ export type ListEndpointsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; author: string; slug: string; }; @@ -68,13 +81,13 @@ export const ListEndpointsRequest$outboundSchema: z.ZodType< ListEndpointsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), author: z.string(), slug: z.string(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listendpointszdr.ts b/src/models/operations/listendpointszdr.ts index 96d088f0..caa00bb1 100644 --- a/src/models/operations/listendpointszdr.ts +++ b/src/models/operations/listendpointszdr.ts @@ -23,7 +23,13 @@ export type ListEndpointsZdrGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListEndpointsZdrRequest = { @@ -39,7 +45,13 @@ export type ListEndpointsZdrRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -52,7 +64,8 @@ export type ListEndpointsZdrResponse = { /** @internal */ export type ListEndpointsZdrRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -61,11 +74,11 @@ export const ListEndpointsZdrRequest$outboundSchema: z.ZodType< ListEndpointsZdrRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listguardrailkeyassignments.ts b/src/models/operations/listguardrailkeyassignments.ts index f7498794..e5ae4cf2 100644 --- a/src/models/operations/listguardrailkeyassignments.ts +++ b/src/models/operations/listguardrailkeyassignments.ts @@ -22,7 +22,13 @@ export type ListGuardrailKeyAssignmentsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListGuardrailKeyAssignmentsRequest = { @@ -38,7 +44,13 @@ export type ListGuardrailKeyAssignmentsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -101,7 +113,8 @@ export type ListGuardrailKeyAssignmentsResponse = { /** @internal */ export type ListGuardrailKeyAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; offset?: string | undefined; limit?: string | undefined; @@ -113,14 +126,14 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema: z.ZodType< ListGuardrailKeyAssignmentsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), offset: z.string().optional(), limit: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listguardrailmemberassignments.ts b/src/models/operations/listguardrailmemberassignments.ts index cb37b10d..a99c37c3 100644 --- a/src/models/operations/listguardrailmemberassignments.ts +++ b/src/models/operations/listguardrailmemberassignments.ts @@ -22,7 +22,13 @@ export type ListGuardrailMemberAssignmentsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListGuardrailMemberAssignmentsRequest = { @@ -38,7 +44,13 @@ export type ListGuardrailMemberAssignmentsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail */ @@ -97,7 +109,8 @@ export type ListGuardrailMemberAssignmentsResponse = { /** @internal */ export type ListGuardrailMemberAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; offset?: string | undefined; limit?: string | undefined; @@ -109,14 +122,14 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema: z.ZodType< ListGuardrailMemberAssignmentsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), offset: z.string().optional(), limit: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listguardrails.ts b/src/models/operations/listguardrails.ts index 77bb3653..64618e35 100644 --- a/src/models/operations/listguardrails.ts +++ b/src/models/operations/listguardrails.ts @@ -24,7 +24,13 @@ export type ListGuardrailsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListGuardrailsRequest = { @@ -40,7 +46,13 @@ export type ListGuardrailsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Number of records to skip for pagination */ @@ -91,6 +103,10 @@ export type ListGuardrailsData = { * List of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model canonical_slugs (immutable identifiers) */ @@ -126,7 +142,8 @@ export type ListGuardrailsResponse = { /** @internal */ export type ListGuardrailsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; offset?: string | undefined; limit?: string | undefined; }; @@ -137,13 +154,13 @@ export const ListGuardrailsRequest$outboundSchema: z.ZodType< ListGuardrailsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), offset: z.string().optional(), limit: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); @@ -173,6 +190,7 @@ export const ListGuardrailsData$inboundSchema: z.ZodType< reset_interval: z.nullable(ListGuardrailsResetInterval$inboundSchema) .optional(), allowed_providers: z.nullable(z.array(z.string())).optional(), + ignored_providers: z.nullable(z.array(z.string())).optional(), allowed_models: z.nullable(z.array(z.string())).optional(), enforce_zdr: z.nullable(z.boolean()).optional(), created_at: z.string(), @@ -182,6 +200,7 @@ export const ListGuardrailsData$inboundSchema: z.ZodType< "limit_usd": "limitUsd", "reset_interval": "resetInterval", "allowed_providers": "allowedProviders", + "ignored_providers": "ignoredProviders", "allowed_models": "allowedModels", "enforce_zdr": "enforceZdr", "created_at": "createdAt", diff --git a/src/models/operations/listkeyassignments.ts b/src/models/operations/listkeyassignments.ts index 2a7fa26d..800c8962 100644 --- a/src/models/operations/listkeyassignments.ts +++ b/src/models/operations/listkeyassignments.ts @@ -22,7 +22,13 @@ export type ListKeyAssignmentsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListKeyAssignmentsRequest = { @@ -38,7 +44,13 @@ export type ListKeyAssignmentsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Number of records to skip for pagination */ @@ -97,7 +109,8 @@ export type ListKeyAssignmentsResponse = { /** @internal */ export type ListKeyAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; offset?: string | undefined; limit?: string | undefined; }; @@ -108,13 +121,13 @@ export const ListKeyAssignmentsRequest$outboundSchema: z.ZodType< ListKeyAssignmentsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), offset: z.string().optional(), limit: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listmemberassignments.ts b/src/models/operations/listmemberassignments.ts index ebdba3bd..5472421e 100644 --- a/src/models/operations/listmemberassignments.ts +++ b/src/models/operations/listmemberassignments.ts @@ -22,7 +22,13 @@ export type ListMemberAssignmentsGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListMemberAssignmentsRequest = { @@ -38,7 +44,13 @@ export type ListMemberAssignmentsRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * Number of records to skip for pagination */ @@ -93,7 +105,8 @@ export type ListMemberAssignmentsResponse = { /** @internal */ export type ListMemberAssignmentsRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; offset?: string | undefined; limit?: string | undefined; }; @@ -104,13 +117,13 @@ export const ListMemberAssignmentsRequest$outboundSchema: z.ZodType< ListMemberAssignmentsRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), offset: z.string().optional(), limit: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listmodelscount.ts b/src/models/operations/listmodelscount.ts index 4a8c595d..33125590 100644 --- a/src/models/operations/listmodelscount.ts +++ b/src/models/operations/listmodelscount.ts @@ -19,7 +19,13 @@ export type ListModelsCountGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListModelsCountRequest = { @@ -35,13 +41,25 @@ export type ListModelsCountRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + */ + outputModalities?: string | undefined; }; /** @internal */ export type ListModelsCountRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + output_modalities?: string | undefined; }; /** @internal */ @@ -50,11 +68,13 @@ export const ListModelsCountRequest$outboundSchema: z.ZodType< ListModelsCountRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + outputModalities: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", + outputModalities: "output_modalities", }); }); diff --git a/src/models/operations/listmodelsuser.ts b/src/models/operations/listmodelsuser.ts index 2068737c..f9728e0e 100644 --- a/src/models/operations/listmodelsuser.ts +++ b/src/models/operations/listmodelsuser.ts @@ -19,7 +19,13 @@ export type ListModelsUserGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListModelsUserSecurity = { @@ -39,7 +45,13 @@ export type ListModelsUserRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @internal */ @@ -66,7 +78,8 @@ export function listModelsUserSecurityToJSON( /** @internal */ export type ListModelsUserRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -75,11 +88,11 @@ export const ListModelsUserRequest$outboundSchema: z.ZodType< ListModelsUserRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/listproviders.ts b/src/models/operations/listproviders.ts index 92a8d661..42fe05ee 100644 --- a/src/models/operations/listproviders.ts +++ b/src/models/operations/listproviders.ts @@ -22,7 +22,13 @@ export type ListProvidersGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListProvidersRequest = { @@ -38,7 +44,13 @@ export type ListProvidersRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type ListProvidersData = { @@ -74,7 +86,8 @@ export type ListProvidersResponse = { /** @internal */ export type ListProvidersRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; }; /** @internal */ @@ -83,11 +96,11 @@ export const ListProvidersRequest$outboundSchema: z.ZodType< ListProvidersRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", }); }); diff --git a/src/models/operations/sendchatcompletionrequest.ts b/src/models/operations/sendchatcompletionrequest.ts index 957b070c..9ac5fa7a 100644 --- a/src/models/operations/sendchatcompletionrequest.ts +++ b/src/models/operations/sendchatcompletionrequest.ts @@ -24,7 +24,13 @@ export type SendChatCompletionRequestGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; export type SendChatCompletionRequestRequest = { @@ -40,7 +46,13 @@ export type SendChatCompletionRequestRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; chatGenerationParams: models.ChatGenerationParams; }; @@ -61,7 +73,8 @@ export type SendChatCompletionRequestResponse = /** @internal */ export type SendChatCompletionRequestRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; ChatGenerationParams: models.ChatGenerationParams$Outbound; }; @@ -71,12 +84,12 @@ export const SendChatCompletionRequestRequest$outboundSchema: z.ZodType< SendChatCompletionRequestRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), chatGenerationParams: models.ChatGenerationParams$outboundSchema, }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", chatGenerationParams: "ChatGenerationParams", }); }); diff --git a/src/models/operations/updateguardrail.ts b/src/models/operations/updateguardrail.ts index 42c7f76e..0cc62a6c 100644 --- a/src/models/operations/updateguardrail.ts +++ b/src/models/operations/updateguardrail.ts @@ -24,7 +24,13 @@ export type UpdateGuardrailGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -63,6 +69,10 @@ export type UpdateGuardrailRequestBody = { * New list of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model identifiers (slug or canonical_slug accepted) */ @@ -86,7 +96,13 @@ export type UpdateGuardrailRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The unique identifier of the guardrail to update */ @@ -137,6 +153,10 @@ export type UpdateGuardrailData = { * List of allowed provider IDs */ allowedProviders?: Array | null | undefined; + /** + * List of provider IDs to exclude from routing + */ + ignoredProviders?: Array | null | undefined; /** * Array of model canonical_slugs (immutable identifiers) */ @@ -178,6 +198,7 @@ export type UpdateGuardrailRequestBody$Outbound = { limit_usd?: number | null | undefined; reset_interval?: string | null | undefined; allowed_providers?: Array | null | undefined; + ignored_providers?: Array | null | undefined; allowed_models?: Array | null | undefined; enforce_zdr?: boolean | null | undefined; }; @@ -193,6 +214,7 @@ export const UpdateGuardrailRequestBody$outboundSchema: z.ZodType< resetInterval: z.nullable(UpdateGuardrailResetIntervalRequest$outboundSchema) .optional(), allowedProviders: z.nullable(z.array(z.string())).optional(), + ignoredProviders: z.nullable(z.array(z.string())).optional(), allowedModels: z.nullable(z.array(z.string())).optional(), enforceZdr: z.nullable(z.boolean()).optional(), }).transform((v) => { @@ -200,6 +222,7 @@ export const UpdateGuardrailRequestBody$outboundSchema: z.ZodType< limitUsd: "limit_usd", resetInterval: "reset_interval", allowedProviders: "allowed_providers", + ignoredProviders: "ignored_providers", allowedModels: "allowed_models", enforceZdr: "enforce_zdr", }); @@ -216,7 +239,8 @@ export function updateGuardrailRequestBodyToJSON( /** @internal */ export type UpdateGuardrailRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; id: string; RequestBody: UpdateGuardrailRequestBody$Outbound; }; @@ -227,13 +251,13 @@ export const UpdateGuardrailRequest$outboundSchema: z.ZodType< UpdateGuardrailRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), id: z.string(), requestBody: z.lazy(() => UpdateGuardrailRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); @@ -264,6 +288,7 @@ export const UpdateGuardrailData$inboundSchema: z.ZodType< reset_interval: z.nullable(UpdateGuardrailResetIntervalResponse$inboundSchema) .optional(), allowed_providers: z.nullable(z.array(z.string())).optional(), + ignored_providers: z.nullable(z.array(z.string())).optional(), allowed_models: z.nullable(z.array(z.string())).optional(), enforce_zdr: z.nullable(z.boolean()).optional(), created_at: z.string(), @@ -273,6 +298,7 @@ export const UpdateGuardrailData$inboundSchema: z.ZodType< "limit_usd": "limitUsd", "reset_interval": "resetInterval", "allowed_providers": "allowedProviders", + "ignored_providers": "ignoredProviders", "allowed_models": "allowedModels", "enforce_zdr": "enforceZdr", "created_at": "createdAt", diff --git a/src/models/operations/updatekeys.ts b/src/models/operations/updatekeys.ts index ba980797..00044592 100644 --- a/src/models/operations/updatekeys.ts +++ b/src/models/operations/updatekeys.ts @@ -24,7 +24,13 @@ export type UpdateKeysGlobals = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; }; /** @@ -76,7 +82,13 @@ export type UpdateKeysRequest = { * * @remarks */ - xTitle?: string | undefined; + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; /** * The hash identifier of the API key to update */ @@ -219,7 +231,8 @@ export function updateKeysRequestBodyToJSON( /** @internal */ export type UpdateKeysRequest$Outbound = { "HTTP-Referer"?: string | undefined; - "X-Title"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; hash: string; RequestBody: UpdateKeysRequestBody$Outbound; }; @@ -230,13 +243,13 @@ export const UpdateKeysRequest$outboundSchema: z.ZodType< UpdateKeysRequest > = z.object({ httpReferer: z.string().optional(), - xTitle: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), hash: z.string(), requestBody: z.lazy(() => UpdateKeysRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { httpReferer: "HTTP-Referer", - xTitle: "X-Title", requestBody: "RequestBody", }); }); diff --git a/src/models/outputmessage.ts b/src/models/outputmessage.ts index 76b98b2c..fed67882 100644 --- a/src/models/outputmessage.ts +++ b/src/models/outputmessage.ts @@ -57,6 +57,28 @@ export type OutputMessageContent = | ResponseOutputText | OpenAIResponsesRefusalContent; +export const OutputMessagePhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type OutputMessagePhaseFinalAnswer = ClosedEnum< + typeof OutputMessagePhaseFinalAnswer +>; + +export const OutputMessagePhaseCommentary = { + Commentary: "commentary", +} as const; +export type OutputMessagePhaseCommentary = ClosedEnum< + typeof OutputMessagePhaseCommentary +>; + +/** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ +export type OutputMessagePhaseUnion = + | OutputMessagePhaseCommentary + | OutputMessagePhaseFinalAnswer + | any; + export type OutputMessage = { id: string; role: OutputMessageRole; @@ -67,6 +89,15 @@ export type OutputMessage = { | OutputMessageStatusInProgress | undefined; content: Array; + /** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ + phase?: + | OutputMessagePhaseCommentary + | OutputMessagePhaseFinalAnswer + | any + | null + | undefined; }; /** @internal */ @@ -133,6 +164,36 @@ export function outputMessageContentFromJSON( ); } +/** @internal */ +export const OutputMessagePhaseFinalAnswer$inboundSchema: z.ZodEnum< + typeof OutputMessagePhaseFinalAnswer +> = z.enum(OutputMessagePhaseFinalAnswer); + +/** @internal */ +export const OutputMessagePhaseCommentary$inboundSchema: z.ZodEnum< + typeof OutputMessagePhaseCommentary +> = z.enum(OutputMessagePhaseCommentary); + +/** @internal */ +export const OutputMessagePhaseUnion$inboundSchema: z.ZodType< + OutputMessagePhaseUnion, + unknown +> = z.union([ + OutputMessagePhaseCommentary$inboundSchema, + OutputMessagePhaseFinalAnswer$inboundSchema, + z.any(), +]); + +export function outputMessagePhaseUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OutputMessagePhaseUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OutputMessagePhaseUnion' from JSON`, + ); +} + /** @internal */ export const OutputMessage$inboundSchema: z.ZodType = z .object({ @@ -150,6 +211,13 @@ export const OutputMessage$inboundSchema: z.ZodType = z OpenAIResponsesRefusalContent$inboundSchema, ]), ), + phase: z.nullable( + z.union([ + OutputMessagePhaseCommentary$inboundSchema, + OutputMessagePhaseFinalAnswer$inboundSchema, + z.any(), + ]), + ).optional(), }); export function outputMessageFromJSON( diff --git a/src/models/outputmodality.ts b/src/models/outputmodality.ts index 2ac068bb..143ff54c 100644 --- a/src/models/outputmodality.ts +++ b/src/models/outputmodality.ts @@ -12,6 +12,7 @@ export const OutputModality = { Image: "image", Embeddings: "embeddings", Audio: "audio", + Video: "video", } as const; export type OutputModality = OpenEnum; diff --git a/src/models/providername.ts b/src/models/providername.ts index fb59d249..ba9576e3 100644 --- a/src/models/providername.ts +++ b/src/models/providername.ts @@ -8,6 +8,7 @@ import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; export const ProviderName = { + AkashML: "AkashML", Ai21: "AI21", AionLabs: "AionLabs", Alibaba: "Alibaba", diff --git a/src/models/providerpreferences.ts b/src/models/providerpreferences.ts index 92c73410..da8289b4 100644 --- a/src/models/providerpreferences.ts +++ b/src/models/providerpreferences.ts @@ -34,6 +34,7 @@ export const ProviderPreferencesSortEnum = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; export type ProviderPreferencesSortEnum = OpenEnum< typeof ProviderPreferencesSortEnum @@ -43,6 +44,7 @@ export const ProviderPreferencesProviderSortConfigEnum = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; export type ProviderPreferencesProviderSortConfigEnum = ClosedEnum< typeof ProviderPreferencesProviderSortConfigEnum @@ -55,6 +57,7 @@ export const ProviderPreferencesBy = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) @@ -97,6 +100,7 @@ export const ProviderPreferencesProviderSort = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) diff --git a/src/models/providersort.ts b/src/models/providersort.ts index b0cd31cc..75e9fce0 100644 --- a/src/models/providersort.ts +++ b/src/models/providersort.ts @@ -14,6 +14,7 @@ export const ProviderSort = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) diff --git a/src/models/providersortconfig.ts b/src/models/providersortconfig.ts index 473ed35e..fc796682 100644 --- a/src/models/providersortconfig.ts +++ b/src/models/providersortconfig.ts @@ -14,6 +14,7 @@ export const By = { Price: "price", Throughput: "throughput", Latency: "latency", + Exacto: "exacto", } as const; /** * The provider sorting strategy (price, throughput, latency) diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index 1d68d6e5..d97cb115 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -21,7 +21,7 @@ export type ResponseOutputTextTopLogprob = { logprob: number; }; -export type Logprob = { +export type ResponseOutputTextLogprob = { token: string; bytes: Array; logprob: number; @@ -32,7 +32,7 @@ export type ResponseOutputText = { type: "output_text"; text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; }; /** @internal */ @@ -81,7 +81,10 @@ export function responseOutputTextTopLogprobFromJSON( } /** @internal */ -export const Logprob$inboundSchema: z.ZodType = z.object({ +export const ResponseOutputTextLogprob$inboundSchema: z.ZodType< + ResponseOutputTextLogprob, + unknown +> = z.object({ token: z.string(), bytes: z.array(z.number()), logprob: z.number(), @@ -94,7 +97,7 @@ export const Logprob$inboundSchema: z.ZodType = z.object({ }); }); /** @internal */ -export type Logprob$Outbound = { +export type ResponseOutputTextLogprob$Outbound = { token: string; bytes: Array; logprob: number; @@ -102,30 +105,36 @@ export type Logprob$Outbound = { }; /** @internal */ -export const Logprob$outboundSchema: z.ZodType = z - .object({ - token: z.string(), - bytes: z.array(z.number()), - logprob: z.number(), - topLogprobs: z.array( - z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), - ), - }).transform((v) => { - return remap$(v, { - topLogprobs: "top_logprobs", - }); +export const ResponseOutputTextLogprob$outboundSchema: z.ZodType< + ResponseOutputTextLogprob$Outbound, + ResponseOutputTextLogprob +> = z.object({ + token: z.string(), + bytes: z.array(z.number()), + logprob: z.number(), + topLogprobs: z.array( + z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), + ), +}).transform((v) => { + return remap$(v, { + topLogprobs: "top_logprobs", }); +}); -export function logprobToJSON(logprob: Logprob): string { - return JSON.stringify(Logprob$outboundSchema.parse(logprob)); +export function responseOutputTextLogprobToJSON( + responseOutputTextLogprob: ResponseOutputTextLogprob, +): string { + return JSON.stringify( + ResponseOutputTextLogprob$outboundSchema.parse(responseOutputTextLogprob), + ); } -export function logprobFromJSON( +export function responseOutputTextLogprobFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Logprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Logprob' from JSON`, + (x) => ResponseOutputTextLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponseOutputTextLogprob' from JSON`, ); } @@ -137,14 +146,15 @@ export const ResponseOutputText$inboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), - logprobs: z.array(z.lazy(() => Logprob$inboundSchema)).optional(), + logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$inboundSchema)) + .optional(), }); /** @internal */ export type ResponseOutputText$Outbound = { type: "output_text"; text: string; annotations?: Array | undefined; - logprobs?: Array | undefined; + logprobs?: Array | undefined; }; /** @internal */ @@ -155,7 +165,8 @@ export const ResponseOutputText$outboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), - logprobs: z.array(z.lazy(() => Logprob$outboundSchema)).optional(), + logprobs: z.array(z.lazy(() => ResponseOutputTextLogprob$outboundSchema)) + .optional(), }); export function responseOutputTextToJSON( diff --git a/src/models/responsesoutputitem.ts b/src/models/responsesoutputitem.ts index 796f37fd..33a2b9f3 100644 --- a/src/models/responsesoutputitem.ts +++ b/src/models/responsesoutputitem.ts @@ -27,6 +27,10 @@ import { ResponsesOutputMessage, ResponsesOutputMessage$inboundSchema, } from "./responsesoutputmessage.js"; +import { + ResponsesServerToolOutput, + ResponsesServerToolOutput$inboundSchema, +} from "./responsesservertooloutput.js"; import { ResponsesWebSearchCallOutput, ResponsesWebSearchCallOutput$inboundSchema, @@ -36,36 +40,26 @@ import { * An output item from the response */ export type ResponsesOutputItem = - | (ResponsesOutputMessage & { type: "message" }) - | (ResponsesOutputItemReasoning & { type: "reasoning" }) - | (ResponsesOutputItemFunctionCall & { type: "function_call" }) - | (ResponsesWebSearchCallOutput & { type: "web_search_call" }) - | (ResponsesOutputItemFileSearchCall & { type: "file_search_call" }) - | (ResponsesImageGenerationCall & { type: "image_generation_call" }); + | ResponsesOutputMessage + | ResponsesOutputItemFunctionCall + | ResponsesWebSearchCallOutput + | ResponsesOutputItemFileSearchCall + | ResponsesOutputItemReasoning + | ResponsesImageGenerationCall + | ResponsesServerToolOutput; /** @internal */ export const ResponsesOutputItem$inboundSchema: z.ZodType< ResponsesOutputItem, unknown > = z.union([ - ResponsesOutputMessage$inboundSchema.and( - z.object({ type: z.literal("message") }), - ), - ResponsesOutputItemReasoning$inboundSchema.and( - z.object({ type: z.literal("reasoning") }), - ), - ResponsesOutputItemFunctionCall$inboundSchema.and( - z.object({ type: z.literal("function_call") }), - ), - ResponsesWebSearchCallOutput$inboundSchema.and( - z.object({ type: z.literal("web_search_call") }), - ), - ResponsesOutputItemFileSearchCall$inboundSchema.and( - z.object({ type: z.literal("file_search_call") }), - ), - ResponsesImageGenerationCall$inboundSchema.and( - z.object({ type: z.literal("image_generation_call") }), - ), + ResponsesOutputMessage$inboundSchema, + ResponsesOutputItemFunctionCall$inboundSchema, + ResponsesWebSearchCallOutput$inboundSchema, + ResponsesOutputItemFileSearchCall$inboundSchema, + ResponsesOutputItemReasoning$inboundSchema, + ResponsesImageGenerationCall$inboundSchema, + ResponsesServerToolOutput$inboundSchema, ]); export function responsesOutputItemFromJSON( diff --git a/src/models/responsesoutputitemreasoning.ts b/src/models/responsesoutputitemreasoning.ts index daf71d47..537d7461 100644 --- a/src/models/responsesoutputitemreasoning.ts +++ b/src/models/responsesoutputitemreasoning.ts @@ -13,14 +13,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, - ReasoningSummaryText$Outbound, - ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js"; import { ReasoningTextContent, ReasoningTextContent$inboundSchema, - ReasoningTextContent$Outbound, - ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js"; export const ResponsesOutputItemReasoningType = { @@ -102,40 +98,24 @@ export type ResponsesOutputItemReasoning = { export const ResponsesOutputItemReasoningType$inboundSchema: z.ZodEnum< typeof ResponsesOutputItemReasoningType > = z.enum(ResponsesOutputItemReasoningType); -/** @internal */ -export const ResponsesOutputItemReasoningType$outboundSchema: z.ZodEnum< - typeof ResponsesOutputItemReasoningType -> = ResponsesOutputItemReasoningType$inboundSchema; /** @internal */ export const ResponsesOutputItemReasoningStatusInProgress$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusInProgress, ); -/** @internal */ -export const ResponsesOutputItemReasoningStatusInProgress$outboundSchema: - z.ZodEnum = - ResponsesOutputItemReasoningStatusInProgress$inboundSchema; /** @internal */ export const ResponsesOutputItemReasoningStatusIncomplete$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusIncomplete, ); -/** @internal */ -export const ResponsesOutputItemReasoningStatusIncomplete$outboundSchema: - z.ZodEnum = - ResponsesOutputItemReasoningStatusIncomplete$inboundSchema; /** @internal */ export const ResponsesOutputItemReasoningStatusCompleted$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusCompleted, ); -/** @internal */ -export const ResponsesOutputItemReasoningStatusCompleted$outboundSchema: - z.ZodEnum = - ResponsesOutputItemReasoningStatusCompleted$inboundSchema; /** @internal */ export const ResponsesOutputItemReasoningStatusUnion$inboundSchema: z.ZodType< @@ -146,32 +126,7 @@ export const ResponsesOutputItemReasoningStatusUnion$inboundSchema: z.ZodType< ResponsesOutputItemReasoningStatusIncomplete$inboundSchema, ResponsesOutputItemReasoningStatusInProgress$inboundSchema, ]); -/** @internal */ -export type ResponsesOutputItemReasoningStatusUnion$Outbound = - | string - | string - | string; - -/** @internal */ -export const ResponsesOutputItemReasoningStatusUnion$outboundSchema: z.ZodType< - ResponsesOutputItemReasoningStatusUnion$Outbound, - ResponsesOutputItemReasoningStatusUnion -> = z.union([ - ResponsesOutputItemReasoningStatusCompleted$outboundSchema, - ResponsesOutputItemReasoningStatusIncomplete$outboundSchema, - ResponsesOutputItemReasoningStatusInProgress$outboundSchema, -]); -export function responsesOutputItemReasoningStatusUnionToJSON( - responsesOutputItemReasoningStatusUnion: - ResponsesOutputItemReasoningStatusUnion, -): string { - return JSON.stringify( - ResponsesOutputItemReasoningStatusUnion$outboundSchema.parse( - responsesOutputItemReasoningStatusUnion, - ), - ); -} export function responsesOutputItemReasoningStatusUnionFromJSON( jsonString: string, ): SafeParseResult< @@ -193,11 +148,6 @@ export const ResponsesOutputItemReasoningFormat$inboundSchema: z.ZodType< ResponsesOutputItemReasoningFormat, unknown > = openEnums.inboundSchema(ResponsesOutputItemReasoningFormat); -/** @internal */ -export const ResponsesOutputItemReasoningFormat$outboundSchema: z.ZodType< - string, - ResponsesOutputItemReasoningFormat -> = openEnums.outboundSchema(ResponsesOutputItemReasoningFormat); /** @internal */ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< @@ -222,51 +172,7 @@ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< "encrypted_content": "encryptedContent", }); }); -/** @internal */ -export type ResponsesOutputItemReasoning$Outbound = { - type: string; - id: string; - content?: Array | null | undefined; - summary: Array; - encrypted_content?: string | null | undefined; - status?: string | string | string | undefined; - signature?: string | null | undefined; - format?: string | null | undefined; -}; -/** @internal */ -export const ResponsesOutputItemReasoning$outboundSchema: z.ZodType< - ResponsesOutputItemReasoning$Outbound, - ResponsesOutputItemReasoning -> = z.object({ - type: ResponsesOutputItemReasoningType$outboundSchema, - id: z.string(), - content: z.nullable(z.array(ReasoningTextContent$outboundSchema)).optional(), - summary: z.array(ReasoningSummaryText$outboundSchema), - encryptedContent: z.nullable(z.string()).optional(), - status: z.union([ - ResponsesOutputItemReasoningStatusCompleted$outboundSchema, - ResponsesOutputItemReasoningStatusIncomplete$outboundSchema, - ResponsesOutputItemReasoningStatusInProgress$outboundSchema, - ]).optional(), - signature: z.nullable(z.string()).optional(), - format: z.nullable(ResponsesOutputItemReasoningFormat$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - encryptedContent: "encrypted_content", - }); -}); - -export function responsesOutputItemReasoningToJSON( - responsesOutputItemReasoning: ResponsesOutputItemReasoning, -): string { - return JSON.stringify( - ResponsesOutputItemReasoning$outboundSchema.parse( - responsesOutputItemReasoning, - ), - ); -} export function responsesOutputItemReasoningFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputmessage.ts b/src/models/responsesoutputmessage.ts index dc3999ba..f0e0b1a9 100644 --- a/src/models/responsesoutputmessage.ts +++ b/src/models/responsesoutputmessage.ts @@ -11,14 +11,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContent$inboundSchema, - OpenAIResponsesRefusalContent$Outbound, - OpenAIResponsesRefusalContent$outboundSchema, } from "./openairesponsesrefusalcontent.js"; import { ResponseOutputText, ResponseOutputText$inboundSchema, - ResponseOutputText$Outbound, - ResponseOutputText$outboundSchema, } from "./responseoutputtext.js"; export const ResponsesOutputMessageRole = { @@ -65,6 +61,28 @@ export type ResponsesOutputMessageContent = | ResponseOutputText | OpenAIResponsesRefusalContent; +export const ResponsesOutputMessagePhaseFinalAnswer = { + FinalAnswer: "final_answer", +} as const; +export type ResponsesOutputMessagePhaseFinalAnswer = ClosedEnum< + typeof ResponsesOutputMessagePhaseFinalAnswer +>; + +export const ResponsesOutputMessagePhaseCommentary = { + Commentary: "commentary", +} as const; +export type ResponsesOutputMessagePhaseCommentary = ClosedEnum< + typeof ResponsesOutputMessagePhaseCommentary +>; + +/** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ +export type ResponsesOutputMessagePhaseUnion = + | ResponsesOutputMessagePhaseCommentary + | ResponsesOutputMessagePhaseFinalAnswer + | any; + /** * An output message item */ @@ -78,52 +96,41 @@ export type ResponsesOutputMessage = { | ResponsesOutputMessageStatusInProgress | undefined; content: Array; + /** + * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ + phase?: + | ResponsesOutputMessagePhaseCommentary + | ResponsesOutputMessagePhaseFinalAnswer + | any + | null + | undefined; }; /** @internal */ export const ResponsesOutputMessageRole$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageRole > = z.enum(ResponsesOutputMessageRole); -/** @internal */ -export const ResponsesOutputMessageRole$outboundSchema: z.ZodEnum< - typeof ResponsesOutputMessageRole -> = ResponsesOutputMessageRole$inboundSchema; /** @internal */ export const ResponsesOutputMessageType$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageType > = z.enum(ResponsesOutputMessageType); -/** @internal */ -export const ResponsesOutputMessageType$outboundSchema: z.ZodEnum< - typeof ResponsesOutputMessageType -> = ResponsesOutputMessageType$inboundSchema; /** @internal */ export const ResponsesOutputMessageStatusInProgress$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusInProgress > = z.enum(ResponsesOutputMessageStatusInProgress); -/** @internal */ -export const ResponsesOutputMessageStatusInProgress$outboundSchema: z.ZodEnum< - typeof ResponsesOutputMessageStatusInProgress -> = ResponsesOutputMessageStatusInProgress$inboundSchema; /** @internal */ export const ResponsesOutputMessageStatusIncomplete$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusIncomplete > = z.enum(ResponsesOutputMessageStatusIncomplete); -/** @internal */ -export const ResponsesOutputMessageStatusIncomplete$outboundSchema: z.ZodEnum< - typeof ResponsesOutputMessageStatusIncomplete -> = ResponsesOutputMessageStatusIncomplete$inboundSchema; /** @internal */ export const ResponsesOutputMessageStatusCompleted$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusCompleted > = z.enum(ResponsesOutputMessageStatusCompleted); -/** @internal */ -export const ResponsesOutputMessageStatusCompleted$outboundSchema: z.ZodEnum< - typeof ResponsesOutputMessageStatusCompleted -> = ResponsesOutputMessageStatusCompleted$inboundSchema; /** @internal */ export const ResponsesOutputMessageStatusUnion$inboundSchema: z.ZodType< @@ -134,31 +141,7 @@ export const ResponsesOutputMessageStatusUnion$inboundSchema: z.ZodType< ResponsesOutputMessageStatusIncomplete$inboundSchema, ResponsesOutputMessageStatusInProgress$inboundSchema, ]); -/** @internal */ -export type ResponsesOutputMessageStatusUnion$Outbound = - | string - | string - | string; -/** @internal */ -export const ResponsesOutputMessageStatusUnion$outboundSchema: z.ZodType< - ResponsesOutputMessageStatusUnion$Outbound, - ResponsesOutputMessageStatusUnion -> = z.union([ - ResponsesOutputMessageStatusCompleted$outboundSchema, - ResponsesOutputMessageStatusIncomplete$outboundSchema, - ResponsesOutputMessageStatusInProgress$outboundSchema, -]); - -export function responsesOutputMessageStatusUnionToJSON( - responsesOutputMessageStatusUnion: ResponsesOutputMessageStatusUnion, -): string { - return JSON.stringify( - ResponsesOutputMessageStatusUnion$outboundSchema.parse( - responsesOutputMessageStatusUnion, - ), - ); -} export function responsesOutputMessageStatusUnionFromJSON( jsonString: string, ): SafeParseResult { @@ -177,36 +160,44 @@ export const ResponsesOutputMessageContent$inboundSchema: z.ZodType< ResponseOutputText$inboundSchema, OpenAIResponsesRefusalContent$inboundSchema, ]); + +export function responsesOutputMessageContentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ResponsesOutputMessageContent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponsesOutputMessageContent' from JSON`, + ); +} + /** @internal */ -export type ResponsesOutputMessageContent$Outbound = - | ResponseOutputText$Outbound - | OpenAIResponsesRefusalContent$Outbound; +export const ResponsesOutputMessagePhaseFinalAnswer$inboundSchema: z.ZodEnum< + typeof ResponsesOutputMessagePhaseFinalAnswer +> = z.enum(ResponsesOutputMessagePhaseFinalAnswer); /** @internal */ -export const ResponsesOutputMessageContent$outboundSchema: z.ZodType< - ResponsesOutputMessageContent$Outbound, - ResponsesOutputMessageContent +export const ResponsesOutputMessagePhaseCommentary$inboundSchema: z.ZodEnum< + typeof ResponsesOutputMessagePhaseCommentary +> = z.enum(ResponsesOutputMessagePhaseCommentary); + +/** @internal */ +export const ResponsesOutputMessagePhaseUnion$inboundSchema: z.ZodType< + ResponsesOutputMessagePhaseUnion, + unknown > = z.union([ - ResponseOutputText$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, + ResponsesOutputMessagePhaseCommentary$inboundSchema, + ResponsesOutputMessagePhaseFinalAnswer$inboundSchema, + z.any(), ]); -export function responsesOutputMessageContentToJSON( - responsesOutputMessageContent: ResponsesOutputMessageContent, -): string { - return JSON.stringify( - ResponsesOutputMessageContent$outboundSchema.parse( - responsesOutputMessageContent, - ), - ); -} -export function responsesOutputMessageContentFromJSON( +export function responsesOutputMessagePhaseUnionFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ResponsesOutputMessageContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ResponsesOutputMessageContent' from JSON`, + (x) => ResponsesOutputMessagePhaseUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponsesOutputMessagePhaseUnion' from JSON`, ); } @@ -229,46 +220,15 @@ export const ResponsesOutputMessage$inboundSchema: z.ZodType< OpenAIResponsesRefusalContent$inboundSchema, ]), ), -}); -/** @internal */ -export type ResponsesOutputMessage$Outbound = { - id: string; - role: string; - type: string; - status?: string | string | string | undefined; - content: Array< - ResponseOutputText$Outbound | OpenAIResponsesRefusalContent$Outbound - >; -}; - -/** @internal */ -export const ResponsesOutputMessage$outboundSchema: z.ZodType< - ResponsesOutputMessage$Outbound, - ResponsesOutputMessage -> = z.object({ - id: z.string(), - role: ResponsesOutputMessageRole$outboundSchema, - type: ResponsesOutputMessageType$outboundSchema, - status: z.union([ - ResponsesOutputMessageStatusCompleted$outboundSchema, - ResponsesOutputMessageStatusIncomplete$outboundSchema, - ResponsesOutputMessageStatusInProgress$outboundSchema, - ]).optional(), - content: z.array( + phase: z.nullable( z.union([ - ResponseOutputText$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, + ResponsesOutputMessagePhaseCommentary$inboundSchema, + ResponsesOutputMessagePhaseFinalAnswer$inboundSchema, + z.any(), ]), - ), + ).optional(), }); -export function responsesOutputMessageToJSON( - responsesOutputMessage: ResponsesOutputMessage, -): string { - return JSON.stringify( - ResponsesOutputMessage$outboundSchema.parse(responsesOutputMessage), - ); -} export function responsesOutputMessageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesservertooloutput.ts b/src/models/responsesservertooloutput.ts new file mode 100644 index 00000000..0beb6377 --- /dev/null +++ b/src/models/responsesservertooloutput.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d115c397b664 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + collectExtraKeys as collectExtraKeys$, + safeParse, +} from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const ResponsesServerToolOutputStatus = { + Completed: "completed", + InProgress: "in_progress", + Incomplete: "incomplete", +} as const; +export type ResponsesServerToolOutputStatus = OpenEnum< + typeof ResponsesServerToolOutputStatus +>; + +/** + * A generic OpenRouter server tool output item + */ +export type ResponsesServerToolOutput = { + /** + * Server tool type (e.g. openrouter:datetime, openrouter:web_search) + */ + type: string; + id?: string | undefined; + status: ResponsesServerToolOutputStatus; + additionalProperties?: { [k: string]: any | null } | undefined; +}; + +/** @internal */ +export const ResponsesServerToolOutputStatus$inboundSchema: z.ZodType< + ResponsesServerToolOutputStatus, + unknown +> = openEnums.inboundSchema(ResponsesServerToolOutputStatus); +/** @internal */ +export const ResponsesServerToolOutputStatus$outboundSchema: z.ZodType< + string, + ResponsesServerToolOutputStatus +> = openEnums.outboundSchema(ResponsesServerToolOutputStatus); + +/** @internal */ +export const ResponsesServerToolOutput$inboundSchema: z.ZodType< + ResponsesServerToolOutput, + unknown +> = collectExtraKeys$( + z.object({ + type: z.string(), + id: z.string().optional(), + status: ResponsesServerToolOutputStatus$inboundSchema, + }).catchall(z.any()), + "additionalProperties", + true, +); +/** @internal */ +export type ResponsesServerToolOutput$Outbound = { + type: string; + id?: string | undefined; + status: string; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const ResponsesServerToolOutput$outboundSchema: z.ZodType< + ResponsesServerToolOutput$Outbound, + ResponsesServerToolOutput +> = z.object({ + type: z.string(), + id: z.string().optional(), + status: ResponsesServerToolOutputStatus$outboundSchema, + additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); + +export function responsesServerToolOutputToJSON( + responsesServerToolOutput: ResponsesServerToolOutput, +): string { + return JSON.stringify( + ResponsesServerToolOutput$outboundSchema.parse(responsesServerToolOutput), + ); +} +export function responsesServerToolOutputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ResponsesServerToolOutput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponsesServerToolOutput' from JSON`, + ); +} diff --git a/src/models/responseswebsearchcalloutput.ts b/src/models/responseswebsearchcalloutput.ts index 8858d5bb..36d2e80f 100644 --- a/src/models/responseswebsearchcalloutput.ts +++ b/src/models/responseswebsearchcalloutput.ts @@ -14,41 +14,266 @@ import { WebSearchStatus$outboundSchema, } from "./websearchstatus.js"; -export const ResponsesWebSearchCallOutputType = { +export const TypeWebSearchCall = { WebSearchCall: "web_search_call", } as const; -export type ResponsesWebSearchCallOutputType = ClosedEnum< - typeof ResponsesWebSearchCallOutputType ->; +export type TypeWebSearchCall = ClosedEnum; + +export type ActionFindInPage = { + type: "find_in_page"; + pattern: string; + url: string; +}; + +export type ActionOpenPage = { + type: "open_page"; + url?: string | null | undefined; +}; + +export const TypeURL = { + Url: "url", +} as const; +export type TypeURL = ClosedEnum; + +export type Source = { + type: TypeURL; + url: string; +}; + +export type ActionSearch = { + type: "search"; + query: string; + queries?: Array | undefined; + sources?: Array | undefined; +}; + +export type Action = ActionSearch | ActionOpenPage | ActionFindInPage; export type ResponsesWebSearchCallOutput = { - type: ResponsesWebSearchCallOutputType; + type: TypeWebSearchCall; id: string; + action: ActionSearch | ActionOpenPage | ActionFindInPage; status: WebSearchStatus; }; /** @internal */ -export const ResponsesWebSearchCallOutputType$inboundSchema: z.ZodEnum< - typeof ResponsesWebSearchCallOutputType -> = z.enum(ResponsesWebSearchCallOutputType); +export const TypeWebSearchCall$inboundSchema: z.ZodEnum< + typeof TypeWebSearchCall +> = z.enum(TypeWebSearchCall); +/** @internal */ +export const TypeWebSearchCall$outboundSchema: z.ZodEnum< + typeof TypeWebSearchCall +> = TypeWebSearchCall$inboundSchema; + +/** @internal */ +export const ActionFindInPage$inboundSchema: z.ZodType< + ActionFindInPage, + unknown +> = z.object({ + type: z.literal("find_in_page"), + pattern: z.string(), + url: z.string(), +}); +/** @internal */ +export type ActionFindInPage$Outbound = { + type: "find_in_page"; + pattern: string; + url: string; +}; + +/** @internal */ +export const ActionFindInPage$outboundSchema: z.ZodType< + ActionFindInPage$Outbound, + ActionFindInPage +> = z.object({ + type: z.literal("find_in_page"), + pattern: z.string(), + url: z.string(), +}); + +export function actionFindInPageToJSON( + actionFindInPage: ActionFindInPage, +): string { + return JSON.stringify( + ActionFindInPage$outboundSchema.parse(actionFindInPage), + ); +} +export function actionFindInPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActionFindInPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActionFindInPage' from JSON`, + ); +} + +/** @internal */ +export const ActionOpenPage$inboundSchema: z.ZodType = + z.object({ + type: z.literal("open_page"), + url: z.nullable(z.string()).optional(), + }); +/** @internal */ +export type ActionOpenPage$Outbound = { + type: "open_page"; + url?: string | null | undefined; +}; + +/** @internal */ +export const ActionOpenPage$outboundSchema: z.ZodType< + ActionOpenPage$Outbound, + ActionOpenPage +> = z.object({ + type: z.literal("open_page"), + url: z.nullable(z.string()).optional(), +}); + +export function actionOpenPageToJSON(actionOpenPage: ActionOpenPage): string { + return JSON.stringify(ActionOpenPage$outboundSchema.parse(actionOpenPage)); +} +export function actionOpenPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActionOpenPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActionOpenPage' from JSON`, + ); +} + +/** @internal */ +export const TypeURL$inboundSchema: z.ZodEnum = z.enum(TypeURL); +/** @internal */ +export const TypeURL$outboundSchema: z.ZodEnum = + TypeURL$inboundSchema; + +/** @internal */ +export const Source$inboundSchema: z.ZodType = z.object({ + type: TypeURL$inboundSchema, + url: z.string(), +}); +/** @internal */ +export type Source$Outbound = { + type: string; + url: string; +}; + +/** @internal */ +export const Source$outboundSchema: z.ZodType = z + .object({ + type: TypeURL$outboundSchema, + url: z.string(), + }); + +export function sourceToJSON(source: Source): string { + return JSON.stringify(Source$outboundSchema.parse(source)); +} +export function sourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Source$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Source' from JSON`, + ); +} + +/** @internal */ +export const ActionSearch$inboundSchema: z.ZodType = z + .object({ + type: z.literal("search"), + query: z.string(), + queries: z.array(z.string()).optional(), + sources: z.array(z.lazy(() => Source$inboundSchema)).optional(), + }); +/** @internal */ +export type ActionSearch$Outbound = { + type: "search"; + query: string; + queries?: Array | undefined; + sources?: Array | undefined; +}; + +/** @internal */ +export const ActionSearch$outboundSchema: z.ZodType< + ActionSearch$Outbound, + ActionSearch +> = z.object({ + type: z.literal("search"), + query: z.string(), + queries: z.array(z.string()).optional(), + sources: z.array(z.lazy(() => Source$outboundSchema)).optional(), +}); + +export function actionSearchToJSON(actionSearch: ActionSearch): string { + return JSON.stringify(ActionSearch$outboundSchema.parse(actionSearch)); +} +export function actionSearchFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActionSearch$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActionSearch' from JSON`, + ); +} + +/** @internal */ +export const Action$inboundSchema: z.ZodType = z.union([ + z.lazy(() => ActionSearch$inboundSchema), + z.lazy(() => ActionOpenPage$inboundSchema), + z.lazy(() => ActionFindInPage$inboundSchema), +]); +/** @internal */ +export type Action$Outbound = + | ActionSearch$Outbound + | ActionOpenPage$Outbound + | ActionFindInPage$Outbound; + /** @internal */ -export const ResponsesWebSearchCallOutputType$outboundSchema: z.ZodEnum< - typeof ResponsesWebSearchCallOutputType -> = ResponsesWebSearchCallOutputType$inboundSchema; +export const Action$outboundSchema: z.ZodType = z + .union([ + z.lazy(() => ActionSearch$outboundSchema), + z.lazy(() => ActionOpenPage$outboundSchema), + z.lazy(() => ActionFindInPage$outboundSchema), + ]); + +export function actionToJSON(action: Action): string { + return JSON.stringify(Action$outboundSchema.parse(action)); +} +export function actionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Action$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Action' from JSON`, + ); +} /** @internal */ export const ResponsesWebSearchCallOutput$inboundSchema: z.ZodType< ResponsesWebSearchCallOutput, unknown > = z.object({ - type: ResponsesWebSearchCallOutputType$inboundSchema, + type: TypeWebSearchCall$inboundSchema, id: z.string(), + action: z.union([ + z.lazy(() => ActionSearch$inboundSchema), + z.lazy(() => ActionOpenPage$inboundSchema), + z.lazy(() => ActionFindInPage$inboundSchema), + ]), status: WebSearchStatus$inboundSchema, }); /** @internal */ export type ResponsesWebSearchCallOutput$Outbound = { type: string; id: string; + action: + | ActionSearch$Outbound + | ActionOpenPage$Outbound + | ActionFindInPage$Outbound; status: string; }; @@ -57,8 +282,13 @@ export const ResponsesWebSearchCallOutput$outboundSchema: z.ZodType< ResponsesWebSearchCallOutput$Outbound, ResponsesWebSearchCallOutput > = z.object({ - type: ResponsesWebSearchCallOutputType$outboundSchema, + type: TypeWebSearchCall$outboundSchema, id: z.string(), + action: z.union([ + z.lazy(() => ActionSearch$outboundSchema), + z.lazy(() => ActionOpenPage$outboundSchema), + z.lazy(() => ActionFindInPage$outboundSchema), + ]), status: WebSearchStatus$outboundSchema, }); diff --git a/src/models/responseswebsearchservertool.ts b/src/models/responseswebsearchservertool.ts new file mode 100644 index 00000000..c7dbabfe --- /dev/null +++ b/src/models/responseswebsearchservertool.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ff4c5c1f4ee2 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type ResponsesWebSearchServerToolParameters = { + /** + * Maximum number of search results to return per search call. Defaults to 5. + */ + maxResults?: number | undefined; + /** + * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. + */ + maxTotalResults?: number | undefined; +}; + +/** + * OpenRouter built-in server tool: searches the web for current information + */ +export type ResponsesWebSearchServerTool = { + type: "openrouter:web_search"; + parameters?: ResponsesWebSearchServerToolParameters | undefined; +}; + +/** @internal */ +export type ResponsesWebSearchServerToolParameters$Outbound = { + max_results?: number | undefined; + max_total_results?: number | undefined; +}; + +/** @internal */ +export const ResponsesWebSearchServerToolParameters$outboundSchema: z.ZodType< + ResponsesWebSearchServerToolParameters$Outbound, + ResponsesWebSearchServerToolParameters +> = z.object({ + maxResults: z.number().optional(), + maxTotalResults: z.number().optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + maxTotalResults: "max_total_results", + }); +}); + +export function responsesWebSearchServerToolParametersToJSON( + responsesWebSearchServerToolParameters: + ResponsesWebSearchServerToolParameters, +): string { + return JSON.stringify( + ResponsesWebSearchServerToolParameters$outboundSchema.parse( + responsesWebSearchServerToolParameters, + ), + ); +} + +/** @internal */ +export type ResponsesWebSearchServerTool$Outbound = { + type: "openrouter:web_search"; + parameters?: ResponsesWebSearchServerToolParameters$Outbound | undefined; +}; + +/** @internal */ +export const ResponsesWebSearchServerTool$outboundSchema: z.ZodType< + ResponsesWebSearchServerTool$Outbound, + ResponsesWebSearchServerTool +> = z.object({ + type: z.literal("openrouter:web_search"), + parameters: z.lazy(() => + ResponsesWebSearchServerToolParameters$outboundSchema + ).optional(), +}); + +export function responsesWebSearchServerToolToJSON( + responsesWebSearchServerTool: ResponsesWebSearchServerTool, +): string { + return JSON.stringify( + ResponsesWebSearchServerTool$outboundSchema.parse( + responsesWebSearchServerTool, + ), + ); +} diff --git a/src/models/tooldefinitionjson.ts b/src/models/tooldefinitionjson.ts index 9393ec42..34109221 100644 --- a/src/models/tooldefinitionjson.ts +++ b/src/models/tooldefinitionjson.ts @@ -5,22 +5,31 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { ClosedEnum } from "../types/enums.js"; import { ChatMessageContentItemCacheControl, ChatMessageContentItemCacheControl$Outbound, ChatMessageContentItemCacheControl$outboundSchema, } from "./chatmessagecontentitemcachecontrol.js"; - -export const ToolDefinitionJsonType = { - Function: "function", -} as const; -export type ToolDefinitionJsonType = ClosedEnum; +import { + DatetimeServerTool, + DatetimeServerTool$Outbound, + DatetimeServerTool$outboundSchema, +} from "./datetimeservertool.js"; +import { + WebSearchServerTool, + WebSearchServerTool$Outbound, + WebSearchServerTool$outboundSchema, +} from "./websearchservertool.js"; +import { + WebSearchShorthand, + WebSearchShorthand$Outbound, + WebSearchShorthand$outboundSchema, +} from "./websearchshorthand.js"; /** * Function definition for tool calling */ -export type ToolDefinitionJsonFunction = { +export type ToolDefinitionJsonFunctionFunction = { /** * Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) */ @@ -39,28 +48,32 @@ export type ToolDefinitionJsonFunction = { strict?: boolean | null | undefined; }; -/** - * Tool definition for function calling - */ -export type ToolDefinitionJson = { - type: ToolDefinitionJsonType; +export type ToolDefinitionJsonFunction = { + type: "function"; /** * Function definition for tool calling */ - function: ToolDefinitionJsonFunction; + function: ToolDefinitionJsonFunctionFunction; /** * Cache control for the content part */ cacheControl?: ChatMessageContentItemCacheControl | undefined; }; -/** @internal */ -export const ToolDefinitionJsonType$outboundSchema: z.ZodEnum< - typeof ToolDefinitionJsonType -> = z.enum(ToolDefinitionJsonType); +/** + * Tool definition for function calling (regular function or OpenRouter built-in server tool) + */ +export type ToolDefinitionJson = + | ToolDefinitionJsonFunction + | DatetimeServerTool + | WebSearchServerTool + | (WebSearchShorthand & { type: "web_search" }) + | (WebSearchShorthand & { type: "web_search_preview" }) + | (WebSearchShorthand & { type: "web_search_preview_2025_03_11" }) + | (WebSearchShorthand & { type: "web_search_2025_08_26" }); /** @internal */ -export type ToolDefinitionJsonFunction$Outbound = { +export type ToolDefinitionJsonFunctionFunction$Outbound = { name: string; description?: string | undefined; parameters?: { [k: string]: any | null } | undefined; @@ -68,9 +81,9 @@ export type ToolDefinitionJsonFunction$Outbound = { }; /** @internal */ -export const ToolDefinitionJsonFunction$outboundSchema: z.ZodType< - ToolDefinitionJsonFunction$Outbound, - ToolDefinitionJsonFunction +export const ToolDefinitionJsonFunctionFunction$outboundSchema: z.ZodType< + ToolDefinitionJsonFunctionFunction$Outbound, + ToolDefinitionJsonFunctionFunction > = z.object({ name: z.string(), description: z.string().optional(), @@ -78,28 +91,30 @@ export const ToolDefinitionJsonFunction$outboundSchema: z.ZodType< strict: z.nullable(z.boolean()).optional(), }); -export function toolDefinitionJsonFunctionToJSON( - toolDefinitionJsonFunction: ToolDefinitionJsonFunction, +export function toolDefinitionJsonFunctionFunctionToJSON( + toolDefinitionJsonFunctionFunction: ToolDefinitionJsonFunctionFunction, ): string { return JSON.stringify( - ToolDefinitionJsonFunction$outboundSchema.parse(toolDefinitionJsonFunction), + ToolDefinitionJsonFunctionFunction$outboundSchema.parse( + toolDefinitionJsonFunctionFunction, + ), ); } /** @internal */ -export type ToolDefinitionJson$Outbound = { - type: string; - function: ToolDefinitionJsonFunction$Outbound; +export type ToolDefinitionJsonFunction$Outbound = { + type: "function"; + function: ToolDefinitionJsonFunctionFunction$Outbound; cache_control?: ChatMessageContentItemCacheControl$Outbound | undefined; }; /** @internal */ -export const ToolDefinitionJson$outboundSchema: z.ZodType< - ToolDefinitionJson$Outbound, - ToolDefinitionJson +export const ToolDefinitionJsonFunction$outboundSchema: z.ZodType< + ToolDefinitionJsonFunction$Outbound, + ToolDefinitionJsonFunction > = z.object({ - type: ToolDefinitionJsonType$outboundSchema, - function: z.lazy(() => ToolDefinitionJsonFunction$outboundSchema), + type: z.literal("function"), + function: z.lazy(() => ToolDefinitionJsonFunctionFunction$outboundSchema), cacheControl: ChatMessageContentItemCacheControl$outboundSchema.optional(), }).transform((v) => { return remap$(v, { @@ -107,6 +122,46 @@ export const ToolDefinitionJson$outboundSchema: z.ZodType< }); }); +export function toolDefinitionJsonFunctionToJSON( + toolDefinitionJsonFunction: ToolDefinitionJsonFunction, +): string { + return JSON.stringify( + ToolDefinitionJsonFunction$outboundSchema.parse(toolDefinitionJsonFunction), + ); +} + +/** @internal */ +export type ToolDefinitionJson$Outbound = + | ToolDefinitionJsonFunction$Outbound + | DatetimeServerTool$Outbound + | WebSearchServerTool$Outbound + | (WebSearchShorthand$Outbound & { type: "web_search" }) + | (WebSearchShorthand$Outbound & { type: "web_search_preview" }) + | (WebSearchShorthand$Outbound & { type: "web_search_preview_2025_03_11" }) + | (WebSearchShorthand$Outbound & { type: "web_search_2025_08_26" }); + +/** @internal */ +export const ToolDefinitionJson$outboundSchema: z.ZodType< + ToolDefinitionJson$Outbound, + ToolDefinitionJson +> = z.union([ + z.lazy(() => ToolDefinitionJsonFunction$outboundSchema), + DatetimeServerTool$outboundSchema, + WebSearchServerTool$outboundSchema, + WebSearchShorthand$outboundSchema.and( + z.object({ type: z.literal("web_search") }), + ), + WebSearchShorthand$outboundSchema.and( + z.object({ type: z.literal("web_search_preview") }), + ), + WebSearchShorthand$outboundSchema.and( + z.object({ type: z.literal("web_search_preview_2025_03_11") }), + ), + WebSearchShorthand$outboundSchema.and( + z.object({ type: z.literal("web_search_2025_08_26") }), + ), +]); + export function toolDefinitionJsonToJSON( toolDefinitionJson: ToolDefinitionJson, ): string { diff --git a/src/models/websearchengine.ts b/src/models/websearchengine.ts index 5d8c6ef9..bda19371 100644 --- a/src/models/websearchengine.ts +++ b/src/models/websearchengine.ts @@ -13,6 +13,8 @@ import { OpenEnum } from "../types/enums.js"; export const WebSearchEngine = { Native: "native", Exa: "exa", + Firecrawl: "firecrawl", + Parallel: "parallel", } as const; /** * The search engine to use for web search. diff --git a/src/models/websearchservertool.ts b/src/models/websearchservertool.ts new file mode 100644 index 00000000..acf763c2 --- /dev/null +++ b/src/models/websearchservertool.ts @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 478da2f8e455 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; + +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const WebSearchServerToolEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type WebSearchServerToolEngine = OpenEnum< + typeof WebSearchServerToolEngine +>; + +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export const WebSearchServerToolSearchContextSize = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export type WebSearchServerToolSearchContextSize = OpenEnum< + typeof WebSearchServerToolSearchContextSize +>; + +export const WebSearchServerToolParametersType = { + Approximate: "approximate", +} as const; +export type WebSearchServerToolParametersType = ClosedEnum< + typeof WebSearchServerToolParametersType +>; + +/** + * Approximate user location for location-biased results. + */ +export type WebSearchServerToolUserLocation = { + type?: WebSearchServerToolParametersType | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +export type WebSearchServerToolParameters = { + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: WebSearchServerToolEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; + /** + * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + */ + maxTotalResults?: number | undefined; + /** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ + searchContextSize?: WebSearchServerToolSearchContextSize | undefined; + /** + * Approximate user location for location-biased results. + */ + userLocation?: WebSearchServerToolUserLocation | undefined; + /** + * Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + allowedDomains?: Array | undefined; + /** + * Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + excludedDomains?: Array | undefined; +}; + +/** + * OpenRouter built-in server tool: searches the web for current information + */ +export type WebSearchServerTool = { + type: "openrouter:web_search"; + parameters?: WebSearchServerToolParameters | undefined; +}; + +/** @internal */ +export const WebSearchServerToolEngine$outboundSchema: z.ZodType< + string, + WebSearchServerToolEngine +> = openEnums.outboundSchema(WebSearchServerToolEngine); + +/** @internal */ +export const WebSearchServerToolSearchContextSize$outboundSchema: z.ZodType< + string, + WebSearchServerToolSearchContextSize +> = openEnums.outboundSchema(WebSearchServerToolSearchContextSize); + +/** @internal */ +export const WebSearchServerToolParametersType$outboundSchema: z.ZodEnum< + typeof WebSearchServerToolParametersType +> = z.enum(WebSearchServerToolParametersType); + +/** @internal */ +export type WebSearchServerToolUserLocation$Outbound = { + type?: string | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** @internal */ +export const WebSearchServerToolUserLocation$outboundSchema: z.ZodType< + WebSearchServerToolUserLocation$Outbound, + WebSearchServerToolUserLocation +> = z.object({ + type: WebSearchServerToolParametersType$outboundSchema.optional(), + city: z.string().optional(), + region: z.string().optional(), + country: z.string().optional(), + timezone: z.string().optional(), +}); + +export function webSearchServerToolUserLocationToJSON( + webSearchServerToolUserLocation: WebSearchServerToolUserLocation, +): string { + return JSON.stringify( + WebSearchServerToolUserLocation$outboundSchema.parse( + webSearchServerToolUserLocation, + ), + ); +} + +/** @internal */ +export type WebSearchServerToolParameters$Outbound = { + engine?: string | undefined; + max_results?: number | undefined; + max_total_results?: number | undefined; + search_context_size?: string | undefined; + user_location?: WebSearchServerToolUserLocation$Outbound | undefined; + allowed_domains?: Array | undefined; + excluded_domains?: Array | undefined; +}; + +/** @internal */ +export const WebSearchServerToolParameters$outboundSchema: z.ZodType< + WebSearchServerToolParameters$Outbound, + WebSearchServerToolParameters +> = z.object({ + engine: WebSearchServerToolEngine$outboundSchema.optional(), + maxResults: z.number().optional(), + maxTotalResults: z.number().optional(), + searchContextSize: WebSearchServerToolSearchContextSize$outboundSchema + .optional(), + userLocation: z.lazy(() => WebSearchServerToolUserLocation$outboundSchema) + .optional(), + allowedDomains: z.array(z.string()).optional(), + excludedDomains: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + maxTotalResults: "max_total_results", + searchContextSize: "search_context_size", + userLocation: "user_location", + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchServerToolParametersToJSON( + webSearchServerToolParameters: WebSearchServerToolParameters, +): string { + return JSON.stringify( + WebSearchServerToolParameters$outboundSchema.parse( + webSearchServerToolParameters, + ), + ); +} + +/** @internal */ +export type WebSearchServerTool$Outbound = { + type: "openrouter:web_search"; + parameters?: WebSearchServerToolParameters$Outbound | undefined; +}; + +/** @internal */ +export const WebSearchServerTool$outboundSchema: z.ZodType< + WebSearchServerTool$Outbound, + WebSearchServerTool +> = z.object({ + type: z.literal("openrouter:web_search"), + parameters: z.lazy(() => WebSearchServerToolParameters$outboundSchema) + .optional(), +}); + +export function webSearchServerToolToJSON( + webSearchServerTool: WebSearchServerTool, +): string { + return JSON.stringify( + WebSearchServerTool$outboundSchema.parse(webSearchServerTool), + ); +} diff --git a/src/models/websearchshorthand.ts b/src/models/websearchshorthand.ts new file mode 100644 index 00000000..351e6c84 --- /dev/null +++ b/src/models/websearchshorthand.ts @@ -0,0 +1,378 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 20e3c2bd41b7 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; + +export const WebSearchShorthandType = { + WebSearch: "web_search", + WebSearchPreview: "web_search_preview", + WebSearchPreview20250311: "web_search_preview_2025_03_11", + WebSearch20250826: "web_search_2025_08_26", +} as const; +export type WebSearchShorthandType = OpenEnum; + +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const WebSearchShorthandEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type WebSearchShorthandEngine = OpenEnum< + typeof WebSearchShorthandEngine +>; + +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export const WebSearchShorthandSearchContextSize = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export type WebSearchShorthandSearchContextSize = OpenEnum< + typeof WebSearchShorthandSearchContextSize +>; + +export const WebSearchShorthandTypeApproximate = { + Approximate: "approximate", +} as const; +export type WebSearchShorthandTypeApproximate = ClosedEnum< + typeof WebSearchShorthandTypeApproximate +>; + +/** + * Approximate user location for location-biased results. + */ +export type WebSearchShorthandUserLocation = { + type?: WebSearchShorthandTypeApproximate | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export const WebSearchShorthandParametersEngine = { + Auto: "auto", + Native: "native", + Exa: "exa", +} as const; +/** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ +export type WebSearchShorthandParametersEngine = OpenEnum< + typeof WebSearchShorthandParametersEngine +>; + +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export const WebSearchShorthandParametersSearchContextSize = { + Low: "low", + Medium: "medium", + High: "high", +} as const; +/** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ +export type WebSearchShorthandParametersSearchContextSize = OpenEnum< + typeof WebSearchShorthandParametersSearchContextSize +>; + +export const WebSearchShorthandParametersType = { + Approximate: "approximate", +} as const; +export type WebSearchShorthandParametersType = ClosedEnum< + typeof WebSearchShorthandParametersType +>; + +/** + * Approximate user location for location-biased results. + */ +export type WebSearchShorthandParametersUserLocation = { + type?: WebSearchShorthandParametersType | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +export type WebSearchShorthandParameters = { + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: WebSearchShorthandParametersEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; + /** + * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + */ + maxTotalResults?: number | undefined; + /** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ + searchContextSize?: WebSearchShorthandParametersSearchContextSize | undefined; + /** + * Approximate user location for location-biased results. + */ + userLocation?: WebSearchShorthandParametersUserLocation | undefined; + /** + * Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + allowedDomains?: Array | undefined; + /** + * Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + excludedDomains?: Array | undefined; +}; + +/** + * Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + */ +export type WebSearchShorthand = { + type: WebSearchShorthandType; + /** + * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search (parameters like max_results, search_context_size, and domain filters are not forwarded to the provider). "exa" forces the Exa search API. + */ + engine?: WebSearchShorthandEngine | undefined; + /** + * Maximum number of search results to return per search call. Defaults to 5. Only applies when using the Exa engine; ignored with native provider search. + */ + maxResults?: number | undefined; + /** + * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + */ + maxTotalResults?: number | undefined; + /** + * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + */ + searchContextSize?: WebSearchShorthandSearchContextSize | undefined; + /** + * Approximate user location for location-biased results. + */ + userLocation?: WebSearchShorthandUserLocation | undefined; + /** + * Limit search results to these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + allowedDomains?: Array | undefined; + /** + * Exclude search results from these domains. Only applies when using the Exa engine; ignored with native provider search. + */ + excludedDomains?: Array | undefined; + parameters?: WebSearchShorthandParameters | undefined; +}; + +/** @internal */ +export const WebSearchShorthandType$outboundSchema: z.ZodType< + string, + WebSearchShorthandType +> = openEnums.outboundSchema(WebSearchShorthandType); + +/** @internal */ +export const WebSearchShorthandEngine$outboundSchema: z.ZodType< + string, + WebSearchShorthandEngine +> = openEnums.outboundSchema(WebSearchShorthandEngine); + +/** @internal */ +export const WebSearchShorthandSearchContextSize$outboundSchema: z.ZodType< + string, + WebSearchShorthandSearchContextSize +> = openEnums.outboundSchema(WebSearchShorthandSearchContextSize); + +/** @internal */ +export const WebSearchShorthandTypeApproximate$outboundSchema: z.ZodEnum< + typeof WebSearchShorthandTypeApproximate +> = z.enum(WebSearchShorthandTypeApproximate); + +/** @internal */ +export type WebSearchShorthandUserLocation$Outbound = { + type?: string | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** @internal */ +export const WebSearchShorthandUserLocation$outboundSchema: z.ZodType< + WebSearchShorthandUserLocation$Outbound, + WebSearchShorthandUserLocation +> = z.object({ + type: WebSearchShorthandTypeApproximate$outboundSchema.optional(), + city: z.string().optional(), + region: z.string().optional(), + country: z.string().optional(), + timezone: z.string().optional(), +}); + +export function webSearchShorthandUserLocationToJSON( + webSearchShorthandUserLocation: WebSearchShorthandUserLocation, +): string { + return JSON.stringify( + WebSearchShorthandUserLocation$outboundSchema.parse( + webSearchShorthandUserLocation, + ), + ); +} + +/** @internal */ +export const WebSearchShorthandParametersEngine$outboundSchema: z.ZodType< + string, + WebSearchShorthandParametersEngine +> = openEnums.outboundSchema(WebSearchShorthandParametersEngine); + +/** @internal */ +export const WebSearchShorthandParametersSearchContextSize$outboundSchema: + z.ZodType = openEnums + .outboundSchema(WebSearchShorthandParametersSearchContextSize); + +/** @internal */ +export const WebSearchShorthandParametersType$outboundSchema: z.ZodEnum< + typeof WebSearchShorthandParametersType +> = z.enum(WebSearchShorthandParametersType); + +/** @internal */ +export type WebSearchShorthandParametersUserLocation$Outbound = { + type?: string | undefined; + city?: string | undefined; + region?: string | undefined; + country?: string | undefined; + timezone?: string | undefined; +}; + +/** @internal */ +export const WebSearchShorthandParametersUserLocation$outboundSchema: z.ZodType< + WebSearchShorthandParametersUserLocation$Outbound, + WebSearchShorthandParametersUserLocation +> = z.object({ + type: WebSearchShorthandParametersType$outboundSchema.optional(), + city: z.string().optional(), + region: z.string().optional(), + country: z.string().optional(), + timezone: z.string().optional(), +}); + +export function webSearchShorthandParametersUserLocationToJSON( + webSearchShorthandParametersUserLocation: + WebSearchShorthandParametersUserLocation, +): string { + return JSON.stringify( + WebSearchShorthandParametersUserLocation$outboundSchema.parse( + webSearchShorthandParametersUserLocation, + ), + ); +} + +/** @internal */ +export type WebSearchShorthandParameters$Outbound = { + engine?: string | undefined; + max_results?: number | undefined; + max_total_results?: number | undefined; + search_context_size?: string | undefined; + user_location?: WebSearchShorthandParametersUserLocation$Outbound | undefined; + allowed_domains?: Array | undefined; + excluded_domains?: Array | undefined; +}; + +/** @internal */ +export const WebSearchShorthandParameters$outboundSchema: z.ZodType< + WebSearchShorthandParameters$Outbound, + WebSearchShorthandParameters +> = z.object({ + engine: WebSearchShorthandParametersEngine$outboundSchema.optional(), + maxResults: z.number().optional(), + maxTotalResults: z.number().optional(), + searchContextSize: + WebSearchShorthandParametersSearchContextSize$outboundSchema.optional(), + userLocation: z.lazy(() => + WebSearchShorthandParametersUserLocation$outboundSchema + ).optional(), + allowedDomains: z.array(z.string()).optional(), + excludedDomains: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + maxTotalResults: "max_total_results", + searchContextSize: "search_context_size", + userLocation: "user_location", + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchShorthandParametersToJSON( + webSearchShorthandParameters: WebSearchShorthandParameters, +): string { + return JSON.stringify( + WebSearchShorthandParameters$outboundSchema.parse( + webSearchShorthandParameters, + ), + ); +} + +/** @internal */ +export type WebSearchShorthand$Outbound = { + type: string; + engine?: string | undefined; + max_results?: number | undefined; + max_total_results?: number | undefined; + search_context_size?: string | undefined; + user_location?: WebSearchShorthandUserLocation$Outbound | undefined; + allowed_domains?: Array | undefined; + excluded_domains?: Array | undefined; + parameters?: WebSearchShorthandParameters$Outbound | undefined; +}; + +/** @internal */ +export const WebSearchShorthand$outboundSchema: z.ZodType< + WebSearchShorthand$Outbound, + WebSearchShorthand +> = z.object({ + type: WebSearchShorthandType$outboundSchema, + engine: WebSearchShorthandEngine$outboundSchema.optional(), + maxResults: z.number().optional(), + maxTotalResults: z.number().optional(), + searchContextSize: WebSearchShorthandSearchContextSize$outboundSchema + .optional(), + userLocation: z.lazy(() => WebSearchShorthandUserLocation$outboundSchema) + .optional(), + allowedDomains: z.array(z.string()).optional(), + excludedDomains: z.array(z.string()).optional(), + parameters: z.lazy(() => WebSearchShorthandParameters$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + maxResults: "max_results", + maxTotalResults: "max_total_results", + searchContextSize: "search_context_size", + userLocation: "user_location", + allowedDomains: "allowed_domains", + excludedDomains: "excluded_domains", + }); +}); + +export function webSearchShorthandToJSON( + webSearchShorthand: WebSearchShorthand, +): string { + return JSON.stringify( + WebSearchShorthand$outboundSchema.parse(webSearchShorthand), + ); +} diff --git a/src/types/index.ts b/src/types/index.ts index ae8a167d..dfb23ead 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -10,7 +10,3 @@ export type { PageIterator, Paginator } from "./operations.js"; export { createPageIterator } from "./operations.js"; export { RFCDate } from "./rfcdate.js"; export * from "./unrecognized.js"; - -// Model types generated by @openrouter/cli types command -export type { ModelId, Variant, StaticVariant, VirtualVariant } from "./models.js"; -export { MODEL_HASH } from "./models.js"; diff --git a/tests/e2e/call-model-state.test.ts b/tests/e2e/call-model-state.test.ts index 33923ae5..70ab0955 100644 --- a/tests/e2e/call-model-state.test.ts +++ b/tests/e2e/call-model-state.test.ts @@ -53,7 +53,7 @@ describe('State Management Integration', () => { // State should be saved expect(storedState).not.toBeNull(); expect(storedState?.id).toMatch(/^conv_/); - }, 30000); + }, 60000); it('should track conversation status', async () => { let storedState: ConversationState | null = null; @@ -88,7 +88,7 @@ describe('State Management Integration', () => { expect(stateHistory.length).toBeGreaterThan(0); // Final state should be complete or in_progress expect(['complete', 'in_progress']).toContain(storedState?.status); - }, 30000); + }, 60000); }); describe('Approval Workflow', () => { @@ -216,6 +216,6 @@ describe('State Management Integration', () => { : [storedState.messages]; expect(messages.length).toBeGreaterThan(0); } - }, 30000); + }, 60000); }); }); diff --git a/tests/e2e/call-model-tools.test.ts b/tests/e2e/call-model-tools.test.ts index 67f48338..884dd20a 100644 --- a/tests/e2e/call-model-tools.test.ts +++ b/tests/e2e/call-model-tools.test.ts @@ -606,12 +606,13 @@ describe('Enhanced Tool Support for callModel', () => { tools: [ weatherTool, ], + stopWhen: stepCountIs(3), }); const fullResponse = await response.getResponse(); const message = toChatMessage(fullResponse); expect(message).toBeDefined(); - }, 30000); + }, 60000); it('should handle multi-turn conversation with tool execution', async () => { // This will test the full loop: request -> tool call -> execute -> send result -> final response @@ -662,7 +663,7 @@ describe('Enhanced Tool Support for callModel', () => { const finalMessage = toChatMessage(fullResponse); expect(finalMessage).toBeDefined(); expect(finalMessage.content).toBeTruthy(); - }, 30000); + }, 60000); }); describe('Error Handling', () => { diff --git a/tests/e2e/multi-turn-tool-state.test.ts b/tests/e2e/multi-turn-tool-state.test.ts index 16e73195..551aa749 100644 --- a/tests/e2e/multi-turn-tool-state.test.ts +++ b/tests/e2e/multi-turn-tool-state.test.ts @@ -12,7 +12,7 @@ import { } from '../../src/index.js'; import type { ModelResult } from '../../src/lib/model-result.js'; import type { Tool } from '../../src/lib/tool-types.js'; -import type { OpenResponsesInput, OpenResponsesInput1 } from '../../src/models/openresponsesinput.js'; +import type { OpenResponsesInputUnion, OpenResponsesInputUnion1 } from '../../src/models/openresponsesinputunion.js'; dotenv.config(); @@ -666,7 +666,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { const allItemsMap = new Map(); // Build input function that dynamically constructs messages per turn - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { turnHistory.push(ctx.numberOfTurns); if (ctx.numberOfTurns === 0) { @@ -679,7 +679,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { // Subsequent turns: get previous input and rebuild with fresh system prompt const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); @@ -742,7 +742,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { const systemPrompt = 'You are a helpful assistant for task management.'; // Build input function - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { if (ctx.numberOfTurns === 0) { return [ { role: 'system' as const, content: systemPrompt }, @@ -751,7 +751,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { } const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); @@ -785,7 +785,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { const allItemsMap = new Map(); const systemPrompt = 'You are a helpful task assistant.'; - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { if (ctx.numberOfTurns === 0) { return [ { role: 'system' as const, content: systemPrompt }, @@ -794,7 +794,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { } const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); @@ -839,7 +839,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { const sizeHistory: number[] = []; const systemPrompt = 'You are a task tracking assistant.'; - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { if (ctx.numberOfTurns === 0) { return [ { role: 'system' as const, content: systemPrompt }, @@ -852,7 +852,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { } const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); @@ -896,7 +896,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { taskStore.set('task_1', { id: 'task_1', name: 'Alpha Task', createdAt: new Date().toISOString() }); taskStore.set('task_2', { id: 'task_2', name: 'Beta Task', createdAt: new Date().toISOString() }); - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { if (ctx.numberOfTurns === 0) { return [ { role: 'system' as const, content: systemPrompt }, @@ -909,7 +909,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { } const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); @@ -965,7 +965,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { const tools = [createCreateTaskTool(), createListTasksTool()]; const systemPrompt = 'You are a precise task executor. Execute each step in order.'; - const inputFn = async (ctx: TurnContext): Promise => { + const inputFn = async (ctx: TurnContext): Promise => { if (ctx.numberOfTurns === 0) { return [ { role: 'system' as const, content: systemPrompt }, @@ -978,7 +978,7 @@ describe('Multi-Turn Tool State E2E Tests', () => { } const prevInput = ctx.turnRequest?.input; - const prevMessages: OpenResponsesInput1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); + const prevMessages: OpenResponsesInputUnion1[] = typeof prevInput === 'string' ? [] : (prevInput ?? []); const messagesWithoutSystem = prevMessages.filter( (m) => !('role' in m && m.role === 'system'), ); diff --git a/tests/unit/build-tool-call-stream.test.ts b/tests/unit/build-tool-call-stream.test.ts new file mode 100644 index 00000000..ee8c8bcb --- /dev/null +++ b/tests/unit/build-tool-call-stream.test.ts @@ -0,0 +1,289 @@ +import type { + OpenResponsesStreamEvent, + OpenResponsesStreamEventResponseCompleted, + OpenResponsesStreamEventResponseFunctionCallArgumentsDelta, + OpenResponsesStreamEventResponseFunctionCallArgumentsDone, + OpenResponsesStreamEventResponseOutputItemAdded, +} from '../../src/models/openresponsesstreamevent.js'; + +import { describe, expect, it } from 'vitest'; +import { ReusableReadableStream } from '../../src/lib/reusable-stream.js'; +import { buildToolCallStream } from '../../src/lib/stream-transformers.js'; + +// ============================================================================ +// Synthetic event factories +// ============================================================================ + +function createImmediateStream( + events: OpenResponsesStreamEvent[], +): ReusableReadableStream { + const readable = new ReadableStream({ + start(controller) { + for (const event of events) { + controller.enqueue(event); + } + controller.close(); + }, + }); + return new ReusableReadableStream(readable); +} + +function outputItemAddedFunctionCallEvent( + callId: string, + name: string, + itemId?: string, +): OpenResponsesStreamEventResponseOutputItemAdded { + return { + type: 'response.output_item.added', + outputIndex: 0, + item: { + type: 'function_call', + id: itemId ?? callId, + callId, + name, + arguments: '', + status: 'in_progress', + }, + sequenceNumber: 0, + }; +} + +/** + * Creates a function_call output_item.added event with the id property omitted. + * In real API responses, JSON.parse() never produces `id: undefined` — the + * property is simply absent when the API doesn't include it. This exercises + * the `item.id ?? item.callId` fallback in production code realistically. + */ +function outputItemAddedFunctionCallEventNoId( + callId: string, + name: string, +): OpenResponsesStreamEventResponseOutputItemAdded { + return { + type: 'response.output_item.added', + outputIndex: 0, + item: { + type: 'function_call', + callId, + name, + arguments: '', + status: 'in_progress', + }, + sequenceNumber: 0, + }; +} + +function functionCallArgsDeltaEvent( + delta: string, + itemId: string, +): OpenResponsesStreamEventResponseFunctionCallArgumentsDelta { + return { + type: 'response.function_call_arguments.delta', + itemId, + outputIndex: 0, + delta, + sequenceNumber: 0, + }; +} + +function functionCallArgsDoneEvent( + args: string, + name: string, + itemId: string, +): OpenResponsesStreamEventResponseFunctionCallArgumentsDone { + return { + type: 'response.function_call_arguments.done', + itemId, + outputIndex: 0, + name, + arguments: args, + sequenceNumber: 0, + }; +} + +function responseCompletedEvent(): OpenResponsesStreamEventResponseCompleted { + return { + type: 'response.completed', + response: { + id: 'resp_1', + object: 'response', + createdAt: 0, + model: 'test-model', + status: 'completed', + completedAt: 0, + output: [], + error: null, + incompleteDetails: null, + temperature: null, + topP: null, + presencePenalty: null, + frequencyPenalty: null, + metadata: null, + tools: [], + toolChoice: 'auto', + parallelToolCalls: false, + }, + sequenceNumber: 0, + }; +} + +// ============================================================================ +// Tests +// ============================================================================ + +describe('buildToolCallStream — callId/itemId key mismatch fix', () => { + it('should use item.id (not callId) as map key so deltas are found when item.id differs from callId', async () => { + // This is the core regression test for the fix. + // item.id='item_1' differs from callId='call_abc'. + // Delta events use itemId='item_1' for lookup. + // Before the fix, the map key was callId, so deltas were silently dropped. + const stream = createImmediateStream([ + outputItemAddedFunctionCallEvent('call_abc', 'get_weather', 'item_1'), + functionCallArgsDeltaEvent('{"location":', 'item_1'), + functionCallArgsDeltaEvent('"NYC"}', 'item_1'), + functionCallArgsDoneEvent('{"location":"NYC"}', 'get_weather', 'item_1'), + responseCompletedEvent(), + ]); + + const toolCalls: Array<{ + id: string; + name: string; + arguments: unknown; + }> = []; + for await (const tc of buildToolCallStream(stream)) { + toolCalls.push({ + id: tc.id, + name: tc.name, + arguments: tc.arguments, + }); + } + + // Tool call should be yielded (not silently dropped) + expect(toolCalls).toHaveLength(1); + expect(toolCalls[0]!.name).toBe('get_weather'); + expect(toolCalls[0]!.arguments).toEqual({ location: 'NYC' }); + }); + + it('should yield callId (not item.id) as the ParsedToolCall.id for API compatibility', async () => { + // The yielded id must be callId for downstream consumers + // (tool-orchestrator.ts, model-result.ts) that submit tool results back to the API. + // Before the second fix, the stored id was itemKey (item.id), not callId. + const stream = createImmediateStream([ + outputItemAddedFunctionCallEvent('call_abc', 'get_weather', 'item_1'), + functionCallArgsDeltaEvent('{"location":"NYC"}', 'item_1'), + functionCallArgsDoneEvent('{"location":"NYC"}', 'get_weather', 'item_1'), + responseCompletedEvent(), + ]); + + const toolCalls: Array<{ + id: string; + name: string; + }> = []; + for await (const tc of buildToolCallStream(stream)) { + toolCalls.push({ + id: tc.id, + name: tc.name, + }); + } + + expect(toolCalls).toHaveLength(1); + // id must be the callId, NOT item.id + expect(toolCalls[0]!.id).toBe('call_abc'); + expect(toolCalls[0]!.id).not.toBe('item_1'); + }); + + it('should handle multiple tool calls with different callId/itemId mappings', async () => { + const stream = createImmediateStream([ + outputItemAddedFunctionCallEvent('call_weather', 'get_weather', 'item_100'), + outputItemAddedFunctionCallEvent('call_time', 'get_time', 'item_200'), + functionCallArgsDeltaEvent('{"location":"NYC"}', 'item_100'), + functionCallArgsDoneEvent('{"location":"NYC"}', 'get_weather', 'item_100'), + functionCallArgsDeltaEvent('{"tz":"EST"}', 'item_200'), + functionCallArgsDoneEvent('{"tz":"EST"}', 'get_time', 'item_200'), + responseCompletedEvent(), + ]); + + const toolCalls: Array<{ + id: string; + name: string; + arguments: unknown; + }> = []; + for await (const tc of buildToolCallStream(stream)) { + toolCalls.push({ + id: tc.id, + name: tc.name, + arguments: tc.arguments, + }); + } + + expect(toolCalls).toHaveLength(2); + + // First tool call: id should be callId, not itemId + expect(toolCalls[0]!.id).toBe('call_weather'); + expect(toolCalls[0]!.name).toBe('get_weather'); + expect(toolCalls[0]!.arguments).toEqual({ location: 'NYC' }); + + // Second tool call: id should be callId, not itemId + expect(toolCalls[1]!.id).toBe('call_time'); + expect(toolCalls[1]!.name).toBe('get_time'); + expect(toolCalls[1]!.arguments).toEqual({ tz: 'EST' }); + }); + + it('should still work when item.id equals callId (backwards compatibility)', async () => { + // When item.id === callId, both old and new code work. + // This verifies no regression for the common case. + const stream = createImmediateStream([ + outputItemAddedFunctionCallEvent('call_same', 'search', 'call_same'), + functionCallArgsDeltaEvent('{"q":"test"}', 'call_same'), + functionCallArgsDoneEvent('{"q":"test"}', 'search', 'call_same'), + responseCompletedEvent(), + ]); + + const toolCalls: Array<{ + id: string; + name: string; + arguments: unknown; + }> = []; + for await (const tc of buildToolCallStream(stream)) { + toolCalls.push({ + id: tc.id, + name: tc.name, + arguments: tc.arguments, + }); + } + + expect(toolCalls).toHaveLength(1); + expect(toolCalls[0]!.id).toBe('call_same'); + expect(toolCalls[0]!.name).toBe('search'); + expect(toolCalls[0]!.arguments).toEqual({ q: 'test' }); + }); + + it('should fall back to callId as map key when item.id is undefined', async () => { + // When item.id is literally undefined, the fallback `item.id ?? item.callId` uses callId. + // Uses outputItemAddedFunctionCallEventNoId which sets id: undefined explicitly. + // Delta events use callId as itemId since that's what the fallback resolves to. + const stream = createImmediateStream([ + outputItemAddedFunctionCallEventNoId('call_fallback', 'lookup'), + functionCallArgsDeltaEvent('{"key":"val"}', 'call_fallback'), + functionCallArgsDoneEvent('{"key":"val"}', 'lookup', 'call_fallback'), + responseCompletedEvent(), + ]); + + const toolCalls: Array<{ + id: string; + name: string; + arguments: unknown; + }> = []; + for await (const tc of buildToolCallStream(stream)) { + toolCalls.push({ + id: tc.id, + name: tc.name, + arguments: tc.arguments, + }); + } + + expect(toolCalls).toHaveLength(1); + expect(toolCalls[0]!.id).toBe('call_fallback'); + expect(toolCalls[0]!.name).toBe('lookup'); + expect(toolCalls[0]!.arguments).toEqual({ key: 'val' }); + }); +}); diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..6bea4f03 --- /dev/null +++ b/turbo.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "compile": { + "dependsOn": ["^compile"], + "outputs": ["esm/**"] + } + } +}