diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2dfb6c46..e514346a 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: 120c7bd50799b56de18af00857c12323 docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.3.12 - configChecksum: cce50a3d7b5dd75b96087345547294f3 + releaseVersion: 0.3.14 + configChecksum: 87c16d84987e46f9fa5175fdaa9f27d4 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: ba629f9b-a13d-42b4-ae14-31b3a9f796d0 + pristine_commit_hash: 0c910f8d50c78a8b98dd0f9045160274f66e50e8 + pristine_tree_hash: c610add66b4de63f43b82dc14d6839f5b3c26e68 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 @@ -216,12 +240,16 @@ trackedFiles: pristine_git_object: 6853983e06def8a1a1928eaea953469e502981bb docs/models/chatmessagetokenlogprob.md: id: d4b24af16d32 - last_write_checksum: sha1:d73bf6f5185263b82203cb702ea88921ed0c557b - pristine_git_object: 2d09ed76f485592a7f3feaee6491ae38827b3182 + last_write_checksum: sha1:449d0392438ae9002fbe114bb70c6c17ff6972b5 + pristine_git_object: 886381e6209c6293d4c4d70633b6f4b0d1507a91 docs/models/chatmessagetokenlogprobs.md: id: e987211f8936 last_write_checksum: sha1:00220d98932f5ae1e4c24d4e9e47344175e8d68c pristine_git_object: 01cd792f73eb9609c3b65281cae43858f90e2945 + docs/models/chatmessagetokenlogprobtoplogprob.md: + id: e0875b3ca7c0 + last_write_checksum: sha1:687f38dfac49d7f7487cb96c33f6a05e96db665e + pristine_git_object: 766a215302c909def13c477abe085b43e444caed docs/models/chatmessagetoolcall.md: id: 8f50e7f37c2e last_write_checksum: sha1:f1dea21b85173ba18d87fd0bde883313d3cf964a @@ -468,8 +496,12 @@ 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/logprob.md: + id: 5a2841eb9a83 + last_write_checksum: sha1:0afee55ce697e0a37bf0f144ccc90baf49e88e2e + pristine_git_object: 3ba44ac20d009c1d6249925ed2d328f615d4b882 docs/models/message.md: id: a9614076792b last_write_checksum: sha1:22da043167de1d7f11be7b853fc301a8cd254d78 @@ -482,6 +514,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 @@ -692,16 +728,24 @@ trackedFiles: pristine_git_object: 76ff2a11e013076db454e95be5720f0735f48413 docs/models/openresponseseasyinputmessage.md: id: adc7a69b8fce - last_write_checksum: sha1:4100ec01038000f242fb6c053029083fa56f0b8f - pristine_git_object: 00b9d0cd4dd218aee8642f58124f8d14831a7230 - docs/models/openresponseseasyinputmessagecontent1.md: - id: e07a0cb548a0 - last_write_checksum: sha1:3eb2f296efa4b729a5fd0167d9eed478f1188c30 - pristine_git_object: 97371515b739c7900c01acb924847a4b87ef95bf - docs/models/openresponseseasyinputmessagecontent2.md: - id: 7d6906a9f8da - last_write_checksum: sha1:fbe9677c1f73f46679dff20f4322196fa070da39 - pristine_git_object: 035af50bc901a1029dd11132df18fefcfd2052a5 + last_write_checksum: sha1:a1913dca348a4e75579e5707fd61685985e42eed + pristine_git_object: 98941cc65573e1cad8a6eecf5327eafb61ca151b + docs/models/openresponseseasyinputmessagecontentinputimage.md: + id: f7e2ecc93999 + last_write_checksum: sha1:9a46ccdefddd2902b7aa40590818eda2443a1120 + pristine_git_object: b52031f02887565acc6de2221ac9c301d977520a + docs/models/openresponseseasyinputmessagecontentunion1.md: + id: c11b35f5153b + last_write_checksum: sha1:a56e9512f9b33507e1ef33aa25e890c0eda6e889 + pristine_git_object: 07d8e7cdcdb4c7ea5a2c9d2ac88c8145514e9a58 + docs/models/openresponseseasyinputmessagecontentunion2.md: + id: c52981ea58b6 + last_write_checksum: sha1:7cc465aad38312d8073a22de702889f1d6e59a62 + pristine_git_object: e535b1b4806ea678681e82eb27ab1ecd697f29ca + docs/models/openresponseseasyinputmessagedetail.md: + id: 069deae7def7 + last_write_checksum: sha1:9fc1b8f628b71f6f24a49eeb31109044a533d2b1 + pristine_git_object: b5fbf956996b3f2d6ccc73ef2c573d2b05c58c33 docs/models/openresponseseasyinputmessageroleassistant.md: id: f355d4b1ce01 last_write_checksum: sha1:2d58ab82959697ff0bbd5b01c767226b42429986 @@ -722,10 +766,10 @@ trackedFiles: id: ead5e8d907a3 last_write_checksum: sha1:be2e3a0228889e341de08e04381bb5510e398235 pristine_git_object: a403b050f4ffd5884ef53e570d6a804f02115dd9 - docs/models/openresponseseasyinputmessagetype.md: - id: 54934ccf6321 - last_write_checksum: sha1:917439c664d12265c119aa4c931f862a3678e425 - pristine_git_object: de6184d4b49bdbf3fa21a08295a37f50e761595f + docs/models/openresponseseasyinputmessagetypemessage.md: + id: a1c130bf327f + last_write_checksum: sha1:2095e6867f99d3a3e0fba507a76db28ead12f7bc + pristine_git_object: 394ff2dc7a7e8da3f574bb801b095e7e881f6c8b docs/models/openresponseserrorevent.md: id: 73d189c27d1d last_write_checksum: sha1:8802680fc643016a1ef21f46f8cd7d0d64ca071f @@ -772,12 +816,20 @@ trackedFiles: pristine_git_object: 69c3aef479a7f82c847a96e5bd1ed6a71459f816 docs/models/openresponsesinputmessageitem.md: id: 3c300aacc4af - last_write_checksum: sha1:cbe9823e0c3dcf8253fc676000c2f3e8e79cdfd0 - pristine_git_object: 5bcb8590e385e8b76cd70d2db15b95e043bc0de9 - docs/models/openresponsesinputmessageitemcontent.md: - id: f24e2e909414 - last_write_checksum: sha1:a00609222dc06700790c987d16f4d2fe4adf222d - pristine_git_object: b28e0fcc6d996bd3dd45e52cbb7b71fbe0215535 + last_write_checksum: sha1:c15ce1231ca81255b857d01d82c84eb0f8cc6acc + pristine_git_object: cea2a8277c84dd35c790f6deb6592a1574c60e31 + docs/models/openresponsesinputmessageitemcontentinputimage.md: + id: 4301bb16e51e + last_write_checksum: sha1:fd767ef043d9de5e64b9c32ae32778fffa32f789 + pristine_git_object: 85b629f8c2177b3563a3fb3bece55aa69c1e180d + docs/models/openresponsesinputmessageitemcontentunion.md: + id: a9dcbee380fc + last_write_checksum: sha1:f0cd039293b7fb891363a5f9868f9ca0a2952785 + pristine_git_object: 239a98501a3bbecf0a05707bd7fc0459bb8518a0 + docs/models/openresponsesinputmessageitemdetail.md: + id: 6f4f92cab241 + last_write_checksum: sha1:91b6b79e95ebd695a6620358b6450d08edee0e0a + pristine_git_object: ac149e6cf89ede4aad9c626f15308edac1634a99 docs/models/openresponsesinputmessageitemroledeveloper.md: id: 617261c30876 last_write_checksum: sha1:3698a2c8ffcb51f00c36d109531b6c08321c562c @@ -794,18 +846,18 @@ trackedFiles: id: fa6afe1be03c last_write_checksum: sha1:ed453f7e8d7cd9b287c2751b43de92b190c2dd56 pristine_git_object: ed7965e01001eaa2a0719ee8d6df6ae673523c3b - docs/models/openresponsesinputmessageitemtype.md: - id: a5e1b93e3e17 - last_write_checksum: sha1:a35e6f3e8107bdabe5b7d995e2bdd4b8990484c5 - pristine_git_object: 45e5df9c525d933a73426554a02241e29f64db84 + docs/models/openresponsesinputmessageitemtypemessage.md: + id: 1fcd16e8ac95 + last_write_checksum: sha1:bc280ddba584d2aa5a0837031b55ff470cf7bed9 + pristine_git_object: be978ccbdecc45bd79214fd2db7547e8637c8103 docs/models/openresponseslogprobs.md: id: e0a6e43b0b8b last_write_checksum: sha1:8c2e618697b6c0401e9ce3d01614e49d8def36fc pristine_git_object: 378b69f703e65c59ff8b639ead80a32b3f7e4b4e docs/models/openresponsesnonstreamingresponse.md: id: d0ac728b4904 - last_write_checksum: sha1:eff5ca8c71a681a586eb6f52b6e54210eadd306f - pristine_git_object: 8c04096fad77c3001a2103034f97cf88a2f03790 + last_write_checksum: sha1:cbdd12304978f23446743d381fc73584d5ff3769 + pristine_git_object: 3d8dd191ac763fc1ed70398711655ce18043ccb9 docs/models/openresponsesnonstreamingresponsetoolfunction.md: id: d4d0e54d3003 last_write_checksum: sha1:bb878cf3f28281a0a24c71a701385db8edbee373 @@ -832,8 +884,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 +920,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:41d572b84a969e6cf8de7057786b46badd000f89 + pristine_git_object: 96183efe82f859f5c4f2ac47b78e5890d61fab83 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 +942,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 +960,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 @@ -932,12 +992,12 @@ trackedFiles: pristine_git_object: 5e291d4568e9e2ab971494b572afa548757424b5 docs/models/openresponsesstreamevent.md: id: 29f83c2fa377 - last_write_checksum: sha1:067415049dd23d6ea840e408827b9d70ead95393 - pristine_git_object: 4baf7b822faa87439dbc0f3932d75745759151b1 + last_write_checksum: sha1:3e4f1c39710d12e4fb4f4e6bdabb1070c3089a95 + pristine_git_object: c4ab7b8008526317429c09f81f25cfaee8ca5d66 docs/models/openresponsesstreameventresponsecompleted.md: id: 8ddfba315394 - last_write_checksum: sha1:279fcc65b1ec97bea02c807a9ab563108cd748d0 - pristine_git_object: fb9d4c85473bbabe0d0af2c99f13075a772bd02c + last_write_checksum: sha1:ec03af2d20dbe3c3bd565ef3f3661ec53e359c3d + pristine_git_object: c2cccbaf22d0ffc35c6c5282d7cc77ae96671bbc docs/models/openresponsesstreameventresponsecontentpartadded.md: id: 1c72b5c00176 last_write_checksum: sha1:e7e7d00d49b90a6637a63b988855bd8166a77762 @@ -948,12 +1008,12 @@ trackedFiles: pristine_git_object: 107bc14e5406df8a81e1bae51fb88b691f6c392b docs/models/openresponsesstreameventresponsecreated.md: id: 1eb9104f0d5c - last_write_checksum: sha1:24273beb781e689813da66391d29f03f42dcbe10 - pristine_git_object: 5edc0ed7e00e390fea3cfc8d715797cf49c5824c + last_write_checksum: sha1:64f5fe5f3290190dff9bf626d1a31da999243e0b + pristine_git_object: ece153d85a8e23d39869757917412bd8822bf3fd docs/models/openresponsesstreameventresponsefailed.md: id: 8552b3585136 - last_write_checksum: sha1:2a6108aa834fec5fde905b89944830254750a094 - pristine_git_object: e9ec0badde1a4265a718fd6d7994249e2719c3e2 + last_write_checksum: sha1:71f30aeaab3d5d1b1a50be4c19308e5a542dfe7e + pristine_git_object: 05b84259a5701dfb51b91bc6b0213020f6a7081b docs/models/openresponsesstreameventresponsefunctioncallargumentsdelta.md: id: d774ce6db776 last_write_checksum: sha1:68cb3f42558e18d3aaf31d15ab7275b6f964e127 @@ -964,12 +1024,12 @@ trackedFiles: pristine_git_object: 59d7678426ec651df9d749d3f3b8751614805125 docs/models/openresponsesstreameventresponseincomplete.md: id: fc183a9faffa - last_write_checksum: sha1:818d593f9cfaf356ae2d4a68ba42f958146584ba - pristine_git_object: 708abc70b659fbe4a92bf1c3b5b642ea41acc42a + last_write_checksum: sha1:4e8929ae0d0e224af32d83515e25df32ed2c06c9 + pristine_git_object: ca9d262995c70c9a2fbc3bb09b08040de5ff9710 docs/models/openresponsesstreameventresponseinprogress.md: id: 701f03c16e30 - last_write_checksum: sha1:d62d0e2b680d2a9d9d03a6885f2e933e232220a5 - pristine_git_object: a5d342b1c870830f8572ecd3f62b0e1c536473ed + last_write_checksum: sha1:9e3bb66d63324c7c1159cba78fdeab5f0c112f2c + pristine_git_object: e4a8ca13d17903b3e3538fb0167fc1405645093e docs/models/openresponsesstreameventresponseoutputitemadded.md: id: 0c3c06e02f9c last_write_checksum: sha1:8d17077a002ff9b3cb9027c74b802ae64b9a8cc3 @@ -1116,12 +1176,12 @@ trackedFiles: pristine_git_object: af927c6418f4bd515b87f52b41a3c7583c3eaff0 docs/models/operations/createresponsesresponse.md: id: c55a819f0ab5 - last_write_checksum: sha1:f8e638094ad790d173f9581fb4cd239eca01504f - pristine_git_object: cf5d4010ca2e254e4cbf5e1e88db958f299a6724 + last_write_checksum: sha1:39dbcdedff28909f42372e8b7b9092b3fc225e46 + pristine_git_object: a724c72f1baeea19d150a23ed6509f29a5c1f84d docs/models/operations/createresponsesresponsebody.md: id: c0639e97c684 - last_write_checksum: sha1:66c98c45e40fb39b7eef531d114601f0d92a8039 - pristine_git_object: ac16541d6920f0ad66bba77d808b72749ff74514 + last_write_checksum: sha1:484f79490add59bf08bc521b3fc9f87c216f537d + pristine_git_object: f546415b3380dad92d605b0d04b0638ae71e5b04 docs/models/operations/deletekeysrequest.md: id: 88cb4c43ad9d last_write_checksum: sha1:b3645ed005e3c0847c09422ec7b66175f01d927e @@ -1168,16 +1228,16 @@ trackedFiles: pristine_git_object: e6872cd11481540174740eb5929f5e84c307bd9c docs/models/operations/getgenerationdata.md: id: c47059f62af7 - last_write_checksum: sha1:918cb85841f71023c12f168252b86612e4f2ff8c - pristine_git_object: 83bd5d01998d9af5697609031617f8b9f5ece77c + last_write_checksum: sha1:0fd2a05115edc6f810bfde1e821f9a56b5ff29ee + pristine_git_object: 8028472702fc86e1d5736cc60fcaf78c6991fed5 docs/models/operations/getgenerationrequest.md: id: fe98f4f7a718 last_write_checksum: sha1:44d8a0ff0bcd4a70a5a95eda4084859787b5fccf pristine_git_object: 4bdaeaf73753b58ffb89151e55fdc352bd18dc1c docs/models/operations/getgenerationresponse.md: id: edafe5ee4596 - last_write_checksum: sha1:686b56fb68a083beba4f1c9011ebc5b4156b0032 - pristine_git_object: 5a3820379d671a6b66a738422ed5cc0849655f40 + last_write_checksum: sha1:90c4e9b37d13e90fa824cbb0de78ec05c0c0d3f0 + pristine_git_object: 39a8787a05d52771433495dded2a09167014385e docs/models/operations/getkeydata.md: id: 359964834be9 last_write_checksum: sha1:2455639a3e3569807781df591dad86d5cf2e535b @@ -1240,12 +1300,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 +1470,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 +1504,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 +1572,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 @@ -1572,20 +1652,32 @@ trackedFiles: pristine_git_object: 24bc213c0bf2aa1e970b138af1c51d3c25a2460b docs/models/responseinputimage.md: id: 21d9de287417 - last_write_checksum: sha1:463c59fe44a848c5d69836c3a87e70f7434ab082 - pristine_git_object: fedb0ffe77952bd7eb28df7a978d364c0dba9d5d + last_write_checksum: sha1:1f266defa097c1a0baf3a6409f47e632b2c8b5ff + pristine_git_object: f59b3fe880818119be254d19a26f55aeff9806d4 docs/models/responseinputimagedetail.md: id: 02223e7510c7 last_write_checksum: sha1:7813eb7133c515707048d81d189d470805d068f0 pristine_git_object: b1ae0f809642c2fe5cdaab70e71a5ae2c19e504b + docs/models/responseinputimagetype.md: + id: f64ebbddb0ab + last_write_checksum: sha1:a78c0bf1e7c226ef8de75e6541ca80559fd3df26 + pristine_git_object: 17e8345226dea74dbba471b90deaea1691631630 docs/models/responseinputtext.md: id: e62245ef2400 last_write_checksum: sha1:9bb761ec6b8c7fd4b581573e3d2973b0d44d6e1a pristine_git_object: cb509e89bb7f071ba1def78d69d73d6da81d46c7 + docs/models/responseinputvideo.md: + id: b7523f3cdace + last_write_checksum: sha1:0928571d3a5bc9a8ec8fd24418bdee6a19267080 + pristine_git_object: 863fc5cd105d4c1950c21ef4b64ab65c59e2d1e8 docs/models/responseoutputtext.md: id: 95e91ca81990 - last_write_checksum: sha1:ee2de5931bfeb7e8f09864736c8289abeddcd3af - pristine_git_object: ea27fa62086db787ca7d24fd3f91b704a862bb1a + last_write_checksum: sha1:49241881ccb25962d988cd4c8557bd04b433cf76 + pristine_git_object: c0d9c093f7ad217e8cf3cc469e940107412bb3e8 + docs/models/responseoutputtexttoplogprob.md: + id: 4cae20e12fcf + last_write_checksum: sha1:561e05b3d842295788e963a3cd0d5609657a7778 + pristine_git_object: 9e5fada59213aea3dacee5009176b80cfb637d03 docs/models/responseserrorfield.md: id: 03dd50404dff last_write_checksum: sha1:a1ed09b0e9a1091293d8503e1e59b30cc5e9d416 @@ -1648,8 +1740,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 +1798,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 +1840,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 +1860,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 @@ -1818,10 +1918,6 @@ trackedFiles: id: b4929af623aa last_write_checksum: sha1:6135140c8a32957c3007ab7a00bc13970d083cca pristine_git_object: 5271aa4e738ebdd133994f2ab47b0a877ddf669f - docs/models/toplogprob.md: - id: f3d5d29d1bdb - last_write_checksum: sha1:8302fccca07f4e50bb94be5942f966ea55947dd4 - pristine_git_object: e80ee7c5ddefdf5ae26a83e3492512226469b969 docs/models/topproviderinfo.md: id: 6d198b9b973b last_write_checksum: sha1:4df4b348401c3e30d52b27aad85d649bfea28ed2 @@ -1960,12 +2056,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:5bb82593180b988c5b2a17d2c742406d6a15d2db - pristine_git_object: 2f4e1f407044a746f0989cca539d84d85628d098 + last_write_checksum: sha1:cb28be90286c87c9a525e17b304af1fbabe7a222 + pristine_git_object: afc764505f852c84de632602b3745244b40beb61 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:a6a094aee517b1fc79d3acfd87dae93903d910ea - pristine_git_object: 4167411f54231e9e8ba7ceb281f0d6ca19e724fb + last_write_checksum: sha1:733263ddbf2b792126571dd842dcb2b5c3642848 + pristine_git_object: 4a5ade5f00a80b5b48ae48d1eef4fab661060b16 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -2088,8 +2184,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:aa7c67efe51a310aeb8dc170bd36d8ba2491920a + pristine_git_object: 05f65bba0270b70ffd835233c5233da723e8cece src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -2176,12 +2272,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 @@ -2208,8 +2304,8 @@ trackedFiles: pristine_git_object: 9847a91701eb1b038dccd549a763f68e69bf8a4c src/models/chatmessagetokenlogprob.ts: id: eed686a58eb1 - last_write_checksum: sha1:3e9a418f37f2d9ba5059acd16e1028d12fcb79c8 - pristine_git_object: 327bfbd14e5a110a542b352353195d84735bcab7 + last_write_checksum: sha1:3060b72cc4b8eb330c6e5a740ce29d0a82666a8d + pristine_git_object: f1d1922a8c3977d88ca9db4dc5c45ddc47d80ad4 src/models/chatmessagetokenlogprobs.ts: id: 2dbd9fc61ed8 last_write_checksum: sha1:7ee84adbffe9c6abc3387568b19091201a14bab3 @@ -2388,8 +2484,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:9b327a6c0bc1a6e25705913d08bf8a861d194f0e + pristine_git_object: 081389c1839fba5dbd2640515092c1c03bfbbe99 src/models/inputmodality.ts: id: 771d5d4c91ec last_write_checksum: sha1:7f742bf5a1e6b7953ea96df4c4cef29c602accad @@ -2456,8 +2552,8 @@ trackedFiles: pristine_git_object: 0e524e09e7708246e4b647b921f62cde3c580eba src/models/openairesponsesinputunion.ts: id: 0b061e126936 - last_write_checksum: sha1:b03f752917570119deffae3584738191e4b24be3 - pristine_git_object: b840e4148f928d3fec131643b1107319456d1e26 + last_write_checksum: sha1:1219d02cbf9dff1dc2c38c1ad938427959fba5b5 + pristine_git_object: 562b0cb26a321e84e45a0b6dc9ca7cc2fd7b5e72 src/models/openairesponsesprompt.ts: id: c583d897e9d2 last_write_checksum: sha1:894340f6bb585e936e0b62459ca01521b2a420ab @@ -2492,8 +2588,8 @@ trackedFiles: pristine_git_object: b307aa9dee0c43f804012a762e4aee6dac13b2a2 src/models/openresponseseasyinputmessage.ts: id: 9cae543ceb47 - last_write_checksum: sha1:c7d593f736a7a9f8d2c8ae79d53fb0a4d8dc97a3 - pristine_git_object: dedeed37a16718c81574e0a8d3d05c68d71997ae + last_write_checksum: sha1:7501d12b352681c5f82ca2e7a43db36d0e24572c + pristine_git_object: f8b55e634d69696c95051f5cef0b77841c61d016 src/models/openresponseserrorevent.ts: id: 508880501ed2 last_write_checksum: sha1:f64fc658f9aa9aa938d12df43f0bb42febedeb89 @@ -2528,20 +2624,20 @@ trackedFiles: pristine_git_object: 7f007b7afb5455aef6460bf3a382239e0bf6fb1b src/models/openresponsesinputmessageitem.ts: id: cccc4eb21a9b - last_write_checksum: sha1:628174dd61c90ba8867d7d3d07630705e1e4d001 - pristine_git_object: d95f5d2900cde5020d37e3c83f62a6651efe6b46 + last_write_checksum: sha1:438d0d769bcbf6cc0b25997f84303984202b6225 + pristine_git_object: 9dcfafb757e3d876208ff7a5116b10a373cf0910 src/models/openresponseslogprobs.ts: id: 7ec69a3158fc last_write_checksum: sha1:35ad33aa6ae476ba091a2741035a9eaae2eba655 pristine_git_object: ea0b9a92edcb6803a0f5a691859f11ec5a62561c src/models/openresponsesnonstreamingresponse.ts: id: ffd6f7198dd7 - last_write_checksum: sha1:ceb40e97b8ebe234991492a37a7e5f7f0e5be1fd - pristine_git_object: 5577126769d0a1d8795c1eb913f13a82ed5e40f6 + last_write_checksum: sha1:6045084704290bf2e9e2ee52a5f5fde31ae0bffa + pristine_git_object: b6c8c858d7b3ee85438351f22696a44cf6b96721 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 +2664,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:43d81bb0bee0e738f89d95951f8cb83c2492c412 + pristine_git_object: dc9fc3282a401b992f3402cb98d3dee7555f51ed src/models/openresponsesresponsetext.ts: id: aded1ce23b04 last_write_checksum: sha1:5046f904e0b5db52fbae46d9bbed94d651b7b0ef @@ -2640,8 +2736,8 @@ trackedFiles: pristine_git_object: 2c7c2dc7982e4f70c88a08e1f0841b8eb93625e7 src/models/operations/getgeneration.ts: id: 5cdb2959d2a5 - last_write_checksum: sha1:f07995081b53a760e200435d8f8d39710084ba67 - pristine_git_object: 98e74eb75a7ea6afc835f05c63e4298dfa18b041 + last_write_checksum: sha1:fd246e3ce1857f743c5d8cad3a30c5b35b51ea58 + pristine_git_object: 7ed9f3de4040d8159dc8cb0992e5d2a4e622232d src/models/operations/getkey.ts: id: 27d0f86c087f last_write_checksum: sha1:c54e8a824da1672c0cd5d1766071a05a14b58ad3 @@ -2722,22 +2818,42 @@ trackedFiles: id: 704f51d4a5f7 last_write_checksum: sha1:1830a046687a63576259d7d2f534154df86e69b9 pristine_git_object: d32dc10b8d734d48a15721a479831c4b2ff96ece + src/models/percentilelatencycutoffs.ts: + id: 92e053096488 + last_write_checksum: sha1:9cb4c885e8af419a7f349713894ee691de8f3903 + pristine_git_object: 8d4f9360509ee1e3e635a632d47a3e7db73609b9 + src/models/percentilestats.ts: + id: 9a6b504d3964 + last_write_checksum: sha1:77a384fc53d104729d80f52437b66dd23ac440f5 + pristine_git_object: 0593bbc95473e72c1d7f3d0ecfd38afb9ce977ae + src/models/percentilethroughputcutoffs.ts: + id: 847aba8ff633 + last_write_checksum: sha1:f3806ceafd88e68e4d33fa3fce930d001ca62fe0 + pristine_git_object: c29b848df9c96b99c3755b2d329e886b78aa8234 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:98ff43d4f7d6a4b518e5887a00168d7fd1be8ac1 + pristine_git_object: 926e0bcebe7ffa72c4fded9a4080a0c7fe0c0d8e + src/models/preferredminthroughput.ts: + id: 5ff9056f1474 + last_write_checksum: sha1:4bde45a30a0de321fa75eeef37405c2a8c31e904 + pristine_git_object: ace60e53dcddb8f1c8b31da35585a548f89c2b2a 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 +2868,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 @@ -2800,16 +2916,20 @@ trackedFiles: pristine_git_object: 1d2aefa1736bab3a5a9ccfba558e30e28119ceb0 src/models/responseinputimage.ts: id: 9c7a50d121df - last_write_checksum: sha1:d07e884f4d44290344b750664fb3679099edc15d - pristine_git_object: 44c63262b203130bebd37d1125d44d1598586ae0 + last_write_checksum: sha1:a0027556d708910065c6963f0c03344f598e0cba + pristine_git_object: 572d0e524c7e3d83df74cf360059aca5392ff2fb src/models/responseinputtext.ts: id: 841523070a3c last_write_checksum: sha1:2eced62f2909cf540be019bb5fb30c79ddac7112 pristine_git_object: 5b8f3dec6cc58c5d09176bed64ab170881fbbaf2 + src/models/responseinputvideo.ts: + id: 79bef840e448 + last_write_checksum: sha1:36a914dea8225a7fa43975017ce9617ec9711652 + pristine_git_object: dd76764eca12e9acef64f1e8bcbf31520d635c3e src/models/responseoutputtext.ts: id: 2d5e61e53c46 - last_write_checksum: sha1:e6790fca2772d5e46f3b0915a9fa163ef6a4bb2d - pristine_git_object: 5028e794264cb6763be48f5c5aeee157fc887aef + last_write_checksum: sha1:23003d7b339dcce2d8491d395b89503095bc1221 + pristine_git_object: 1d68d6e594449824c640bb546e697a2244b85727 src/models/responseserrorfield.ts: id: 830ea3d3b590 last_write_checksum: sha1:776be0716ffd7975f6e36f67179d31c49013f2af @@ -2844,12 +2964,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:20d96f3d4b6fba9b617d832a36c54bc1f6230cbd + pristine_git_object: ce35ab6661fc317ffcb4c57b7e80c41c5a7b824b src/models/responsessearchcontextsize.ts: id: 3c1dd9e04db4 last_write_checksum: sha1:6280fd261d048367d14726add6a077657833f16f @@ -2868,12 +2992,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 @@ -3756,7 +3880,7 @@ examples: id: "" responses: "200": - application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}} + application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto"}} 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: @@ -3825,7 +3949,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 +3964,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": @@ -3942,7 +4066,7 @@ examples: application/json: {"store": false, "service_tier": "auto", "stream": false} responses: "200": - application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 7468.94, "frequency_penalty": 3967.09, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 278bfb0b..df48d0e7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -33,7 +33,7 @@ generation: skipResponseBodyAssertions: false preApplyUnionDiscriminators: true typescript: - version: 0.3.12 + version: 0.3.14 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 4047ff25..fb85a179 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -108,6 +108,41 @@ components: type: array items: $ref: '#/components/schemas/OpenAIResponsesAnnotation' + logprobs: + type: array + items: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: number + logprob: + type: number + top_logprobs: + type: array + items: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: number + logprob: + type: number + required: + - token + - bytes + - logprob + required: + - token + - bytes + - logprob + - top_logprobs required: - type - text @@ -268,7 +303,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 +331,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 @@ -538,6 +592,7 @@ components: allOf: - $ref: '#/components/schemas/OpenAIResponsesUsage' - type: object + nullable: true properties: cost: type: number @@ -1189,6 +1244,9 @@ components: type: string status: $ref: '#/components/schemas/OpenAIResponsesResponseStatus' + completed_at: + type: number + nullable: true output: type: array items: @@ -1239,6 +1297,12 @@ components: top_p: type: number nullable: true + presence_penalty: + type: number + nullable: true + frequency_penalty: + type: number + nullable: true instructions: $ref: '#/components/schemas/OpenAIResponsesInput' metadata: @@ -1300,11 +1364,15 @@ components: - object - created_at - model + - status + - completed_at - output - error - incomplete_details - temperature - top_p + - presence_penalty + - frequency_penalty - instructions - metadata - tools @@ -3224,6 +3292,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -3234,6 +3303,23 @@ components: - type: summary_text text: Step by step analysis description: Reasoning output item with signature and format extensions + ResponseInputVideo: + type: object + properties: + type: + type: string + enum: + - input_video + video_url: + type: string + description: A base64 data URL or remote URL that resolves to a video file + required: + - type + - video_url + description: Video input content item + example: + type: input_video + video_url: https://example.com/video.mp4 OpenResponsesEasyInputMessage: type: object properties: @@ -3261,16 +3347,18 @@ components: items: oneOf: - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg - $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputAudio' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/ResponseInputVideo' - type: string required: - role @@ -3300,16 +3388,18 @@ components: items: oneOf: - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg - $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputAudio' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/ResponseInputVideo' required: - role - content @@ -3418,6 +3508,11 @@ components: example: summary: auto enabled: true + ResponsesOutputModality: + type: string + enum: + - text + - image OpenAIResponsesIncludable: type: string enum: @@ -3470,12 +3565,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -3500,13 +3595,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -3551,6 +3647,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: @@ -3637,8 +3801,45 @@ components: type: number nullable: true minimum: 0 + top_logprobs: + type: integer + nullable: true + minimum: 0 + maximum: 20 + max_tool_calls: + type: integer + nullable: true + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + frequency_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 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 +3975,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 +4328,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 +4763,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 +4858,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 +4880,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 +4904,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 +5017,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 +5059,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -4862,13 +5089,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -4951,6 +5179,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -5174,6 +5403,8 @@ components: properties: cached_tokens: type: number + cache_write_tokens: + type: number audio_tokens: type: number video_tokens: @@ -5521,20 +5752,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 +5814,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 +6044,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: @@ -6987,6 +7286,11 @@ paths: - completions - embeddings description: Type of API used for the generation + router: + type: string + nullable: true + description: Router used for the request (e.g., openrouter/auto) + example: openrouter/auto required: - id - upstream_id @@ -7020,6 +7324,7 @@ paths: - native_finish_reason - external_user - api_type + - router description: Generation data required: - data diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 803e36f2..ba83473f 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -109,6 +109,41 @@ components: type: array items: $ref: '#/components/schemas/OpenAIResponsesAnnotation' + logprobs: + type: array + items: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: number + logprob: + type: number + top_logprobs: + type: array + items: + type: object + properties: + token: + type: string + bytes: + type: array + items: + type: number + logprob: + type: number + required: + - token + - bytes + - logprob + required: + - token + - bytes + - logprob + - top_logprobs required: - type - text @@ -269,7 +304,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 +333,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 @@ -543,6 +598,7 @@ components: allOf: - $ref: '#/components/schemas/OpenAIResponsesUsage' - type: object + nullable: true properties: cost: type: number @@ -1203,6 +1259,9 @@ components: type: string status: $ref: '#/components/schemas/OpenAIResponsesResponseStatus' + completed_at: + type: number + nullable: true output: type: array items: @@ -1253,6 +1312,12 @@ components: top_p: type: number nullable: true + presence_penalty: + type: number + nullable: true + frequency_penalty: + type: number + nullable: true instructions: $ref: '#/components/schemas/OpenAIResponsesInput' metadata: @@ -1315,11 +1380,15 @@ components: - object - created_at - model + - status + - completed_at - output - error - incomplete_details - temperature - top_p + - presence_penalty + - frequency_penalty - instructions - metadata - tools @@ -3239,6 +3308,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -3250,6 +3320,23 @@ components: - type: summary_text text: Step by step analysis description: Reasoning output item with signature and format extensions + ResponseInputVideo: + type: object + properties: + type: + type: string + enum: + - input_video + video_url: + type: string + description: A base64 data URL or remote URL that resolves to a video file + required: + - type + - video_url + description: Video input content item + example: + type: input_video + video_url: https://example.com/video.mp4 OpenResponsesEasyInputMessage: type: object properties: @@ -3277,16 +3364,18 @@ components: items: oneOf: - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg - $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputAudio' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/ResponseInputVideo' - type: string required: - role @@ -3316,16 +3405,18 @@ components: items: oneOf: - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' + - allOf: + - $ref: '#/components/schemas/ResponseInputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg - $ref: '#/components/schemas/ResponseInputFile' - $ref: '#/components/schemas/ResponseInputAudio' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/ResponseInputVideo' required: - role - content @@ -3434,6 +3525,12 @@ components: example: summary: auto enabled: true + ResponsesOutputModality: + type: string + enum: + - text + - image + x-speakeasy-unknown-values: allow OpenAIResponsesIncludable: type: string enum: @@ -3487,12 +3584,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -3517,13 +3614,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -3572,6 +3670,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: @@ -3661,8 +3821,44 @@ components: type: number nullable: true minimum: 0 + top_logprobs: + type: integer + nullable: true + minimum: 0 + maximum: 20 + max_tool_calls: + type: integer + nullable: true + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + frequency_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 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 +3984,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 +4323,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 +4765,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 +4859,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 +4879,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 +4903,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 +5016,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 +5058,12 @@ components: - Fireworks - Friendli - GMICloud - - GoPomelo - Google - Google AI Studio - Groq - Hyperbolic - Inception + - Inceptron - InferenceNet - Infermatic - Inflection @@ -4861,13 +5088,14 @@ components: - Phala - Relace - SambaNova + - Seed - SiliconFlow - Sourceful - Stealth - StreamLake - Switchpoint - - Targon - Together + - Upstage - Venice - WandB - Xiaomi @@ -4951,6 +5179,7 @@ components: enum: - unknown - openai-responses-v1 + - azure-openai-responses-v1 - xai-responses-v1 - anthropic-claude-v1 - google-gemini-v1 @@ -5176,6 +5405,8 @@ components: properties: cached_tokens: type: number + cache_write_tokens: + type: number audio_tokens: type: number video_tokens: @@ -5518,20 +5749,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 +5805,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 +6037,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: @@ -7004,6 +7298,11 @@ paths: - embeddings description: Type of API used for the generation x-speakeasy-unknown-values: allow + router: + type: string + nullable: true + description: Router used for the request (e.g., openrouter/auto) + example: openrouter/auto required: - id - upstream_id @@ -7037,6 +7336,7 @@ paths: - native_finish_reason - external_user - api_type + - router description: Generation data required: - data diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5fef387c..9fb4199d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,17 +2,18 @@ speakeasyVersion: 1.680.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9825a9d9dd018739535efcfcd22e5cad96efd1ce991aeaa4b4e7fe5b9d40f0fa - sourceBlobDigest: sha256:6f9ef0c822dc240348641c51d5824e49681a2e3ac0132d2c19cd2abb3bcfdd03 + sourceRevisionDigest: sha256:0aa4be5f9c66d0754b4bf06ded3fc5bcd70847e344936d5fbd381f330da68a9b + sourceBlobDigest: sha256:7947538e5ccee796a2a352fa3abd6dc2b062d18cd8271149028ae1324d132f20 tags: - latest + - fix-update-openapi-schema - 1.0.0 targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:9825a9d9dd018739535efcfcd22e5cad96efd1ce991aeaa4b4e7fe5b9d40f0fa - sourceBlobDigest: sha256:6f9ef0c822dc240348641c51d5824e49681a2e3ac0132d2c19cd2abb3bcfdd03 + sourceRevisionDigest: sha256:0aa4be5f9c66d0754b4bf06ded3fc5bcd70847e344936d5fbd381f330da68a9b + sourceBlobDigest: sha256:7947538e5ccee796a2a352fa3abd6dc2b062d18cd8271149028ae1324d132f20 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/chatmessagetokenlogprob.md b/docs/models/chatmessagetokenlogprob.md index 2d09ed76..886381e6 100644 --- a/docs/models/chatmessagetokenlogprob.md +++ b/docs/models/chatmessagetokenlogprob.md @@ -23,9 +23,9 @@ let value: ChatMessageTokenLogprob = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `token` | *string* | :heavy_check_mark: | N/A | -| `logprob` | *number* | :heavy_check_mark: | N/A | -| `bytes` | *number*[] | :heavy_check_mark: | N/A | -| `topLogprobs` | [models.TopLogprob](../models/toplogprob.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `token` | *string* | :heavy_check_mark: | N/A | +| `logprob` | *number* | :heavy_check_mark: | N/A | +| `bytes` | *number*[] | :heavy_check_mark: | N/A | +| `topLogprobs` | [models.ChatMessageTokenLogprobTopLogprob](../models/chatmessagetokenlogprobtoplogprob.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/toplogprob.md b/docs/models/chatmessagetokenlogprobtoplogprob.md similarity index 73% rename from docs/models/toplogprob.md rename to docs/models/chatmessagetokenlogprobtoplogprob.md index e80ee7c5..766a2153 100644 --- a/docs/models/toplogprob.md +++ b/docs/models/chatmessagetokenlogprobtoplogprob.md @@ -1,13 +1,13 @@ -# TopLogprob +# ChatMessageTokenLogprobTopLogprob ## Example Usage ```typescript -import { TopLogprob } from "@openrouter/sdk/models"; +import { ChatMessageTokenLogprobTopLogprob } from "@openrouter/sdk/models"; -let value: TopLogprob = { +let value: ChatMessageTokenLogprobTopLogprob = { token: "", - logprob: 88.94, + logprob: 6197.03, bytes: [], }; ``` 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/logprob.md b/docs/models/logprob.md new file mode 100644 index 00000000..3ba44ac2 --- /dev/null +++ b/docs/models/logprob.md @@ -0,0 +1,25 @@ +# Logprob + +## Example Usage + +```typescript +import { Logprob } from "@openrouter/sdk/models"; + +let value: Logprob = { + token: "", + bytes: [ + 3226.37, + ], + logprob: 2246.86, + topLogprobs: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `token` | *string* | :heavy_check_mark: | N/A | +| `bytes` | *number*[] | :heavy_check_mark: | N/A | +| `logprob` | *number* | :heavy_check_mark: | N/A | +| `topLogprobs` | [models.ResponseOutputTextTopLogprob](../models/responseoutputtexttoplogprob.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file 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/openresponseseasyinputmessage.md b/docs/models/openresponseseasyinputmessage.md index 00b9d0cd..98941cc6 100644 --- a/docs/models/openresponseseasyinputmessage.md +++ b/docs/models/openresponseseasyinputmessage.md @@ -13,8 +13,8 @@ let value: OpenResponsesEasyInputMessage = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `type` | [models.OpenResponsesEasyInputMessageType](../models/openresponseseasyinputmessagetype.md) | :heavy_minus_sign: | N/A | -| `role` | *models.OpenResponsesEasyInputMessageRoleUnion* | :heavy_check_mark: | N/A | -| `content` | *models.OpenResponsesEasyInputMessageContent2* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `type` | [models.OpenResponsesEasyInputMessageTypeMessage](../models/openresponseseasyinputmessagetypemessage.md) | :heavy_minus_sign: | N/A | +| `role` | *models.OpenResponsesEasyInputMessageRoleUnion* | :heavy_check_mark: | N/A | +| `content` | *models.OpenResponsesEasyInputMessageContentUnion2* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagecontent2.md b/docs/models/openresponseseasyinputmessagecontent2.md deleted file mode 100644 index 035af50b..00000000 --- a/docs/models/openresponseseasyinputmessagecontent2.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenResponsesEasyInputMessageContent2 - - -## Supported Types - -### `models.OpenResponsesEasyInputMessageContent1[]` - -```typescript -const value: models.OpenResponsesEasyInputMessageContent1[] = []; -``` - -### `string` - -```typescript -const value: string = ""; -``` - diff --git a/docs/models/openresponseseasyinputmessagecontentinputimage.md b/docs/models/openresponseseasyinputmessagecontentinputimage.md new file mode 100644 index 00000000..b52031f0 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagecontentinputimage.md @@ -0,0 +1,22 @@ +# OpenResponsesEasyInputMessageContentInputImage + +Image input content item + +## Example Usage + +```typescript +import { OpenResponsesEasyInputMessageContentInputImage } from "@openrouter/sdk/models"; + +let value: OpenResponsesEasyInputMessageContentInputImage = { + type: "input_image", + detail: "auto", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `type` | *"input_image"* | :heavy_check_mark: | N/A | +| `detail` | [models.OpenResponsesEasyInputMessageDetail](../models/openresponseseasyinputmessagedetail.md) | :heavy_check_mark: | N/A | +| `imageUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitemcontent.md b/docs/models/openresponseseasyinputmessagecontentunion1.md similarity index 61% rename from docs/models/openresponsesinputmessageitemcontent.md rename to docs/models/openresponseseasyinputmessagecontentunion1.md index b28e0fcc..07d8e7cd 100644 --- a/docs/models/openresponsesinputmessageitemcontent.md +++ b/docs/models/openresponseseasyinputmessagecontentunion1.md @@ -1,4 +1,4 @@ -# OpenResponsesInputMessageItemContent +# OpenResponsesEasyInputMessageContentUnion1 ## Supported Types @@ -12,10 +12,10 @@ const value: models.ResponseInputText = { }; ``` -### `models.ResponseInputImage` +### `models.OpenResponsesEasyInputMessageContentInputImage` ```typescript -const value: models.ResponseInputImage = { +const value: models.OpenResponsesEasyInputMessageContentInputImage = { type: "input_image", detail: "auto", }; @@ -41,3 +41,12 @@ const value: models.ResponseInputAudio = { }; ``` +### `models.ResponseInputVideo` + +```typescript +const value: models.ResponseInputVideo = { + type: "input_video", + videoUrl: "https://example.com/video.mp4", +}; +``` + diff --git a/docs/models/openresponseseasyinputmessagecontentunion2.md b/docs/models/openresponseseasyinputmessagecontentunion2.md new file mode 100644 index 00000000..e535b1b4 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagecontentunion2.md @@ -0,0 +1,17 @@ +# OpenResponsesEasyInputMessageContentUnion2 + + +## Supported Types + +### `models.OpenResponsesEasyInputMessageContentUnion1[]` + +```typescript +const value: models.OpenResponsesEasyInputMessageContentUnion1[] = []; +``` + +### `string` + +```typescript +const value: string = ""; +``` + diff --git a/docs/models/openresponseseasyinputmessagedetail.md b/docs/models/openresponseseasyinputmessagedetail.md new file mode 100644 index 00000000..b5fbf956 --- /dev/null +++ b/docs/models/openresponseseasyinputmessagedetail.md @@ -0,0 +1,17 @@ +# OpenResponsesEasyInputMessageDetail + +## Example Usage + +```typescript +import { OpenResponsesEasyInputMessageDetail } from "@openrouter/sdk/models"; + +let value: OpenResponsesEasyInputMessageDetail = "low"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "high" | "low" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagetype.md b/docs/models/openresponseseasyinputmessagetype.md deleted file mode 100644 index de6184d4..00000000 --- a/docs/models/openresponseseasyinputmessagetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesEasyInputMessageType - -## Example Usage - -```typescript -import { OpenResponsesEasyInputMessageType } from "@openrouter/sdk/models"; - -let value: OpenResponsesEasyInputMessageType = "message"; -``` - -## Values - -```typescript -"message" -``` \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagetypemessage.md b/docs/models/openresponseseasyinputmessagetypemessage.md new file mode 100644 index 00000000..394ff2dc --- /dev/null +++ b/docs/models/openresponseseasyinputmessagetypemessage.md @@ -0,0 +1,15 @@ +# OpenResponsesEasyInputMessageTypeMessage + +## Example Usage + +```typescript +import { OpenResponsesEasyInputMessageTypeMessage } from "@openrouter/sdk/models"; + +let value: OpenResponsesEasyInputMessageTypeMessage = "message"; +``` + +## Values + +```typescript +"message" +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitem.md b/docs/models/openresponsesinputmessageitem.md index 5bcb8590..cea2a827 100644 --- a/docs/models/openresponsesinputmessageitem.md +++ b/docs/models/openresponsesinputmessageitem.md @@ -18,9 +18,9 @@ let value: OpenResponsesInputMessageItem = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | [models.OpenResponsesInputMessageItemType](../models/openresponsesinputmessageitemtype.md) | :heavy_minus_sign: | N/A | -| `role` | *models.OpenResponsesInputMessageItemRoleUnion* | :heavy_check_mark: | N/A | -| `content` | *models.OpenResponsesInputMessageItemContent*[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | [models.OpenResponsesInputMessageItemTypeMessage](../models/openresponsesinputmessageitemtypemessage.md) | :heavy_minus_sign: | N/A | +| `role` | *models.OpenResponsesInputMessageItemRoleUnion* | :heavy_check_mark: | N/A | +| `content` | *models.OpenResponsesInputMessageItemContentUnion*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitemcontentinputimage.md b/docs/models/openresponsesinputmessageitemcontentinputimage.md new file mode 100644 index 00000000..85b629f8 --- /dev/null +++ b/docs/models/openresponsesinputmessageitemcontentinputimage.md @@ -0,0 +1,22 @@ +# OpenResponsesInputMessageItemContentInputImage + +Image input content item + +## Example Usage + +```typescript +import { OpenResponsesInputMessageItemContentInputImage } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputMessageItemContentInputImage = { + type: "input_image", + detail: "auto", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `type` | *"input_image"* | :heavy_check_mark: | N/A | +| `detail` | [models.OpenResponsesInputMessageItemDetail](../models/openresponsesinputmessageitemdetail.md) | :heavy_check_mark: | N/A | +| `imageUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponseseasyinputmessagecontent1.md b/docs/models/openresponsesinputmessageitemcontentunion.md similarity index 61% rename from docs/models/openresponseseasyinputmessagecontent1.md rename to docs/models/openresponsesinputmessageitemcontentunion.md index 97371515..239a9850 100644 --- a/docs/models/openresponseseasyinputmessagecontent1.md +++ b/docs/models/openresponsesinputmessageitemcontentunion.md @@ -1,4 +1,4 @@ -# OpenResponsesEasyInputMessageContent1 +# OpenResponsesInputMessageItemContentUnion ## Supported Types @@ -12,10 +12,10 @@ const value: models.ResponseInputText = { }; ``` -### `models.ResponseInputImage` +### `models.OpenResponsesInputMessageItemContentInputImage` ```typescript -const value: models.ResponseInputImage = { +const value: models.OpenResponsesInputMessageItemContentInputImage = { type: "input_image", detail: "auto", }; @@ -41,3 +41,12 @@ const value: models.ResponseInputAudio = { }; ``` +### `models.ResponseInputVideo` + +```typescript +const value: models.ResponseInputVideo = { + type: "input_video", + videoUrl: "https://example.com/video.mp4", +}; +``` + diff --git a/docs/models/openresponsesinputmessageitemdetail.md b/docs/models/openresponsesinputmessageitemdetail.md new file mode 100644 index 00000000..ac149e6c --- /dev/null +++ b/docs/models/openresponsesinputmessageitemdetail.md @@ -0,0 +1,17 @@ +# OpenResponsesInputMessageItemDetail + +## Example Usage + +```typescript +import { OpenResponsesInputMessageItemDetail } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputMessageItemDetail = "high"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"auto" | "high" | "low" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitemtype.md b/docs/models/openresponsesinputmessageitemtype.md deleted file mode 100644 index 45e5df9c..00000000 --- a/docs/models/openresponsesinputmessageitemtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenResponsesInputMessageItemType - -## Example Usage - -```typescript -import { OpenResponsesInputMessageItemType } from "@openrouter/sdk/models"; - -let value: OpenResponsesInputMessageItemType = "message"; -``` - -## Values - -```typescript -"message" -``` \ No newline at end of file diff --git a/docs/models/openresponsesinputmessageitemtypemessage.md b/docs/models/openresponsesinputmessageitemtypemessage.md new file mode 100644 index 00000000..be978ccb --- /dev/null +++ b/docs/models/openresponsesinputmessageitemtypemessage.md @@ -0,0 +1,15 @@ +# OpenResponsesInputMessageItemTypeMessage + +## Example Usage + +```typescript +import { OpenResponsesInputMessageItemTypeMessage } from "@openrouter/sdk/models"; + +let value: OpenResponsesInputMessageItemTypeMessage = "message"; +``` + +## Values + +```typescript +"message" +``` \ No newline at end of file diff --git a/docs/models/openresponsesnonstreamingresponse.md b/docs/models/openresponsesnonstreamingresponse.md index 8c04096f..3d8dd191 100644 --- a/docs/models/openresponsesnonstreamingresponse.md +++ b/docs/models/openresponsesnonstreamingresponse.md @@ -12,6 +12,8 @@ let value: OpenResponsesNonStreamingResponse = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "completed", + completedAt: null, output: [ { id: "msg-abc123", @@ -29,6 +31,8 @@ let value: OpenResponsesNonStreamingResponse = { incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 293.66, + frequencyPenalty: 9884.38, instructions: null, metadata: null, tools: [], @@ -45,7 +49,8 @@ let value: OpenResponsesNonStreamingResponse = { | `object` | [models.ObjectT](../models/objectt.md) | :heavy_check_mark: | N/A | | | `createdAt` | *number* | :heavy_check_mark: | N/A | | | `model` | *string* | :heavy_check_mark: | N/A | | -| `status` | [models.OpenAIResponsesResponseStatus](../models/openairesponsesresponsestatus.md) | :heavy_minus_sign: | N/A | | +| `status` | [models.OpenAIResponsesResponseStatus](../models/openairesponsesresponsestatus.md) | :heavy_check_mark: | N/A | | +| `completedAt` | *number* | :heavy_check_mark: | N/A | | | `output` | *models.ResponsesOutputItem*[] | :heavy_check_mark: | N/A | | | `user` | *string* | :heavy_minus_sign: | N/A | | | `outputText` | *string* | :heavy_minus_sign: | N/A | | @@ -59,6 +64,8 @@ let value: OpenResponsesNonStreamingResponse = { | `maxOutputTokens` | *number* | :heavy_minus_sign: | N/A | | | `temperature` | *number* | :heavy_check_mark: | N/A | | | `topP` | *number* | :heavy_check_mark: | N/A | | +| `presencePenalty` | *number* | :heavy_check_mark: | N/A | | +| `frequencyPenalty` | *number* | :heavy_check_mark: | N/A | | | `instructions` | *models.OpenAIResponsesInputUnion* | :heavy_check_mark: | N/A | | | `metadata` | Record | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} | | `tools` | *models.OpenResponsesNonStreamingResponseToolUnion*[] | :heavy_check_mark: | N/A | | 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..96183efe 100644 --- a/docs/models/openresponsesrequest.md +++ b/docs/models/openresponsesrequest.md @@ -27,7 +27,13 @@ let value: OpenResponsesRequest = {}; | `maxOutputTokens` | *number* | :heavy_minus_sign: | N/A | | | `temperature` | *number* | :heavy_minus_sign: | N/A | | | `topP` | *number* | :heavy_minus_sign: | N/A | | +| `topLogprobs` | *number* | :heavy_minus_sign: | N/A | | +| `maxToolCalls` | *number* | :heavy_minus_sign: | N/A | | +| `presencePenalty` | *number* | :heavy_minus_sign: | N/A | | +| `frequencyPenalty` | *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/openresponsesstreamevent.md b/docs/models/openresponsesstreamevent.md index 4baf7b82..c4ab7b80 100644 --- a/docs/models/openresponsesstreamevent.md +++ b/docs/models/openresponsesstreamevent.md @@ -15,11 +15,15 @@ const value: models.OpenResponsesStreamEventResponseCreated = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "in_progress", + completedAt: 7999.81, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 6463.74, + frequencyPenalty: null, instructions: null, metadata: null, tools: [], @@ -40,11 +44,15 @@ const value: models.OpenResponsesStreamEventResponseInProgress = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "in_progress", + completedAt: 5374.05, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 6221.3, + frequencyPenalty: 1294.49, instructions: null, metadata: null, tools: [], @@ -65,6 +73,8 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "completed", + completedAt: 3370.61, output: [ { id: "item-1", @@ -82,6 +92,8 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 9760.35, + frequencyPenalty: 8654.54, instructions: null, metadata: null, tools: [], @@ -102,11 +114,15 @@ const value: models.OpenResponsesStreamEventResponseIncomplete = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "incomplete", + completedAt: 1221.53, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 7501.6, + frequencyPenalty: 258.79, instructions: null, metadata: null, tools: [], @@ -127,11 +143,15 @@ const value: models.OpenResponsesStreamEventResponseFailed = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "failed", + completedAt: 257.96, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 1169.05, + frequencyPenalty: 2180.11, instructions: null, metadata: null, tools: [], diff --git a/docs/models/openresponsesstreameventresponsecompleted.md b/docs/models/openresponsesstreameventresponsecompleted.md index fb9d4c85..c2cccbaf 100644 --- a/docs/models/openresponsesstreameventresponsecompleted.md +++ b/docs/models/openresponsesstreameventresponsecompleted.md @@ -14,6 +14,8 @@ let value: OpenResponsesStreamEventResponseCompleted = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "completed", + completedAt: 6756.82, output: [ { id: "item-1", @@ -31,6 +33,8 @@ let value: OpenResponsesStreamEventResponseCompleted = { incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 5218.67, + frequencyPenalty: 9449.97, instructions: null, metadata: null, tools: [], diff --git a/docs/models/openresponsesstreameventresponsecreated.md b/docs/models/openresponsesstreameventresponsecreated.md index 5edc0ed7..ece153d8 100644 --- a/docs/models/openresponsesstreameventresponsecreated.md +++ b/docs/models/openresponsesstreameventresponsecreated.md @@ -14,11 +14,15 @@ let value: OpenResponsesStreamEventResponseCreated = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "in_progress", + completedAt: 1983.13, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: null, + frequencyPenalty: 3092.81, instructions: null, metadata: null, tools: [], diff --git a/docs/models/openresponsesstreameventresponsefailed.md b/docs/models/openresponsesstreameventresponsefailed.md index e9ec0bad..05b84259 100644 --- a/docs/models/openresponsesstreameventresponsefailed.md +++ b/docs/models/openresponsesstreameventresponsefailed.md @@ -14,11 +14,15 @@ let value: OpenResponsesStreamEventResponseFailed = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "failed", + completedAt: 934.62, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 5672.21, + frequencyPenalty: null, instructions: null, metadata: null, tools: [], diff --git a/docs/models/openresponsesstreameventresponseincomplete.md b/docs/models/openresponsesstreameventresponseincomplete.md index 708abc70..ca9d2629 100644 --- a/docs/models/openresponsesstreameventresponseincomplete.md +++ b/docs/models/openresponsesstreameventresponseincomplete.md @@ -14,11 +14,15 @@ let value: OpenResponsesStreamEventResponseIncomplete = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "incomplete", + completedAt: 2472.5, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 4625.79, + frequencyPenalty: 2007.6, instructions: null, metadata: null, tools: [], diff --git a/docs/models/openresponsesstreameventresponseinprogress.md b/docs/models/openresponsesstreameventresponseinprogress.md index a5d342b1..e4a8ca13 100644 --- a/docs/models/openresponsesstreameventresponseinprogress.md +++ b/docs/models/openresponsesstreameventresponseinprogress.md @@ -14,11 +14,15 @@ let value: OpenResponsesStreamEventResponseInProgress = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "in_progress", + completedAt: 1373.8, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: null, + frequencyPenalty: 5865.18, instructions: null, metadata: null, tools: [], diff --git a/docs/models/operations/createresponsesresponse.md b/docs/models/operations/createresponsesresponse.md index cf5d4010..a724c72f 100644 --- a/docs/models/operations/createresponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -11,6 +11,8 @@ const value: models.OpenResponsesNonStreamingResponse = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "completed", + completedAt: 288.81, output: [ { id: "msg-abc123", @@ -28,6 +30,8 @@ const value: models.OpenResponsesNonStreamingResponse = { incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 1980.95, + frequencyPenalty: 5982.72, instructions: null, metadata: null, tools: [], diff --git a/docs/models/operations/createresponsesresponsebody.md b/docs/models/operations/createresponsesresponsebody.md index ac16541d..f546415b 100644 --- a/docs/models/operations/createresponsesresponsebody.md +++ b/docs/models/operations/createresponsesresponsebody.md @@ -15,11 +15,15 @@ let value: CreateResponsesResponseBody = { object: "response", createdAt: 1704067200, model: "gpt-4", + status: "in_progress", + completedAt: 8101.12, output: [], error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: 8087.26, + frequencyPenalty: 4886.88, instructions: null, metadata: null, tools: [], diff --git a/docs/models/operations/getgenerationdata.md b/docs/models/operations/getgenerationdata.md index 83bd5d01..80284727 100644 --- a/docs/models/operations/getgenerationdata.md +++ b/docs/models/operations/getgenerationdata.md @@ -40,6 +40,7 @@ let value: GetGenerationData = { nativeFinishReason: "stop", externalUser: "user-123", apiType: "completions", + router: "openrouter/auto", }; ``` @@ -78,4 +79,5 @@ let value: GetGenerationData = { | `isByok` | *boolean* | :heavy_check_mark: | Whether this used bring-your-own-key | false | | `nativeFinishReason` | *string* | :heavy_check_mark: | Native finish reason as reported by provider | stop | | `externalUser` | *string* | :heavy_check_mark: | External user identifier | user-123 | -| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | \ No newline at end of file +| `apiType` | [operations.ApiType](../../models/operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | +| `router` | *string* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | \ No newline at end of file diff --git a/docs/models/operations/getgenerationresponse.md b/docs/models/operations/getgenerationresponse.md index 5a382037..39a8787a 100644 --- a/docs/models/operations/getgenerationresponse.md +++ b/docs/models/operations/getgenerationresponse.md @@ -41,6 +41,7 @@ let value: GetGenerationResponse = { nativeFinishReason: "stop", externalUser: "user-123", apiType: null, + router: "openrouter/auto", }, }; ``` 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/responseinputimage.md b/docs/models/responseinputimage.md index fedb0ffe..f59b3fe8 100644 --- a/docs/models/responseinputimage.md +++ b/docs/models/responseinputimage.md @@ -17,6 +17,6 @@ let value: ResponseInputImage = { | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `type` | *"input_image"* | :heavy_check_mark: | N/A | +| `type` | [models.ResponseInputImageType](../models/responseinputimagetype.md) | :heavy_check_mark: | N/A | | `detail` | [models.ResponseInputImageDetail](../models/responseinputimagedetail.md) | :heavy_check_mark: | N/A | | `imageUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseinputimagetype.md b/docs/models/responseinputimagetype.md new file mode 100644 index 00000000..17e83452 --- /dev/null +++ b/docs/models/responseinputimagetype.md @@ -0,0 +1,15 @@ +# ResponseInputImageType + +## Example Usage + +```typescript +import { ResponseInputImageType } from "@openrouter/sdk/models"; + +let value: ResponseInputImageType = "input_image"; +``` + +## Values + +```typescript +"input_image" +``` \ No newline at end of file diff --git a/docs/models/responseinputvideo.md b/docs/models/responseinputvideo.md new file mode 100644 index 00000000..863fc5cd --- /dev/null +++ b/docs/models/responseinputvideo.md @@ -0,0 +1,21 @@ +# ResponseInputVideo + +Video input content item + +## Example Usage + +```typescript +import { ResponseInputVideo } from "@openrouter/sdk/models"; + +let value: ResponseInputVideo = { + type: "input_video", + videoUrl: "https://example.com/video.mp4", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `type` | *"input_video"* | :heavy_check_mark: | N/A | +| `videoUrl` | *string* | :heavy_check_mark: | A base64 data URL or remote URL that resolves to a video file | \ No newline at end of file diff --git a/docs/models/responseoutputtext.md b/docs/models/responseoutputtext.md index ea27fa62..c0d9c093 100644 --- a/docs/models/responseoutputtext.md +++ b/docs/models/responseoutputtext.md @@ -13,8 +13,9 @@ let value: ResponseOutputText = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `type` | *"output_text"* | :heavy_check_mark: | N/A | -| `text` | *string* | :heavy_check_mark: | N/A | -| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *"output_text"* | :heavy_check_mark: | N/A | +| `text` | *string* | :heavy_check_mark: | N/A | +| `annotations` | *models.OpenAIResponsesAnnotation*[] | :heavy_minus_sign: | N/A | +| `logprobs` | [models.Logprob](../models/logprob.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseoutputtexttoplogprob.md b/docs/models/responseoutputtexttoplogprob.md new file mode 100644 index 00000000..9e5fada5 --- /dev/null +++ b/docs/models/responseoutputtexttoplogprob.md @@ -0,0 +1,24 @@ +# ResponseOutputTextTopLogprob + +## Example Usage + +```typescript +import { ResponseOutputTextTopLogprob } from "@openrouter/sdk/models"; + +let value: ResponseOutputTextTopLogprob = { + token: "", + bytes: [ + 3036.17, + 344.14, + ], + logprob: 1976.4, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `token` | *string* | :heavy_check_mark: | N/A | +| `bytes` | *number*[] | :heavy_check_mark: | N/A | +| `logprob` | *number* | :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/jsr.json b/jsr.json index 2f4e1f40..afc76450 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.3.12", + "version": "0.3.14", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index baa5676f..441a5133 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.3.12", + "version": "0.3.14", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ diff --git a/src/lib/anthropic-compat.test.ts b/src/lib/anthropic-compat.test.ts index 10ebfcb3..731e59ec 100644 --- a/src/lib/anthropic-compat.test.ts +++ b/src/lib/anthropic-compat.test.ts @@ -15,12 +15,15 @@ function createMockResponse( id: "resp_test", object: "response", createdAt: Date.now(), + completedAt: Date.now(), model: "openai/gpt-4", status: "completed", error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: null, + frequencyPenalty: null, metadata: null, tools: [], toolChoice: "auto", diff --git a/src/lib/chat-compat.test.ts b/src/lib/chat-compat.test.ts index 7fe73e10..acaa99a9 100644 --- a/src/lib/chat-compat.test.ts +++ b/src/lib/chat-compat.test.ts @@ -15,12 +15,15 @@ function createMockResponse( id: "resp_test", object: "response", createdAt: Date.now(), + completedAt: Date.now(), model: "openai/gpt-4", status: "completed", error: null, incompleteDetails: null, temperature: null, topP: null, + presencePenalty: null, + frequencyPenalty: null, metadata: null, tools: [], toolChoice: "auto", diff --git a/src/lib/config.ts b/src/lib/config.ts index 368e0171..4903984c 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -72,7 +72,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.3.12", + sdkVersion: "0.3.14", genVersion: "2.788.4", - userAgent: "speakeasy-sdk/typescript 0.3.12 2.788.4 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.3.14 2.788.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/lib/tool-types.ts b/src/lib/tool-types.ts index f8d693ac..794d29c4 100644 --- a/src/lib/tool-types.ts +++ b/src/lib/tool-types.ts @@ -300,7 +300,7 @@ export interface StepResult { readonly toolCalls: TypedToolCallUnion[]; readonly toolResults: ToolExecutionResultUnion[]; readonly response: models.OpenResponsesNonStreamingResponse; - readonly usage?: models.OpenResponsesUsage | undefined; + readonly usage?: models.OpenResponsesUsage | null | undefined; readonly finishReason?: string | undefined; readonly warnings?: Warning[] | undefined; readonly experimental_providerMetadata?: Record | undefined; 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/chatmessagetokenlogprob.ts b/src/models/chatmessagetokenlogprob.ts index 327bfbd1..f1d1922a 100644 --- a/src/models/chatmessagetokenlogprob.ts +++ b/src/models/chatmessagetokenlogprob.ts @@ -9,7 +9,7 @@ import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -export type TopLogprob = { +export type ChatMessageTokenLogprobTopLogprob = { token: string; logprob: number; bytes: Array | null; @@ -19,24 +19,26 @@ export type ChatMessageTokenLogprob = { token: string; logprob: number; bytes: Array | null; - topLogprobs: Array; + topLogprobs: Array; }; /** @internal */ -export const TopLogprob$inboundSchema: z.ZodType = z - .object({ - token: z.string(), - logprob: z.number(), - bytes: z.nullable(z.array(z.number())), - }); +export const ChatMessageTokenLogprobTopLogprob$inboundSchema: z.ZodType< + ChatMessageTokenLogprobTopLogprob, + unknown +> = z.object({ + token: z.string(), + logprob: z.number(), + bytes: z.nullable(z.array(z.number())), +}); -export function topLogprobFromJSON( +export function chatMessageTokenLogprobTopLogprobFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => TopLogprob$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TopLogprob' from JSON`, + (x) => ChatMessageTokenLogprobTopLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatMessageTokenLogprobTopLogprob' from JSON`, ); } @@ -48,7 +50,9 @@ export const ChatMessageTokenLogprob$inboundSchema: z.ZodType< token: z.string(), logprob: z.number(), bytes: z.nullable(z.array(z.number())), - top_logprobs: z.array(z.lazy(() => TopLogprob$inboundSchema)), + top_logprobs: z.array( + z.lazy(() => ChatMessageTokenLogprobTopLogprob$inboundSchema), + ), }).transform((v) => { return remap$(v, { "top_logprobs": "topLogprobs", diff --git a/src/models/index.ts b/src/models/index.ts index f8e040d1..765d20b9 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"; @@ -123,6 +128,7 @@ export * from "./responseinputaudio.js"; export * from "./responseinputfile.js"; export * from "./responseinputimage.js"; export * from "./responseinputtext.js"; +export * from "./responseinputvideo.js"; export * from "./responseoutputtext.js"; export * from "./responseserrorfield.js"; export * from "./responsesformatjsonobject.js"; @@ -134,6 +140,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/openairesponsesinputunion.ts b/src/models/openairesponsesinputunion.ts index b840e414..562b0cb2 100644 --- a/src/models/openairesponsesinputunion.ts +++ b/src/models/openairesponsesinputunion.ts @@ -101,7 +101,7 @@ export type OpenAIResponsesInputRoleUnion2 = export type OpenAIResponsesInputContent3 = | ResponseInputText - | ResponseInputImage + | (ResponseInputImage & { type: "input_image" }) | ResponseInputFile | ResponseInputAudio; @@ -114,7 +114,7 @@ export type OpenAIResponsesInputMessage2 = { | OpenAIResponsesInputRoleDeveloper2; content: Array< | ResponseInputText - | ResponseInputImage + | (ResponseInputImage & { type: "input_image" }) | ResponseInputFile | ResponseInputAudio >; @@ -163,14 +163,14 @@ export type OpenAIResponsesInputRoleUnion1 = export type OpenAIResponsesInputContent1 = | ResponseInputText - | ResponseInputImage + | (ResponseInputImage & { type: "input_image" }) | ResponseInputFile | ResponseInputAudio; export type OpenAIResponsesInputContent2 = | Array< | ResponseInputText - | ResponseInputImage + | (ResponseInputImage & { type: "input_image" }) | ResponseInputFile | ResponseInputAudio > @@ -186,7 +186,7 @@ export type OpenAIResponsesInputMessage1 = { content: | Array< | ResponseInputText - | ResponseInputImage + | (ResponseInputImage & { type: "input_image" }) | ResponseInputFile | ResponseInputAudio > @@ -324,7 +324,9 @@ export const OpenAIResponsesInputContent3$inboundSchema: z.ZodType< unknown > = z.union([ ResponseInputText$inboundSchema, - ResponseInputImage$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), ResponseInputFile$inboundSchema, ResponseInputAudio$inboundSchema, ]); @@ -354,7 +356,9 @@ export const OpenAIResponsesInputMessage2$inboundSchema: z.ZodType< content: z.array( z.union([ ResponseInputText$inboundSchema, - ResponseInputImage$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), ResponseInputFile$inboundSchema, ResponseInputAudio$inboundSchema, ]), @@ -423,7 +427,9 @@ export const OpenAIResponsesInputContent1$inboundSchema: z.ZodType< unknown > = z.union([ ResponseInputText$inboundSchema, - ResponseInputImage$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), ResponseInputFile$inboundSchema, ResponseInputAudio$inboundSchema, ]); @@ -446,7 +452,9 @@ export const OpenAIResponsesInputContent2$inboundSchema: z.ZodType< z.array( z.union([ ResponseInputText$inboundSchema, - ResponseInputImage$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), ResponseInputFile$inboundSchema, ResponseInputAudio$inboundSchema, ]), @@ -480,7 +488,9 @@ export const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType< z.array( z.union([ ResponseInputText$inboundSchema, - ResponseInputImage$inboundSchema, + ResponseInputImage$inboundSchema.and( + z.object({ type: z.literal("input_image") }), + ), ResponseInputFile$inboundSchema, ResponseInputAudio$inboundSchema, ]), diff --git a/src/models/openresponseseasyinputmessage.ts b/src/models/openresponseseasyinputmessage.ts index dedeed37..f8b55e63 100644 --- a/src/models/openresponseseasyinputmessage.ts +++ b/src/models/openresponseseasyinputmessage.ts @@ -4,7 +4,9 @@ */ import * as z from "zod/v4"; -import { ClosedEnum } from "../types/enums.js"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { ResponseInputAudio, ResponseInputAudio$Outbound, @@ -15,22 +17,22 @@ import { ResponseInputFile$Outbound, ResponseInputFile$outboundSchema, } from "./responseinputfile.js"; -import { - ResponseInputImage, - ResponseInputImage$Outbound, - ResponseInputImage$outboundSchema, -} from "./responseinputimage.js"; import { ResponseInputText, ResponseInputText$Outbound, ResponseInputText$outboundSchema, } from "./responseinputtext.js"; +import { + ResponseInputVideo, + ResponseInputVideo$Outbound, + ResponseInputVideo$outboundSchema, +} from "./responseinputvideo.js"; -export const OpenResponsesEasyInputMessageType = { +export const OpenResponsesEasyInputMessageTypeMessage = { Message: "message", } as const; -export type OpenResponsesEasyInputMessageType = ClosedEnum< - typeof OpenResponsesEasyInputMessageType +export type OpenResponsesEasyInputMessageTypeMessage = ClosedEnum< + typeof OpenResponsesEasyInputMessageTypeMessage >; export const OpenResponsesEasyInputMessageRoleDeveloper = { @@ -67,23 +69,43 @@ export type OpenResponsesEasyInputMessageRoleUnion = | OpenResponsesEasyInputMessageRoleAssistant | OpenResponsesEasyInputMessageRoleDeveloper; -export type OpenResponsesEasyInputMessageContent1 = +export const OpenResponsesEasyInputMessageDetail = { + Auto: "auto", + High: "high", + Low: "low", +} as const; +export type OpenResponsesEasyInputMessageDetail = OpenEnum< + typeof OpenResponsesEasyInputMessageDetail +>; + +/** + * Image input content item + */ +export type OpenResponsesEasyInputMessageContentInputImage = { + type: "input_image"; + detail: OpenResponsesEasyInputMessageDetail; + imageUrl?: string | null | undefined; +}; + +export type OpenResponsesEasyInputMessageContentUnion1 = | ResponseInputText - | ResponseInputImage + | OpenResponsesEasyInputMessageContentInputImage | ResponseInputFile - | ResponseInputAudio; + | ResponseInputAudio + | ResponseInputVideo; -export type OpenResponsesEasyInputMessageContent2 = +export type OpenResponsesEasyInputMessageContentUnion2 = | Array< | ResponseInputText - | ResponseInputImage + | OpenResponsesEasyInputMessageContentInputImage | ResponseInputFile | ResponseInputAudio + | ResponseInputVideo > | string; export type OpenResponsesEasyInputMessage = { - type?: OpenResponsesEasyInputMessageType | undefined; + type?: OpenResponsesEasyInputMessageTypeMessage | undefined; role: | OpenResponsesEasyInputMessageRoleUser | OpenResponsesEasyInputMessageRoleSystem @@ -92,17 +114,18 @@ export type OpenResponsesEasyInputMessage = { content: | Array< | ResponseInputText - | ResponseInputImage + | OpenResponsesEasyInputMessageContentInputImage | ResponseInputFile | ResponseInputAudio + | ResponseInputVideo > | string; }; /** @internal */ -export const OpenResponsesEasyInputMessageType$outboundSchema: z.ZodEnum< - typeof OpenResponsesEasyInputMessageType -> = z.enum(OpenResponsesEasyInputMessageType); +export const OpenResponsesEasyInputMessageTypeMessage$outboundSchema: z.ZodEnum< + typeof OpenResponsesEasyInputMessageTypeMessage +> = z.enum(OpenResponsesEasyInputMessageTypeMessage); /** @internal */ export const OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema: @@ -156,65 +179,112 @@ export function openResponsesEasyInputMessageRoleUnionToJSON( } /** @internal */ -export type OpenResponsesEasyInputMessageContent1$Outbound = +export const OpenResponsesEasyInputMessageDetail$outboundSchema: z.ZodType< + string, + OpenResponsesEasyInputMessageDetail +> = openEnums.outboundSchema(OpenResponsesEasyInputMessageDetail); + +/** @internal */ +export type OpenResponsesEasyInputMessageContentInputImage$Outbound = { + type: "input_image"; + detail: string; + image_url?: string | null | undefined; +}; + +/** @internal */ +export const OpenResponsesEasyInputMessageContentInputImage$outboundSchema: + z.ZodType< + OpenResponsesEasyInputMessageContentInputImage$Outbound, + OpenResponsesEasyInputMessageContentInputImage + > = z.object({ + type: z.literal("input_image"), + detail: OpenResponsesEasyInputMessageDetail$outboundSchema, + imageUrl: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + }); + }); + +export function openResponsesEasyInputMessageContentInputImageToJSON( + openResponsesEasyInputMessageContentInputImage: + OpenResponsesEasyInputMessageContentInputImage, +): string { + return JSON.stringify( + OpenResponsesEasyInputMessageContentInputImage$outboundSchema.parse( + openResponsesEasyInputMessageContentInputImage, + ), + ); +} + +/** @internal */ +export type OpenResponsesEasyInputMessageContentUnion1$Outbound = | ResponseInputText$Outbound - | ResponseInputImage$Outbound + | OpenResponsesEasyInputMessageContentInputImage$Outbound | ResponseInputFile$Outbound - | ResponseInputAudio$Outbound; + | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound; /** @internal */ -export const OpenResponsesEasyInputMessageContent1$outboundSchema: z.ZodType< - OpenResponsesEasyInputMessageContent1$Outbound, - OpenResponsesEasyInputMessageContent1 -> = z.union([ - ResponseInputText$outboundSchema, - ResponseInputImage$outboundSchema, - ResponseInputFile$outboundSchema, - ResponseInputAudio$outboundSchema, -]); +export const OpenResponsesEasyInputMessageContentUnion1$outboundSchema: + z.ZodType< + OpenResponsesEasyInputMessageContentUnion1$Outbound, + OpenResponsesEasyInputMessageContentUnion1 + > = z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => OpenResponsesEasyInputMessageContentInputImage$outboundSchema), + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, + ResponseInputVideo$outboundSchema, + ]); -export function openResponsesEasyInputMessageContent1ToJSON( - openResponsesEasyInputMessageContent1: OpenResponsesEasyInputMessageContent1, +export function openResponsesEasyInputMessageContentUnion1ToJSON( + openResponsesEasyInputMessageContentUnion1: + OpenResponsesEasyInputMessageContentUnion1, ): string { return JSON.stringify( - OpenResponsesEasyInputMessageContent1$outboundSchema.parse( - openResponsesEasyInputMessageContent1, + OpenResponsesEasyInputMessageContentUnion1$outboundSchema.parse( + openResponsesEasyInputMessageContentUnion1, ), ); } /** @internal */ -export type OpenResponsesEasyInputMessageContent2$Outbound = +export type OpenResponsesEasyInputMessageContentUnion2$Outbound = | Array< | ResponseInputText$Outbound - | ResponseInputImage$Outbound + | OpenResponsesEasyInputMessageContentInputImage$Outbound | ResponseInputFile$Outbound | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound > | string; /** @internal */ -export const OpenResponsesEasyInputMessageContent2$outboundSchema: z.ZodType< - OpenResponsesEasyInputMessageContent2$Outbound, - OpenResponsesEasyInputMessageContent2 -> = z.union([ - z.array( - z.union([ +export const OpenResponsesEasyInputMessageContentUnion2$outboundSchema: + z.ZodType< + OpenResponsesEasyInputMessageContentUnion2$Outbound, + OpenResponsesEasyInputMessageContentUnion2 + > = z.union([ + z.array(z.union([ ResponseInputText$outboundSchema, - ResponseInputImage$outboundSchema, + z.lazy(() => + OpenResponsesEasyInputMessageContentInputImage$outboundSchema + ), ResponseInputFile$outboundSchema, ResponseInputAudio$outboundSchema, - ]), - ), - z.string(), -]); + ResponseInputVideo$outboundSchema, + ])), + z.string(), + ]); -export function openResponsesEasyInputMessageContent2ToJSON( - openResponsesEasyInputMessageContent2: OpenResponsesEasyInputMessageContent2, +export function openResponsesEasyInputMessageContentUnion2ToJSON( + openResponsesEasyInputMessageContentUnion2: + OpenResponsesEasyInputMessageContentUnion2, ): string { return JSON.stringify( - OpenResponsesEasyInputMessageContent2$outboundSchema.parse( - openResponsesEasyInputMessageContent2, + OpenResponsesEasyInputMessageContentUnion2$outboundSchema.parse( + openResponsesEasyInputMessageContentUnion2, ), ); } @@ -226,9 +296,10 @@ export type OpenResponsesEasyInputMessage$Outbound = { content: | Array< | ResponseInputText$Outbound - | ResponseInputImage$Outbound + | OpenResponsesEasyInputMessageContentInputImage$Outbound | ResponseInputFile$Outbound | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound > | string; }; @@ -238,7 +309,7 @@ export const OpenResponsesEasyInputMessage$outboundSchema: z.ZodType< OpenResponsesEasyInputMessage$Outbound, OpenResponsesEasyInputMessage > = z.object({ - type: OpenResponsesEasyInputMessageType$outboundSchema.optional(), + type: OpenResponsesEasyInputMessageTypeMessage$outboundSchema.optional(), role: z.union([ OpenResponsesEasyInputMessageRoleUser$outboundSchema, OpenResponsesEasyInputMessageRoleSystem$outboundSchema, @@ -246,14 +317,15 @@ export const OpenResponsesEasyInputMessage$outboundSchema: z.ZodType< OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema, ]), content: z.union([ - z.array( - z.union([ - ResponseInputText$outboundSchema, - ResponseInputImage$outboundSchema, - ResponseInputFile$outboundSchema, - ResponseInputAudio$outboundSchema, - ]), - ), + z.array(z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => + OpenResponsesEasyInputMessageContentInputImage$outboundSchema + ), + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, + ResponseInputVideo$outboundSchema, + ])), z.string(), ]), }); diff --git a/src/models/openresponsesinputmessageitem.ts b/src/models/openresponsesinputmessageitem.ts index d95f5d29..9dcfafb7 100644 --- a/src/models/openresponsesinputmessageitem.ts +++ b/src/models/openresponsesinputmessageitem.ts @@ -4,7 +4,9 @@ */ import * as z from "zod/v4"; -import { ClosedEnum } from "../types/enums.js"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { ResponseInputAudio, ResponseInputAudio$Outbound, @@ -15,22 +17,22 @@ import { ResponseInputFile$Outbound, ResponseInputFile$outboundSchema, } from "./responseinputfile.js"; -import { - ResponseInputImage, - ResponseInputImage$Outbound, - ResponseInputImage$outboundSchema, -} from "./responseinputimage.js"; import { ResponseInputText, ResponseInputText$Outbound, ResponseInputText$outboundSchema, } from "./responseinputtext.js"; +import { + ResponseInputVideo, + ResponseInputVideo$Outbound, + ResponseInputVideo$outboundSchema, +} from "./responseinputvideo.js"; -export const OpenResponsesInputMessageItemType = { +export const OpenResponsesInputMessageItemTypeMessage = { Message: "message", } as const; -export type OpenResponsesInputMessageItemType = ClosedEnum< - typeof OpenResponsesInputMessageItemType +export type OpenResponsesInputMessageItemTypeMessage = ClosedEnum< + typeof OpenResponsesInputMessageItemTypeMessage >; export const OpenResponsesInputMessageItemRoleDeveloper = { @@ -59,31 +61,51 @@ export type OpenResponsesInputMessageItemRoleUnion = | OpenResponsesInputMessageItemRoleSystem | OpenResponsesInputMessageItemRoleDeveloper; -export type OpenResponsesInputMessageItemContent = +export const OpenResponsesInputMessageItemDetail = { + Auto: "auto", + High: "high", + Low: "low", +} as const; +export type OpenResponsesInputMessageItemDetail = OpenEnum< + typeof OpenResponsesInputMessageItemDetail +>; + +/** + * Image input content item + */ +export type OpenResponsesInputMessageItemContentInputImage = { + type: "input_image"; + detail: OpenResponsesInputMessageItemDetail; + imageUrl?: string | null | undefined; +}; + +export type OpenResponsesInputMessageItemContentUnion = | ResponseInputText - | ResponseInputImage + | OpenResponsesInputMessageItemContentInputImage | ResponseInputFile - | ResponseInputAudio; + | ResponseInputAudio + | ResponseInputVideo; export type OpenResponsesInputMessageItem = { id?: string | undefined; - type?: OpenResponsesInputMessageItemType | undefined; + type?: OpenResponsesInputMessageItemTypeMessage | undefined; role: | OpenResponsesInputMessageItemRoleUser | OpenResponsesInputMessageItemRoleSystem | OpenResponsesInputMessageItemRoleDeveloper; content: Array< | ResponseInputText - | ResponseInputImage + | OpenResponsesInputMessageItemContentInputImage | ResponseInputFile | ResponseInputAudio + | ResponseInputVideo >; }; /** @internal */ -export const OpenResponsesInputMessageItemType$outboundSchema: z.ZodEnum< - typeof OpenResponsesInputMessageItemType -> = z.enum(OpenResponsesInputMessageItemType); +export const OpenResponsesInputMessageItemTypeMessage$outboundSchema: z.ZodEnum< + typeof OpenResponsesInputMessageItemTypeMessage +> = z.enum(OpenResponsesInputMessageItemTypeMessage); /** @internal */ export const OpenResponsesInputMessageItemRoleDeveloper$outboundSchema: @@ -129,29 +151,72 @@ export function openResponsesInputMessageItemRoleUnionToJSON( } /** @internal */ -export type OpenResponsesInputMessageItemContent$Outbound = +export const OpenResponsesInputMessageItemDetail$outboundSchema: z.ZodType< + string, + OpenResponsesInputMessageItemDetail +> = openEnums.outboundSchema(OpenResponsesInputMessageItemDetail); + +/** @internal */ +export type OpenResponsesInputMessageItemContentInputImage$Outbound = { + type: "input_image"; + detail: string; + image_url?: string | null | undefined; +}; + +/** @internal */ +export const OpenResponsesInputMessageItemContentInputImage$outboundSchema: + z.ZodType< + OpenResponsesInputMessageItemContentInputImage$Outbound, + OpenResponsesInputMessageItemContentInputImage + > = z.object({ + type: z.literal("input_image"), + detail: OpenResponsesInputMessageItemDetail$outboundSchema, + imageUrl: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + imageUrl: "image_url", + }); + }); + +export function openResponsesInputMessageItemContentInputImageToJSON( + openResponsesInputMessageItemContentInputImage: + OpenResponsesInputMessageItemContentInputImage, +): string { + return JSON.stringify( + OpenResponsesInputMessageItemContentInputImage$outboundSchema.parse( + openResponsesInputMessageItemContentInputImage, + ), + ); +} + +/** @internal */ +export type OpenResponsesInputMessageItemContentUnion$Outbound = | ResponseInputText$Outbound - | ResponseInputImage$Outbound + | OpenResponsesInputMessageItemContentInputImage$Outbound | ResponseInputFile$Outbound - | ResponseInputAudio$Outbound; + | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound; /** @internal */ -export const OpenResponsesInputMessageItemContent$outboundSchema: z.ZodType< - OpenResponsesInputMessageItemContent$Outbound, - OpenResponsesInputMessageItemContent -> = z.union([ - ResponseInputText$outboundSchema, - ResponseInputImage$outboundSchema, - ResponseInputFile$outboundSchema, - ResponseInputAudio$outboundSchema, -]); +export const OpenResponsesInputMessageItemContentUnion$outboundSchema: + z.ZodType< + OpenResponsesInputMessageItemContentUnion$Outbound, + OpenResponsesInputMessageItemContentUnion + > = z.union([ + ResponseInputText$outboundSchema, + z.lazy(() => OpenResponsesInputMessageItemContentInputImage$outboundSchema), + ResponseInputFile$outboundSchema, + ResponseInputAudio$outboundSchema, + ResponseInputVideo$outboundSchema, + ]); -export function openResponsesInputMessageItemContentToJSON( - openResponsesInputMessageItemContent: OpenResponsesInputMessageItemContent, +export function openResponsesInputMessageItemContentUnionToJSON( + openResponsesInputMessageItemContentUnion: + OpenResponsesInputMessageItemContentUnion, ): string { return JSON.stringify( - OpenResponsesInputMessageItemContent$outboundSchema.parse( - openResponsesInputMessageItemContent, + OpenResponsesInputMessageItemContentUnion$outboundSchema.parse( + openResponsesInputMessageItemContentUnion, ), ); } @@ -163,9 +228,10 @@ export type OpenResponsesInputMessageItem$Outbound = { role: string | string | string; content: Array< | ResponseInputText$Outbound - | ResponseInputImage$Outbound + | OpenResponsesInputMessageItemContentInputImage$Outbound | ResponseInputFile$Outbound | ResponseInputAudio$Outbound + | ResponseInputVideo$Outbound >; }; @@ -175,7 +241,7 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< OpenResponsesInputMessageItem > = z.object({ id: z.string().optional(), - type: OpenResponsesInputMessageItemType$outboundSchema.optional(), + type: OpenResponsesInputMessageItemTypeMessage$outboundSchema.optional(), role: z.union([ OpenResponsesInputMessageItemRoleUser$outboundSchema, OpenResponsesInputMessageItemRoleSystem$outboundSchema, @@ -184,9 +250,12 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< content: z.array( z.union([ ResponseInputText$outboundSchema, - ResponseInputImage$outboundSchema, + z.lazy(() => + OpenResponsesInputMessageItemContentInputImage$outboundSchema + ), ResponseInputFile$outboundSchema, ResponseInputAudio$outboundSchema, + ResponseInputVideo$outboundSchema, ]), ), }); diff --git a/src/models/openresponsesnonstreamingresponse.ts b/src/models/openresponsesnonstreamingresponse.ts index 55771267..b6c8c858 100644 --- a/src/models/openresponsesnonstreamingresponse.ts +++ b/src/models/openresponsesnonstreamingresponse.ts @@ -105,7 +105,8 @@ export type OpenResponsesNonStreamingResponse = { object: ObjectT; createdAt: number; model: string; - status?: OpenAIResponsesResponseStatus | undefined; + status: OpenAIResponsesResponseStatus; + completedAt: number | null; output: Array; user?: string | null | undefined; outputText?: string | undefined; @@ -119,12 +120,14 @@ export type OpenResponsesNonStreamingResponse = { /** * Token usage information for the response */ - usage?: OpenResponsesUsage | undefined; + usage?: OpenResponsesUsage | null | undefined; maxToolCalls?: number | null | undefined; topLogprobs?: number | undefined; maxOutputTokens?: number | null | undefined; temperature: number | null; topP: number | null; + presencePenalty: number | null; + frequencyPenalty: number | null; instructions?: OpenAIResponsesInputUnion | null | undefined; /** * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. @@ -216,7 +219,8 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< object: ObjectT$inboundSchema, created_at: z.number(), model: z.string(), - status: OpenAIResponsesResponseStatus$inboundSchema.optional(), + status: OpenAIResponsesResponseStatus$inboundSchema, + completed_at: z.nullable(z.number()), output: z.array(ResponsesOutputItem$inboundSchema), user: z.nullable(z.string()).optional(), output_text: z.string().optional(), @@ -226,12 +230,14 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< incomplete_details: z.nullable( OpenAIResponsesIncompleteDetails$inboundSchema, ), - usage: OpenResponsesUsage$inboundSchema.optional(), + usage: z.nullable(OpenResponsesUsage$inboundSchema).optional(), max_tool_calls: z.nullable(z.number()).optional(), top_logprobs: z.number().optional(), max_output_tokens: z.nullable(z.number()).optional(), temperature: z.nullable(z.number()), top_p: z.nullable(z.number()), + presence_penalty: z.nullable(z.number()), + frequency_penalty: z.nullable(z.number()), instructions: z.nullable(OpenAIResponsesInputUnion$inboundSchema).optional(), metadata: z.nullable(z.record(z.string(), z.string())), tools: z.array( @@ -257,6 +263,7 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { "created_at": "createdAt", + "completed_at": "completedAt", "output_text": "outputText", "prompt_cache_key": "promptCacheKey", "safety_identifier": "safetyIdentifier", @@ -265,6 +272,8 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< "top_logprobs": "topLogprobs", "max_output_tokens": "maxOutputTokens", "top_p": "topP", + "presence_penalty": "presencePenalty", + "frequency_penalty": "frequencyPenalty", "tool_choice": "toolChoice", "parallel_tool_calls": "parallelToolCalls", "previous_response_id": "previousResponseId", 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..dc9fc328 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 @@ -304,7 +321,19 @@ export type OpenResponsesRequest = { maxOutputTokens?: number | null | undefined; temperature?: number | null | undefined; topP?: number | null | undefined; + topLogprobs?: number | null | undefined; + maxToolCalls?: number | null | undefined; + presencePenalty?: number | null | undefined; + frequencyPenalty?: 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 +353,7 @@ export type OpenResponsesRequest = { */ plugins?: | Array< + | OpenResponsesRequestPluginAutoRouter | OpenResponsesRequestPluginModeration | OpenResponsesRequestPluginWeb | OpenResponsesRequestPluginFileParser @@ -401,6 +431,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 +578,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 +609,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 +622,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 +748,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 +792,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), @@ -754,7 +832,13 @@ export type OpenResponsesRequest$Outbound = { max_output_tokens?: number | null | undefined; temperature?: number | null | undefined; top_p?: number | null | undefined; + top_logprobs?: number | null | undefined; + max_tool_calls?: number | null | undefined; + presence_penalty?: number | null | undefined; + frequency_penalty?: 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 +852,7 @@ export type OpenResponsesRequest$Outbound = { provider?: OpenResponsesRequestProvider$Outbound | null | undefined; plugins?: | Array< + | OpenResponsesRequestPluginAutoRouter$Outbound | OpenResponsesRequestPluginModeration$Outbound | OpenResponsesRequestPluginWeb$Outbound | OpenResponsesRequestPluginFileParser$Outbound @@ -804,7 +889,14 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< maxOutputTokens: z.nullable(z.number()).optional(), temperature: z.nullable(z.number()).optional(), topP: z.nullable(z.number()).optional(), + topLogprobs: z.nullable(z.int()).optional(), + maxToolCalls: z.nullable(z.int()).optional(), + presencePenalty: z.nullable(z.number()).optional(), + frequencyPenalty: 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 +913,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), @@ -835,7 +928,12 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< parallelToolCalls: "parallel_tool_calls", maxOutputTokens: "max_output_tokens", topP: "top_p", + topLogprobs: "top_logprobs", + maxToolCalls: "max_tool_calls", + presencePenalty: "presence_penalty", + frequencyPenalty: "frequency_penalty", topK: "top_k", + imageConfig: "image_config", promptCacheKey: "prompt_cache_key", previousResponseId: "previous_response_id", safetyIdentifier: "safety_identifier", diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index 98e74eb7..7ed9f3de 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -159,6 +159,10 @@ export type GetGenerationData = { * Type of API used for the generation */ apiType: ApiType | null; + /** + * Router used for the request (e.g., openrouter/auto) + */ + router: string | null; }; /** @@ -233,6 +237,7 @@ export const GetGenerationData$inboundSchema: z.ZodType< native_finish_reason: z.nullable(z.string()), external_user: z.nullable(z.string()), api_type: z.nullable(ApiType$inboundSchema), + router: z.nullable(z.string()), }).transform((v) => { return remap$(v, { "upstream_id": "upstreamId", diff --git a/src/models/percentilelatencycutoffs.ts b/src/models/percentilelatencycutoffs.ts new file mode 100644 index 00000000..8d4f9360 --- /dev/null +++ b/src/models/percentilelatencycutoffs.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 92e053096488 + */ + +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..0593bbc9 --- /dev/null +++ b/src/models/percentilestats.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9a6b504d3964 + */ + +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..c29b848d --- /dev/null +++ b/src/models/percentilethroughputcutoffs.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 847aba8ff633 + */ + +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..926e0bce --- /dev/null +++ b/src/models/preferredmaxlatency.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e03f33269427 + */ + +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..ace60e53 --- /dev/null +++ b/src/models/preferredminthroughput.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5ff9056f1474 + */ + +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/responseinputimage.ts b/src/models/responseinputimage.ts index 44c63262..572d0e52 100644 --- a/src/models/responseinputimage.ts +++ b/src/models/responseinputimage.ts @@ -7,10 +7,15 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; +import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +export const ResponseInputImageType = { + InputImage: "input_image", +} as const; +export type ResponseInputImageType = ClosedEnum; + export const ResponseInputImageDetail = { Auto: "auto", High: "high", @@ -24,11 +29,20 @@ export type ResponseInputImageDetail = OpenEnum< * Image input content item */ export type ResponseInputImage = { - type: "input_image"; + type: ResponseInputImageType; detail: ResponseInputImageDetail; imageUrl?: string | null | undefined; }; +/** @internal */ +export const ResponseInputImageType$inboundSchema: z.ZodEnum< + typeof ResponseInputImageType +> = z.enum(ResponseInputImageType); +/** @internal */ +export const ResponseInputImageType$outboundSchema: z.ZodEnum< + typeof ResponseInputImageType +> = ResponseInputImageType$inboundSchema; + /** @internal */ export const ResponseInputImageDetail$inboundSchema: z.ZodType< ResponseInputImageDetail, @@ -45,7 +59,7 @@ export const ResponseInputImage$inboundSchema: z.ZodType< ResponseInputImage, unknown > = z.object({ - type: z.literal("input_image"), + type: ResponseInputImageType$inboundSchema, detail: ResponseInputImageDetail$inboundSchema, image_url: z.nullable(z.string()).optional(), }).transform((v) => { @@ -55,7 +69,7 @@ export const ResponseInputImage$inboundSchema: z.ZodType< }); /** @internal */ export type ResponseInputImage$Outbound = { - type: "input_image"; + type: string; detail: string; image_url?: string | null | undefined; }; @@ -65,7 +79,7 @@ export const ResponseInputImage$outboundSchema: z.ZodType< ResponseInputImage$Outbound, ResponseInputImage > = z.object({ - type: z.literal("input_image"), + type: ResponseInputImageType$outboundSchema, detail: ResponseInputImageDetail$outboundSchema, imageUrl: z.nullable(z.string()).optional(), }).transform((v) => { diff --git a/src/models/responseinputvideo.ts b/src/models/responseinputvideo.ts new file mode 100644 index 00000000..dd76764e --- /dev/null +++ b/src/models/responseinputvideo.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 79bef840e448 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +/** + * Video input content item + */ +export type ResponseInputVideo = { + type: "input_video"; + /** + * A base64 data URL or remote URL that resolves to a video file + */ + videoUrl: string; +}; + +/** @internal */ +export type ResponseInputVideo$Outbound = { + type: "input_video"; + video_url: string; +}; + +/** @internal */ +export const ResponseInputVideo$outboundSchema: z.ZodType< + ResponseInputVideo$Outbound, + ResponseInputVideo +> = z.object({ + type: z.literal("input_video"), + videoUrl: z.string(), +}).transform((v) => { + return remap$(v, { + videoUrl: "video_url", + }); +}); + +export function responseInputVideoToJSON( + responseInputVideo: ResponseInputVideo, +): string { + return JSON.stringify( + ResponseInputVideo$outboundSchema.parse(responseInputVideo), + ); +} diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index 5028e794..1d68d6e5 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -4,6 +4,7 @@ */ import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -14,12 +15,120 @@ import { OpenAIResponsesAnnotation$outboundSchema, } from "./openairesponsesannotation.js"; +export type ResponseOutputTextTopLogprob = { + token: string; + bytes: Array; + logprob: number; +}; + +export type Logprob = { + token: string; + bytes: Array; + logprob: number; + topLogprobs: Array; +}; + export type ResponseOutputText = { type: "output_text"; text: string; annotations?: Array | undefined; + logprobs?: Array | undefined; +}; + +/** @internal */ +export const ResponseOutputTextTopLogprob$inboundSchema: z.ZodType< + ResponseOutputTextTopLogprob, + unknown +> = z.object({ + token: z.string(), + bytes: z.array(z.number()), + logprob: z.number(), +}); +/** @internal */ +export type ResponseOutputTextTopLogprob$Outbound = { + token: string; + bytes: Array; + logprob: number; }; +/** @internal */ +export const ResponseOutputTextTopLogprob$outboundSchema: z.ZodType< + ResponseOutputTextTopLogprob$Outbound, + ResponseOutputTextTopLogprob +> = z.object({ + token: z.string(), + bytes: z.array(z.number()), + logprob: z.number(), +}); + +export function responseOutputTextTopLogprobToJSON( + responseOutputTextTopLogprob: ResponseOutputTextTopLogprob, +): string { + return JSON.stringify( + ResponseOutputTextTopLogprob$outboundSchema.parse( + responseOutputTextTopLogprob, + ), + ); +} +export function responseOutputTextTopLogprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ResponseOutputTextTopLogprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ResponseOutputTextTopLogprob' from JSON`, + ); +} + +/** @internal */ +export const Logprob$inboundSchema: z.ZodType = z.object({ + token: z.string(), + bytes: z.array(z.number()), + logprob: z.number(), + top_logprobs: z.array( + z.lazy(() => ResponseOutputTextTopLogprob$inboundSchema), + ), +}).transform((v) => { + return remap$(v, { + "top_logprobs": "topLogprobs", + }); +}); +/** @internal */ +export type Logprob$Outbound = { + token: string; + bytes: Array; + logprob: number; + top_logprobs: Array; +}; + +/** @internal */ +export const Logprob$outboundSchema: z.ZodType = z + .object({ + token: z.string(), + bytes: z.array(z.number()), + logprob: z.number(), + topLogprobs: z.array( + z.lazy(() => ResponseOutputTextTopLogprob$outboundSchema), + ), + }).transform((v) => { + return remap$(v, { + topLogprobs: "top_logprobs", + }); + }); + +export function logprobToJSON(logprob: Logprob): string { + return JSON.stringify(Logprob$outboundSchema.parse(logprob)); +} +export function logprobFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Logprob$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Logprob' from JSON`, + ); +} + /** @internal */ export const ResponseOutputText$inboundSchema: z.ZodType< ResponseOutputText, @@ -28,12 +137,14 @@ export const ResponseOutputText$inboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), + logprobs: z.array(z.lazy(() => Logprob$inboundSchema)).optional(), }); /** @internal */ export type ResponseOutputText$Outbound = { type: "output_text"; text: string; annotations?: Array | undefined; + logprobs?: Array | undefined; }; /** @internal */ @@ -44,6 +155,7 @@ export const ResponseOutputText$outboundSchema: z.ZodType< type: z.literal("output_text"), text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), + logprobs: z.array(z.lazy(() => Logprob$outboundSchema)).optional(), }); export function responseOutputTextToJSON( 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..ce35ab66 --- /dev/null +++ b/src/models/responsesoutputmodality.ts @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c42840bf36d8 + */ + +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", diff --git a/tests/e2e/call-model.test.ts b/tests/e2e/call-model.test.ts index c4466fbf..d562f46c 100644 --- a/tests/e2e/call-model.test.ts +++ b/tests/e2e/call-model.test.ts @@ -54,7 +54,7 @@ describe('callModel E2E Tests', () => { describe('Chat-style messages support', () => { it('should accept chat-style Message array as input', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'system', @@ -76,7 +76,7 @@ describe('callModel E2E Tests', () => { it('should handle multi-turn chat-style conversation', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -101,7 +101,7 @@ describe('callModel E2E Tests', () => { it('should handle system message in chat-style input', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'system', @@ -213,7 +213,7 @@ describe('callModel E2E Tests', () => { ]; const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromClaudeMessages(claudeMessages), }); @@ -238,7 +238,7 @@ describe('callModel E2E Tests', () => { ]; const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromClaudeMessages(claudeMessages), }); @@ -266,7 +266,7 @@ describe('callModel E2E Tests', () => { ]; const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromClaudeMessages(claudeMessages), }); @@ -294,7 +294,7 @@ describe('callModel E2E Tests', () => { ]; const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromClaudeMessages(claudeMessages), }); @@ -308,7 +308,7 @@ describe('callModel E2E Tests', () => { describe('response.text - Text extraction', () => { it('should successfully get text from a response', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -327,7 +327,7 @@ describe('callModel E2E Tests', () => { it('should handle multi-turn conversations', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -354,7 +354,7 @@ describe('callModel E2E Tests', () => { describe('response.message - Complete message extraction', () => { it('should successfully get a complete message from response', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -388,7 +388,7 @@ describe('callModel E2E Tests', () => { it('should have proper message structure', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -449,7 +449,7 @@ describe('callModel E2E Tests', () => { describe('response.textStream - Streaming text deltas', () => { it('should successfully stream text deltas', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -474,7 +474,7 @@ describe('callModel E2E Tests', () => { it('should stream progressively without waiting for completion', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -509,7 +509,7 @@ describe('callModel E2E Tests', () => { describe('response.newMessagesStream - Streaming message updates (Responses format)', () => { it('should successfully stream incremental message updates in ResponsesOutputMessage format', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -550,7 +550,7 @@ describe('callModel E2E Tests', () => { it('should return ResponsesOutputMessage with correct shape', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -705,7 +705,7 @@ describe('callModel E2E Tests', () => { it('should return messages with all required fields and correct types', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -832,7 +832,7 @@ describe('callModel E2E Tests', () => { describe('response.fullResponsesStream - Streaming all events', () => { it('should successfully stream all response events', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -864,7 +864,7 @@ describe('callModel E2E Tests', () => { it('should include text delta events', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -897,7 +897,7 @@ describe('callModel E2E Tests', () => { describe('response.fullChatStream - Chat-compatible streaming', () => { it('should successfully stream in chat-compatible format', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -924,7 +924,7 @@ describe('callModel E2E Tests', () => { it('should return events with correct shape for each event type', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -986,7 +986,7 @@ describe('callModel E2E Tests', () => { it('should validate content.delta events have proper structure', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1114,7 +1114,7 @@ describe('callModel E2E Tests', () => { describe('Multiple concurrent consumption patterns', () => { it('should allow reading text and streaming simultaneously', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1149,7 +1149,7 @@ describe('callModel E2E Tests', () => { it('should allow multiple stream consumers', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1197,7 +1197,7 @@ describe('callModel E2E Tests', () => { it('should allow sequential consumption - text then stream', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1227,7 +1227,7 @@ describe('callModel E2E Tests', () => { it('should allow sequential consumption - stream then text', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1272,7 +1272,7 @@ describe('callModel E2E Tests', () => { it('should handle empty input', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [], }); @@ -1289,7 +1289,7 @@ describe('callModel E2E Tests', () => { describe('response.getResponse - Full response with usage', () => { it('should return full response with correct shape', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1335,7 +1335,7 @@ describe('callModel E2E Tests', () => { it('should return usage with correct shape including all token details', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1391,7 +1391,7 @@ describe('callModel E2E Tests', () => { it('should return error and incompleteDetails fields with correct shape', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1417,7 +1417,7 @@ describe('callModel E2E Tests', () => { it('should allow concurrent access with other methods', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1445,7 +1445,7 @@ describe('callModel E2E Tests', () => { it('should return consistent results on multiple calls', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1470,7 +1470,7 @@ describe('callModel E2E Tests', () => { describe('Response parameters', () => { it('should respect maxOutputTokens parameter', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1489,7 +1489,7 @@ describe('callModel E2E Tests', () => { it('should work with instructions parameter', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1509,7 +1509,7 @@ describe('callModel E2E Tests', () => { it('should support provider parameter with correct shape', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1531,7 +1531,7 @@ describe('callModel E2E Tests', () => { it('should support provider with order preference', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1556,7 +1556,7 @@ describe('callModel E2E Tests', () => { it('should support provider with ignore list', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', @@ -1579,7 +1579,7 @@ describe('callModel E2E Tests', () => { it('should support provider with quantizations filter', async () => { const response = client.callModel({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: fromChatMessages([ { role: 'user', diff --git a/tests/e2e/chat.test.ts b/tests/e2e/chat.test.ts index b5ad310a..91d8dbd3 100644 --- a/tests/e2e/chat.test.ts +++ b/tests/e2e/chat.test.ts @@ -20,7 +20,7 @@ describe('Chat E2E Tests', () => { describe('chat.send() - Non-streaming', () => { it('should successfully send a chat request and get a response', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', @@ -48,7 +48,7 @@ describe('Chat E2E Tests', () => { it('should handle multi-turn conversations', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', @@ -81,7 +81,7 @@ describe('Chat E2E Tests', () => { it('should respect max_tokens parameter', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', @@ -101,7 +101,7 @@ describe('Chat E2E Tests', () => { describe('chat.send() - Streaming', () => { it('should successfully stream chat responses', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', @@ -130,7 +130,7 @@ describe('Chat E2E Tests', () => { it('should stream complete content progressively', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', @@ -159,7 +159,7 @@ describe('Chat E2E Tests', () => { it('should include finish_reason in final chunk', async () => { const response = await client.chat.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', messages: [ { role: 'user', diff --git a/tests/e2e/responses.test.ts b/tests/e2e/responses.test.ts index 79881c0b..f7016d0f 100644 --- a/tests/e2e/responses.test.ts +++ b/tests/e2e/responses.test.ts @@ -21,7 +21,7 @@ describe('Beta Responses E2E Tests', () => { describe('beta.responses.send() - Non-streaming', () => { it('should successfully send a responses request and get a response', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -58,7 +58,7 @@ describe('Beta Responses E2E Tests', () => { it('should handle multi-turn conversations', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -100,7 +100,7 @@ describe('Beta Responses E2E Tests', () => { it('should respect maxOutputTokens parameter', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -118,7 +118,7 @@ describe('Beta Responses E2E Tests', () => { it('should handle metadata in request', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -141,7 +141,7 @@ describe('Beta Responses E2E Tests', () => { it('should handle instructions parameter', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -162,7 +162,7 @@ describe('Beta Responses E2E Tests', () => { describe('beta.responses.send() - Streaming', () => { it('should successfully stream responses', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -197,7 +197,7 @@ describe('Beta Responses E2E Tests', () => { it('should stream complete content progressively', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -231,7 +231,7 @@ describe('Beta Responses E2E Tests', () => { it('should include response.completed event in stream', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -259,7 +259,7 @@ describe('Beta Responses E2E Tests', () => { it('should handle streaming with metadata', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message', @@ -287,7 +287,7 @@ describe('Beta Responses E2E Tests', () => { it('should concatenate streaming chunks into complete sentence', async () => { const response = await client.beta.responses.send({ - model: 'meta-llama/llama-3.2-1b-instruct', + model: 'anthropic/claude-haiku-4.5', input: [ { type: 'message',