diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2dfb6c46..76c8d304 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: 1db69edc4b5b304c46791820b3617b3d + docChecksum: 02e9ed05c1d125ae04b6bcd30a892388 docVersion: 1.0.0 - speakeasyVersion: 1.680.0 - generationVersion: 2.788.4 + speakeasyVersion: 1.678.0 + generationVersion: 2.787.2 releaseVersion: 0.3.12 configChecksum: cce50a3d7b5dd75b96087345547294f3 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: ca9052d3-98c2-4cac-95f7-d5037c0dbe8a - pristine_commit_hash: 91e5dcb2c14bb5516188d34ea90ff8bb70ac6fda - pristine_tree_hash: 6cb2daf107b33d67d26fd4a55bb2c65f4e2b7c76 + generation_id: 62917ff7-df36-438c-bde9-649eb4ad6258 + pristine_commit_hash: ce8a8ede40f1f5018b4120a11183e7bed9e36a9a + pristine_tree_hash: cdf16d8f06979beaab279c07e217cbb557d2e811 features: typescript: acceptHeaders: 2.81.2 @@ -116,16 +116,24 @@ trackedFiles: pristine_git_object: f0436c70d31701f55c4b4668c93c59ac65f8be37 docs/models/chatgenerationparams.md: id: bb3446bdc077 - last_write_checksum: sha1:e79fb10d98923123d6df85f8ec8f9ba7cc4e28e7 - pristine_git_object: a3822de595f941f2c7297f2f1f0641d26bcc895c + last_write_checksum: sha1:edfec1dd5538435765eb7e81bbe1e5d3b62042af + pristine_git_object: 26fdcc6d79feb1b9f70e3e3ad5edcef3a1279ff3 docs/models/chatgenerationparamsdatacollection.md: id: 1e3a1cd360fc last_write_checksum: sha1:060e34fe136f4069a21bae2154f7895f7e72776f pristine_git_object: 3718bbe5cf3301f927ce7cca08e334685ddb19a1 + docs/models/chatgenerationparamsimageconfig.md: + id: 84ed14ec0766 + last_write_checksum: sha1:0b10b5e5c7744e240dabeaadc3108d05d963e0f2 + pristine_git_object: fe647c072cc569beea4598b2cdc72293d846fe1c docs/models/chatgenerationparamsmaxprice.md: id: 6cc065ac30f3 last_write_checksum: sha1:57032761de558666c428c528cf6f69747bc8aab3 pristine_git_object: 48f41213a80b37c7fba8a4312074be2237cb6eed + docs/models/chatgenerationparamspluginautorouter.md: + id: 83e3a7365cc3 + last_write_checksum: sha1:701e1d9e79d8a8c861eb0576af22cbd08b5ee6f7 + pristine_git_object: 9a7cafbeb9397b9e1fabb80e4bbb2793e381e513 docs/models/chatgenerationparamspluginfileparser.md: id: 600ec63a57f7 last_write_checksum: sha1:1d1a7beed9bf0ba506274998b59f545fc4eb8a40 @@ -140,16 +148,32 @@ trackedFiles: pristine_git_object: 5a6bbab9c2f8fe57e049a7cf907fe5ea571ba0f5 docs/models/chatgenerationparamspluginunion.md: id: e0e521e5432e - last_write_checksum: sha1:2707ed04a088530897130239ebd18ef097ae5be4 - pristine_git_object: 22f32f288b4b5bbb8b87068fdf359f758c17b313 + last_write_checksum: sha1:68ceb4389dc4d58eeaaaff1bc7ca77aabdc1e294 + pristine_git_object: fcecb0aba42cabb6aa43d1f251397e3f77309dbb docs/models/chatgenerationparamspluginweb.md: id: d0d73d469fd5 last_write_checksum: sha1:b79cfe99f5de50c3561333d5d78d3df899ea657b pristine_git_object: 5019fca667229536878dd66abe14ce5bfa797e14 + docs/models/chatgenerationparamspreferredmaxlatency.md: + id: 4aa9de01411c + last_write_checksum: sha1:0a691ea2ec43c74b3c1ab371e893e5738354cd74 + pristine_git_object: d3dac7da470841da77e48c1aa82bbf7facc34f58 + docs/models/chatgenerationparamspreferredmaxlatencyunion.md: + id: 488040874ec7 + last_write_checksum: sha1:2a48eb57d7466b82964a2dca5c2cfcd1fd4111ef + pristine_git_object: c05e7e358f802fdecdc87c5c63e6b188bc0b8a52 + docs/models/chatgenerationparamspreferredminthroughput.md: + id: eb065c938f42 + last_write_checksum: sha1:0663e94de41930818a99952b88b8fa44382c8ab3 + pristine_git_object: a92d72de07f2241f6375cc69e0aa87d318dd8aa6 + docs/models/chatgenerationparamspreferredminthroughputunion.md: + id: 58da9921d0c3 + last_write_checksum: sha1:35a67d055758379404608adb4b8328f07733611c + pristine_git_object: b1c243dca06eb3c0ae5f1c3fb33ce7eb7ddd6682 docs/models/chatgenerationparamsprovider.md: id: 53100e96f9b3 - last_write_checksum: sha1:251a6898e05f03ff8576b537299af5c78f19ba71 - pristine_git_object: dd5158f2ef7dca5f301f9417ff20772a3d79a205 + last_write_checksum: sha1:bbf270115675a0f44817f021188e8b29da748ac1 + pristine_git_object: e9066810144a18ee67bd90e6da15f484a8a08666 docs/models/chatgenerationparamsresponseformatjsonobject.md: id: f55b3d1074de last_write_checksum: sha1:030c5fd5f71222a109e83d8a414c531ecca6aa42 @@ -468,8 +492,8 @@ trackedFiles: pristine_git_object: aa34788e2713691540b458a21142c537991c67ad docs/models/listendpointsresponse.md: id: 538591337ba9 - last_write_checksum: sha1:0792aae109c8d38f3d50f9671d1c7a13410e1837 - pristine_git_object: 71cba3ed92a87b1a23797c26c0c43a5af350ca94 + last_write_checksum: sha1:dfeb7e7d0e32e5cbd842f18c9c21d1fae8784192 + pristine_git_object: f3f08010fcfeb1ee6a8cd724466f4daeec5f14b1 docs/models/message.md: id: a9614076792b last_write_checksum: sha1:22da043167de1d7f11be7b853fc301a8cd254d78 @@ -482,6 +506,10 @@ trackedFiles: id: dbf003557c11 last_write_checksum: sha1:ebadea98bf2fc89cfe1c298dcda59f48313f17fe pristine_git_object: 7ea3ecb5543ad99b02cbb35af32faa48356a03d8 + docs/models/modality.md: + id: bf9d60290081 + last_write_checksum: sha1:7aedfc6c59f0ecc8bb5ee91c0d0a14f4270d01cb + pristine_git_object: 81727872b2ab71047358eedf339f81f53ed17bcd docs/models/model.md: id: 66e0236ac289 last_write_checksum: sha1:0838137dd59f66921fd571f3720c5a466aaa6ae4 @@ -832,8 +860,8 @@ trackedFiles: pristine_git_object: 75667ccca4ba2ba7de2a3814c62a6f579ad019eb docs/models/openresponsesreasoningformat.md: id: 9fb60a301cab - last_write_checksum: sha1:867ba528660ab95753574935012fe767e69dffe9 - pristine_git_object: 3885ed1099efaa26f354b87358ee10242b8053e7 + last_write_checksum: sha1:8a07949ce6297b386081215f5b69342fa328b4d2 + pristine_git_object: 05d007d9c1e708ee270903fe5df39ee119fcf75f docs/models/openresponsesreasoningstatuscompleted.md: id: 2ec2579ff582 last_write_checksum: sha1:18364a2e7b02005509490a0c65d4b974b642320a @@ -868,12 +896,16 @@ trackedFiles: pristine_git_object: 58b79f7952dde1e36fc3696b72a2e7d5fff2d06b docs/models/openresponsesrequest.md: id: 31fbfb05398d - last_write_checksum: sha1:3bb989ee78adee637c811f23dceed7d43ca701ed - pristine_git_object: de3566265c1397f3a937675f3ca85bdb4ce578c2 + last_write_checksum: sha1:7a201ad42da346050ccb49c9eb5ad384313b1119 + pristine_git_object: 33da0f0f48f3bf8be803af86f92a103b0bfb51e4 docs/models/openresponsesrequestignore.md: id: 1a7632be7d10 last_write_checksum: sha1:c0e3072d51d1b5f00239a5ae9c2c79bf46da8e19 pristine_git_object: 233062b436590bb9aafdf9f30ab448b1b570d460 + docs/models/openresponsesrequestimageconfig.md: + id: 6a416d6b5eca + last_write_checksum: sha1:5d11afa0b870af4b58db71546e3b775408b54e73 + pristine_git_object: cb9af2897a72eb53fed3fd7f8c894a29d17ae4af docs/models/openresponsesrequestmaxprice.md: id: 884882fb34c9 last_write_checksum: sha1:b3f722dcfe869a994ff84dcb2e813f714efbe02d @@ -886,6 +918,10 @@ trackedFiles: id: 5fadbc9bf2ea last_write_checksum: sha1:7a7fd54280c4363b0b1f980123db48c18972d791 pristine_git_object: e8180b1bb0aa84f2ae2304d6612927d07e5c6498 + docs/models/openresponsesrequestpluginautorouter.md: + id: 06093724cf28 + last_write_checksum: sha1:21792c84844bbf81c371f10ac3b9ceaed67ee88a + pristine_git_object: 9d4f2c148dbdab7f92d7b8229064a97dd94bede4 docs/models/openresponsesrequestpluginfileparser.md: id: f5035f920ff2 last_write_checksum: sha1:47a5304db29ef1ca8267a5d74b5c20e080c9d7d2 @@ -900,16 +936,16 @@ trackedFiles: pristine_git_object: 915847518314c82da5c93e2076c3b6db4791324d docs/models/openresponsesrequestpluginunion.md: id: 43ff38d22485 - last_write_checksum: sha1:e339b076bca4b3ad25257cebfa8d3f817789881e - pristine_git_object: 48232ce399ebe2794461a31cd0ff4b9198fd7f38 + last_write_checksum: sha1:9e32216e48d28d62b2a3491e3112f166d4427ee3 + pristine_git_object: ebf50062aae9875480fd776600184800679e0898 docs/models/openresponsesrequestpluginweb.md: id: 38282c1e86f2 last_write_checksum: sha1:d8ae45bfb7704c835e01394807827a22b9a09c40 pristine_git_object: 333dc3c779b7a07246980f0edb554299a3273a1a docs/models/openresponsesrequestprovider.md: id: 73c771e9ab67 - last_write_checksum: sha1:5905176c7251977d940f7e080551405c9e3e3e47 - pristine_git_object: 8162fc1aef2e2ce9e31da577c4e1511f45a73bae + last_write_checksum: sha1:662c3b7ba7e1aa1ab34ab6e29e437e540556808b + pristine_git_object: b66f084e406b087cee85b91974637947d64c79de docs/models/openresponsesrequestsort.md: id: 4a8a54014fb6 last_write_checksum: sha1:cf2bc7f9581a5adc8a6c14b0593c5753ea30e2d3 @@ -1240,12 +1276,12 @@ trackedFiles: pristine_git_object: de13f0fc824d8999d29941a4f8521268428c630d docs/models/operations/listendpointsresponse.md: id: 662f4daf76d2 - last_write_checksum: sha1:81d89ae5301d7d8fe915d470444104b3a9e41d20 - pristine_git_object: f5df4a085d135d399c9436cc7a7f63222db66cad + last_write_checksum: sha1:67d822787529202d7ec822c462a1aea50db27107 + pristine_git_object: c279494133245a520eafaadcdf2175f4b42136e1 docs/models/operations/listendpointszdrresponse.md: id: 5c9c93477484 - last_write_checksum: sha1:6e46a2471d25208e7b427521874488e2bcc79782 - pristine_git_object: 5109a585d7c9ce0a4762c66f50cecad796eee5fa + last_write_checksum: sha1:ff7e5de176d8a4e07a34ef0696e31436161f883f + pristine_git_object: 5eddc9683f75eba1b619bc96d2e83fe1026bb83e docs/models/operations/listmodelsusersecurity.md: id: 07a43f294881 last_write_checksum: sha1:0960a0a6dbece8266f287e905eb5e592024240f8 @@ -1410,10 +1446,30 @@ trackedFiles: id: e1affaa37c33 last_write_checksum: sha1:f8b022115273557bcf6748fbdff6fa9516e1f205 pristine_git_object: 73df927c852d8369870d0ef39c21c61af01e76d7 + docs/models/percentilelatencycutoffs.md: + id: d12acbf645e5 + last_write_checksum: sha1:90ff738ed045521e36725c2f8f0312752e766530 + pristine_git_object: 285bbe7ac77d5e506b04177e1ade292bc7e2edb8 + docs/models/percentilestats.md: + id: d7d335c6f6c8 + last_write_checksum: sha1:59b7b036503174c45997c45d3a9523a22d59db42 + pristine_git_object: 9aad100ba106f9b9399c6915fafa9fa520bd4526 + docs/models/percentilethroughputcutoffs.md: + id: 6b62ce2c64a2 + last_write_checksum: sha1:75f48c039aac37767b05ea44f1496a2217c32af1 + pristine_git_object: ebaceb6e280132fb0990b015af38d5d895b67d82 docs/models/perrequestlimits.md: id: 34d264d24d04 last_write_checksum: sha1:06a6fd664c3dfa29a160352bc4db448475e21b9c pristine_git_object: df2c4efd50c0e3e28237422a51d26d55019bf24b + docs/models/preferredmaxlatency.md: + id: 6c99f91a353b + last_write_checksum: sha1:e53440e449330e6feed91ca6a5646354c9f4b002 + pristine_git_object: 9c2854b02c904583c9bcd2160a6fb992cd58d9e1 + docs/models/preferredminthroughput.md: + id: 45e0610ae106 + last_write_checksum: sha1:9ed04de0924f71268bf32ed35ae54fbe00d34cbe + pristine_git_object: 90581244ce1ba0be538b910ae3a6d4380685c90a docs/models/pricing.md: id: 3f8579be3813 last_write_checksum: sha1:13d385951737907fea11f1bea6578bfc95483ecc @@ -1424,20 +1480,20 @@ trackedFiles: pristine_git_object: 6d489375882524404c3d2b5e0a02b73e9e0c8322 docs/models/prompttokensdetails.md: id: 1391892fce0a - last_write_checksum: sha1:341a914f81329f373975dc03c5822abcb4a10217 - pristine_git_object: c01910fea28045fb140973c9ec2ef01eea2cf30d + last_write_checksum: sha1:1842c29f80f4a4d90e888316cf277943dd888dfa + pristine_git_object: 6b96206e454e8dc021b1d853c77a817094f8854c docs/models/providername.md: id: 661ee6ccfa8a - last_write_checksum: sha1:28dd4b6f14be6a7978960371dee32cf0290922b9 - pristine_git_object: ec7473ace423973033bff8384f3f4b70adec70f8 + last_write_checksum: sha1:93ffab582f8f3d77c78c13153ef18739044bcde5 + pristine_git_object: a7c2ff6f05d39b0ca9f36bdde124a653f56cea9f docs/models/provideroverloadedresponseerrordata.md: id: 23d66996874e last_write_checksum: sha1:93e27b1eabea198409d833c54370b889a138f6b0 pristine_git_object: da229099b7c8cdff965c40da5b86e910c47a29d2 docs/models/providerpreferences.md: id: f9bf4d106c4e - last_write_checksum: sha1:3b3c387c0d7ee7f9ffeabc8394317197841b25a6 - pristine_git_object: ef7cdab204da0429a744c8d0b679c37b2e698ae7 + last_write_checksum: sha1:1fbbb5b8daa492ab61503eb623776c4ddb105689 + pristine_git_object: 029880ce92994516af5573a21b0194feeb90b038 docs/models/providerpreferencesignore.md: id: a4edb667e4e3 last_write_checksum: sha1:168239130d7819aaa9dc83613dc8a75564927122 @@ -1492,8 +1548,8 @@ trackedFiles: pristine_git_object: 1a6cae19b495ff3fa4436053764bd031accad350 docs/models/publicendpoint.md: id: 981d88d3c6db - last_write_checksum: sha1:b381b0c7b3e705242f60f2b4c10655bab2034640 - pristine_git_object: 4e5109428786e57e1e07eea86b4a3816d04fc192 + last_write_checksum: sha1:af8e6900afbcc3cd0551de94776b7476dc793b77 + pristine_git_object: e60f52d65f3ddcf849c6786acbc997efe5a06e84 docs/models/publicendpointquantization.md: id: b5a1de0acc9d last_write_checksum: sha1:a30c396e6a86ba559bb1f7b8800394376638f92b @@ -1648,8 +1704,12 @@ trackedFiles: pristine_git_object: 5a0684cc0c22cca520b55596b20b16f734c6bf75 docs/models/responsesoutputitemreasoning.md: id: 4980240c48f7 - last_write_checksum: sha1:2ca934536085e4b3bfa6edc9880b1fcd3ee0eec6 - pristine_git_object: 21f77c8e647da07b8d10aa1b0340ea7f2f7188a6 + last_write_checksum: sha1:f85df9c56372e95e3e6cd921ca8603e10687b09f + pristine_git_object: 72074b6ca2c1744f24ff9d12a479f9c263fd2567 + docs/models/responsesoutputitemreasoningformat.md: + id: ccd47763ab19 + last_write_checksum: sha1:696d8db55b1b1dc0416617cb05b0b982bd7b0bf3 + pristine_git_object: baaa591aec68c1fa1d6ab65464cb60a1e5e5eff9 docs/models/responsesoutputitemreasoningstatuscompleted.md: id: 5ba35ab2e54d last_write_checksum: sha1:a429a63a7cce133bc4f08e9efc2f394333093be4 @@ -1702,6 +1762,10 @@ trackedFiles: id: 0a624124eef2 last_write_checksum: sha1:b6b640b50008474f6e89bbc27d16eb670a7367e0 pristine_git_object: 98dc91add5dcc9ecc1c99e951b5f27b96f20775e + docs/models/responsesoutputmodality.md: + id: d1cae98a81dd + last_write_checksum: sha1:338340b805ddc278259640b1429f36fb23a54301 + pristine_git_object: dacf9f827a68996126f9c425635885bd995c9e38 docs/models/responsessearchcontextsize.md: id: e0d2720792b0 last_write_checksum: sha1:117f5155c607bfe6cc70f67aa730c00144a4ba9b @@ -1740,8 +1804,8 @@ trackedFiles: pristine_git_object: c6058f73691b9b051a4f6c65f6193df0b7fbbeeb docs/models/schema0enum.md: id: a6b9414adf87 - last_write_checksum: sha1:4d8b8b78c83937b021dafec60e99f426518920d2 - pristine_git_object: 2cf06689231e6ee83a897f9b01212ef249dd5c30 + last_write_checksum: sha1:cb56c840833d6731dbc51fb7693dd4a7e114ba7f + pristine_git_object: 387442526b3b98a40ec0c55d9fe005e34bdace67 docs/models/schema3.md: id: 082bedbd3961 last_write_checksum: sha1:4dafe41e5fca394aa3f9d749ec989644176526c5 @@ -1760,8 +1824,8 @@ trackedFiles: pristine_git_object: b5190d0982fd8378394b8a1686fbd830aa76cead docs/models/schema5.md: id: 83e60f793ba8 - last_write_checksum: sha1:e47ccc1d36b3c8f341e7e5324d39df0124604731 - pristine_git_object: fc01ed8115440b6ed00fac690c5d71ce4e8156a4 + last_write_checksum: sha1:bdbc26cbac4dbcb332776887fd570bd6e8c91694 + pristine_git_object: 3c5e2232db08669a23eb7ae8a2a7f9b9fb9387c4 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:1978f84a4c782f5ed85eb03074a6fa5e19f103c7 @@ -2088,8 +2152,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:cac230b3f1bb71d76dcb98ded8be09ef79f726b0 - pristine_git_object: 1b37b1e20c5fd2bce32406d1fac907d453f9e50a + last_write_checksum: sha1:515b108735cc0adf486d974d81760911baa68bcf + pristine_git_object: 47314894a0ec54207cb66a966a998ec386ea0367 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -2176,12 +2240,12 @@ trackedFiles: pristine_git_object: 9f509fc94bcb4b1c24b5046b3cb6e2b7b637c118 src/models/chatgenerationparams.ts: id: f98a2a558f3f - last_write_checksum: sha1:026d8ac70ed0bcefe074a24421fc29e7ce4457a8 - pristine_git_object: 6f601cc60773f896a52ef0474e95f29fd7d0184b + last_write_checksum: sha1:faa0731970d0378afdb418dd35ade4aaaf6a33af + pristine_git_object: a1a266db8a4b84e02f809db2e010a603cf225668 src/models/chatgenerationtokenusage.ts: id: 1d57b0d238b8 - last_write_checksum: sha1:aa2f76df6e53bee3299c5984404daf2b64e33982 - pristine_git_object: 07e1115a94c28a6fac9a226af73d577775e156b0 + last_write_checksum: sha1:c07f2e7a811b665994f9ae1d42df31aa701388ff + pristine_git_object: a2c30cf8b4e4db296d146277961e5760fec2b6ad src/models/chatmessagecontentitem.ts: id: bb7f6b29b93f last_write_checksum: sha1:97181a656928af6a5685c7f979bcba9a208e65f2 @@ -2388,8 +2452,8 @@ trackedFiles: pristine_git_object: db61647cd182502b2b3b5333ee3a0bba66542645 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:4c6711366cae8318ef49436b6954263af7b268ad - pristine_git_object: 1d8403af8887cfa0744292621fa0f15a4557001e + last_write_checksum: sha1:7db7dccafa4cc153dd3bc26317415a2733814361 + pristine_git_object: 1cca72e979b125177451085a87650f382c772373 src/models/inputmodality.ts: id: 771d5d4c91ec last_write_checksum: sha1:7f742bf5a1e6b7953ea96df4c4cef29c602accad @@ -2540,8 +2604,8 @@ trackedFiles: pristine_git_object: 5577126769d0a1d8795c1eb913f13a82ed5e40f6 src/models/openresponsesreasoning.ts: id: 296442f2d24a - last_write_checksum: sha1:866baeff37e619389173aafe2a28252df8100998 - pristine_git_object: 2bf9ff6b318e600f6e6b69b181af6589164f06f9 + last_write_checksum: sha1:208af0f7ff336615af9942b82932e1fa01a46e94 + pristine_git_object: 416b878637b5cfe8d50cbc714aeb6b49acfe326b src/models/openresponsesreasoningconfig.ts: id: c2f9d074fbd4 last_write_checksum: sha1:fa4a78f97745f137635f0cfc25d6ea083d620906 @@ -2568,8 +2632,8 @@ trackedFiles: pristine_git_object: 438e3268f5050c6e3e4899d019e9671f0ef9a556 src/models/openresponsesrequest.ts: id: ff8a31d46b1c - last_write_checksum: sha1:ea3cc2e6244845f2f1c072bd47f787f0fd30cef5 - pristine_git_object: b415f732bb31bf8198b94704ae64193ed393cfc2 + last_write_checksum: sha1:dea023d81a84e1101e525cc4e2f7f6426e53cd90 + pristine_git_object: 26e2976065f51b9c67d846256b86f5c8a64b6f80 src/models/openresponsesresponsetext.ts: id: aded1ce23b04 last_write_checksum: sha1:5046f904e0b5db52fbae46d9bbed94d651b7b0ef @@ -2722,22 +2786,42 @@ trackedFiles: id: 704f51d4a5f7 last_write_checksum: sha1:1830a046687a63576259d7d2f534154df86e69b9 pristine_git_object: d32dc10b8d734d48a15721a479831c4b2ff96ece + src/models/percentilelatencycutoffs.ts: + id: 92e053096488 + last_write_checksum: sha1:dd5b3d55d449f6f5074572c359bdca828aea081e + pristine_git_object: aea49c29fe5fa2917845f802780ac181d3573722 + src/models/percentilestats.ts: + id: 9a6b504d3964 + last_write_checksum: sha1:be5654d2818969037deb62d4b1277439e97ae0ff + pristine_git_object: 9dfb13ad741f08c1d0456b01d01cb5f5047dc514 + src/models/percentilethroughputcutoffs.ts: + id: 847aba8ff633 + last_write_checksum: sha1:6b12d3bcc625d01a7741d60878db1dd2426b65c1 + pristine_git_object: 64350cb96504a94daf1cfb8af7facf5b479c4cf3 src/models/perrequestlimits.ts: id: 2b2b6cf6a019 last_write_checksum: sha1:b301eb57f0a4eef19f3fa62e6a3e54e44dfa3913 pristine_git_object: a5bfb5dc6be9438a7b61dcab0944f70377916862 + src/models/preferredmaxlatency.ts: + id: e03f33269427 + last_write_checksum: sha1:6f468fd441cde7624381267c13f26348a6255bdf + pristine_git_object: 603f7d4a09bb9665ad223367964fc49425db8ffc + src/models/preferredminthroughput.ts: + id: 5ff9056f1474 + last_write_checksum: sha1:27d90a93c83e07533142b1b8cc1d3252c85242d9 + pristine_git_object: d2180d165594e1e5a5cd373ad9b0e03b13acce61 src/models/providername.ts: id: 89e536fb023a - last_write_checksum: sha1:4b76c862538275e5909530ed6c01ec44433da820 - pristine_git_object: db7996c05a501db9f0ffc1fd8b166a9d8d6abf76 + last_write_checksum: sha1:3a7c044aafdd7c31905fad0d834d0d2c0d9e0b61 + pristine_git_object: 3e7ccef868f314481835d1ec9a2f5e123b2dcbe0 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:b3773f306a628044087bb993c03533fc5dd82b9e - pristine_git_object: d783498df7eb035e92f750e6ab0d8eec31fd2af7 + last_write_checksum: sha1:ba7444e053608c3ebd8df6ebadb281ae361c9c39 + pristine_git_object: 3d8656ba04b8ec627a9e84082c1f51bf06126c16 src/models/providersort.ts: id: 7d1e919d1ec3 last_write_checksum: sha1:79757871ce1ce3fea1a1e0457286dbf45a32b35e @@ -2752,8 +2836,8 @@ trackedFiles: pristine_git_object: ab212a4c43bd6e099ce33c01c8152e54d47ce0bd src/models/publicendpoint.ts: id: 396ce3186017 - last_write_checksum: sha1:bf6cc8481b427363e525eca01932209115a04498 - pristine_git_object: 23f47a3070d3c0c7b717497ea148a35cec067d97 + last_write_checksum: sha1:a0b35f53360cdccdf13de426f8c0eff240a34579 + pristine_git_object: ce4dda9fce87974417ce87d19f6e5672c0841a9d src/models/publicpricing.ts: id: 0a44a1c3bab5 last_write_checksum: sha1:d89d4b227df690ac55a72bf9e7394bfff6e43882 @@ -2844,12 +2928,16 @@ trackedFiles: pristine_git_object: 4b2a84ba49afe91cfeb0b7947bf4028524b49713 src/models/responsesoutputitemreasoning.ts: id: 191f7f61ea84 - last_write_checksum: sha1:59ca3515ea228a3c3f9054e2d5a60ce71c845534 - pristine_git_object: 60b06c0e742c175f6a504b4c7690913a4d0a2afb + last_write_checksum: sha1:b22d1f37e32edb058fd32522bee5ead9b219559b + pristine_git_object: 4304b7e11ce24fd0901866e49812b4a61cea951f src/models/responsesoutputmessage.ts: id: 32cb33488ea2 last_write_checksum: sha1:82e6697b5617027faa4d6e65791eebbd4c46724c pristine_git_object: dc3999bae9a4a8783e6273f237cf5ef56c8d0973 + src/models/responsesoutputmodality.ts: + id: c42840bf36d8 + last_write_checksum: sha1:ef3234c76a79663140ab9d7492bdfefa09d33579 + pristine_git_object: da588971eb5a4dce00c4fc0d93aea23bc41259f4 src/models/responsessearchcontextsize.ts: id: 3c1dd9e04db4 last_write_checksum: sha1:6280fd261d048367d14726add6a077657833f16f @@ -2868,12 +2956,12 @@ trackedFiles: pristine_git_object: ad0047e3ee3baf0dea29abdfda2f3b7681c03519 src/models/schema0.ts: id: 14bff3bd8497 - last_write_checksum: sha1:3058207a8cc35341a322560bd665627bf9ac8779 - pristine_git_object: b2669445d4371d8f8b6d10885e0aad47efab821d + last_write_checksum: sha1:83aca8ee163e14d3f04eb710e25a1c6ed3741fb5 + pristine_git_object: 2fc01894cf0abfa06423b13dd78b4a01fa701032 src/models/schema3.ts: id: 6f7380bcbcea - last_write_checksum: sha1:1684d7aaa4a521191b2f2f63ba797f07438c3795 - pristine_git_object: 366ab7b1fb3f3e548a79687befdc10013b1a59d3 + last_write_checksum: sha1:e7fc08c524b69f672aa47e78fb9ae41f9380c884 + pristine_git_object: bcd2d06aa9faf4eaf1970562a59a0d825d88c560 src/models/security.ts: id: d90c6c784ca5 last_write_checksum: sha1:90d7a8903f46cd2ea5428527343a003511fc78c9 @@ -3825,7 +3913,7 @@ examples: slug: "" responses: "200": - application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true}]}} + application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}} 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: @@ -3840,7 +3928,7 @@ examples: speakeasy-default-list-endpoints-zdr: responses: "200": - application/json: {"data": [{"name": "", "model_name": "", "context_length": 8891.09, "pricing": {"prompt": "1000", "completion": "1000"}, "provider_name": "OpenAI", "tag": "", "quantization": "fp16", "max_completion_tokens": 4685.25, "max_prompt_tokens": 22.7, "supported_parameters": ["temperature"], "uptime_last_30m": 6060.66, "supports_implicit_caching": true}]} + application/json: {"data": [{"name": "", "model_name": "", "context_length": 8891.09, "pricing": {"prompt": "1000", "completion": "1000"}, "provider_name": "OpenAI", "tag": "", "quantization": "fp16", "max_completion_tokens": 4685.25, "max_prompt_tokens": 22.7, "supported_parameters": ["temperature"], "uptime_last_30m": 6060.66, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} "500": diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 4047ff25..b978e35b 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -268,7 +268,24 @@ components: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object - properties: {} + properties: + signature: + type: string + nullable: true + description: A signature for the reasoning content, used for verification + example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: + type: string + nullable: true + enum: + - unknown + - openai-responses-v1 + - azure-openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + - google-gemini-v1 + description: The format of the reasoning content + example: anthropic-claude-v1 example: id: reasoning-123 type: reasoning @@ -279,6 +296,8 @@ components: content: - type: reasoning_text text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 description: An output item containing reasoning OutputItemFunctionCall: type: object @@ -3224,6 +3243,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -3418,6 +3438,11 @@ components: example: summary: auto enabled: true + ResponsesOutputModality: + type: string + enum: + - text + - image OpenAIResponsesIncludable: type: string enum: @@ -3470,12 +3495,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -3500,13 +3525,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -3551,6 +3577,74 @@ components: type: string description: A value in string format that is a large number example: 1000 + PercentileThroughputCutoffs: + type: object + properties: + p50: + type: number + nullable: true + description: Minimum p50 throughput (tokens/sec) + p75: + type: number + nullable: true + description: Minimum p75 throughput (tokens/sec) + p90: + type: number + nullable: true + description: Minimum p90 throughput (tokens/sec) + p99: + type: number + nullable: true + description: Minimum p99 throughput (tokens/sec) + description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + example: + p50: 100 + p90: 50 + PreferredMinThroughput: + anyOf: + - type: number + - $ref: '#/components/schemas/PercentileThroughputCutoffs' + - nullable: true + description: >- + Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with + percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in + routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if + it meets the threshold. + example: 100 + PercentileLatencyCutoffs: + type: object + properties: + p50: + type: number + nullable: true + description: Maximum p50 latency (seconds) + p75: + type: number + nullable: true + description: Maximum p75 latency (seconds) + p90: + type: number + nullable: true + description: Maximum p90 latency (seconds) + p99: + type: number + nullable: true + description: Maximum p99 latency (seconds) + description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + example: + p50: 5 + p90: 10 + PreferredMaxLatency: + anyOf: + - type: number + - $ref: '#/components/schemas/PercentileLatencyCutoffs' + - nullable: true + description: >- + Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific + cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using + fallback models, this may cause a fallback model to be used instead of the primary model if it meets the + threshold. + example: 5 WebSearchEngine: type: string enum: @@ -3639,6 +3733,25 @@ components: minimum: 0 top_k: type: number + image_config: + type: object + additionalProperties: + anyOf: + - type: string + - type: number + description: >- + Provider-specific image configuration options. Keys and values vary by model/provider. See + https://openrouter.ai/docs/features/multimodal/image-generation for more details. + example: + aspect_ratio: '16:9' + modalities: + type: array + items: + $ref: '#/components/schemas/ResponsesOutputModality' + description: Output modalities for the response. Supported values are "text" and "image". + example: + - text + - image prompt_cache_key: type: string nullable: true @@ -3774,43 +3887,38 @@ components: The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. preferred_min_throughput: - type: number - nullable: true - description: >- - Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, - but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used - instead of the primary model if it meets the threshold. - example: 100 + $ref: '#/components/schemas/PreferredMinThroughput' preferred_max_latency: - type: number - nullable: true - description: >- - Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are - deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead - of the primary model if it meets the threshold. - example: 5 - min_throughput: - type: number - nullable: true - deprecated: true - description: >- - **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for - preferred_min_throughput. - example: 100 - x-speakeasy-deprecation-message: Use preferred_min_throughput instead. - max_latency: - type: number - nullable: true - deprecated: true - description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.' - example: 5 - x-speakeasy-deprecation-message: Use preferred_max_latency instead. + $ref: '#/components/schemas/PreferredMaxLatency' additionalProperties: false description: When multiple model providers are available, optionally indicate your routing preference. plugins: type: array items: oneOf: + - type: object + properties: + id: + type: string + enum: + - auto-router + enabled: + type: boolean + description: Set to false to disable the auto-router plugin for this request. Defaults to true. + allowed_models: + type: array + items: + type: string + description: >- + List of model patterns to filter which models the auto-router can route between. Supports + wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default + supported models list. + example: + - anthropic/* + - openai/gpt-4o + - google/* + required: + - id - type: object properties: id: @@ -4132,37 +4240,9 @@ components: The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. preferred_min_throughput: - type: number - nullable: true - description: >- - Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but - are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead - of the primary model if it meets the threshold. - example: 100 + $ref: '#/components/schemas/PreferredMinThroughput' preferred_max_latency: - type: number - nullable: true - description: >- - Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are - deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of - the primary model if it meets the threshold. - example: 5 - min_throughput: - type: number - nullable: true - deprecated: true - description: >- - **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for - preferred_min_throughput. - example: 100 - x-speakeasy-deprecation-message: Use preferred_min_throughput instead. - max_latency: - type: number - nullable: true - deprecated: true - description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.' - example: 5 - x-speakeasy-deprecation-message: Use preferred_max_latency instead. + $ref: '#/components/schemas/PreferredMaxLatency' description: Provider routing preferences for the request. PublicPricing: type: object @@ -4595,6 +4675,34 @@ components: - -5 - -10 example: 0 + PercentileStats: + type: object + nullable: true + properties: + p50: + type: number + description: Median (50th percentile) + example: 25.5 + p75: + type: number + description: 75th percentile + example: 35.2 + p90: + type: number + description: 90th percentile + example: 48.7 + p99: + type: number + description: 99th percentile + example: 85.3 + required: + - p50 + - p75 + - p90 + - p99 + description: >- + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible + when authenticated with an API key or cookie; returns null for unauthenticated requests. PublicEndpoint: type: object properties: @@ -4662,6 +4770,15 @@ components: nullable: true supports_implicit_caching: type: boolean + latency_last_30m: + $ref: '#/components/schemas/PercentileStats' + throughput_last_30m: + allOf: + - $ref: '#/components/schemas/PercentileStats' + - description: >- + Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token + generation speed. Only visible when authenticated with an API key or cookie; returns null for + unauthenticated requests. required: - name - model_name @@ -4675,6 +4792,8 @@ components: - supported_parameters - uptime_last_30m - supports_implicit_caching + - latency_last_30m + - throughput_last_30m description: Information about a specific model endpoint example: name: 'OpenAI: GPT-4' @@ -4697,6 +4816,16 @@ components: status: 0 uptime_last_30m: 99.5 supports_implicit_caching: true + latency_last_30m: + p50: 0.25 + p75: 0.35 + p90: 0.48 + p99: 0.85 + throughput_last_30m: + p50: 45.2 + p75: 38.5 + p90: 28.3 + p99: 15.1 ListEndpointsResponse: type: object properties: @@ -4800,6 +4929,16 @@ components: status: default uptime_last_30m: 99.5 supports_implicit_caching: true + latency_last_30m: + p50: 0.25 + p75: 0.35 + p90: 0.48 + p99: 0.85 + throughput_last_30m: + p50: 45.2 + p75: 38.5 + p90: 28.3 + p99: 15.1 __schema0: type: array items: @@ -4832,12 +4971,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -4862,13 +5001,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -4951,6 +5091,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -5174,6 +5315,8 @@ components: properties: cached_tokens: type: number + cache_write_tokens: + type: number audio_tokens: type: number video_tokens: @@ -5521,20 +5664,60 @@ components: request: $ref: '#/components/schemas/__schema1' preferred_min_throughput: + description: >- + Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object + with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are + deprioritized in routing. When using fallback models, this may cause a fallback model to be used + instead of the primary model if it meets the threshold. anyOf: - - type: number + - anyOf: + - type: number + - type: object + properties: + p50: + anyOf: + - type: number + - type: 'null' + p75: + anyOf: + - type: number + - type: 'null' + p90: + anyOf: + - type: number + - type: 'null' + p99: + anyOf: + - type: number + - type: 'null' - type: 'null' preferred_max_latency: + description: >- + Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with + percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are + deprioritized in routing. When using fallback models, this may cause a fallback model to be used + instead of the primary model if it meets the threshold. anyOf: - - type: number - - type: 'null' - min_throughput: - anyOf: - - type: number - - type: 'null' - max_latency: - anyOf: - - type: number + - anyOf: + - type: number + - type: object + properties: + p50: + anyOf: + - type: number + - type: 'null' + p75: + anyOf: + - type: number + - type: 'null' + p90: + anyOf: + - type: number + - type: 'null' + p99: + anyOf: + - type: number + - type: 'null' - type: 'null' additionalProperties: false - type: 'null' @@ -5543,6 +5726,19 @@ components: type: array items: oneOf: + - type: object + properties: + id: + type: string + const: auto-router + enabled: + type: boolean + allowed_models: + type: array + items: + type: string + required: + - id - type: object properties: id: @@ -5760,6 +5956,21 @@ components: properties: echo_upstream_body: type: boolean + image_config: + type: object + propertyNames: + type: string + additionalProperties: + anyOf: + - type: string + - type: number + modalities: + type: array + items: + type: string + enum: + - text + - image required: - messages ProviderSortUnion: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 803e36f2..18ee31c6 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -269,7 +269,25 @@ components: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object - properties: {} + properties: + signature: + type: string + nullable: true + description: A signature for the reasoning content, used for verification + example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: + type: string + nullable: true + enum: + - unknown + - openai-responses-v1 + - azure-openai-responses-v1 + - xai-responses-v1 + - anthropic-claude-v1 + - google-gemini-v1 + description: The format of the reasoning content + example: anthropic-claude-v1 + x-speakeasy-unknown-values: allow example: id: reasoning-123 type: reasoning @@ -280,6 +298,8 @@ components: content: - type: reasoning_text text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 description: An output item containing reasoning OutputItemFunctionCall: type: object @@ -3239,6 +3259,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -3434,6 +3455,12 @@ components: example: summary: auto enabled: true + ResponsesOutputModality: + type: string + enum: + - text + - image + x-speakeasy-unknown-values: allow OpenAIResponsesIncludable: type: string enum: @@ -3487,12 +3514,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -3517,13 +3544,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -3572,6 +3600,68 @@ components: type: string description: A value in string format that is a large number example: 1000 + PercentileThroughputCutoffs: + type: object + properties: + p50: + type: number + nullable: true + description: Minimum p50 throughput (tokens/sec) + p75: + type: number + nullable: true + description: Minimum p75 throughput (tokens/sec) + p90: + type: number + nullable: true + description: Minimum p90 throughput (tokens/sec) + p99: + type: number + nullable: true + description: Minimum p99 throughput (tokens/sec) + description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + example: + p50: 100 + p90: 50 + PreferredMinThroughput: + anyOf: + - type: number + - $ref: '#/components/schemas/PercentileThroughputCutoffs' + - nullable: true + description: >- + Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + example: 100 + PercentileLatencyCutoffs: + type: object + properties: + p50: + type: number + nullable: true + description: Maximum p50 latency (seconds) + p75: + type: number + nullable: true + description: Maximum p75 latency (seconds) + p90: + type: number + nullable: true + description: Maximum p90 latency (seconds) + p99: + type: number + nullable: true + description: Maximum p99 latency (seconds) + description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + example: + p50: 5 + p90: 10 + PreferredMaxLatency: + anyOf: + - type: number + - $ref: '#/components/schemas/PercentileLatencyCutoffs' + - nullable: true + description: >- + Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + example: 5 WebSearchEngine: type: string enum: @@ -3663,6 +3753,24 @@ components: minimum: 0 top_k: type: number + image_config: + type: object + additionalProperties: + anyOf: + - type: string + - type: number + description: >- + Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. + example: + aspect_ratio: '16:9' + modalities: + type: array + items: + $ref: '#/components/schemas/ResponsesOutputModality' + description: Output modalities for the response. Supported values are "text" and "image". + example: + - text + - image prompt_cache_key: type: string nullable: true @@ -3788,38 +3896,36 @@ components: description: >- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. preferred_min_throughput: - type: number - nullable: true - description: >- - Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - example: 100 + $ref: '#/components/schemas/PreferredMinThroughput' preferred_max_latency: - type: number - nullable: true - description: >- - Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - example: 5 - min_throughput: - type: number - nullable: true - deprecated: true - description: >- - **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. - example: 100 - x-speakeasy-deprecation-message: Use preferred_min_throughput instead. - max_latency: - type: number - nullable: true - deprecated: true - description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.' - example: 5 - x-speakeasy-deprecation-message: Use preferred_max_latency instead. + $ref: '#/components/schemas/PreferredMaxLatency' additionalProperties: false description: When multiple model providers are available, optionally indicate your routing preference. plugins: type: array items: oneOf: + - type: object + properties: + id: + type: string + enum: + - auto-router + enabled: + type: boolean + description: Set to false to disable the auto-router plugin for this request. Defaults to true. + allowed_models: + type: array + items: + type: string + description: >- + List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. + example: + - anthropic/* + - openai/gpt-4o + - google/* + required: + - id - type: object properties: id: @@ -4129,32 +4235,9 @@ components: description: >- The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. preferred_min_throughput: - type: number - nullable: true - description: >- - Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - example: 100 + $ref: '#/components/schemas/PreferredMinThroughput' preferred_max_latency: - type: number - nullable: true - description: >- - Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - example: 5 - min_throughput: - type: number - nullable: true - deprecated: true - description: >- - **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. - example: 100 - x-speakeasy-deprecation-message: Use preferred_min_throughput instead. - max_latency: - type: number - nullable: true - deprecated: true - description: '**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.' - example: 5 - x-speakeasy-deprecation-message: Use preferred_max_latency instead. + $ref: '#/components/schemas/PreferredMaxLatency' description: Provider routing preferences for the request. PublicPricing: type: object @@ -4594,6 +4677,33 @@ components: - -10 example: 0 x-speakeasy-unknown-values: allow + PercentileStats: + type: object + nullable: true + properties: + p50: + type: number + description: Median (50th percentile) + example: 25.5 + p75: + type: number + description: 75th percentile + example: 35.2 + p90: + type: number + description: 90th percentile + example: 48.7 + p99: + type: number + description: 99th percentile + example: 85.3 + required: + - p50 + - p75 + - p90 + - p99 + description: >- + Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. PublicEndpoint: type: object properties: @@ -4661,6 +4771,13 @@ components: nullable: true supports_implicit_caching: type: boolean + latency_last_30m: + $ref: '#/components/schemas/PercentileStats' + throughput_last_30m: + allOf: + - $ref: '#/components/schemas/PercentileStats' + - description: >- + Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. required: - name - model_name @@ -4674,6 +4791,8 @@ components: - supported_parameters - uptime_last_30m - supports_implicit_caching + - latency_last_30m + - throughput_last_30m description: Information about a specific model endpoint example: name: 'OpenAI: GPT-4' @@ -4696,6 +4815,16 @@ components: status: 0 uptime_last_30m: 99.5 supports_implicit_caching: true + latency_last_30m: + p50: 0.25 + p75: 0.35 + p90: 0.48 + p99: 0.85 + throughput_last_30m: + p50: 45.2 + p75: 38.5 + p90: 28.3 + p99: 15.1 ListEndpointsResponse: type: object properties: @@ -4799,6 +4928,16 @@ components: status: default uptime_last_30m: 99.5 supports_implicit_caching: true + latency_last_30m: + p50: 0.25 + p75: 0.35 + p90: 0.48 + p99: 0.85 + throughput_last_30m: + p50: 45.2 + p75: 38.5 + p90: 28.3 + p99: 15.1 __schema0: type: array items: @@ -4831,12 +4970,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -4861,13 +5000,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -4951,6 +5091,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -5176,6 +5317,8 @@ components: properties: cached_tokens: type: number + cache_write_tokens: + type: number audio_tokens: type: number video_tokens: @@ -5518,20 +5661,54 @@ components: request: $ref: '#/components/schemas/__schema1' preferred_min_throughput: + description: >- + Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. anyOf: - - type: number + - anyOf: + - type: number + - type: object + properties: + p50: + anyOf: + - type: number + - type: 'null' + p75: + anyOf: + - type: number + - type: 'null' + p90: + anyOf: + - type: number + - type: 'null' + p99: + anyOf: + - type: number + - type: 'null' - type: 'null' preferred_max_latency: + description: >- + Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. anyOf: - - type: number - - type: 'null' - min_throughput: - anyOf: - - type: number - - type: 'null' - max_latency: - anyOf: - - type: number + - anyOf: + - type: number + - type: object + properties: + p50: + anyOf: + - type: number + - type: 'null' + p75: + anyOf: + - type: number + - type: 'null' + p90: + anyOf: + - type: number + - type: 'null' + p99: + anyOf: + - type: number + - type: 'null' - type: 'null' additionalProperties: false - type: 'null' @@ -5540,6 +5717,19 @@ components: type: array items: oneOf: + - type: object + properties: + id: + type: string + const: auto-router + enabled: + type: boolean + allowed_models: + type: array + items: + type: string + required: + - id - type: object properties: id: @@ -5759,6 +5949,22 @@ components: properties: echo_upstream_body: type: boolean + image_config: + type: object + propertyNames: + type: string + additionalProperties: + anyOf: + - type: string + - type: number + modalities: + type: array + items: + type: string + enum: + - text + - image + x-speakeasy-unknown-values: allow required: - messages ProviderSortUnion: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5fef387c..6e988b6f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.680.0 +speakeasyVersion: 1.678.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9825a9d9dd018739535efcfcd22e5cad96efd1ce991aeaa4b4e7fe5b9d40f0fa - sourceBlobDigest: sha256:6f9ef0c822dc240348641c51d5824e49681a2e3ac0132d2c19cd2abb3bcfdd03 + sourceRevisionDigest: sha256:0f4e0b8ad88243230f6ea56530a548e1d10722206f3bcf884201b16175bacbe0 + sourceBlobDigest: sha256:fccf091e833389805928266c716991f5c53b34b651903e341937498c065c7f8d tags: - latest - 1.0.0 @@ -11,8 +11,8 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9825a9d9dd018739535efcfcd22e5cad96efd1ce991aeaa4b4e7fe5b9d40f0fa - sourceBlobDigest: sha256:6f9ef0c822dc240348641c51d5824e49681a2e3ac0132d2c19cd2abb3bcfdd03 + sourceRevisionDigest: sha256:0f4e0b8ad88243230f6ea56530a548e1d10722206f3bcf884201b16175bacbe0 + sourceBlobDigest: sha256:fccf091e833389805928266c716991f5c53b34b651903e341937498c065c7f8d workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/docs/models/chatgenerationparams.md b/docs/models/chatgenerationparams.md index a3822de5..26fdcc6d 100644 --- a/docs/models/chatgenerationparams.md +++ b/docs/models/chatgenerationparams.md @@ -45,4 +45,6 @@ let value: ChatGenerationParams = { | `toolChoice` | *any* | :heavy_minus_sign: | N/A | | `tools` | [models.ToolDefinitionJson](../models/tooldefinitionjson.md)[] | :heavy_minus_sign: | N/A | | `topP` | *number* | :heavy_minus_sign: | N/A | -| `debug` | [models.Debug](../models/debug.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `debug` | [models.Debug](../models/debug.md) | :heavy_minus_sign: | N/A | +| `imageConfig` | Record | :heavy_minus_sign: | N/A | +| `modalities` | [models.Modality](../models/modality.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamsimageconfig.md b/docs/models/chatgenerationparamsimageconfig.md new file mode 100644 index 00000000..fe647c07 --- /dev/null +++ b/docs/models/chatgenerationparamsimageconfig.md @@ -0,0 +1,17 @@ +# ChatGenerationParamsImageConfig + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + diff --git a/docs/models/chatgenerationparamspluginautorouter.md b/docs/models/chatgenerationparamspluginautorouter.md new file mode 100644 index 00000000..9a7cafbe --- /dev/null +++ b/docs/models/chatgenerationparamspluginautorouter.md @@ -0,0 +1,19 @@ +# ChatGenerationParamsPluginAutoRouter + +## Example Usage + +```typescript +import { ChatGenerationParamsPluginAutoRouter } from "@openrouter/sdk/models"; + +let value: ChatGenerationParamsPluginAutoRouter = { + id: "auto-router", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *"auto-router"* | :heavy_check_mark: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `allowedModels` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamspluginunion.md b/docs/models/chatgenerationparamspluginunion.md index 22f32f28..fcecb0ab 100644 --- a/docs/models/chatgenerationparamspluginunion.md +++ b/docs/models/chatgenerationparamspluginunion.md @@ -3,6 +3,14 @@ ## Supported Types +### `models.ChatGenerationParamsPluginAutoRouter` + +```typescript +const value: models.ChatGenerationParamsPluginAutoRouter = { + id: "auto-router", +}; +``` + ### `models.ChatGenerationParamsPluginModeration` ```typescript diff --git a/docs/models/chatgenerationparamspreferredmaxlatency.md b/docs/models/chatgenerationparamspreferredmaxlatency.md new file mode 100644 index 00000000..d3dac7da --- /dev/null +++ b/docs/models/chatgenerationparamspreferredmaxlatency.md @@ -0,0 +1,18 @@ +# ChatGenerationParamsPreferredMaxLatency + +## Example Usage + +```typescript +import { ChatGenerationParamsPreferredMaxLatency } from "@openrouter/sdk/models"; + +let value: ChatGenerationParamsPreferredMaxLatency = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `p50` | *number* | :heavy_minus_sign: | N/A | +| `p75` | *number* | :heavy_minus_sign: | N/A | +| `p90` | *number* | :heavy_minus_sign: | N/A | +| `p99` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamspreferredmaxlatencyunion.md b/docs/models/chatgenerationparamspreferredmaxlatencyunion.md new file mode 100644 index 00000000..c05e7e35 --- /dev/null +++ b/docs/models/chatgenerationparamspreferredmaxlatencyunion.md @@ -0,0 +1,17 @@ +# ChatGenerationParamsPreferredMaxLatencyUnion + + +## Supported Types + +### `number` + +```typescript +const value: number = 1284.03; +``` + +### `models.ChatGenerationParamsPreferredMaxLatency` + +```typescript +const value: models.ChatGenerationParamsPreferredMaxLatency = {}; +``` + diff --git a/docs/models/chatgenerationparamspreferredminthroughput.md b/docs/models/chatgenerationparamspreferredminthroughput.md new file mode 100644 index 00000000..a92d72de --- /dev/null +++ b/docs/models/chatgenerationparamspreferredminthroughput.md @@ -0,0 +1,18 @@ +# ChatGenerationParamsPreferredMinThroughput + +## Example Usage + +```typescript +import { ChatGenerationParamsPreferredMinThroughput } from "@openrouter/sdk/models"; + +let value: ChatGenerationParamsPreferredMinThroughput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `p50` | *number* | :heavy_minus_sign: | N/A | +| `p75` | *number* | :heavy_minus_sign: | N/A | +| `p90` | *number* | :heavy_minus_sign: | N/A | +| `p99` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparamspreferredminthroughputunion.md b/docs/models/chatgenerationparamspreferredminthroughputunion.md new file mode 100644 index 00000000..b1c243dc --- /dev/null +++ b/docs/models/chatgenerationparamspreferredminthroughputunion.md @@ -0,0 +1,17 @@ +# ChatGenerationParamsPreferredMinThroughputUnion + + +## Supported Types + +### `number` + +```typescript +const value: number = 1284.03; +``` + +### `models.ChatGenerationParamsPreferredMinThroughput` + +```typescript +const value: models.ChatGenerationParamsPreferredMinThroughput = {}; +``` + diff --git a/docs/models/chatgenerationparamsprovider.md b/docs/models/chatgenerationparamsprovider.md index dd5158f2..e9066810 100644 --- a/docs/models/chatgenerationparamsprovider.md +++ b/docs/models/chatgenerationparamsprovider.md @@ -10,20 +10,18 @@ let value: ChatGenerationParamsProvider = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| -| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | -| `dataCollection` | [models.ChatGenerationParamsDataCollection](../models/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | -| `zdr` | *boolean* | :heavy_minus_sign: | N/A | -| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | N/A | -| `order` | *models.Schema0*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | -| `only` | *models.Schema0*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | -| `ignore` | *models.Schema0*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | -| `quantizations` | [models.Quantizations](../models/quantizations.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | -| `sort` | *models.ProviderSortUnion* | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | -| `maxPrice` | [models.ChatGenerationParamsMaxPrice](../models/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | -| `preferredMinThroughput` | *number* | :heavy_minus_sign: | N/A | -| `preferredMaxLatency` | *number* | :heavy_minus_sign: | N/A | -| `minThroughput` | *number* | :heavy_minus_sign: | N/A | -| `maxLatency` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| +| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | +| `dataCollection` | [models.ChatGenerationParamsDataCollection](../models/chatgenerationparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | +| `zdr` | *boolean* | :heavy_minus_sign: | N/A | +| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | N/A | +| `order` | *models.Schema0*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | +| `only` | *models.Schema0*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | +| `ignore` | *models.Schema0*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | +| `quantizations` | [models.Quantizations](../models/quantizations.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | +| `sort` | *models.ProviderSortUnion* | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | +| `maxPrice` | [models.ChatGenerationParamsMaxPrice](../models/chatgenerationparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | +| `preferredMinThroughput` | *models.ChatGenerationParamsPreferredMinThroughputUnion* | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | +| `preferredMaxLatency` | *models.ChatGenerationParamsPreferredMaxLatencyUnion* | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | \ No newline at end of file diff --git a/docs/models/listendpointsresponse.md b/docs/models/listendpointsresponse.md index 71cba3ed..f3f08010 100644 --- a/docs/models/listendpointsresponse.md +++ b/docs/models/listendpointsresponse.md @@ -47,6 +47,18 @@ let value: ListEndpointsResponse = { ], uptimeLast30m: 99.5, supportsImplicitCaching: true, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + throughputLast30m: { + p50: 45.2, + p75: 38.5, + p90: 28.3, + p99: 15.1, + }, }, ], }; diff --git a/docs/models/modality.md b/docs/models/modality.md new file mode 100644 index 00000000..81727872 --- /dev/null +++ b/docs/models/modality.md @@ -0,0 +1,17 @@ +# Modality + +## Example Usage + +```typescript +import { Modality } from "@openrouter/sdk/models"; + +let value: Modality = "image"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"text" | "image" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponsesreasoningformat.md b/docs/models/openresponsesreasoningformat.md index 3885ed10..05d007d9 100644 --- a/docs/models/openresponsesreasoningformat.md +++ b/docs/models/openresponsesreasoningformat.md @@ -13,5 +13,5 @@ let value: OpenResponsesReasoningFormat = "unknown"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"unknown" | "openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized +"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/openresponsesrequest.md b/docs/models/openresponsesrequest.md index de356626..33da0f0f 100644 --- a/docs/models/openresponsesrequest.md +++ b/docs/models/openresponsesrequest.md @@ -28,6 +28,8 @@ let value: OpenResponsesRequest = {}; | `temperature` | *number* | :heavy_minus_sign: | N/A | | | `topP` | *number* | :heavy_minus_sign: | N/A | | | `topK` | *number* | :heavy_minus_sign: | N/A | | +| `imageConfig` | Record | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | +| `modalities` | [models.ResponsesOutputModality](../models/responsesoutputmodality.md)[] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | | `promptCacheKey` | *string* | :heavy_minus_sign: | N/A | | | `previousResponseId` | *string* | :heavy_minus_sign: | N/A | | | `prompt` | [models.OpenAIResponsesPrompt](../models/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | diff --git a/docs/models/openresponsesrequestimageconfig.md b/docs/models/openresponsesrequestimageconfig.md new file mode 100644 index 00000000..cb9af289 --- /dev/null +++ b/docs/models/openresponsesrequestimageconfig.md @@ -0,0 +1,17 @@ +# OpenResponsesRequestImageConfig + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `number` + +```typescript +const value: number = 1284.03; +``` + diff --git a/docs/models/openresponsesrequestpluginautorouter.md b/docs/models/openresponsesrequestpluginautorouter.md new file mode 100644 index 00000000..9d4f2c14 --- /dev/null +++ b/docs/models/openresponsesrequestpluginautorouter.md @@ -0,0 +1,19 @@ +# OpenResponsesRequestPluginAutoRouter + +## Example Usage + +```typescript +import { OpenResponsesRequestPluginAutoRouter } from "@openrouter/sdk/models"; + +let value: OpenResponsesRequestPluginAutoRouter = { + id: "auto-router", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *"auto-router"* | :heavy_check_mark: | N/A | | +| `enabled` | *boolean* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | | +| `allowedModels` | *string*[] | :heavy_minus_sign: | List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. | [
"anthropic/*",
"openai/gpt-4o",
"google/*"
] | \ No newline at end of file diff --git a/docs/models/openresponsesrequestpluginunion.md b/docs/models/openresponsesrequestpluginunion.md index 48232ce3..ebf50062 100644 --- a/docs/models/openresponsesrequestpluginunion.md +++ b/docs/models/openresponsesrequestpluginunion.md @@ -3,6 +3,14 @@ ## Supported Types +### `models.OpenResponsesRequestPluginAutoRouter` + +```typescript +const value: models.OpenResponsesRequestPluginAutoRouter = { + id: "auto-router", +}; +``` + ### `models.OpenResponsesRequestPluginModeration` ```typescript diff --git a/docs/models/openresponsesrequestprovider.md b/docs/models/openresponsesrequestprovider.md index 8162fc1a..b66f084e 100644 --- a/docs/models/openresponsesrequestprovider.md +++ b/docs/models/openresponsesrequestprovider.md @@ -12,20 +12,18 @@ let value: OpenResponsesRequestProvider = {}; ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | -| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | -| `dataCollection` | [models.DataCollection](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | -| `zdr` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | -| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | -| `order` | *models.OpenResponsesRequestOrder*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | -| `only` | *models.OpenResponsesRequestOnly*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | -| `ignore` | *models.OpenResponsesRequestIgnore*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | -| `quantizations` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | *models.OpenResponsesRequestSort* | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | -| `maxPrice` | [models.OpenResponsesRequestMaxPrice](../models/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | -| `preferredMinThroughput` | *number* | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | -| `preferredMaxLatency` | *number* | :heavy_minus_sign: | Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | -| ~~`minThroughput`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_min_throughput instead..

**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. | 100 | -| ~~`maxLatency`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_max_latency instead..

**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. | 5 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | +| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | +| `dataCollection` | [models.DataCollection](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | +| `zdr` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | +| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | +| `order` | *models.OpenResponsesRequestOrder*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | +| `only` | *models.OpenResponsesRequestOnly*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | +| `ignore` | *models.OpenResponsesRequestIgnore*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | +| `quantizations` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | +| `sort` | *models.OpenResponsesRequestSort* | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | +| `maxPrice` | [models.OpenResponsesRequestMaxPrice](../models/openresponsesrequestmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | +| `preferredMinThroughput` | *models.PreferredMinThroughput* | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | +| `preferredMaxLatency` | *models.PreferredMaxLatency* | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | \ No newline at end of file diff --git a/docs/models/operations/listendpointsresponse.md b/docs/models/operations/listendpointsresponse.md index f5df4a08..c2794941 100644 --- a/docs/models/operations/listendpointsresponse.md +++ b/docs/models/operations/listendpointsresponse.md @@ -48,6 +48,18 @@ let value: ListEndpointsResponse = { ], uptimeLast30m: 99.5, supportsImplicitCaching: true, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + throughputLast30m: { + p50: 45.2, + p75: 38.5, + p90: 28.3, + p99: 15.1, + }, }, ], }, @@ -56,6 +68,6 @@ let value: ListEndpointsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `data` | [models.ListEndpointsResponse](../../models/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"id": "openai/gpt-4",
"name": "GPT-4",
"created": 1692901234,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"architecture": {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
},
"endpoints": [
{
"name": "OpenAI: GPT-4",
"model_name": "GPT-4",
"context_length": 8192,
"pricing": {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
},
"provider_name": "OpenAI",
"tag": "openai",
"quantization": "fp16",
"max_completion_tokens": 4096,
"max_prompt_tokens": 8192,
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"status": "default",
"uptime_last_30m": 99.5,
"supports_implicit_caching": true
}
]
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.ListEndpointsResponse](../../models/listendpointsresponse.md) | :heavy_check_mark: | List of available endpoints for a model | {
"id": "openai/gpt-4",
"name": "GPT-4",
"created": 1692901234,
"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",
"architecture": {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
},
"endpoints": [
{
"name": "OpenAI: GPT-4",
"model_name": "GPT-4",
"context_length": 8192,
"pricing": {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
},
"provider_name": "OpenAI",
"tag": "openai",
"quantization": "fp16",
"max_completion_tokens": 4096,
"max_prompt_tokens": 8192,
"supported_parameters": [
"temperature",
"top_p",
"max_tokens",
"frequency_penalty",
"presence_penalty"
],
"status": "default",
"uptime_last_30m": 99.5,
"supports_implicit_caching": true,
"latency_last_30m": {
"p50": 0.25,
"p75": 0.35,
"p90": 0.48,
"p99": 0.85
},
"throughput_last_30m": {
"p50": 45.2,
"p75": 38.5,
"p90": 28.3,
"p99": 15.1
}
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/listendpointszdrresponse.md b/docs/models/operations/listendpointszdrresponse.md index 5109a585..5eddc968 100644 --- a/docs/models/operations/listendpointszdrresponse.md +++ b/docs/models/operations/listendpointszdrresponse.md @@ -29,6 +29,18 @@ let value: ListEndpointsZdrResponse = { ], uptimeLast30m: 99.5, supportsImplicitCaching: true, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + throughputLast30m: { + p50: 45.2, + p75: 38.5, + p90: 28.3, + p99: 15.1, + }, }, ], }; diff --git a/docs/models/percentilelatencycutoffs.md b/docs/models/percentilelatencycutoffs.md new file mode 100644 index 00000000..285bbe7a --- /dev/null +++ b/docs/models/percentilelatencycutoffs.md @@ -0,0 +1,20 @@ +# PercentileLatencyCutoffs + +Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + +## Example Usage + +```typescript +import { PercentileLatencyCutoffs } from "@openrouter/sdk/models"; + +let value: PercentileLatencyCutoffs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `p50` | *number* | :heavy_minus_sign: | Maximum p50 latency (seconds) | +| `p75` | *number* | :heavy_minus_sign: | Maximum p75 latency (seconds) | +| `p90` | *number* | :heavy_minus_sign: | Maximum p90 latency (seconds) | +| `p99` | *number* | :heavy_minus_sign: | Maximum p99 latency (seconds) | \ No newline at end of file diff --git a/docs/models/percentilestats.md b/docs/models/percentilestats.md new file mode 100644 index 00000000..9aad100b --- /dev/null +++ b/docs/models/percentilestats.md @@ -0,0 +1,25 @@ +# PercentileStats + +Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + +## Example Usage + +```typescript +import { PercentileStats } from "@openrouter/sdk/models"; + +let value: PercentileStats = { + p50: 25.5, + p75: 35.2, + p90: 48.7, + p99: 85.3, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `p50` | *number* | :heavy_check_mark: | Median (50th percentile) | 25.5 | +| `p75` | *number* | :heavy_check_mark: | 75th percentile | 35.2 | +| `p90` | *number* | :heavy_check_mark: | 90th percentile | 48.7 | +| `p99` | *number* | :heavy_check_mark: | 99th percentile | 85.3 | \ No newline at end of file diff --git a/docs/models/percentilethroughputcutoffs.md b/docs/models/percentilethroughputcutoffs.md new file mode 100644 index 00000000..ebaceb6e --- /dev/null +++ b/docs/models/percentilethroughputcutoffs.md @@ -0,0 +1,20 @@ +# PercentileThroughputCutoffs + +Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + +## Example Usage + +```typescript +import { PercentileThroughputCutoffs } from "@openrouter/sdk/models"; + +let value: PercentileThroughputCutoffs = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `p50` | *number* | :heavy_minus_sign: | Minimum p50 throughput (tokens/sec) | +| `p75` | *number* | :heavy_minus_sign: | Minimum p75 throughput (tokens/sec) | +| `p90` | *number* | :heavy_minus_sign: | Minimum p90 throughput (tokens/sec) | +| `p99` | *number* | :heavy_minus_sign: | Minimum p99 throughput (tokens/sec) | \ No newline at end of file diff --git a/docs/models/preferredmaxlatency.md b/docs/models/preferredmaxlatency.md new file mode 100644 index 00000000..9c2854b0 --- /dev/null +++ b/docs/models/preferredmaxlatency.md @@ -0,0 +1,25 @@ +# PreferredMaxLatency + +Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + + +## Supported Types + +### `number` + +```typescript +const value: number = 5; +``` + +### `models.PercentileLatencyCutoffs` + +```typescript +const value: models.PercentileLatencyCutoffs = {}; +``` + +### `any` + +```typescript +const value: any = 5; +``` + diff --git a/docs/models/preferredminthroughput.md b/docs/models/preferredminthroughput.md new file mode 100644 index 00000000..90581244 --- /dev/null +++ b/docs/models/preferredminthroughput.md @@ -0,0 +1,25 @@ +# PreferredMinThroughput + +Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + + +## Supported Types + +### `number` + +```typescript +const value: number = 100; +``` + +### `models.PercentileThroughputCutoffs` + +```typescript +const value: models.PercentileThroughputCutoffs = {}; +``` + +### `any` + +```typescript +const value: any = 100; +``` + diff --git a/docs/models/prompttokensdetails.md b/docs/models/prompttokensdetails.md index c01910fe..6b96206e 100644 --- a/docs/models/prompttokensdetails.md +++ b/docs/models/prompttokensdetails.md @@ -13,5 +13,6 @@ let value: PromptTokensDetails = {}; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `cachedTokens` | *number* | :heavy_minus_sign: | N/A | +| `cacheWriteTokens` | *number* | :heavy_minus_sign: | N/A | | `audioTokens` | *number* | :heavy_minus_sign: | N/A | | `videoTokens` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/providername.md b/docs/models/providername.md index ec7473ac..a7c2ff6f 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" | "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" | "GoPomelo" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "InferenceNet" | "Infermatic" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "SiliconFlow" | "Sourceful" | "Stealth" | "StreamLake" | "Switchpoint" | "Targon" | "Together" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AI21" | "AionLabs" | "Alibaba" | "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" | "Infermatic" | "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" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/providerpreferences.md b/docs/models/providerpreferences.md index ef7cdab2..029880ce 100644 --- a/docs/models/providerpreferences.md +++ b/docs/models/providerpreferences.md @@ -12,20 +12,18 @@ let value: ProviderPreferences = {}; ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | -| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | -| `dataCollection` | [models.DataCollection](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | -| `zdr` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | -| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | -| `order` | *models.ProviderPreferencesOrder*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | -| `only` | *models.ProviderPreferencesOnly*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | -| `ignore` | *models.ProviderPreferencesIgnore*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | -| `quantizations` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | -| `sort` | *models.ProviderPreferencesSortUnion* | :heavy_minus_sign: | N/A | | -| `maxPrice` | [models.ProviderPreferencesMaxPrice](../models/providerpreferencesmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | -| `preferredMinThroughput` | *number* | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | -| `preferredMaxLatency` | *number* | :heavy_minus_sign: | Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | -| ~~`minThroughput`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_min_throughput instead..

**DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. | 100 | -| ~~`maxLatency`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: Use preferred_max_latency instead..

**DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. | 5 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowFallbacks` | *boolean* | :heavy_minus_sign: | Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
| | +| `requireParameters` | *boolean* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. | | +| `dataCollection` | [models.DataCollection](../models/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it

- deny: use only providers which do not collect user data. | allow | +| `zdr` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | +| `enforceDistillableText` | *boolean* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true | +| `order` | *models.ProviderPreferencesOrder*[] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | | +| `only` | *models.ProviderPreferencesOnly*[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | | +| `ignore` | *models.ProviderPreferencesIgnore*[] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | | +| `quantizations` | [models.Quantization](../models/quantization.md)[] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | | +| `sort` | *models.ProviderPreferencesSortUnion* | :heavy_minus_sign: | N/A | | +| `maxPrice` | [models.ProviderPreferencesMaxPrice](../models/providerpreferencesmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | | +| `preferredMinThroughput` | *models.PreferredMinThroughput* | :heavy_minus_sign: | Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 100 | +| `preferredMaxLatency` | *models.PreferredMaxLatency* | :heavy_minus_sign: | Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. | 5 | \ No newline at end of file diff --git a/docs/models/publicendpoint.md b/docs/models/publicendpoint.md index 4e510942..e60f52d6 100644 --- a/docs/models/publicendpoint.md +++ b/docs/models/publicendpoint.md @@ -27,23 +27,37 @@ let value: PublicEndpoint = { ], uptimeLast30m: 99.5, supportsImplicitCaching: true, + latencyLast30m: { + p50: 0.25, + p75: 0.35, + p90: 0.48, + p99: 0.85, + }, + throughputLast30m: { + p50: 45.2, + p75: 38.5, + p90: 28.3, + p99: 15.1, + }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | | -| `modelName` | *string* | :heavy_check_mark: | N/A | | -| `contextLength` | *number* | :heavy_check_mark: | N/A | | -| `pricing` | [models.Pricing](../models/pricing.md) | :heavy_check_mark: | N/A | | -| `providerName` | [models.ProviderName](../models/providername.md) | :heavy_check_mark: | N/A | OpenAI | -| `tag` | *string* | :heavy_check_mark: | N/A | | -| `quantization` | [models.PublicEndpointQuantization](../models/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 | -| `maxCompletionTokens` | *number* | :heavy_check_mark: | N/A | | -| `maxPromptTokens` | *number* | :heavy_check_mark: | N/A | | -| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | N/A | | -| `status` | [models.EndpointStatus](../models/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | -| `uptimeLast30m` | *number* | :heavy_check_mark: | N/A | | -| `supportsImplicitCaching` | *boolean* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | | +| `modelName` | *string* | :heavy_check_mark: | N/A | | +| `contextLength` | *number* | :heavy_check_mark: | N/A | | +| `pricing` | [models.Pricing](../models/pricing.md) | :heavy_check_mark: | N/A | | +| `providerName` | [models.ProviderName](../models/providername.md) | :heavy_check_mark: | N/A | OpenAI | +| `tag` | *string* | :heavy_check_mark: | N/A | | +| `quantization` | [models.PublicEndpointQuantization](../models/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 | +| `maxCompletionTokens` | *number* | :heavy_check_mark: | N/A | | +| `maxPromptTokens` | *number* | :heavy_check_mark: | N/A | | +| `supportedParameters` | [models.Parameter](../models/parameter.md)[] | :heavy_check_mark: | N/A | | +| `status` | [models.EndpointStatus](../models/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 | +| `uptimeLast30m` | *number* | :heavy_check_mark: | N/A | | +| `supportsImplicitCaching` | *boolean* | :heavy_check_mark: | N/A | | +| `latencyLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | | +| `throughputLast30m` | [models.PercentileStats](../models/percentilestats.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/responsesoutputitemreasoning.md b/docs/models/responsesoutputitemreasoning.md index 21f77c8e..72074b6c 100644 --- a/docs/models/responsesoutputitemreasoning.md +++ b/docs/models/responsesoutputitemreasoning.md @@ -21,11 +21,13 @@ let value: ResponsesOutputItemReasoning = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | [models.ResponsesOutputItemReasoningType](../models/responsesoutputitemreasoningtype.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.ResponsesOutputItemReasoningStatusUnion* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `type` | [models.ResponsesOutputItemReasoningType](../models/responsesoutputitemreasoningtype.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.ResponsesOutputItemReasoningStatusUnion* | :heavy_minus_sign: | N/A | | +| `signature` | *string* | :heavy_minus_sign: | A signature for the reasoning content, used for verification | EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... | +| `format` | [models.ResponsesOutputItemReasoningFormat](../models/responsesoutputitemreasoningformat.md) | :heavy_minus_sign: | The format of the reasoning content | anthropic-claude-v1 | \ No newline at end of file diff --git a/docs/models/responsesoutputitemreasoningformat.md b/docs/models/responsesoutputitemreasoningformat.md new file mode 100644 index 00000000..baaa591a --- /dev/null +++ b/docs/models/responsesoutputitemreasoningformat.md @@ -0,0 +1,19 @@ +# ResponsesOutputItemReasoningFormat + +The format of the reasoning content + +## Example Usage + +```typescript +import { ResponsesOutputItemReasoningFormat } from "@openrouter/sdk/models"; + +let value: ResponsesOutputItemReasoningFormat = "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/responsesoutputmodality.md b/docs/models/responsesoutputmodality.md new file mode 100644 index 00000000..dacf9f82 --- /dev/null +++ b/docs/models/responsesoutputmodality.md @@ -0,0 +1,17 @@ +# ResponsesOutputModality + +## Example Usage + +```typescript +import { ResponsesOutputModality } from "@openrouter/sdk/models"; + +let value: ResponsesOutputModality = "image"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"text" | "image" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/schema0enum.md b/docs/models/schema0enum.md index 2cf06689..38744252 100644 --- a/docs/models/schema0enum.md +++ b/docs/models/schema0enum.md @@ -13,5 +13,5 @@ let value: Schema0Enum = "WandB"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AI21" | "AionLabs" | "Alibaba" | "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" | "GoPomelo" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "InferenceNet" | "Infermatic" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "SiliconFlow" | "Sourceful" | "Stealth" | "StreamLake" | "Switchpoint" | "Targon" | "Together" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AI21" | "AionLabs" | "Alibaba" | "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" | "Infermatic" | "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" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/schema5.md b/docs/models/schema5.md index fc01ed81..3c5e2232 100644 --- a/docs/models/schema5.md +++ b/docs/models/schema5.md @@ -13,5 +13,5 @@ let value: Schema5 = "google-gemini-v1"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"unknown" | "openai-responses-v1" | "xai-responses-v1" | "anthropic-claude-v1" | "google-gemini-v1" | Unrecognized +"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/src/models/chatgenerationparams.ts b/src/models/chatgenerationparams.ts index 6f601cc6..a1a266db 100644 --- a/src/models/chatgenerationparams.ts +++ b/src/models/chatgenerationparams.ts @@ -79,6 +79,28 @@ export type ChatGenerationParamsMaxPrice = { request?: any | undefined; }; +export type ChatGenerationParamsPreferredMinThroughput = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +export type ChatGenerationParamsPreferredMinThroughputUnion = + | number + | ChatGenerationParamsPreferredMinThroughput; + +export type ChatGenerationParamsPreferredMaxLatency = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +export type ChatGenerationParamsPreferredMaxLatencyUnion = + | number + | ChatGenerationParamsPreferredMaxLatency; + export type ChatGenerationParamsProvider = { /** * Whether to allow backup providers to serve requests @@ -127,10 +149,22 @@ export type ChatGenerationParamsProvider = { * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. */ maxPrice?: ChatGenerationParamsMaxPrice | undefined; - preferredMinThroughput?: number | null | undefined; - preferredMaxLatency?: number | null | undefined; - minThroughput?: number | null | undefined; - maxLatency?: number | null | undefined; + /** + * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + */ + preferredMinThroughput?: + | number + | ChatGenerationParamsPreferredMinThroughput + | null + | undefined; + /** + * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + */ + preferredMaxLatency?: + | number + | ChatGenerationParamsPreferredMaxLatency + | null + | undefined; }; export type ChatGenerationParamsPluginResponseHealing = { @@ -173,7 +207,14 @@ export type ChatGenerationParamsPluginModeration = { id: "moderation"; }; +export type ChatGenerationParamsPluginAutoRouter = { + id: "auto-router"; + enabled?: boolean | undefined; + allowedModels?: Array | undefined; +}; + export type ChatGenerationParamsPluginUnion = + | ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser @@ -225,6 +266,14 @@ export type Debug = { echoUpstreamBody?: boolean | undefined; }; +export type ChatGenerationParamsImageConfig = string | number; + +export const Modality = { + Text: "text", + Image: "image", +} as const; +export type Modality = OpenEnum; + export type ChatGenerationParams = { /** * When multiple model providers are available, optionally indicate your routing preference. @@ -235,6 +284,7 @@ export type ChatGenerationParams = { */ plugins?: | Array< + | ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser @@ -275,6 +325,8 @@ export type ChatGenerationParams = { tools?: Array | undefined; topP?: number | null | undefined; debug?: Debug | undefined; + imageConfig?: { [k: string]: string | number } | undefined; + modalities?: Array | undefined; }; /** @internal */ @@ -318,6 +370,119 @@ export function chatGenerationParamsMaxPriceToJSON( ); } +/** @internal */ +export type ChatGenerationParamsPreferredMinThroughput$Outbound = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +/** @internal */ +export const ChatGenerationParamsPreferredMinThroughput$outboundSchema: + z.ZodType< + ChatGenerationParamsPreferredMinThroughput$Outbound, + ChatGenerationParamsPreferredMinThroughput + > = z.object({ + p50: z.nullable(z.number()).optional(), + p75: z.nullable(z.number()).optional(), + p90: z.nullable(z.number()).optional(), + p99: z.nullable(z.number()).optional(), + }); + +export function chatGenerationParamsPreferredMinThroughputToJSON( + chatGenerationParamsPreferredMinThroughput: + ChatGenerationParamsPreferredMinThroughput, +): string { + return JSON.stringify( + ChatGenerationParamsPreferredMinThroughput$outboundSchema.parse( + chatGenerationParamsPreferredMinThroughput, + ), + ); +} + +/** @internal */ +export type ChatGenerationParamsPreferredMinThroughputUnion$Outbound = + | number + | ChatGenerationParamsPreferredMinThroughput$Outbound; + +/** @internal */ +export const ChatGenerationParamsPreferredMinThroughputUnion$outboundSchema: + z.ZodType< + ChatGenerationParamsPreferredMinThroughputUnion$Outbound, + ChatGenerationParamsPreferredMinThroughputUnion + > = z.union([ + z.number(), + z.lazy(() => ChatGenerationParamsPreferredMinThroughput$outboundSchema), + ]); + +export function chatGenerationParamsPreferredMinThroughputUnionToJSON( + chatGenerationParamsPreferredMinThroughputUnion: + ChatGenerationParamsPreferredMinThroughputUnion, +): string { + return JSON.stringify( + ChatGenerationParamsPreferredMinThroughputUnion$outboundSchema.parse( + chatGenerationParamsPreferredMinThroughputUnion, + ), + ); +} + +/** @internal */ +export type ChatGenerationParamsPreferredMaxLatency$Outbound = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +/** @internal */ +export const ChatGenerationParamsPreferredMaxLatency$outboundSchema: z.ZodType< + ChatGenerationParamsPreferredMaxLatency$Outbound, + ChatGenerationParamsPreferredMaxLatency +> = z.object({ + p50: z.nullable(z.number()).optional(), + p75: z.nullable(z.number()).optional(), + p90: z.nullable(z.number()).optional(), + p99: z.nullable(z.number()).optional(), +}); + +export function chatGenerationParamsPreferredMaxLatencyToJSON( + chatGenerationParamsPreferredMaxLatency: + ChatGenerationParamsPreferredMaxLatency, +): string { + return JSON.stringify( + ChatGenerationParamsPreferredMaxLatency$outboundSchema.parse( + chatGenerationParamsPreferredMaxLatency, + ), + ); +} + +/** @internal */ +export type ChatGenerationParamsPreferredMaxLatencyUnion$Outbound = + | number + | ChatGenerationParamsPreferredMaxLatency$Outbound; + +/** @internal */ +export const ChatGenerationParamsPreferredMaxLatencyUnion$outboundSchema: + z.ZodType< + ChatGenerationParamsPreferredMaxLatencyUnion$Outbound, + ChatGenerationParamsPreferredMaxLatencyUnion + > = z.union([ + z.number(), + z.lazy(() => ChatGenerationParamsPreferredMaxLatency$outboundSchema), + ]); + +export function chatGenerationParamsPreferredMaxLatencyUnionToJSON( + chatGenerationParamsPreferredMaxLatencyUnion: + ChatGenerationParamsPreferredMaxLatencyUnion, +): string { + return JSON.stringify( + ChatGenerationParamsPreferredMaxLatencyUnion$outboundSchema.parse( + chatGenerationParamsPreferredMaxLatencyUnion, + ), + ); +} + /** @internal */ export type ChatGenerationParamsProvider$Outbound = { allow_fallbacks?: boolean | null | undefined; @@ -331,10 +496,16 @@ export type ChatGenerationParamsProvider$Outbound = { quantizations?: Array | null | undefined; sort?: ProviderSortUnion$Outbound | null | undefined; max_price?: ChatGenerationParamsMaxPrice$Outbound | undefined; - preferred_min_throughput?: number | null | undefined; - preferred_max_latency?: number | null | undefined; - min_throughput?: number | null | undefined; - max_latency?: number | null | undefined; + preferred_min_throughput?: + | number + | ChatGenerationParamsPreferredMinThroughput$Outbound + | null + | undefined; + preferred_max_latency?: + | number + | ChatGenerationParamsPreferredMaxLatency$Outbound + | null + | undefined; }; /** @internal */ @@ -355,10 +526,18 @@ export const ChatGenerationParamsProvider$outboundSchema: z.ZodType< sort: z.nullable(ProviderSortUnion$outboundSchema).optional(), maxPrice: z.lazy(() => ChatGenerationParamsMaxPrice$outboundSchema) .optional(), - preferredMinThroughput: z.nullable(z.number()).optional(), - preferredMaxLatency: z.nullable(z.number()).optional(), - minThroughput: z.nullable(z.number()).optional(), - maxLatency: z.nullable(z.number()).optional(), + preferredMinThroughput: z.nullable( + z.union([ + z.number(), + z.lazy(() => ChatGenerationParamsPreferredMinThroughput$outboundSchema), + ]), + ).optional(), + preferredMaxLatency: z.nullable( + z.union([ + z.number(), + z.lazy(() => ChatGenerationParamsPreferredMaxLatency$outboundSchema), + ]), + ).optional(), }).transform((v) => { return remap$(v, { allowFallbacks: "allow_fallbacks", @@ -368,8 +547,6 @@ export const ChatGenerationParamsProvider$outboundSchema: z.ZodType< maxPrice: "max_price", preferredMinThroughput: "preferred_min_throughput", preferredMaxLatency: "preferred_max_latency", - minThroughput: "min_throughput", - maxLatency: "max_latency", }); }); @@ -518,8 +695,40 @@ export function chatGenerationParamsPluginModerationToJSON( ); } +/** @internal */ +export type ChatGenerationParamsPluginAutoRouter$Outbound = { + id: "auto-router"; + enabled?: boolean | undefined; + allowed_models?: Array | undefined; +}; + +/** @internal */ +export const ChatGenerationParamsPluginAutoRouter$outboundSchema: z.ZodType< + ChatGenerationParamsPluginAutoRouter$Outbound, + ChatGenerationParamsPluginAutoRouter +> = z.object({ + id: z.literal("auto-router"), + enabled: z.boolean().optional(), + allowedModels: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + }); +}); + +export function chatGenerationParamsPluginAutoRouterToJSON( + chatGenerationParamsPluginAutoRouter: ChatGenerationParamsPluginAutoRouter, +): string { + return JSON.stringify( + ChatGenerationParamsPluginAutoRouter$outboundSchema.parse( + chatGenerationParamsPluginAutoRouter, + ), + ); +} + /** @internal */ export type ChatGenerationParamsPluginUnion$Outbound = + | ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound @@ -530,6 +739,7 @@ export const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType< ChatGenerationParamsPluginUnion$Outbound, ChatGenerationParamsPluginUnion > = z.union([ + z.lazy(() => ChatGenerationParamsPluginAutoRouter$outboundSchema), z.lazy(() => ChatGenerationParamsPluginModeration$outboundSchema), z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema), z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema), @@ -712,11 +922,35 @@ export function debugToJSON(debug: Debug): string { return JSON.stringify(Debug$outboundSchema.parse(debug)); } +/** @internal */ +export type ChatGenerationParamsImageConfig$Outbound = string | number; + +/** @internal */ +export const ChatGenerationParamsImageConfig$outboundSchema: z.ZodType< + ChatGenerationParamsImageConfig$Outbound, + ChatGenerationParamsImageConfig +> = z.union([z.string(), z.number()]); + +export function chatGenerationParamsImageConfigToJSON( + chatGenerationParamsImageConfig: ChatGenerationParamsImageConfig, +): string { + return JSON.stringify( + ChatGenerationParamsImageConfig$outboundSchema.parse( + chatGenerationParamsImageConfig, + ), + ); +} + +/** @internal */ +export const Modality$outboundSchema: z.ZodType = openEnums + .outboundSchema(Modality); + /** @internal */ export type ChatGenerationParams$Outbound = { provider?: ChatGenerationParamsProvider$Outbound | null | undefined; plugins?: | Array< + | ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound @@ -754,6 +988,8 @@ export type ChatGenerationParams$Outbound = { tools?: Array | undefined; top_p?: number | null | undefined; debug?: Debug$Outbound | undefined; + image_config?: { [k: string]: string | number } | undefined; + modalities?: Array | undefined; }; /** @internal */ @@ -766,6 +1002,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< ).optional(), plugins: z.array( z.union([ + z.lazy(() => ChatGenerationParamsPluginAutoRouter$outboundSchema), z.lazy(() => ChatGenerationParamsPluginModeration$outboundSchema), z.lazy(() => ChatGenerationParamsPluginWeb$outboundSchema), z.lazy(() => ChatGenerationParamsPluginFileParser$outboundSchema), @@ -803,6 +1040,9 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< tools: z.array(ToolDefinitionJson$outboundSchema).optional(), topP: z.nullable(z.number()).optional(), debug: z.lazy(() => Debug$outboundSchema).optional(), + imageConfig: z.record(z.string(), z.union([z.string(), z.number()])) + .optional(), + modalities: z.array(Modality$outboundSchema).optional(), }).transform((v) => { return remap$(v, { sessionId: "session_id", @@ -816,6 +1056,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< streamOptions: "stream_options", toolChoice: "tool_choice", topP: "top_p", + imageConfig: "image_config", }); }); diff --git a/src/models/chatgenerationtokenusage.ts b/src/models/chatgenerationtokenusage.ts index 07e1115a..a2c30cf8 100644 --- a/src/models/chatgenerationtokenusage.ts +++ b/src/models/chatgenerationtokenusage.ts @@ -18,6 +18,7 @@ export type CompletionTokensDetails = { export type PromptTokensDetails = { cachedTokens?: number | undefined; + cacheWriteTokens?: number | undefined; audioTokens?: number | undefined; videoTokens?: number | undefined; }; @@ -64,11 +65,13 @@ export const PromptTokensDetails$inboundSchema: z.ZodType< unknown > = z.object({ cached_tokens: z.number().optional(), + cache_write_tokens: z.number().optional(), audio_tokens: z.number().optional(), video_tokens: z.number().optional(), }).transform((v) => { return remap$(v, { "cached_tokens": "cachedTokens", + "cache_write_tokens": "cacheWriteTokens", "audio_tokens": "audioTokens", "video_tokens": "videoTokens", }); diff --git a/src/models/index.ts b/src/models/index.ts index f8e040d1..fcf52336 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -102,7 +102,12 @@ export * from "./payloadtoolargeresponseerrordata.js"; export * from "./paymentrequiredresponseerrordata.js"; export * from "./pdfparserengine.js"; export * from "./pdfparseroptions.js"; +export * from "./percentilelatencycutoffs.js"; +export * from "./percentilestats.js"; +export * from "./percentilethroughputcutoffs.js"; export * from "./perrequestlimits.js"; +export * from "./preferredmaxlatency.js"; +export * from "./preferredminthroughput.js"; export * from "./providername.js"; export * from "./provideroverloadedresponseerrordata.js"; export * from "./providerpreferences.js"; @@ -134,6 +139,7 @@ export * from "./responsesoutputitemfilesearchcall.js"; export * from "./responsesoutputitemfunctioncall.js"; export * from "./responsesoutputitemreasoning.js"; export * from "./responsesoutputmessage.js"; +export * from "./responsesoutputmodality.js"; export * from "./responsessearchcontextsize.js"; export * from "./responseswebsearchcalloutput.js"; export * from "./responseswebsearchuserlocation.js"; diff --git a/src/models/openresponsesreasoning.ts b/src/models/openresponsesreasoning.ts index 2bf9ff6b..416b8786 100644 --- a/src/models/openresponsesreasoning.ts +++ b/src/models/openresponsesreasoning.ts @@ -54,6 +54,7 @@ export type OpenResponsesReasoningStatusUnion = export const OpenResponsesReasoningFormat = { Unknown: "unknown", OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", XaiResponsesV1: "xai-responses-v1", AnthropicClaudeV1: "anthropic-claude-v1", GoogleGeminiV1: "google-gemini-v1", diff --git a/src/models/openresponsesrequest.ts b/src/models/openresponsesrequest.ts index b415f732..26e29760 100644 --- a/src/models/openresponsesrequest.ts +++ b/src/models/openresponsesrequest.ts @@ -65,6 +65,16 @@ import { PDFParserOptions$Outbound, PDFParserOptions$outboundSchema, } from "./pdfparseroptions.js"; +import { + PreferredMaxLatency, + PreferredMaxLatency$Outbound, + PreferredMaxLatency$outboundSchema, +} from "./preferredmaxlatency.js"; +import { + PreferredMinThroughput, + PreferredMinThroughput$Outbound, + PreferredMinThroughput$outboundSchema, +} from "./preferredminthroughput.js"; import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; import { @@ -73,6 +83,10 @@ import { ProviderSortConfig$outboundSchema, } from "./providersortconfig.js"; import { Quantization, Quantization$outboundSchema } from "./quantization.js"; +import { + ResponsesOutputModality, + ResponsesOutputModality$outboundSchema, +} from "./responsesoutputmodality.js"; import { WebSearchEngine, WebSearchEngine$outboundSchema, @@ -96,6 +110,8 @@ export type OpenResponsesRequestToolUnion = | OpenResponsesWebSearchTool | OpenResponsesWebSearch20250826Tool; +export type OpenResponsesRequestImageConfig = string | number; + export const ServiceTier = { Auto: "auto", } as const; @@ -202,25 +218,13 @@ export type OpenResponsesRequestProvider = { */ maxPrice?: OpenResponsesRequestMaxPrice | undefined; /** - * Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ - preferredMinThroughput?: number | null | undefined; + preferredMinThroughput?: PreferredMinThroughput | null | undefined; /** - * Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - */ - preferredMaxLatency?: number | null | undefined; - /** - * **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. - * - * @deprecated field: Use preferred_min_throughput instead.. + * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ - minThroughput?: number | null | undefined; - /** - * **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. - * - * @deprecated field: Use preferred_max_latency instead.. - */ - maxLatency?: number | null | undefined; + preferredMaxLatency?: PreferredMaxLatency | null | undefined; }; export type OpenResponsesRequestPluginResponseHealing = { @@ -261,7 +265,20 @@ export type OpenResponsesRequestPluginModeration = { id: "moderation"; }; +export type OpenResponsesRequestPluginAutoRouter = { + id: "auto-router"; + /** + * Set to false to disable the auto-router plugin for this request. Defaults to true. + */ + enabled?: boolean | undefined; + /** + * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list. + */ + allowedModels?: Array | undefined; +}; + export type OpenResponsesRequestPluginUnion = + | OpenResponsesRequestPluginAutoRouter | OpenResponsesRequestPluginModeration | OpenResponsesRequestPluginWeb | OpenResponsesRequestPluginFileParser @@ -305,6 +322,14 @@ export type OpenResponsesRequest = { temperature?: number | null | undefined; topP?: number | null | undefined; topK?: number | undefined; + /** + * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details. + */ + imageConfig?: { [k: string]: string | number } | undefined; + /** + * Output modalities for the response. Supported values are "text" and "image". + */ + modalities?: Array | undefined; promptCacheKey?: string | null | undefined; previousResponseId?: string | null | undefined; prompt?: OpenAIResponsesPrompt | null | undefined; @@ -324,6 +349,7 @@ export type OpenResponsesRequest = { */ plugins?: | Array< + | OpenResponsesRequestPluginAutoRouter | OpenResponsesRequestPluginModeration | OpenResponsesRequestPluginWeb | OpenResponsesRequestPluginFileParser @@ -401,6 +427,25 @@ export function openResponsesRequestToolUnionToJSON( ); } +/** @internal */ +export type OpenResponsesRequestImageConfig$Outbound = string | number; + +/** @internal */ +export const OpenResponsesRequestImageConfig$outboundSchema: z.ZodType< + OpenResponsesRequestImageConfig$Outbound, + OpenResponsesRequestImageConfig +> = z.union([z.string(), z.number()]); + +export function openResponsesRequestImageConfigToJSON( + openResponsesRequestImageConfig: OpenResponsesRequestImageConfig, +): string { + return JSON.stringify( + OpenResponsesRequestImageConfig$outboundSchema.parse( + openResponsesRequestImageConfig, + ), + ); +} + /** @internal */ export const ServiceTier$outboundSchema: z.ZodEnum = z.enum( ServiceTier, @@ -529,10 +574,8 @@ export type OpenResponsesRequestProvider$Outbound = { quantizations?: Array | null | undefined; sort?: string | ProviderSortConfig$Outbound | any | null | undefined; max_price?: OpenResponsesRequestMaxPrice$Outbound | undefined; - preferred_min_throughput?: number | null | undefined; - preferred_max_latency?: number | null | undefined; - min_throughput?: number | null | undefined; - max_latency?: number | null | undefined; + preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; + preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; }; /** @internal */ @@ -562,10 +605,10 @@ export const OpenResponsesRequestProvider$outboundSchema: z.ZodType< ).optional(), maxPrice: z.lazy(() => OpenResponsesRequestMaxPrice$outboundSchema) .optional(), - preferredMinThroughput: z.nullable(z.number()).optional(), - preferredMaxLatency: z.nullable(z.number()).optional(), - minThroughput: z.nullable(z.number()).optional(), - maxLatency: z.nullable(z.number()).optional(), + preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) + .optional(), + preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { allowFallbacks: "allow_fallbacks", @@ -575,8 +618,6 @@ export const OpenResponsesRequestProvider$outboundSchema: z.ZodType< maxPrice: "max_price", preferredMinThroughput: "preferred_min_throughput", preferredMaxLatency: "preferred_max_latency", - minThroughput: "min_throughput", - maxLatency: "max_latency", }); }); @@ -703,8 +744,40 @@ export function openResponsesRequestPluginModerationToJSON( ); } +/** @internal */ +export type OpenResponsesRequestPluginAutoRouter$Outbound = { + id: "auto-router"; + enabled?: boolean | undefined; + allowed_models?: Array | undefined; +}; + +/** @internal */ +export const OpenResponsesRequestPluginAutoRouter$outboundSchema: z.ZodType< + OpenResponsesRequestPluginAutoRouter$Outbound, + OpenResponsesRequestPluginAutoRouter +> = z.object({ + id: z.literal("auto-router"), + enabled: z.boolean().optional(), + allowedModels: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + allowedModels: "allowed_models", + }); +}); + +export function openResponsesRequestPluginAutoRouterToJSON( + openResponsesRequestPluginAutoRouter: OpenResponsesRequestPluginAutoRouter, +): string { + return JSON.stringify( + OpenResponsesRequestPluginAutoRouter$outboundSchema.parse( + openResponsesRequestPluginAutoRouter, + ), + ); +} + /** @internal */ export type OpenResponsesRequestPluginUnion$Outbound = + | OpenResponsesRequestPluginAutoRouter$Outbound | OpenResponsesRequestPluginModeration$Outbound | OpenResponsesRequestPluginWeb$Outbound | OpenResponsesRequestPluginFileParser$Outbound @@ -715,6 +788,7 @@ export const OpenResponsesRequestPluginUnion$outboundSchema: z.ZodType< OpenResponsesRequestPluginUnion$Outbound, OpenResponsesRequestPluginUnion > = z.union([ + z.lazy(() => OpenResponsesRequestPluginAutoRouter$outboundSchema), z.lazy(() => OpenResponsesRequestPluginModeration$outboundSchema), z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema), z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema), @@ -755,6 +829,8 @@ export type OpenResponsesRequest$Outbound = { temperature?: number | null | undefined; top_p?: number | null | undefined; top_k?: number | undefined; + image_config?: { [k: string]: string | number } | undefined; + modalities?: Array | undefined; prompt_cache_key?: string | null | undefined; previous_response_id?: string | null | undefined; prompt?: OpenAIResponsesPrompt$Outbound | null | undefined; @@ -768,6 +844,7 @@ export type OpenResponsesRequest$Outbound = { provider?: OpenResponsesRequestProvider$Outbound | null | undefined; plugins?: | Array< + | OpenResponsesRequestPluginAutoRouter$Outbound | OpenResponsesRequestPluginModeration$Outbound | OpenResponsesRequestPluginWeb$Outbound | OpenResponsesRequestPluginFileParser$Outbound @@ -805,6 +882,9 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< temperature: z.nullable(z.number()).optional(), topP: z.nullable(z.number()).optional(), topK: z.number().optional(), + imageConfig: z.record(z.string(), z.union([z.string(), z.number()])) + .optional(), + modalities: z.array(ResponsesOutputModality$outboundSchema).optional(), promptCacheKey: z.nullable(z.string()).optional(), previousResponseId: z.nullable(z.string()).optional(), prompt: z.nullable(OpenAIResponsesPrompt$outboundSchema).optional(), @@ -821,6 +901,7 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< ).optional(), plugins: z.array( z.union([ + z.lazy(() => OpenResponsesRequestPluginAutoRouter$outboundSchema), z.lazy(() => OpenResponsesRequestPluginModeration$outboundSchema), z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema), z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema), @@ -836,6 +917,7 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< maxOutputTokens: "max_output_tokens", topP: "top_p", topK: "top_k", + imageConfig: "image_config", promptCacheKey: "prompt_cache_key", previousResponseId: "previous_response_id", safetyIdentifier: "safety_identifier", diff --git a/src/models/percentilelatencycutoffs.ts b/src/models/percentilelatencycutoffs.ts new file mode 100644 index 00000000..aea49c29 --- /dev/null +++ b/src/models/percentilelatencycutoffs.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ab5ef16080c7 + */ + +import * as z from "zod/v4"; + +/** + * Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + */ +export type PercentileLatencyCutoffs = { + /** + * Maximum p50 latency (seconds) + */ + p50?: number | null | undefined; + /** + * Maximum p75 latency (seconds) + */ + p75?: number | null | undefined; + /** + * Maximum p90 latency (seconds) + */ + p90?: number | null | undefined; + /** + * Maximum p99 latency (seconds) + */ + p99?: number | null | undefined; +}; + +/** @internal */ +export type PercentileLatencyCutoffs$Outbound = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +/** @internal */ +export const PercentileLatencyCutoffs$outboundSchema: z.ZodType< + PercentileLatencyCutoffs$Outbound, + PercentileLatencyCutoffs +> = z.object({ + p50: z.nullable(z.number()).optional(), + p75: z.nullable(z.number()).optional(), + p90: z.nullable(z.number()).optional(), + p99: z.nullable(z.number()).optional(), +}); + +export function percentileLatencyCutoffsToJSON( + percentileLatencyCutoffs: PercentileLatencyCutoffs, +): string { + return JSON.stringify( + PercentileLatencyCutoffs$outboundSchema.parse(percentileLatencyCutoffs), + ); +} diff --git a/src/models/percentilestats.ts b/src/models/percentilestats.ts new file mode 100644 index 00000000..9dfb13ad --- /dev/null +++ b/src/models/percentilestats.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f8001516363f + */ + +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"; + +/** + * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + */ +export type PercentileStats = { + /** + * Median (50th percentile) + */ + p50: number; + /** + * 75th percentile + */ + p75: number; + /** + * 90th percentile + */ + p90: number; + /** + * 99th percentile + */ + p99: number; +}; + +/** @internal */ +export const PercentileStats$inboundSchema: z.ZodType< + PercentileStats, + unknown +> = z.object({ + p50: z.number(), + p75: z.number(), + p90: z.number(), + p99: z.number(), +}); + +export function percentileStatsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PercentileStats$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PercentileStats' from JSON`, + ); +} diff --git a/src/models/percentilethroughputcutoffs.ts b/src/models/percentilethroughputcutoffs.ts new file mode 100644 index 00000000..64350cb9 --- /dev/null +++ b/src/models/percentilethroughputcutoffs.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 366b617b09b4 + */ + +import * as z from "zod/v4"; + +/** + * Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + */ +export type PercentileThroughputCutoffs = { + /** + * Minimum p50 throughput (tokens/sec) + */ + p50?: number | null | undefined; + /** + * Minimum p75 throughput (tokens/sec) + */ + p75?: number | null | undefined; + /** + * Minimum p90 throughput (tokens/sec) + */ + p90?: number | null | undefined; + /** + * Minimum p99 throughput (tokens/sec) + */ + p99?: number | null | undefined; +}; + +/** @internal */ +export type PercentileThroughputCutoffs$Outbound = { + p50?: number | null | undefined; + p75?: number | null | undefined; + p90?: number | null | undefined; + p99?: number | null | undefined; +}; + +/** @internal */ +export const PercentileThroughputCutoffs$outboundSchema: z.ZodType< + PercentileThroughputCutoffs$Outbound, + PercentileThroughputCutoffs +> = z.object({ + p50: z.nullable(z.number()).optional(), + p75: z.nullable(z.number()).optional(), + p90: z.nullable(z.number()).optional(), + p99: z.nullable(z.number()).optional(), +}); + +export function percentileThroughputCutoffsToJSON( + percentileThroughputCutoffs: PercentileThroughputCutoffs, +): string { + return JSON.stringify( + PercentileThroughputCutoffs$outboundSchema.parse( + percentileThroughputCutoffs, + ), + ); +} diff --git a/src/models/preferredmaxlatency.ts b/src/models/preferredmaxlatency.ts new file mode 100644 index 00000000..603f7d4a --- /dev/null +++ b/src/models/preferredmaxlatency.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 17fc19055e19 + */ + +import * as z from "zod/v4"; +import { + PercentileLatencyCutoffs, + PercentileLatencyCutoffs$Outbound, + PercentileLatencyCutoffs$outboundSchema, +} from "./percentilelatencycutoffs.js"; + +/** + * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + */ +export type PreferredMaxLatency = number | PercentileLatencyCutoffs | any; + +/** @internal */ +export type PreferredMaxLatency$Outbound = + | number + | PercentileLatencyCutoffs$Outbound + | any; + +/** @internal */ +export const PreferredMaxLatency$outboundSchema: z.ZodType< + PreferredMaxLatency$Outbound, + PreferredMaxLatency +> = z.union([z.number(), PercentileLatencyCutoffs$outboundSchema, z.any()]); + +export function preferredMaxLatencyToJSON( + preferredMaxLatency: PreferredMaxLatency, +): string { + return JSON.stringify( + PreferredMaxLatency$outboundSchema.parse(preferredMaxLatency), + ); +} diff --git a/src/models/preferredminthroughput.ts b/src/models/preferredminthroughput.ts new file mode 100644 index 00000000..d2180d16 --- /dev/null +++ b/src/models/preferredminthroughput.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 04b7597c84f9 + */ + +import * as z from "zod/v4"; +import { + PercentileThroughputCutoffs, + PercentileThroughputCutoffs$Outbound, + PercentileThroughputCutoffs$outboundSchema, +} from "./percentilethroughputcutoffs.js"; + +/** + * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + */ +export type PreferredMinThroughput = number | PercentileThroughputCutoffs | any; + +/** @internal */ +export type PreferredMinThroughput$Outbound = + | number + | PercentileThroughputCutoffs$Outbound + | any; + +/** @internal */ +export const PreferredMinThroughput$outboundSchema: z.ZodType< + PreferredMinThroughput$Outbound, + PreferredMinThroughput +> = z.union([z.number(), PercentileThroughputCutoffs$outboundSchema, z.any()]); + +export function preferredMinThroughputToJSON( + preferredMinThroughput: PreferredMinThroughput, +): string { + return JSON.stringify( + PreferredMinThroughput$outboundSchema.parse(preferredMinThroughput), + ); +} diff --git a/src/models/providername.ts b/src/models/providername.ts index db7996c0..3e7ccef8 100644 --- a/src/models/providername.ts +++ b/src/models/providername.ts @@ -34,12 +34,12 @@ export const ProviderName = { Fireworks: "Fireworks", Friendli: "Friendli", GMICloud: "GMICloud", - GoPomelo: "GoPomelo", Google: "Google", GoogleAIStudio: "Google AI Studio", Groq: "Groq", Hyperbolic: "Hyperbolic", Inception: "Inception", + Inceptron: "Inceptron", InferenceNet: "InferenceNet", Infermatic: "Infermatic", Inflection: "Inflection", @@ -64,13 +64,14 @@ export const ProviderName = { Phala: "Phala", Relace: "Relace", SambaNova: "SambaNova", + Seed: "Seed", SiliconFlow: "SiliconFlow", Sourceful: "Sourceful", Stealth: "Stealth", StreamLake: "StreamLake", Switchpoint: "Switchpoint", - Targon: "Targon", Together: "Together", + Upstage: "Upstage", Venice: "Venice", WandB: "WandB", Xiaomi: "Xiaomi", diff --git a/src/models/providerpreferences.ts b/src/models/providerpreferences.ts index d783498d..3d8656ba 100644 --- a/src/models/providerpreferences.ts +++ b/src/models/providerpreferences.ts @@ -11,6 +11,16 @@ import { DataCollection, DataCollection$outboundSchema, } from "./datacollection.js"; +import { + PreferredMaxLatency, + PreferredMaxLatency$Outbound, + PreferredMaxLatency$outboundSchema, +} from "./preferredmaxlatency.js"; +import { + PreferredMinThroughput, + PreferredMinThroughput$Outbound, + PreferredMinThroughput$outboundSchema, +} from "./preferredminthroughput.js"; import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; import { ProviderSort, ProviderSort$outboundSchema } from "./providersort.js"; import { Quantization, Quantization$outboundSchema } from "./quantization.js"; @@ -157,25 +167,13 @@ export type ProviderPreferences = { */ maxPrice?: ProviderPreferencesMaxPrice | undefined; /** - * Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - */ - preferredMinThroughput?: number | null | undefined; - /** - * Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. - */ - preferredMaxLatency?: number | null | undefined; - /** - * **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput. - * - * @deprecated field: Use preferred_min_throughput instead.. + * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ - minThroughput?: number | null | undefined; + preferredMinThroughput?: PreferredMinThroughput | null | undefined; /** - * **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency. - * - * @deprecated field: Use preferred_max_latency instead.. + * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. */ - maxLatency?: number | null | undefined; + preferredMaxLatency?: PreferredMaxLatency | null | undefined; }; /** @internal */ @@ -377,10 +375,8 @@ export type ProviderPreferences$Outbound = { | null | undefined; max_price?: ProviderPreferencesMaxPrice$Outbound | undefined; - preferred_min_throughput?: number | null | undefined; - preferred_max_latency?: number | null | undefined; - min_throughput?: number | null | undefined; - max_latency?: number | null | undefined; + preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined; + preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined; }; /** @internal */ @@ -412,10 +408,10 @@ export const ProviderPreferences$outboundSchema: z.ZodType< ]), ).optional(), maxPrice: z.lazy(() => ProviderPreferencesMaxPrice$outboundSchema).optional(), - preferredMinThroughput: z.nullable(z.number()).optional(), - preferredMaxLatency: z.nullable(z.number()).optional(), - minThroughput: z.nullable(z.number()).optional(), - maxLatency: z.nullable(z.number()).optional(), + preferredMinThroughput: z.nullable(PreferredMinThroughput$outboundSchema) + .optional(), + preferredMaxLatency: z.nullable(PreferredMaxLatency$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { allowFallbacks: "allow_fallbacks", @@ -425,8 +421,6 @@ export const ProviderPreferences$outboundSchema: z.ZodType< maxPrice: "max_price", preferredMinThroughput: "preferred_min_throughput", preferredMaxLatency: "preferred_max_latency", - minThroughput: "min_throughput", - maxLatency: "max_latency", }); }); diff --git a/src/models/publicendpoint.ts b/src/models/publicendpoint.ts index 23f47a30..ce4dda9f 100644 --- a/src/models/publicendpoint.ts +++ b/src/models/publicendpoint.ts @@ -15,6 +15,10 @@ import { } from "./endpointstatus.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { Parameter, Parameter$inboundSchema } from "./parameter.js"; +import { + PercentileStats, + PercentileStats$inboundSchema, +} from "./percentilestats.js"; import { ProviderName, ProviderName$inboundSchema } from "./providername.js"; export type Pricing = { @@ -101,6 +105,11 @@ export type PublicEndpoint = { status?: EndpointStatus | undefined; uptimeLast30m: number | null; supportsImplicitCaching: boolean; + /** + * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. + */ + latencyLast30m: PercentileStats | null; + throughputLast30m: PercentileStats | null; }; /** @internal */ @@ -162,6 +171,8 @@ export const PublicEndpoint$inboundSchema: z.ZodType = status: EndpointStatus$inboundSchema.optional(), uptime_last_30m: z.nullable(z.number()), supports_implicit_caching: z.boolean(), + latency_last_30m: z.nullable(PercentileStats$inboundSchema), + throughput_last_30m: z.nullable(PercentileStats$inboundSchema), }).transform((v) => { return remap$(v, { "model_name": "modelName", @@ -172,6 +183,8 @@ export const PublicEndpoint$inboundSchema: z.ZodType = "supported_parameters": "supportedParameters", "uptime_last_30m": "uptimeLast30m", "supports_implicit_caching": "supportsImplicitCaching", + "latency_last_30m": "latencyLast30m", + "throughput_last_30m": "throughputLast30m", }); }); diff --git a/src/models/responsesoutputitemreasoning.ts b/src/models/responsesoutputitemreasoning.ts index 60b06c0e..4304b7e1 100644 --- a/src/models/responsesoutputitemreasoning.ts +++ b/src/models/responsesoutputitemreasoning.ts @@ -6,7 +6,8 @@ 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 * 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"; import { @@ -55,6 +56,24 @@ export type ResponsesOutputItemReasoningStatusUnion = | ResponsesOutputItemReasoningStatusIncomplete | ResponsesOutputItemReasoningStatusInProgress; +/** + * The format of the reasoning content + */ +export const ResponsesOutputItemReasoningFormat = { + 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 ResponsesOutputItemReasoningFormat = OpenEnum< + typeof ResponsesOutputItemReasoningFormat +>; + /** * An output item containing reasoning */ @@ -69,6 +88,14 @@ export type ResponsesOutputItemReasoning = { | ResponsesOutputItemReasoningStatusIncomplete | ResponsesOutputItemReasoningStatusInProgress | undefined; + /** + * A signature for the reasoning content, used for verification + */ + signature?: string | null | undefined; + /** + * The format of the reasoning content + */ + format?: ResponsesOutputItemReasoningFormat | null | undefined; }; /** @internal */ @@ -161,6 +188,17 @@ export function responsesOutputItemReasoningStatusUnionFromJSON( ); } +/** @internal */ +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< ResponsesOutputItemReasoning, @@ -176,6 +214,9 @@ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< ResponsesOutputItemReasoningStatusIncomplete$inboundSchema, ResponsesOutputItemReasoningStatusInProgress$inboundSchema, ]).optional(), + signature: z.nullable(z.string()).optional(), + format: z.nullable(ResponsesOutputItemReasoningFormat$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "encrypted_content": "encryptedContent", @@ -189,6 +230,8 @@ export type ResponsesOutputItemReasoning$Outbound = { summary: Array; encrypted_content?: string | null | undefined; status?: string | string | string | undefined; + signature?: string | null | undefined; + format?: string | null | undefined; }; /** @internal */ @@ -206,6 +249,9 @@ export const ResponsesOutputItemReasoning$outboundSchema: z.ZodType< 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", diff --git a/src/models/responsesoutputmodality.ts b/src/models/responsesoutputmodality.ts new file mode 100644 index 00000000..da588971 --- /dev/null +++ b/src/models/responsesoutputmodality.ts @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4f6019babb94 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +export const ResponsesOutputModality = { + Text: "text", + Image: "image", +} as const; +export type ResponsesOutputModality = OpenEnum; + +/** @internal */ +export const ResponsesOutputModality$outboundSchema: z.ZodType< + string, + ResponsesOutputModality +> = openEnums.outboundSchema(ResponsesOutputModality); diff --git a/src/models/schema0.ts b/src/models/schema0.ts index b2669445..2fc01894 100644 --- a/src/models/schema0.ts +++ b/src/models/schema0.ts @@ -34,12 +34,12 @@ export const Schema0Enum = { Fireworks: "Fireworks", Friendli: "Friendli", GMICloud: "GMICloud", - GoPomelo: "GoPomelo", Google: "Google", GoogleAIStudio: "Google AI Studio", Groq: "Groq", Hyperbolic: "Hyperbolic", Inception: "Inception", + Inceptron: "Inceptron", InferenceNet: "InferenceNet", Infermatic: "Infermatic", Inflection: "Inflection", @@ -64,13 +64,14 @@ export const Schema0Enum = { Phala: "Phala", Relace: "Relace", SambaNova: "SambaNova", + Seed: "Seed", SiliconFlow: "SiliconFlow", Sourceful: "Sourceful", Stealth: "Stealth", StreamLake: "StreamLake", Switchpoint: "Switchpoint", - Targon: "Targon", Together: "Together", + Upstage: "Upstage", Venice: "Venice", WandB: "WandB", Xiaomi: "Xiaomi", diff --git a/src/models/schema3.ts b/src/models/schema3.ts index 366ab7b1..bcd2d06a 100644 --- a/src/models/schema3.ts +++ b/src/models/schema3.ts @@ -13,6 +13,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export const Schema5 = { Unknown: "unknown", OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", XaiResponsesV1: "xai-responses-v1", AnthropicClaudeV1: "anthropic-claude-v1", GoogleGeminiV1: "google-gemini-v1",