diff --git a/.gitignore b/.gitignore index d69301d..d18d69d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,25 @@ -.venv/ venv/ src/*.egg-info/ **/__pycache__/ .pytest_cache/ .python-version -.DS_Store pyrightconfig.json **/.speakeasy/temp/ **/.speakeasy/logs/ .speakeasy/reports +# Build artifacts +/dist +__pycache__/ +*.py[cod] +*.egg-info/ +*.egg +# Speakeasy generation artifacts (generated in OSS repo, not here) +.speakeasy/*.lock +.speakeasy/*.openapi.yaml +/docs +# Environment .env .env.local +.env.*.local +.DS_Store +.venv/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ef05950..5d6109f 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,22 +1,26 @@ lockVersion: 2.0.0 id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d management: - docChecksum: ba9a1c22e9c7d5926d71b1e78e16b482 + docChecksum: 543e6f0dabe30debf212a997d70dc069 docVersion: 1.0.0 - speakeasyVersion: 1.666.0 - generationVersion: 2.768.0 - releaseVersion: 0.7.11 - configChecksum: c2013e97e44ae07d6749ebe461b47299 + speakeasyVersion: 1.680.0 + generationVersion: 2.788.4 + releaseVersion: 0.8.0 + configChecksum: 1a622905d45caac25e8ee5fb2739d219 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true +persistentEdits: + generation_id: 774c44d3-ac63-4e07-89cd-c9a481c35da3 + pristine_commit_hash: 73742f857dca51846a67a66cc19e0d8c012c9c38 + pristine_tree_hash: a9067817353e27e37c7b7772671e970eb3a738f9 features: python: acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 additionalProperties: 1.0.1 constsAndDefaults: 1.0.5 - core: 5.23.13 + core: 5.23.14 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 @@ -42,7 +46,5078 @@ features: serverEvents: 1.0.11 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 - unions: 3.1.0 + unions: 3.1.1 +trackedFiles: + .devcontainer/README.md: + id: b170c0f184ac + last_write_checksum: sha1:919a25ed5129d316f05a60131c164011763b7c54 + pristine_git_object: c7d8d278438e7906fedb39d99151372b3324ea66 + .devcontainer/devcontainer.json: + id: b34062a34eb1 + last_write_checksum: sha1:94309e8c8eab5ab063986bf625f513a59825e947 + pristine_git_object: 75edff51e68d2934c825764459ba3071044ce2ab + .devcontainer/setup.sh: + id: 5f1dfbfeb8eb + last_write_checksum: sha1:234faaf21a8a7028346590d1eb3fac0429f4991c + pristine_git_object: b39c28c38cf46135982ab5576b4723ea777bf510 + .gitattributes: + id: 24139dae6567 + last_write_checksum: sha1:53134de3ada576f37c22276901e1b5b6d85cd2da + pristine_git_object: 4d75d59008e4d8609876d263419a9dc56c8d6f3a + .vscode/settings.json: + id: 89aa447020cd + last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526 + pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae + USAGE.md: + id: 3aed33ce6e6f + last_write_checksum: sha1:728fda97a79965b16763fbb5cff3995707cfa49b + pristine_git_object: dfa6a258c2659706820dfd651346659b76006691 + docs/components/action.md: + id: 6b3978ee918f + last_write_checksum: sha1:7026f076ddcf89df8f64180c1f6c55b42e642083 + pristine_git_object: 7e76bbedc5fe8e969ccce0ce12a07dd89e2d740b + docs/components/actionfindinpage.md: + id: 88f0962aff68 + last_write_checksum: sha1:1a2c33bd277a0df8eb86bc64abb81c4cfc4da9cc + pristine_git_object: 7ddbd3d16c5c28b5ef7483e6170d2456ca14c090 + docs/components/actionopenpage.md: + id: 0956df8f10e4 + last_write_checksum: sha1:88d726e5b59287d1ff171621cbf0d16ea9d5d9da + pristine_git_object: 0401058dca54568c8f2e686e4e82e0f40e0445cf + docs/components/actionsearch.md: + id: 8cee1325fe56 + last_write_checksum: sha1:4d60f45a3beaee68aedba2acc7609e793bf0d932 + pristine_git_object: fbb7847d08ad0f59ac5587a01ba88ae504da9d79 + docs/components/activityitem.md: + id: 3a8beda39814 + last_write_checksum: sha1:740ef40ee2491b99f8a0d1c7e78f48cbc2d8e134 + pristine_git_object: 570bc5289c4c5ed3debe6d45e44c7d2a341dbbc6 + docs/components/allowedtools.md: + id: b6010d1cddfb + last_write_checksum: sha1:21004e414e39fe4ebe69734d3b8267fea2805b44 + pristine_git_object: f8ca32c5a355b4a3d7509a30d01fd055075488cf + docs/components/always.md: + id: 60d5b0ff8f83 + last_write_checksum: sha1:04684b9e3eea071da9938b3e1deed152f845a0e2 + pristine_git_object: a7a7fd1155f474f4c45ce17e4d678ad2736153b2 + docs/components/annotationaddedevent.md: + id: 7639957f7faf + last_write_checksum: sha1:ceec0784caeee9e52686425593ae1c93a0ed6e53 + pristine_git_object: 6a02fd8e0f622848fcfb1034fa3c4c8ac386a070 + docs/components/annotationaddedeventtype.md: + id: 11b3c6c877d0 + last_write_checksum: sha1:4d8fae9c0de452c9ee796eeab63d242e4feb8497 + pristine_git_object: 4840df7f7005389811fae7c8868ad8d6c1efcd18 + docs/components/applypatchservertool.md: + id: 924a4805520a + last_write_checksum: sha1:f87ee16357b393e199bf0a4ba74e02130f1f243b + pristine_git_object: 704ebe93904414764ac0d52dcfa8bc76c1eaebe2 + docs/components/applypatchservertooltype.md: + id: 3638a8a53d67 + last_write_checksum: sha1:c3139367515e9c0b3dd3109065594824e704c35f + pristine_git_object: 60aec019e3cecb47bfd388f0e049af9956b6acc8 + docs/components/architecture.md: + id: 40a5f2f0b4f3 + last_write_checksum: sha1:5234a3e282842878aed117ed3791d600d6f5e812 + pristine_git_object: f646f15601b53bb6908f4105b6c773c7752855d1 + docs/components/background.md: + id: d5d845f5b5f5 + last_write_checksum: sha1:9221c224fd1b8e9c50e5eda1ed6fe78c47221f96 + pristine_git_object: 62f0f52d26cf2e28ae868efa254c7dd41a37537b + docs/components/badgatewayresponseerrordata.md: + id: f01b062274e6 + last_write_checksum: sha1:7dc1fd7cde5f6810da4b468ecbfa6c5a68d402c6 + pristine_git_object: 9de5a8934d6aa351f1c5647ce6357e77461ae279 + docs/components/badrequestresponseerrordata.md: + id: 89775285bd72 + last_write_checksum: sha1:0d82f0aafdf520817e65888918fb7ac0d70e12dc + pristine_git_object: c36a56e67887463f6f0d3cb9ccf2a3080e6135d7 + docs/components/baseinputscontent1.md: + id: fd111ee7994f + last_write_checksum: sha1:179553080c11a6f3fd1a16b4518e23f723ab908a + pristine_git_object: 9e4ef2ce4732ab9087a97d758a531800edcd634c + docs/components/baseinputscontent2.md: + id: 5dec0fa82eb2 + last_write_checksum: sha1:c7e158b4269d0ad5effc325530330773e5dac5fe + pristine_git_object: 3a50f11305760fd431ab50a1f7ff3d63057ff4dd + docs/components/baseinputscontent3.md: + id: 72010566fea7 + last_write_checksum: sha1:390e15e7cb9b35bb0844baae3b5974a16360df63 + pristine_git_object: 82b7f2279076989af6a5bdaadfced9cc528f92eb + docs/components/baseinputsfunctioncall.md: + id: 018a5dc1a6db + last_write_checksum: sha1:d0e7d85d2eb9eee524543effe916f9002e8f9372 + pristine_git_object: 586017007a62f42b67ecde05ab36e4cb38f3461a + docs/components/baseinputsfunctioncalloutput.md: + id: 99b54ddb792a + last_write_checksum: sha1:0c81aca42e763c626ebaf0c61a903f1259a98382 + pristine_git_object: 7902112b98e87dea1ea84e09a1ad3c7e0edf0570 + docs/components/baseinputsmessage1.md: + id: ac9a6b11f779 + last_write_checksum: sha1:4027e18a15ab26fb4cdd15d7aecff6b56eaf2b1c + pristine_git_object: 647fec64eb6508b81b800c1cc27ca5cf42e16440 + docs/components/baseinputsmessage2.md: + id: 5835b8daefa4 + last_write_checksum: sha1:1088072f9cf6ef4c1d690a61d166cbd7ecc429fb + pristine_git_object: 41bdc483c9a254715dcc90559e6fefd20cd7d9e7 + docs/components/baseinputsoutput1.md: + id: 534f5092590e + last_write_checksum: sha1:b9b7c7f6cf91110f40d7589216b9af0a8dac642e + pristine_git_object: ef33b86f3246f0c693462f4f6a2d08e287af46cd + docs/components/baseinputsoutput2.md: + id: 34e745a5fd0d + last_write_checksum: sha1:28f780924bbcf1e07b25f372df62ba7858cf1a78 + pristine_git_object: 5b9f38e9b60d616b323b0bc787a16f076a9d3880 + docs/components/baseinputsphasecommentary.md: + id: fd174d25ec7e + last_write_checksum: sha1:2aad888ade690360b53ed260c4bfe8b6fea83b25 + pristine_git_object: 26a04fe1e4dc3b16cab331bd47489d46e66195f9 + docs/components/baseinputsphasefinalanswer.md: + id: b59751ca8a83 + last_write_checksum: sha1:83259dbbbe232731691b441e22f1a62f6e86acf3 + pristine_git_object: dac05a7d487a806d2441f022014b50f748b2c40a + docs/components/baseinputsphaseunion.md: + id: 3fca8902e06f + last_write_checksum: sha1:444f1e8657f8980481945c5ce12802f763097d98 + pristine_git_object: b61ff963ac10ae9caf973c21430f5f46f255ce7b + docs/components/baseinputsroleassistant.md: + id: 3856d979d190 + last_write_checksum: sha1:5cd5965071cffb1ffc1b642e671c38509aade865 + pristine_git_object: b761d8327effaaad85ef1142cfa44ac02f1614b8 + docs/components/baseinputsroledeveloper1.md: + id: 4af560b86e62 + last_write_checksum: sha1:4dfdadf0013455c1ac0c340b5b10ce0728e13a58 + pristine_git_object: 0525db8ec170217ad1feffb6e5553000f5e5cc14 + docs/components/baseinputsroledeveloper2.md: + id: 5b865c6db5b9 + last_write_checksum: sha1:e7831e14552eabaac3f0629b5a62df73861dae2d + pristine_git_object: f2af3d42836d60336533c48ed85a4d89fa5bd9b7 + docs/components/baseinputsrolesystem1.md: + id: 4a750f0b5f56 + last_write_checksum: sha1:7d42710e4f9e0eecb04bb1d2c20a46968caf09b5 + pristine_git_object: 35cbac56d9c3be090ca24c4006d94241961743cd + docs/components/baseinputsrolesystem2.md: + id: 6f40703c1f5e + last_write_checksum: sha1:f0fe769b49098a7613b8667d519bc04910c0edf6 + pristine_git_object: 7bebef9d04d1ca6625bec0464ef99458e1cc8d51 + docs/components/baseinputsroleunion1.md: + id: 722714c37d5a + last_write_checksum: sha1:f90223243f0c999ecc301ef7ad133482b99d3fb8 + pristine_git_object: 70c5d035f11631d2e62108b83e58c0e02cec8de0 + docs/components/baseinputsroleunion2.md: + id: cb0c3c0a8915 + last_write_checksum: sha1:e568bf7c6897f3014d2bc59b2836a0bb5c326a0f + pristine_git_object: 7b8a1eeee81a8e9d7bc38be88e7da0a7e1c9c965 + docs/components/baseinputsroleuser1.md: + id: cf8fee985612 + last_write_checksum: sha1:4c0707761520efbae8440356d02e8819b76c6f1c + pristine_git_object: e852eab35cf2f239218d21206d7c7eac2fd2b69d + docs/components/baseinputsroleuser2.md: + id: 9281bf01bfb5 + last_write_checksum: sha1:96314e1a966bc26887e8c9cc5c753b6a8eb6d36f + pristine_git_object: 021e897af5dbc7236a6db06936c222084c210cbb + docs/components/baseinputstypefunctioncall.md: + id: 4c8e161f01c5 + last_write_checksum: sha1:0af13c5f3dc5b049a0769740726410687727df55 + pristine_git_object: 05c3b4b39de3674f263cd97091d5f7c90068284d + docs/components/baseinputstypefunctioncalloutput.md: + id: 0fb86dc33a95 + last_write_checksum: sha1:43a58a949a1c94751aa94207a5b750a88b105d24 + pristine_git_object: 6ecf6c2cee1440840c4db0e462266ec115251251 + docs/components/baseinputstypemessage1.md: + id: c4f5fb69f7fd + last_write_checksum: sha1:a2832bb6f3666db5326a5a69a8f2f05c2f0f21e2 + pristine_git_object: 5a4639fca575fa0c60c5d4175f6e2c64ae9406f4 + docs/components/baseinputstypemessage2.md: + id: 9a694889303a + last_write_checksum: sha1:55398d179622bd8f92558cc3db01af8fb87ded8d + pristine_git_object: bbdc707584afb6bcd4ce1b2739b9ddd7e3ce2324 + docs/components/baseinputsunion.md: + id: b93f8e6d22a2 + last_write_checksum: sha1:d1699f886c2801cb4e96b6e1710c7415e6283589 + pristine_git_object: 2d7597f6a1250fa1b35dc5853f25a0ce1cdfb286 + docs/components/baseinputsunion1.md: + id: 3b291815d087 + last_write_checksum: sha1:3deb8670d031af53674840e7b2c23240c1ba9194 + pristine_git_object: 35fd8ee614341a129163d9443eea11d7dbeddc4c + docs/components/basereasoningconfig.md: + id: c161e7a17271 + last_write_checksum: sha1:8ad7ecc126941b046e74cde51a442f0694af044c + pristine_git_object: b828082a59e81314881897276b663724c637f77c + docs/components/by.md: + id: 1bcedb5155b3 + last_write_checksum: sha1:e71a7e5b233d761921f330ae499a73024aa4a0a5 + pristine_git_object: 557c891217e953757e8385a4b54a50d4528ea91a + docs/components/cachecontrol.md: + id: 77f6aeeabc53 + last_write_checksum: sha1:e43f4beb0ce9189215ea930bd35771775bb8cb2c + pristine_git_object: 07ddac012a71fbe21ac4b5ec94a63054a9cc8bb4 + docs/components/chainid.md: + id: bed884f81fbb + last_write_checksum: sha1:2385b805aee407cd5dd2e9e0e302a51019fb7159 + pristine_git_object: 11579fed5ec6618add73efbf35c16fde43eb2f73 + docs/components/chatassistantimages.md: + id: f1f776b0c4ae + last_write_checksum: sha1:05697e4bc0690cabd72965d01519102c149f6363 + pristine_git_object: 65fba0e5aa8cc676943df05509edf21169feaedc + docs/components/chatassistantimagesimageurl.md: + id: 5dab9ae6518f + last_write_checksum: sha1:d74a4619d0195e1a410c747bd094e738ba439186 + pristine_git_object: ef9412d5a9edda1a0d572a7204f643c57e95c1cb + docs/components/chatassistantmessage.md: + id: 873a0a8e5d40 + last_write_checksum: sha1:781ef36eb333fc16518fb9ad4ab0f12787c5c080 + pristine_git_object: 10e8b2cfcb9effe8128f67c94610aa3e7723fd1a + docs/components/chatassistantmessagecontent.md: + id: ae1f4d3d6315 + last_write_checksum: sha1:0ad5b85eade6a1da7eb7360e87915672ac875c0c + pristine_git_object: 0338df6ce3691baa59f2fbaa3673c53782438dc4 + docs/components/chatassistantmessagerole.md: + id: 1d183e17e37c + last_write_checksum: sha1:dfee23784edcc32fea5312998be7e26070b0148d + pristine_git_object: 07389e76411f893ce1cdc65d5eabb2afb0131355 + docs/components/chataudiooutput.md: + id: aba7fc0396f7 + last_write_checksum: sha1:bac65ae17cc8119caa6409bb1e7bc11a159e5041 + pristine_git_object: ac7cff58ed8a96f74774ce1df5fbda99edb45a0b + docs/components/chatchoice.md: + id: 5e50b0331a4d + last_write_checksum: sha1:bdcb578e91cb10d60e9f83680db2f60cacd386ea + pristine_git_object: 913b1ac51bd17bd4cd685c14fe54ec4b28be55b2 + docs/components/chatcontentaudio.md: + id: 4a23b47cbaea + last_write_checksum: sha1:676f208561f863596231f82801f4fb2cd5fd0f06 + pristine_git_object: 0720a1aa3f414cf2573c0899a71ac2b76d41acbb + docs/components/chatcontentaudioinputaudio.md: + id: 04ffe283799a + last_write_checksum: sha1:10a609317556d4a8845da27336ed885d17407ff4 + pristine_git_object: 9e1410bdaafb74192f4a845ad0a4198a18810e65 + docs/components/chatcontentaudiotype.md: + id: 273a8f11e91e + last_write_checksum: sha1:44f9af0fb93c1f3b918a6d3c9d4c73f302a7b162 + pristine_git_object: 231efb3e968c2f996556140accea135db41e761b + docs/components/chatcontentcachecontrol.md: + id: f61f7d9f11ca + last_write_checksum: sha1:bd9b84c088788bd5af66c01cac8f7432187c9eb0 + pristine_git_object: 3cffd63509fae0fbf94bf31824803b8f6c01303a + docs/components/chatcontentcachecontrolttl.md: + id: 994e611469c1 + last_write_checksum: sha1:c6bd25bd2e9807d32135cabfeac45f48ccc98bd1 + pristine_git_object: 735d6eab7abb0aca5db4092888b1020a4c8ecd78 + docs/components/chatcontentcachecontroltype.md: + id: 6c25585d34d7 + last_write_checksum: sha1:b18c1e7bf7282bbd6c441d6a48e355c87396b9bc + pristine_git_object: a3776be07310a6e3b87f21d95c2c4701cf15422a + docs/components/chatcontentfile.md: + id: 80de41516310 + last_write_checksum: sha1:69c7ad37ab9e170dbb80afbfd9a776a86f5da738 + pristine_git_object: e6f101daa2c9ac93991d55a85adfcf4b50d4986a + docs/components/chatcontentfiletype.md: + id: 7ae1de2bd191 + last_write_checksum: sha1:65db830e9452261b3abfb55e0c0592babb3f8efa + pristine_git_object: c8f291f2fcb753680e87c704099b0c6b8a731000 + docs/components/chatcontentimage.md: + id: 4c6bbbb8fa9e + last_write_checksum: sha1:90c72bf6981ec47b67762e0f5ac10c1209322e59 + pristine_git_object: 8ac292bc0db951f122ae1623836c21acb2f95ca2 + docs/components/chatcontentimagedetail.md: + id: 3f26a1053cda + last_write_checksum: sha1:c074cafc4780c4bc7e6d4a053c886020a89c4e42 + pristine_git_object: 9653ab78adb9b8b9ccfcd46d186d4f9c5a2ace85 + docs/components/chatcontentimageimageurl.md: + id: 7c66172651cc + last_write_checksum: sha1:618dc0fbb640e9701ec5e74214907d60c1dbd067 + pristine_git_object: 3759aeca622eea53883d3cfff02c3b8436f1ed29 + docs/components/chatcontentimagetype.md: + id: b92a4757efe6 + last_write_checksum: sha1:ce2d8002a22bf03477cbbd88c68fc4eace9b392b + pristine_git_object: 61eaf66e23031854c913dea6315deb99722b3098 + docs/components/chatcontentitems.md: + id: 1629a00cba7c + last_write_checksum: sha1:4b84f29c042bce1e08b567a03d64ff1bfbc79cb5 + pristine_git_object: 518eb027a3f8f57eaa7b160d840b794e442adc30 + docs/components/chatcontentitems1.md: + id: e22f3b829177 + last_write_checksum: sha1:b55258ca3851cd35b1d183bfb1a91befd94685f5 + pristine_git_object: 0a3577c0698cafb95add4ba99cc88a2697aa9195 + docs/components/chatcontenttext.md: + id: 7cb138e038e3 + last_write_checksum: sha1:96696d51bf5961d4c1d094461b2194036c242d4a + pristine_git_object: 9b7536182178d5a0554b659ee154c2b4f9c5b1cb + docs/components/chatcontenttexttype.md: + id: ac89efae2559 + last_write_checksum: sha1:dbe556bf72491a11746413bfb84d277623ed6df5 + pristine_git_object: cc7444ce57ed92f8df7b4856c431b41205b7b082 + docs/components/chatcontentvideo.md: + id: 644f016407a5 + last_write_checksum: sha1:54530f92e12087b402d2bb5d1983ce34bdd0caf1 + pristine_git_object: 0e9555efcbaf49b2f0b85c482a138c013a403123 + docs/components/chatcontentvideoinput.md: + id: 2801ab923042 + last_write_checksum: sha1:04fe85c81976c0f9e99d1bace10b18315b62d17e + pristine_git_object: aef6e2276e69e312b9860410f6aaf1ef7dffbe74 + docs/components/chatcontentvideotype.md: + id: 24eadd19337b + last_write_checksum: sha1:4cc42fbb361efc7c51d7d8c6f86dd467c0e02269 + pristine_git_object: e02c721f5d783706b7df11e51aedcd9f2d9b730d + docs/components/chatdebugoptions.md: + id: b4052a7b59a9 + last_write_checksum: sha1:53b4488f82bbe11533870cbf08e961a3cc6d5412 + pristine_git_object: 710b14712a04c14746fce608ff3b3cd96189cc69 + docs/components/chatdevelopermessage.md: + id: fcc03e0bec28 + last_write_checksum: sha1:66403b4ed9627821f1e1f39eda9e97fb106e4ec9 + pristine_git_object: 4742e52484e16330497f1f60aef93be3d13f4c65 + docs/components/chatdevelopermessagecontent.md: + id: f57f34c0f41d + last_write_checksum: sha1:859f5db02c1ac1c5c893f93107d074d7da784ed1 + pristine_git_object: ef6fe747a7b86fdabf34f6a98011ad57a1693582 + docs/components/chatdevelopermessagerole.md: + id: cb0b7aee170d + last_write_checksum: sha1:ef2c0cd397238ed0c1a2342e7df7d2897d07b749 + pristine_git_object: 7a9721cc9e1635c150b1e08d7524689224801c8b + docs/components/chatfinishreasonenum.md: + id: 4a1c7f940839 + last_write_checksum: sha1:07de46813ca84e3b5496ad99c6ac4b7f144089aa + pristine_git_object: 3942c0e03d4faffa564408ab97f99118f4453af6 + docs/components/chatformatgrammarconfig.md: + id: 69a089aa92bf + last_write_checksum: sha1:6091c265b2a9fb1e4670341c6debe95a56e1491f + pristine_git_object: bb09d53865c8c95a1f6f7ccd238adc238db249b7 + docs/components/chatformatgrammarconfigtype.md: + id: "7259142727e4" + last_write_checksum: sha1:06930e28075aa9b4beaace531e8d1e3488956fa0 + pristine_git_object: d61542a3c61384c4b8c656abef985a5761e758ad + docs/components/chatformatjsonschemaconfig.md: + id: d5d317f8b57e + last_write_checksum: sha1:8926d8ff96309daab632790bbcc9b333d98bf204 + pristine_git_object: 39df5380e986286b8e3778106e5cb97237b1714f + docs/components/chatformatjsonschemaconfigtype.md: + id: 5db00c47f9b6 + last_write_checksum: sha1:d17911eacf2093ef10378e87c40d7a6eae45643d + pristine_git_object: 333b76340853f522f1714f7b095253adefb76f7e + docs/components/chatformatpythonconfig.md: + id: cc476e39e9cd + last_write_checksum: sha1:681ca703cd97c8c6b030d9b5111add5cae834fe0 + pristine_git_object: abf14ca7dea07178243c14ff9816a3e419d54bbd + docs/components/chatformatpythonconfigtype.md: + id: c405940549f0 + last_write_checksum: sha1:c7ee086855db30229efe13e92d6dc17ef1920971 + pristine_git_object: 784aaadd1afcd818796aac8afc70b7dedfb5567f + docs/components/chatformattextconfig.md: + id: 89ee5a2469dc + last_write_checksum: sha1:483320204323bdc311782fa32f852f8bcfb1d62f + pristine_git_object: 99ff3e59a97c5636431c293afb905920e9c1bdc3 + docs/components/chatformattextconfigtype.md: + id: b0d90b0d7b5e + last_write_checksum: sha1:52d4933926a4cb6186898585195f4bce168af8bd + pristine_git_object: f3a972b60a63cdb55670cc56cc92eae40578aa87 + docs/components/chatfunctiontool.md: + id: 3c79deefdcc0 + last_write_checksum: sha1:4ea7c79cd0df227138741e443ea8b0cf012cf1d1 + pristine_git_object: fce475528b53c9c2083638a6282e4b7a3073c9b4 + docs/components/chatfunctiontoolfunction.md: + id: 0de29ccfd817 + last_write_checksum: sha1:835e60076a856e5f6996fea77e51bae60216cb31 + pristine_git_object: 754c2b18aa333ca8c28c5d33140e699cadabdc20 + docs/components/chatfunctiontoolfunctionfunction.md: + id: 40ba7785b09a + last_write_checksum: sha1:2fb9f3abf08bb4e9d4a454fd580593a68ebe6eca + pristine_git_object: 678446041b4c4659c432016e3d928f70c12cfe41 + docs/components/chatfunctiontooltype.md: + id: fd79c1a8150a + last_write_checksum: sha1:8180672d9c029ff2e0d2d3b3ae74f20562b6f939 + pristine_git_object: f3b7513915d711c6b839126e6fed13f51a5cb5ca + docs/components/chatjsonschemaconfig.md: + id: 27016a1430b7 + last_write_checksum: sha1:2c4009da0dfab19276d8922c9c3d7667031ec873 + pristine_git_object: a46febe1a602460e5d049d3b6a0fae4599650426 + docs/components/chatmessages.md: + id: 27dc2c8c0d23 + last_write_checksum: sha1:2f700b68c8fe41008706bb68cb495ebf929a1842 + pristine_git_object: 87805945bd2a5d3aca43d9f7f450df4fca1a0c01 + docs/components/chatnamedtoolchoice.md: + id: b55b10cbe381 + last_write_checksum: sha1:044c823d25ec9336f029c18aa88660a4c5e00659 + pristine_git_object: 9271eadd9496ea2d893b5c32f7a8fa1673963e04 + docs/components/chatnamedtoolchoicefunction.md: + id: ce1786a50c32 + last_write_checksum: sha1:b2b6c14545d0b4e23bc4dc9422b356a314620472 + pristine_git_object: 6af3c9eb4e7e2218625d18c08e33dde5c7d389d7 + docs/components/chatnamedtoolchoicetype.md: + id: d4856ca12d1c + last_write_checksum: sha1:c5c5e63ee722467cd13522dc7e36775b905e9a5f + pristine_git_object: 771cf4cae80fd6bd62f1cbb971bb50d6ed5066f8 + docs/components/chatreasoningsummaryverbosityenum.md: + id: 4ea66a561f98 + last_write_checksum: sha1:62ddd3b78bfafb2b0bc20663a7fe2d3f2a88f1e7 + pristine_git_object: ca73483767de32b3d83b7f9e2741011e26ac8e59 + docs/components/chatrequest.md: + id: 5e0fa9a2cb13 + last_write_checksum: sha1:66eacb25d3127af53b1fa6063a14f8c0753f242f + pristine_git_object: f414833efac89a2495b7e50ea66abcb31e896116 + docs/components/chatrequestby.md: + id: 145f80d51a5e + last_write_checksum: sha1:5c17469562f652c78a5d8ebdf5d3973c4999623c + pristine_git_object: d0601f6cdf3d3ab003d62350baed05c07f754b75 + docs/components/chatrequestidautorouter.md: + id: 708031a38d35 + last_write_checksum: sha1:1d7a79a263ea67255064588ac182eb895e6c3259 + pristine_git_object: fbb63203ed2b26e0b49544e121a6aa2939d970cd + docs/components/chatrequestidcontextcompression.md: + id: 42cb1055cc61 + last_write_checksum: sha1:420fcf4e889f8d50029c9d93b14dc83ce399fb32 + pristine_git_object: 5db526d4fb869187d80f36b87174980bfce775ae + docs/components/chatrequestidfileparser.md: + id: 905ac45722f5 + last_write_checksum: sha1:9697b37c5f98d4f77ec85e3b6a47d91d25ca59e8 + pristine_git_object: bf53cfbc0a85f76f37fc15d746a0b8e6245ebeb4 + docs/components/chatrequestidmoderation.md: + id: 272558c4d122 + last_write_checksum: sha1:d82828b40ec4651beb3caeb23258bcc77971cf56 + pristine_git_object: 9bcc55e1c73aa8958fe8c368fb1ae0790dbac9fe + docs/components/chatrequestidresponsehealing.md: + id: cb6623bda058 + last_write_checksum: sha1:15be004882a4d334a7bcf6b3c4d26a90202b8416 + pristine_git_object: 0f402ceaade2ee8ba624ab316f18723c8e55d30c + docs/components/chatrequestidweb.md: + id: c53540f2e04d + last_write_checksum: sha1:240f0cd315bf49f8c384144c10120957ab74aea7 + pristine_git_object: cc196b65e4df56d684cfbc4a6c4e7d544255ae0f + docs/components/chatrequestignore.md: + id: 47c81ff619d6 + last_write_checksum: sha1:84ed01d1010307189777818dceb8d3bef0168f30 + pristine_git_object: f82a39f7f2c38fa2beb4d2aad449b56897f847bc + docs/components/chatrequestimageconfig.md: + id: c307e038f375 + last_write_checksum: sha1:ae532a9e8878e6ba9dbcb0d8880591cf89aac53b + pristine_git_object: e4431b693da838310e5abca4d4f2292e5a67f325 + docs/components/chatrequestmaxprice.md: + id: d648bca2f846 + last_write_checksum: sha1:ba668e6c0ff802f07fb48a939a988ad1460d2577 + pristine_git_object: 04dd3f6a83e7bae119904f05b4140cf39fce5469 + docs/components/chatrequestonly.md: + id: 378a632426e1 + last_write_checksum: sha1:398bc9193c1b99fccf125870d254be403f5b7290 + pristine_git_object: 8abe7af455596400a53d6e499a64b264ce1e5f29 + docs/components/chatrequestorder.md: + id: 4c227f85e474 + last_write_checksum: sha1:ce3dac3cfea93ba2d6bcaeb151e055e9283e9ba3 + pristine_git_object: e103b0d98a92f29c853c99c3a8694164cbb6bf3b + docs/components/chatrequestpartition.md: + id: 9fd772b85dcb + last_write_checksum: sha1:c0f875c5f73a93274bbdfd1b60a0cac8093ebc85 + pristine_git_object: 109ad370b4579741729546d0aaa0e26d8ef63cdb + docs/components/chatrequestpluginautorouter.md: + id: b581a8cb0d99 + last_write_checksum: sha1:8c5fa0c93d0ed23120d1eef625c445f57ded316f + pristine_git_object: 6e9af616c0d41c79d5670d06b8c4c68b782bbe11 + docs/components/chatrequestplugincontextcompression.md: + id: 58502b637b66 + last_write_checksum: sha1:f7dafd9b2ed734a904f281b9210fab81671a1041 + pristine_git_object: bcf9925179dc8a2288a27de6c73ddab2f52da3ac + docs/components/chatrequestpluginfileparser.md: + id: 3d5478026158 + last_write_checksum: sha1:a81db3881bc1d13f1baf1dcf7549e793841ca454 + pristine_git_object: 45e22a47159aeff001e0db0b20b7b08fe28cdd24 + docs/components/chatrequestpluginmoderation.md: + id: 88ff921fc954 + last_write_checksum: sha1:0fdd62f77f54de7988c038a28e047327aae6ac1a + pristine_git_object: b150582ed34c5cee02c68ab0ec163877c2606c52 + docs/components/chatrequestpluginresponsehealing.md: + id: a95315777949 + last_write_checksum: sha1:df535e28ec728ed16ecf8eda554f44a75dfc9841 + pristine_git_object: ced37a1ee8ba9221577a47450b3c19771cf67ce7 + docs/components/chatrequestpluginunion.md: + id: 0cf9523e9e48 + last_write_checksum: sha1:e2edf4433653fd301dd29b3dd55dc9c44fe4a281 + pristine_git_object: e9c2e3819ec26e4551c5534714a200ab1890b7ac + docs/components/chatrequestpluginweb.md: + id: b5917f3dd86b + last_write_checksum: sha1:6d67e191d02ab5effdfb95d84f84036abefa9e63 + pristine_git_object: 297794669b9d952733f32cfc4336bfec66fda712 + docs/components/chatrequestprovider.md: + id: fbd4a1b3b959 + last_write_checksum: sha1:25427b59357f240088c71527f037410e6163de4e + pristine_git_object: 3dbddf65d74406cad0e1a8d248955b1a81104611 + docs/components/chatrequestprovidersort.md: + id: 3e98ea0490bc + last_write_checksum: sha1:b546da55439650541cad5814b4af900baabcde08 + pristine_git_object: 34834faca3696f5cd2cae69a4499fb518d9f5252 + docs/components/chatrequestprovidersortconfig.md: + id: da566203cae1 + last_write_checksum: sha1:b2b9241a0db81179ea740f318bf508910161da65 + pristine_git_object: ac2a9dc93fb590cc163335c2c54ee88eb3cbcb93 + docs/components/chatrequestprovidersortconfigenum.md: + id: 9169fa4c04a6 + last_write_checksum: sha1:3cd504f9f0c13c84896d5f24b8a3eb95a43dd673 + pristine_git_object: c35b72dc64378d10347aa50ab522213093d35480 + docs/components/chatrequestprovidersortconfigunion.md: + id: f2dd32c19d18 + last_write_checksum: sha1:d8262dc72ffc811360cbf763eedc6de24d27d220 + pristine_git_object: 011fecf6dce6ad751e46ff79a1bfb8d4c7514763 + docs/components/chatrequestservicetier.md: + id: deaf591bec38 + last_write_checksum: sha1:8fa53b0f868c99934b83719b7c0b6b44b1f960eb + pristine_git_object: 13ae40be5e3c883f88789c3b5b74a3b2da4c85c2 + docs/components/chatrequestsortenum.md: + id: e9acfaa10ac3 + last_write_checksum: sha1:925655dccb42a5d825e85c4ba2412403afbeb049 + pristine_git_object: e31ed0479235d52dfee162471f56328e712ede0f + docs/components/chatrequestsortunion.md: + id: b3f6ccd518ea + last_write_checksum: sha1:53418253f1389b5f11316ba14dbc8c9039310ed5 + pristine_git_object: 5e478000ed387b55b082419f0fa1d5d5336b6622 + docs/components/chatrequesttrace.md: + id: 6773660e20dd + last_write_checksum: sha1:7dc73ad5da9b9f5d3fbcb58e6d9e1592d913f956 + pristine_git_object: ca2056810661a041da1fb1cf35c9dffb601e669a + docs/components/chatrequestttl.md: + id: c1c7d8cc4b7c + last_write_checksum: sha1:9a1f6bd610c089b78d72ccd5f6c22491bcb348e4 + pristine_git_object: 84250dbf74a81d75b6ca6db1e0220ee8bcaa13b5 + docs/components/chatrequesttype.md: + id: 7207888c9692 + last_write_checksum: sha1:a143915b7f6b8c6ae55db165b74534d8ac703346 + pristine_git_object: 09929dd776a74cc340968112c6d25f37ac2a0aac + docs/components/chatresult.md: + id: 212b0f66efd0 + last_write_checksum: sha1:1b9e35af8ee0fb3c943ec69b7f184ba2094a7aee + pristine_git_object: 48708b3133765c601436a996cebdbb272c774c6e + docs/components/chatresultobject.md: + id: 668504931d18 + last_write_checksum: sha1:6d550246aa007a5be94a9788ae4cfdfb75006980 + pristine_git_object: d05e8b4f60163be62354a7f84ac449e87b7418ae + docs/components/chatstreamchoice.md: + id: 4267d8be7145 + last_write_checksum: sha1:b33c06b3bdcd8a1845d1cca0d3c5d71ba9fcfc7b + pristine_git_object: 5c96ff119a2ce5f39d5fa6bcf7491be549b23908 + docs/components/chatstreamchunk.md: + id: 404d264ea22c + last_write_checksum: sha1:53d9d8127e915f8d8062515fd2284ef6c26a5b42 + pristine_git_object: 2f3e7145c9a28cdd9b2a38a7c13048eea717b681 + docs/components/chatstreamchunkobject.md: + id: 5393918d9606 + last_write_checksum: sha1:0765d94b3d01c811155dce29c20c2ae4bd4abd0e + pristine_git_object: e5c9b9a5c9a9d0604893f8b014d7857aa9d74c1a + docs/components/chatstreamdelta.md: + id: 6a802bee8f3a + last_write_checksum: sha1:ea466fb7ed74e2e5ac6d2a26efd80b8a9ab5fab6 + pristine_git_object: 113fd7f8f71c679277287981370fc4047f0ae8dd + docs/components/chatstreamdeltarole.md: + id: bd41a2e6e1ba + last_write_checksum: sha1:4382019bbc25043a562225a2d54f07d282c65968 + pristine_git_object: 03d5ac5ab133efae7ae05733395324c136247357 + docs/components/chatstreamoptions.md: + id: b01e4aa7d192 + last_write_checksum: sha1:0f21f4cb7a3f28135b4117e20dcf829ea08ded52 + pristine_git_object: ade029eea68f198e2d9ca9cb1f377a595f641f35 + docs/components/chatstreamtoolcall.md: + id: c82d4d57b836 + last_write_checksum: sha1:6babbebc3eb2edd280857dab486ffd04d43eaf3f + pristine_git_object: c9c836284eb81aeb9bc311daf014b45ed7c5bbee + docs/components/chatstreamtoolcallfunction.md: + id: e68f1b506665 + last_write_checksum: sha1:e87aeb7009616a374b662758dbac40d3d62543d2 + pristine_git_object: 97b24f8ce8aff9bc0933313fcb99c2ec40f5fc90 + docs/components/chatstreamtoolcalltype.md: + id: 1e3b82103eae + last_write_checksum: sha1:817c13c26f8493d94658fe6a9e11faf25d3520e7 + pristine_git_object: c78e0564c6a19e3eb9cff4edf0c2e4d86b166a2f + docs/components/chatsystemmessage.md: + id: 19ce58721eeb + last_write_checksum: sha1:9a942356ffe3c46941006c9afca8ca36b99b9563 + pristine_git_object: fbbf529e06e6057a5a2bfc073104a2cb105be9db + docs/components/chatsystemmessagecontent.md: + id: 0e4b073ca405 + last_write_checksum: sha1:e3a97a8cdfa3ffa72fa16afc0ad2a74e128b2d56 + pristine_git_object: 687802523e0accb62dd2628352d2291055e5bae8 + docs/components/chatsystemmessagerole.md: + id: a89f62ff7bde + last_write_checksum: sha1:79746fbaa483f2c7ba052fb28d1c6d0f3b7bc9a4 + pristine_git_object: 93ea0289f870442b5f7565843744993466933dd9 + docs/components/chattokenlogprob.md: + id: 562b5ff8dc1a + last_write_checksum: sha1:90f700801db29295fc33ec61ce06ad540384cd5e + pristine_git_object: 3710116f6289a14763b110f45c90cffdddb8033b + docs/components/chattokenlogprobs.md: + id: cc600497da20 + last_write_checksum: sha1:6581a4b05f8c01ca27a0f24a76d81c704f5c54d1 + pristine_git_object: 5c1d509d7e80c65e63344ee815a982b3a321c122 + docs/components/chattokenlogprobtoplogprob.md: + id: 2fdca99b1741 + last_write_checksum: sha1:fe74469d8ee9a4275acf04f18144c4e5a84bc275 + pristine_git_object: 58970acd3a36e4bf3b4c11b9139af0db9656e513 + docs/components/chattoolcall.md: + id: 5d5bc660b9d0 + last_write_checksum: sha1:b52d6bfe62b301d02fcd1f74f0a1aed5306391ac + pristine_git_object: 7bee5a00ebe1993b03851edf530ce774ee9d754b + docs/components/chattoolcallfunction.md: + id: 2b1fbca75a92 + last_write_checksum: sha1:3bde77494db57c666c280033dad7171a66f3ea90 + pristine_git_object: df28f52e4c5c2118f89b943f4aa6beff3fb256c3 + docs/components/chattoolcalltype.md: + id: 4c4350539598 + last_write_checksum: sha1:36c09bd5863038de76c0ec7c3f24f6fedc4a380a + pristine_git_object: a24314cfbba98628733e2f38affb7005f96dee0e + docs/components/chattoolchoice.md: + id: aa08787a976b + last_write_checksum: sha1:3c2d953ca41929825158130bbcd8d1beca11a914 + pristine_git_object: 7a5f160f5932dad05821cfeee1a62d4fa7daf6e3 + docs/components/chattoolchoiceauto.md: + id: af8f56546bde + last_write_checksum: sha1:14e1710cab46ac216073ae11ee4e4d9e9c089500 + pristine_git_object: 472a5d20fba64f1f5a3c7711ce42ecae04482d6b + docs/components/chattoolchoicenone.md: + id: 7d985a62b156 + last_write_checksum: sha1:5a3cbf83e0fef9a06240465cc19de740c13f44a0 + pristine_git_object: 60dae8bdf01d7af50cdd65afaadcb34e920bc596 + docs/components/chattoolchoicerequired.md: + id: 908350fa4aeb + last_write_checksum: sha1:d808c58b96055dd251730ecbff41e0cd4dcf9f28 + pristine_git_object: 7b5f0cc697cfd542198018b03ac66b1b69488cc7 + docs/components/chattoolmessage.md: + id: fa2c15e2086b + last_write_checksum: sha1:a4dc4485b89713597c58c5dd231282a792a72648 + pristine_git_object: f12432a4be887b819044b6cae3a016d9de6ba7dc + docs/components/chattoolmessagecontent.md: + id: 8e2cb8de51fd + last_write_checksum: sha1:27c24922d9a1cc80988e9734222f5ba5fbc58e48 + pristine_git_object: 8824ed8db3e40daf47afbfcbb66b5027225a133b + docs/components/chattoolmessagerole.md: + id: 5e945be05bab + last_write_checksum: sha1:4d16b0060f643b401568841e198ba97486bee7ed + pristine_git_object: 7eb1791a9153498d5ffffc6b67d3668df59000c2 + docs/components/chatusage.md: + id: 72cd0c41ec64 + last_write_checksum: sha1:db3d1a444f9b7c348220c7d5ba8d717c5a9ad458 + pristine_git_object: 51a4dccb09227b05a6d6b088c35bfb5f1383d413 + docs/components/chatusermessage.md: + id: 4ab205b0030b + last_write_checksum: sha1:15850f82824628c8a3a4d6a9991262c50ba9ab26 + pristine_git_object: 57bb1851ad0f0f273c1672cf86bb5556edf09a24 + docs/components/chatusermessagecontent.md: + id: 0cb3b5d5cd65 + last_write_checksum: sha1:a4881f57d2a2f0d1746de22507bc4b3733753849 + pristine_git_object: d741f370d8ef3715587a8f8ed92bf67284e61c90 + docs/components/chatusermessagerole.md: + id: f4bb7c635d9f + last_write_checksum: sha1:e99a81c25906e98176a509f4b21a0f339b3758d5 + pristine_git_object: 95203396fad26d48c76b23f3481b6167291500e5 + docs/components/chatwebsearchservertool.md: + id: 0514430ce3ba + last_write_checksum: sha1:86669504f1df87e4984ebfbf9ba2437a1520dd6c + pristine_git_object: fc19a2156e954985a49259b94543e562d4659bee + docs/components/chatwebsearchservertoolengine.md: + id: f806d2aeaec9 + last_write_checksum: sha1:593986ca523ca814c985c3aaf48c0b088cd4d1cc + pristine_git_object: 798382a9b483ef4fd689c7c6b6618493026185c8 + docs/components/chatwebsearchservertoolparameters.md: + id: d3707e1a5a75 + last_write_checksum: sha1:5d36e1e006852c46151430cb5c49fe46f025623a + pristine_git_object: f63fcf926a242812f80e6afb57e85da6594b9891 + docs/components/chatwebsearchservertoolparameterstype.md: + id: cd3c94641c78 + last_write_checksum: sha1:aa88f9bc49de759b7b310f4009328ca2b41111ca + pristine_git_object: 2c08d0b7e94dfe77f5f2aa9a7dff3a1dc8ac9ff2 + docs/components/chatwebsearchservertoolsearchcontextsize.md: + id: 4a271fbbf387 + last_write_checksum: sha1:1697c197609ff2c45491c12dd64ef0a1d7f20a26 + pristine_git_object: 05640ddb5a65f367d785a85076a8aeec2685f5a8 + docs/components/chatwebsearchservertooltypeopenrouterwebsearch.md: + id: 839d02a32d9b + last_write_checksum: sha1:76c2591f6f5425c568b321b46e65869cfab02007 + pristine_git_object: 223c0facc161b26a4eca68577f83065cef482c66 + docs/components/chatwebsearchservertooluserlocation.md: + id: 6811de95fb87 + last_write_checksum: sha1:a0e00d5d086871a87a40e63c3b723c0c800dda91 + pristine_git_object: a23d00280792e3adf5599f29f658e41b70c1f29e + docs/components/chatwebsearchshorthand.md: + id: 97a5522cf188 + last_write_checksum: sha1:f9fa4cbdc5380d17ff7127434277ccfa428f9059 + pristine_git_object: 951ac28a4aee81b1c9277d1e51e8a0be98abfb8d + docs/components/chatwebsearchshorthandengine.md: + id: 2e584b3ec7c1 + last_write_checksum: sha1:d472e1521c6ef9644db34eb958df906e3f760425 + pristine_git_object: 21d190ac9600faffd6152d23db75775606c10127 + docs/components/chatwebsearchshorthandparameters.md: + id: d59f2cbea9b5 + last_write_checksum: sha1:cca63fca170b1ea8e91fdb6750ee7f4c91edef10 + pristine_git_object: d795a7dabdc566fbaec5fc11bacadc6c58d0be37 + docs/components/chatwebsearchshorthandparametersengine.md: + id: 7603a3f89ae1 + last_write_checksum: sha1:33a1d49970eaa5c5453d00c06c2c77d4f4325067 + pristine_git_object: c6e3d71424e2a0bcdea407ba2569856eb53a177b + docs/components/chatwebsearchshorthandparameterssearchcontextsize.md: + id: 2f86125b6696 + last_write_checksum: sha1:d74061ac7e6c501976bd18fc205df82501662bb9 + pristine_git_object: 4c94f211346c8417f38b4214d1f54f814cd74ff5 + docs/components/chatwebsearchshorthandparameterstype.md: + id: 408ce47c84b5 + last_write_checksum: sha1:aa80bf76ff85e1d79f2b01f5252e74cfd851705b + pristine_git_object: ad88c38b66179c06e94c4b12e76c6703db5034e6 + docs/components/chatwebsearchshorthandparametersuserlocation.md: + id: 6fa6585766eb + last_write_checksum: sha1:68b9f73c86f4b7460a11ce7649057f51a46f88a0 + pristine_git_object: cc602eb8cc868e68b917eead1fbc8b6235fa4045 + docs/components/chatwebsearchshorthandsearchcontextsize.md: + id: c520b103ca89 + last_write_checksum: sha1:e3febfeaea5cc0ee84ee2bc2455849686d2c465f + pristine_git_object: df9a0f64da391e0e5cc88e8777836625dcae81ba + docs/components/chatwebsearchshorthandtype.md: + id: ec8d82e4169d + last_write_checksum: sha1:11a35b858e9630405ffdde10c89e60ed33fbed45 + pristine_git_object: de2f86e7af6cc072ccd2af6d71e3babc9b554c4e + docs/components/chatwebsearchshorthandtypeapproximate.md: + id: 183e61e759f4 + last_write_checksum: sha1:3322b2f84f08e901db8866b2067e2935f953ae5f + pristine_git_object: 7c3f41fc2353389d09c1848ad3f67ca86ed8c041 + docs/components/chatwebsearchshorthanduserlocation.md: + id: f74b75c3882e + last_write_checksum: sha1:16a02ff0d3d6efc7b9f26a800f2d134aa947470e + pristine_git_object: 4eff7e63efa6943c4bb234f4e41f4d0f3ed97b2d + docs/components/code.md: + id: a224ebbe4cc9 + last_write_checksum: sha1:f505e84ac9a4367e1ffda1f6e03c72c24c15ecbc + pristine_git_object: 86a85544261f8234a7d916e33599270b9d90b059 + docs/components/codeinterpreterservertool.md: + id: 289a7f7a2d12 + last_write_checksum: sha1:3b128522eea15f3dc4a9c46ea793e00d9a78d6f2 + pristine_git_object: a82c7d99ad7cb11bedef9f3c9cb7fc31144d8377 + docs/components/codexlocalshelltool.md: + id: 196880556b4d + last_write_checksum: sha1:56d679292f799f432181fac6ee5d024f74727d0e + pristine_git_object: 9a90670a85d5cf910d6c23e57e95342abbcd2a18 + docs/components/codexlocalshelltooltype.md: + id: 6b76cb92f8f3 + last_write_checksum: sha1:e0bda1e8fea9942f8831ec3876344728e8d2d404 + pristine_git_object: 043aac356e529af550220ec56161439b65d49321 + docs/components/completiontokensdetails.md: + id: 6b7b08e269a0 + last_write_checksum: sha1:39b1d8dde2029505a93436f1dfcf7ac3875b9684 + pristine_git_object: 1fa23d635d7cbb500d5199b7cc4d9c3eb776073b + docs/components/compoundfilter.md: + id: 6c881867d341 + last_write_checksum: sha1:3244cc9e031036ce2a18d6f59b49a5e50c1fbdcf + pristine_git_object: a6cbe94b908a1e5214a2c13122dcc126e1cafd5a + docs/components/compoundfiltertype.md: + id: 8c913408500a + last_write_checksum: sha1:f08429d6fdf07f9d65321a8d00a72c6286ab1dc6 + pristine_git_object: 162ed7159ef543f8b418b2325c75eea6467dd3a9 + docs/components/computeruseservertool.md: + id: 68115b3d3921 + last_write_checksum: sha1:87e29fd2d9b5bc8335d8a062b7f6114106d24311 + pristine_git_object: ebcd67dd6e8f47087402097c626aa0330bb489ff + docs/components/computeruseservertooltype.md: + id: 5957ac538f35 + last_write_checksum: sha1:bf2c675ddac5469378b4a378a42496a3ec3bfd82 + pristine_git_object: cdc92b8cc5e1cb558b421a5a2bb8dff51ceda0ba + docs/components/conflictresponseerrordata.md: + id: c80474d05fa2 + last_write_checksum: sha1:7f53e1736241725b06f21a327b45458fabb1f66a + pristine_git_object: fb319b9ed8d41dd5eead7536827cf74057ce877e + docs/components/connectorid.md: + id: 5a583b8644f9 + last_write_checksum: sha1:61bb2013d883cf53f9fc103eb33c6415454ebd57 + pristine_git_object: 673ad13dbcc84df8ccf4c10d4b722e711873a37d + docs/components/container.md: + id: 9045d956881a + last_write_checksum: sha1:0076c1028f5a416afde20f940e4f989247819fc8 + pristine_git_object: df1116376f912e55b36fa745a431175679413024 + docs/components/containerauto.md: + id: 89a8dc079e5d + last_write_checksum: sha1:981234a3e7562920981506122bb2e21db95b7b74 + pristine_git_object: 2ccdc1e0a9762385f40cfdd4fd1776a0ea9b4dc3 + docs/components/containertype.md: + id: beda1b89c7a4 + last_write_checksum: sha1:f513446b0c8b1cb3a34ed6721bd716536ffbae47 + pristine_git_object: 9be5b3ce474de60fa8116325313e5a8d9ebe188d + docs/components/contentpartaddedevent.md: + id: 46c34edca7cc + last_write_checksum: sha1:36654eb79506a3c2fbf0c0ffd06adfb4f5837f19 + pristine_git_object: 3c110f507c15c42be50e7b1da7fe014bcb709fcb + docs/components/contentpartaddedeventpart.md: + id: 65797fea2a6a + last_write_checksum: sha1:6f3b68d1a22f7d690e3ea2ce1db2af74750f4953 + pristine_git_object: 7101e0275aa7778c408e1237bb0a829f7eaed2b4 + docs/components/contentpartaddedeventtype.md: + id: 72bab8b5ffda + last_write_checksum: sha1:d1effe2f7a73919d65a99f7ac4f3f8d0b80b645b + pristine_git_object: fa5229a68a69489db870b32e5cb58e5e9e707ec0 + docs/components/contentpartdoneevent.md: + id: 4c409e055805 + last_write_checksum: sha1:e0112dbe2763481f1d8d56c6a219d10cf760b26f + pristine_git_object: 8b828dcc294c7b48e6e0c9bfe8f0eba4dc930225 + docs/components/contentpartdoneeventpart.md: + id: 4e2036cbdd2f + last_write_checksum: sha1:461683c3f5f96c458c5d88e87b7876138b1ae22d + pristine_git_object: a09231a3c3e312214f1885f870edbd945be78d5a + docs/components/contentpartdoneeventtype.md: + id: "859167485170" + last_write_checksum: sha1:f35a10d5fc1856fbbf28ee1f64ab43d288c8328b + pristine_git_object: 53a335d9b3cd971a3b24e4759234f987e3499679 + docs/components/contextcompressionengine.md: + id: de089ca4a588 + last_write_checksum: sha1:4dee80dba0a801d9d6aec487235a39d548744372 + pristine_git_object: aa78a36053e7d254e90281ce6432b84221badc36 + docs/components/costdetails.md: + id: 2e3d81b7a646 + last_write_checksum: sha1:298cb44901e7c50563597aae9e0606cf83edbc2b + pristine_git_object: ada009ced29fcaf5d19e81bc67276fe9718ccfaa + docs/components/createchargerequest.md: + id: abed35916f72 + last_write_checksum: sha1:a157ce1a0aa39b3efd07015508498c2e2ae90b12 + pristine_git_object: e789e8f139c280cd256caef05c1561b0f9cefc3c + docs/components/customtool.md: + id: ff0ec1b8ea8b + last_write_checksum: sha1:090abd129254120c6ebdff2d303c36bddc62b712 + pristine_git_object: da6cd5777654596d56636052ed71bad3ab27e99d + docs/components/data.md: + id: 097aebaf54b6 + last_write_checksum: sha1:7c521570c243b639ceffb808e8ec91e76d652ed6 + pristine_git_object: 8d840f603b0a7efd44bae95c88524f5b48986e40 + docs/components/datacollection.md: + id: cacd95d2ebf9 + last_write_checksum: sha1:1d9eb4c12467860d5ef9edceb6456a4b9d6de643 + pristine_git_object: a07c6e2e56cf9bca27530a9f9940b4d439680a0c + docs/components/datetimeservertool.md: + id: 2b884f7c46b0 + last_write_checksum: sha1:bed61a5e960712341c7f444589a1a94731836e71 + pristine_git_object: 7c2623ff136f0223cead23bf7d7cfc5d75c5768c + docs/components/datetimeservertoolparameters.md: + id: 8f0a4b31b545 + last_write_checksum: sha1:798b39b2fcd45c91a0b951346ce51941730ab318 + pristine_git_object: 5fd2e476f313310dc52d5555a1d157a0212ce883 + docs/components/datetimeservertooltype.md: + id: 8d84fb41685d + last_write_checksum: sha1:fcfbe6740c505b263b90f7de5281d4f506922b05 + pristine_git_object: 870296bd3335da46ecdf4ec1722a3d47037a09c9 + docs/components/defaultparameters.md: + id: a84477afcaec + last_write_checksum: sha1:4bec180f914050a27da1cc04f4566712873c3677 + pristine_git_object: da72f0d77c00427d24591a1f3db8762ef47d9fef + docs/components/easyinputmessage.md: + id: a4927c37a92c + last_write_checksum: sha1:c3363992a757fca3ce3f65669e9fd222440f9ab9 + pristine_git_object: b8b3c3485aee0650f8c8780b98246d954b326e44 + docs/components/easyinputmessagecontentinputimage.md: + id: f7937c5f8c6e + last_write_checksum: sha1:d8279b87d3e796670d97a548633f83ca5670970d + pristine_git_object: 283037004f931748e6f7294f5c4077deb4ffb21a + docs/components/easyinputmessagecontenttype.md: + id: ff36a30eebf3 + last_write_checksum: sha1:aa6d05a3a1e20b90ce068b7e98690061c89c6172 + pristine_git_object: 4b35caee917c51e25d8eb9c3056d0300e083b60f + docs/components/easyinputmessagecontentunion1.md: + id: 50fcb3e4383f + last_write_checksum: sha1:f3b0bfbd846036a751a5fafe0027d24fff1e8562 + pristine_git_object: 3fb9f574e248def2e7c13338b69a0836fd6da635 + docs/components/easyinputmessagecontentunion2.md: + id: 193c6ccf9019 + last_write_checksum: sha1:cf3577d0972e3655d0c7fef93a74a8ed784d53f6 + pristine_git_object: fece542858a307b4381b49dd8a48438f6e5412a1 + docs/components/easyinputmessagedetail.md: + id: c61a76d3f5f7 + last_write_checksum: sha1:307cb8955a3d3e6dcf4d975203de59c86865d3a3 + pristine_git_object: 31995d86e0c84af6a6e05212a342d3e13615941b + docs/components/easyinputmessagephasecommentary.md: + id: 876e7cf3c1bd + last_write_checksum: sha1:a66361bbf2c77f4c9ead65c37687136d44fa5b25 + pristine_git_object: 846fa3d7f29f5596cbb820c82fa875ea588ad285 + docs/components/easyinputmessagephasefinalanswer.md: + id: e2b7b0975fdf + last_write_checksum: sha1:1db0189759242106720ead985ff968db6cbb9ae4 + pristine_git_object: d0c4674078bfa1854cbf535108d1f2fc8a26ade2 + docs/components/easyinputmessagephaseunion.md: + id: 2ce458f59101 + last_write_checksum: sha1:5690e18679ce08a4b04a78dc587d3b3e7c32e583 + pristine_git_object: 4a8e7c3c8cc52dc3d9884123cf113c3190d3092b + docs/components/easyinputmessageroleassistant.md: + id: 15af073bfe56 + last_write_checksum: sha1:6af3b2b38d768de19419a6c132b8eee9be68987c + pristine_git_object: 1cdc687996389411002e50056bfb400b5d5bae0d + docs/components/easyinputmessageroledeveloper.md: + id: ee99f8ad364e + last_write_checksum: sha1:59b505361d5c941946e7926038d5b7741cdf3c22 + pristine_git_object: 08832892c5f6bbc65a0363c98b05ba1a1ec056f8 + docs/components/easyinputmessagerolesystem.md: + id: 1b7599d2a1f1 + last_write_checksum: sha1:bbd687187332af48fb13463bd21806379906dce4 + pristine_git_object: 26c830aec4d74672afd9711cd45687d6825647da + docs/components/easyinputmessageroleunion.md: + id: baca15eca8c5 + last_write_checksum: sha1:c22891423c0530830f933da1a8eb6fcb7068d185 + pristine_git_object: 682ab99f7710f31fc792375f41c66c1a634c8bd8 + docs/components/easyinputmessageroleuser.md: + id: 6c844fdcf70c + last_write_checksum: sha1:21736cdf62fc202adf26bf1939e029f452dfcf83 + pristine_git_object: 7b275a9261e22e64da7c7f53e5b998e13af51a1f + docs/components/easyinputmessagetypemessage.md: + id: 09c9ddf2d237 + last_write_checksum: sha1:4890beaae899a0be186dd053e4f83f5e9c7f2688 + pristine_git_object: 39df84285df422ec938376eea073fcc200fa0335 + docs/components/edgenetworktimeoutresponseerrordata.md: + id: 27d848813ab0 + last_write_checksum: sha1:eff07929141781909a39ca2793f1afa963169f7d + pristine_git_object: f460fe48e034fa2d47ca347e7c4ab3a9846a0663 + docs/components/effort.md: + id: 7038976c6de5 + last_write_checksum: sha1:fa890164de181096fd8c1c3b208c2c783c193b2f + pristine_git_object: b23f0fb57a0dead83ce5f3bb69a809bc1e1fbf00 + docs/components/endpointstatus.md: + id: 8643237270dc + last_write_checksum: sha1:945606bc29cd884375a5c9404786df5e726e67a0 + pristine_git_object: dd8900571dc033720f7ae045e3ea0592d4588c4c + docs/components/environment.md: + id: 29e78fad01ee + last_write_checksum: sha1:532d3cc7bb12231a96be78b25f9b5b06e1db3218 + pristine_git_object: e58da65457bd71885289a77f054ae63189dc77d9 + docs/components/error.md: + id: 786c3bb44e8d + last_write_checksum: sha1:7f9e68078bbb760b8eabd8345db100dd9d2d26bd + pristine_git_object: 7765bfc588aafe6caba3d677970ed003dc4fba46 + docs/components/errorevent.md: + id: 85ad990558e2 + last_write_checksum: sha1:4c780ed23b429c6af1f8aa003b300236341e270a + pristine_git_object: 6f81e7ab3e7cbc6d03aa5104051337b52e62a923 + docs/components/erroreventtype.md: + id: c66a1a2560ef + last_write_checksum: sha1:75e5cd528e6faeee349e685da1810190643ae17d + pristine_git_object: b3410e67c37edd66f60b0f2364e0d858abe3bd88 + docs/components/file.md: + id: 6148b0bfb103 + last_write_checksum: sha1:6ed22bc8b67721e109d726be38bcfac96f0fd327 + pristine_git_object: d2a2e85810efa44f6870d4a06de5ed01d59f97ed + docs/components/filecitation.md: + id: e234751883c3 + last_write_checksum: sha1:2213c61c6b5afc59ab72a0c9ee5d31e1a776325b + pristine_git_object: d9673034efeeebc080c7684d63482b43d96c2e62 + docs/components/filecitationtype.md: + id: 41e6446acd3e + last_write_checksum: sha1:8cf5b7140dee926145642fe455df0538a8c95e53 + pristine_git_object: 787e2546ba435d92d0736bb1d4d6e212e0128ad7 + docs/components/filepath.md: + id: 6fc21505064a + last_write_checksum: sha1:a6be92708ea86f23ae1b8e2e66a00233da1f5410 + pristine_git_object: 68dc392f52b2602d8ada5aaa4a270f273cff2b4e + docs/components/filepathtype.md: + id: b9cccc74dfb3 + last_write_checksum: sha1:bfdc1ffdd6ad62790b1b902de7f1e6f1e81fbca6 + pristine_git_object: 8edc6ad003bcd068e3362ed1d4f658a756a01328 + docs/components/filesearchservertool.md: + id: 4a63087d0118 + last_write_checksum: sha1:7673d77da536f84fe0f968d6defe22dd6c1c7488 + pristine_git_object: 489e73d48850a0c1574ec14da8d4df894093737d + docs/components/filesearchservertoolfilters.md: + id: 835669c775bd + last_write_checksum: sha1:6a8c483c5332352d271970eee2faf6af68617189 + pristine_git_object: da597fcd45a513dd906b82ebce7986f5ff095226 + docs/components/filters.md: + id: bb43ec42351f + last_write_checksum: sha1:ab847de6497bdc36c34e6fdaf1c732ef4087ce58 + pristine_git_object: a74f23c2dbbe9525f2f14d25b140106c995d2614 + docs/components/filterstype.md: + id: 7a1c1e739033 + last_write_checksum: sha1:355e43e7bfb04a8119a571ead3b12904526669ac + pristine_git_object: 9dda683e8bedae58b8a21bebc362926b200e2126 + docs/components/forbiddenresponseerrordata.md: + id: 2b182274133d + last_write_checksum: sha1:5905ebd01d68fd89d4b109895b76799ed95dbe24 + pristine_git_object: 37e2199b4865f7bc7bd7daa2ac5065133d51cd3c + docs/components/format_.md: + id: a1f82a6f0081 + last_write_checksum: sha1:a2868ca356a3322f9ab3b2122ecb1cde9e0436d6 + pristine_git_object: 96e07e7e317890e42522caddb5751f6988dfb112 + docs/components/formatgrammar.md: + id: 56dad240b6c3 + last_write_checksum: sha1:4f7bce21c3d1dd214bc0dca845ba7f174a9f7c2d + pristine_git_object: 0a8c433a9911c4223b87b5268c6f0c3fb1fede59 + docs/components/formatjsonobjectconfig.md: + id: 0cb152015017 + last_write_checksum: sha1:3e223b7d266045f2db2515cea9bc4fc9a836eca0 + pristine_git_object: 5b1c7eb54d8a9d396109030e9cdc04f2960b8fe3 + docs/components/formatjsonobjectconfigtype.md: + id: eee3beaba7a2 + last_write_checksum: sha1:318e4df1870ed93c8ad8677ff991ad7d4ea5a5cd + pristine_git_object: f95e5f5749d25c1564372fadde296cd3fb537b36 + docs/components/formatjsonschemaconfig.md: + id: 86caad7af281 + last_write_checksum: sha1:639227fe76590111b9ddf495ad1134b993316eb9 + pristine_git_object: 40f93d91e6b01c72a6789b5aae7cb9be8964a383 + docs/components/formatjsonschemaconfigtype.md: + id: 439973dacfcd + last_write_checksum: sha1:345a2c5fc424bf78d4f64f383dc093c38388d467 + pristine_git_object: 01324649b2e7b8884defc43431c6177a1e0d372b + docs/components/formats.md: + id: c761f516dad9 + last_write_checksum: sha1:54e6afc0e00ec99173c873796b9405b947cdc559 + pristine_git_object: 24d071e213966744d695d859d1dfb70eda47c560 + docs/components/formattext.md: + id: 0a1f9222d5bf + last_write_checksum: sha1:be86d45052064473ed516ec583e637c2027707c3 + pristine_git_object: 80dd1f8a2feeab11fe78a02cdfbd68fe8bfcf6c9 + docs/components/formattextconfig.md: + id: a79b2b3cbebc + last_write_checksum: sha1:f2c2bc3e4417f8299c61b87e5f817e805491227a + pristine_git_object: a37f8950d3ddf8320b21467f43b60f4f4719ea60 + docs/components/formattextconfigtype.md: + id: d81ed62bda6a + last_write_checksum: sha1:c806b9523a4109d4342d237d3fec2f9856594f5a + pristine_git_object: 5d831e0c8984838ae115cd74cc114f95fdfcdeaf + docs/components/formattypegrammar.md: + id: a6275e70cf35 + last_write_checksum: sha1:81c6de4becbbdb9e642c24d20976d4879592fcfa + pristine_git_object: cededf38a907fd264a938cdb941bc41182153b56 + docs/components/formattypetext.md: + id: 978549ce5d07 + last_write_checksum: sha1:caec39e3db4ac9be861e1d30d08e58e543220344 + pristine_git_object: 7d38cb838f31c6c6be5015fe284f22623ea120f7 + docs/components/functioncallargsdeltaevent.md: + id: 029525b7c073 + last_write_checksum: sha1:bd02f3d8671b456f47402ab65d1a605bd8825ad3 + pristine_git_object: 79841c2cafcc9ae603b8056e8c8382798702f67a + docs/components/functioncallargsdeltaeventtype.md: + id: f3f34894a1a4 + last_write_checksum: sha1:36466a5504f92ad63dbea7a289128918efbf8f7f + pristine_git_object: ecaf5b58a63e2b1d6f7034aeb39b5fd8930432d0 + docs/components/functioncallargsdoneevent.md: + id: 3a2081d69643 + last_write_checksum: sha1:efabd5a336187e33af86b3249ee45e95d86962b3 + pristine_git_object: b9645497d3de6ef266db817558a793e365311c9d + docs/components/functioncallargsdoneeventtype.md: + id: 0a537a121286 + last_write_checksum: sha1:ecd15044cea3777ff481256819feac67f7643566 + pristine_git_object: 3f4c91d5bbe63c375f8ba938bfa6b620355c82c3 + docs/components/functioncallitem.md: + id: 728446a82c6b + last_write_checksum: sha1:ae1fb2b45119cd88fafd6cf4095172f51df5bfc7 + pristine_git_object: 8af78d9d1e6eceb6a52a8ab90d109df5499b928a + docs/components/functioncallitemtype.md: + id: c7b1c1ec212b + last_write_checksum: sha1:995a373197e8ee246d7127595dfdd1c77a913dfe + pristine_git_object: 7640481023ffc48c27a7e7417451fecbc661c205 + docs/components/functioncalloutputitem.md: + id: 5bdb39338207 + last_write_checksum: sha1:efb6a0d5a1b4f4d0b410dc7e8c3795f20deea6c5 + pristine_git_object: e859af0cdaf4e47bd22434d3ae877a5f04ac2c02 + docs/components/functioncalloutputitemdetail.md: + id: 2cb02374b48c + last_write_checksum: sha1:c03306cc3461fa680c42fe147394c5b2a27d58cd + pristine_git_object: 3308be744f3ae5d92e2e90e5f9d4b29bc30c4ebf + docs/components/functioncalloutputitemoutputunion1.md: + id: f029cb33f764 + last_write_checksum: sha1:ab07cf8dcc44a1d42fe622ef4ced5a0ecebde673 + pristine_git_object: 41e5f165f9b2af0af87df7743058db29d6e1a97e + docs/components/functioncalloutputitemoutputunion2.md: + id: 1737d9834676 + last_write_checksum: sha1:edde5e34d278f6fc8068d42e94e42d4fdad355e2 + pristine_git_object: a91fd7c0fd6924e7c7870c94d40753f552fc6c04 + docs/components/functioncalloutputitemtypefunctioncalloutput.md: + id: 88a512c5f9ce + last_write_checksum: sha1:611201e2dbd2c8fe1c501b5365bc06367bc5370c + pristine_git_object: 2f4629220306ced5674a9ef70dbcbce1f908b93a + docs/components/imagegencallcompletedevent.md: + id: c26bc1b3854e + last_write_checksum: sha1:3fbced46717f100511986724f16441ff0a081187 + pristine_git_object: a94d499fa1a3208b9381bb5cb21dfc334191a249 + docs/components/imagegencallcompletedeventtype.md: + id: a74ad0e7b9ae + last_write_checksum: sha1:3cc41a971955015c2fdfb46f303ae6882b450b3e + pristine_git_object: de12c9ae201cb4226a48f20f9c19e528bb8089cd + docs/components/imagegencallgeneratingevent.md: + id: d24140b27e2d + last_write_checksum: sha1:a7b69c00aa796bb2cc48a36914e26502c3af40f9 + pristine_git_object: 31b706bcf5d258665a93114a958a76126a9307b2 + docs/components/imagegencallgeneratingeventtype.md: + id: b929dcb09058 + last_write_checksum: sha1:03fed8821dd92b8c233e48725562ef2eec92b34e + pristine_git_object: 620ac466453fb5b61f2bb0f3ba4881c538418830 + docs/components/imagegencallinprogressevent.md: + id: ee60aae70dd9 + last_write_checksum: sha1:00259d79eb464977eb6fba83c1437aa62ba781fd + pristine_git_object: 3c1851ddd38bccfe63f543f6bdc4e6c14c4cbd30 + docs/components/imagegencallinprogresseventtype.md: + id: 51942aa68303 + last_write_checksum: sha1:57cbecd6dd9f7a5bedf779ac06fdecd4cc8fea50 + pristine_git_object: 407c29cdf87ad5ddc32e64d3f68c3785161157a0 + docs/components/imagegencallpartialimageevent.md: + id: 3845104b6af7 + last_write_checksum: sha1:d56e5f8d0b398b43963addad31aac443e615695c + pristine_git_object: 0b6159487f85a5e8178e52c97c9a3930caee04d4 + docs/components/imagegencallpartialimageeventtype.md: + id: c007465f6177 + last_write_checksum: sha1:c14e2e12eb49cf4445fdda2e2f400a8ea849d058 + pristine_git_object: 841d9210013aa9eac24702237c16d0aca12a985f + docs/components/imagegenerationservertool.md: + id: 0ddff7f46134 + last_write_checksum: sha1:ea311fe2164261c6ae9effa396c0d2b84258dce8 + pristine_git_object: 20a42975b05727ba1b6fd44d23758186f246909d + docs/components/imagegenerationservertooltype.md: + id: 5d4b6d6b41ce + last_write_checksum: sha1:125bdc6395723e8fcdd82be5d88e04916b8641fd + pristine_git_object: 4f8136cbf9a30375a867d359430e0385badbf088 + docs/components/imagegenerationstatus.md: + id: 20f9a63cfff4 + last_write_checksum: sha1:999c6f63846a5521309becac23012ed04d18f9eb + pristine_git_object: 22e0541cab57771537bd791307029b628e7151ec + docs/components/incompletedetails.md: + id: 4ce388faaac0 + last_write_checksum: sha1:3aad9a98e1bb15a540b9f8307a1c9524432e7959 + pristine_git_object: 1e12f5f39649bbc28907eb579d26b1dedcd634d9 + docs/components/inputaudio.md: + id: 3bad9d0f3bfb + last_write_checksum: sha1:3780c1c2e2e33d470fab417acbd8c1418967256f + pristine_git_object: dac9b47d60961d90d40cc61d5d0e702807cce65e + docs/components/inputaudioformat.md: + id: fc1e276a2e54 + last_write_checksum: sha1:dcc117039d1c99730491717a90e97c7dfc26d8a3 + pristine_git_object: 226d6990faecc4a44360c6985220fdeadab5e968 + docs/components/inputaudioinputaudio.md: + id: f60668aee68e + last_write_checksum: sha1:e4350309bd2e995a31c8e97c63bd4722dfcb13d2 + pristine_git_object: 2a7ec30a0e77583fb7775b49ab9b769d08aaa5d3 + docs/components/inputaudiotype.md: + id: 2a37b5504461 + last_write_checksum: sha1:e1b72ab7561db1859a957f92514258163a207d03 + pristine_git_object: e30ce1f2f857dcfe90b5312c210c9eff895e4886 + docs/components/inputfidelity.md: + id: 1087f3ef629c + last_write_checksum: sha1:d3da992f449d7864308543468937167d2884022e + pristine_git_object: e89ae0570c5bca8f4e633d7914cd6c98f9799c66 + docs/components/inputfile.md: + id: 3a1680eda22e + last_write_checksum: sha1:717b9ebf4f66d986213a2e83d5d4be920fa3c48f + pristine_git_object: a63bc8435f158f0bbc74e8c9dd688232c2bfcc2f + docs/components/inputfiletype.md: + id: 57d39465e429 + last_write_checksum: sha1:1d94b6bf420854cb5e0162391fe5465cf8650b2e + pristine_git_object: 801a1474178b676683782b4e4672a8ddf9f493f0 + docs/components/inputimage.md: + id: b1754e9aa099 + last_write_checksum: sha1:60ce1b945c96493bc843446ad1bf66b163b84de9 + pristine_git_object: 9c79fa277e4f37f7a6f19f653166bb65fe151680 + docs/components/inputimagedetail.md: + id: 582114ff5e40 + last_write_checksum: sha1:8b26812936eea42fe754a8376c1bf909d8b85197 + pristine_git_object: 09106b0661c2e4b67a76f98513efec087153912a + docs/components/inputimagemask.md: + id: 014a4ddc9ad5 + last_write_checksum: sha1:5b0ae7389a73c3dd799a7ff4e1cceaeed77ffce2 + pristine_git_object: 911ea05268095f50dbe9725c3fe4baa90696f8f1 + docs/components/inputimagetype.md: + id: 2c928cbad52d + last_write_checksum: sha1:3f986842d8fd5fb4aeced61a2e4e896f41b7ac76 + pristine_git_object: 75b828e8fba8d581e1631636b8085053324aff0c + docs/components/inputmessageitem.md: + id: bb421a6ae354 + last_write_checksum: sha1:b24636fb15cb8e26ee30cea3bca6f4411592ab6c + pristine_git_object: a7e9fe0c2160e30592b48225e24ddd79f4ee75a6 + docs/components/inputmessageitemcontentinputimage.md: + id: 70760d9b88c0 + last_write_checksum: sha1:60ebcac0949fcabe91415103ac6591bcaa69c5e4 + pristine_git_object: 08da210cc3725281532de89430f7ad30d4d58634 + docs/components/inputmessageitemcontenttype.md: + id: bb291db04191 + last_write_checksum: sha1:d85c022662be3d3cab6c5bc349d30288a402afcc + pristine_git_object: a1c49d50fdb71d9e0a8936a3a07b36a15f3993a8 + docs/components/inputmessageitemcontentunion.md: + id: 4dd45b0284ef + last_write_checksum: sha1:64419cd96a6d964d9bfe20b93055b904e5413ded + pristine_git_object: 39a5d724f55933275a35c44457a7482c049d9e18 + docs/components/inputmessageitemdetail.md: + id: 66296c9a1130 + last_write_checksum: sha1:9e3e3a4797556b1596efeb675adbd98f37ac3db1 + pristine_git_object: d6a0bdca75c1b561668cc1c222a7f54573bdfd19 + docs/components/inputmessageitemroledeveloper.md: + id: b5ea7f626a52 + last_write_checksum: sha1:42799b848928abc8f7bb0cc45b938455185b71e7 + pristine_git_object: af27ecd86bff337d214dded9c4dc6aee9b10c918 + docs/components/inputmessageitemrolesystem.md: + id: b455984ef53b + last_write_checksum: sha1:78e155484c35194713b7e087ce30e39ef4aa8e93 + pristine_git_object: 269cc21c5be70fe452b993eebf2ea6592e7fabaf + docs/components/inputmessageitemroleunion.md: + id: 7867f828233b + last_write_checksum: sha1:a9d10d93b9c8cd93d07ab7e76453a86c9e011bd2 + pristine_git_object: 30281f667cff516e10138072e42a9370e795811e + docs/components/inputmessageitemroleuser.md: + id: e4d0a822ece5 + last_write_checksum: sha1:8ffea2a7d44e93388b0e1a3479172275ab563674 + pristine_git_object: 19f763241ce5220068564d2fa911f92418c6e50a + docs/components/inputmessageitemtypemessage.md: + id: 0436b12c1362 + last_write_checksum: sha1:4b69cbaafeba5995449e82c1251950aec92df46b + pristine_git_object: 0067fb5a43ef95cbd0668a352796fca20775a912 + docs/components/inputmodality.md: + id: 375f3c4c080b + last_write_checksum: sha1:ad0e655fe0df9024e77ae3a38e661b9334df4038 + pristine_git_object: 89bdc2a7f9ee3a48b82c74784f1e4f9e92ede8ae + docs/components/inputscontent1.md: + id: d52cc340ee2c + last_write_checksum: sha1:3e4174c983a5d960128277273803e49d756775d0 + pristine_git_object: f5c901ca339e9717e70f32f01272344f000d4115 + docs/components/inputscontent2.md: + id: dc0736cbbf99 + last_write_checksum: sha1:ff08bc1cde46e84a744d200629cfc665ba5ebeaa + pristine_git_object: 709bf3192502fa94aca1fde8215ffd2a37cc9198 + docs/components/inputsformat.md: + id: 45dda36b9ef0 + last_write_checksum: sha1:5e9170e204b757bcb09852ba3c2b64f175f7115a + pristine_git_object: 123b031beb00bd60039dba20c164499738152b82 + docs/components/inputsmessage.md: + id: 0e40015668d3 + last_write_checksum: sha1:01f7f593a85d58030e684ef8887143f1eb836afc + pristine_git_object: 586132388c416a11bb32987c4d85b6aea33a07f4 + docs/components/inputsphasecommentary.md: + id: 9cc8146c29b5 + last_write_checksum: sha1:d44cdba85419f8611b4c79f2224be891c8dbd532 + pristine_git_object: e2a50cc9f83ad02c19215729642047cbd8e2fdc2 + docs/components/inputsphasefinalanswer.md: + id: d81f0a021950 + last_write_checksum: sha1:26c66f68ec5de53712c3d6a348cd2a159f784da5 + pristine_git_object: 813f34cbb6340aaaa5ba5f0eec487b21d003aa73 + docs/components/inputsphaseunion.md: + id: 701c7007c43f + last_write_checksum: sha1:01db82bdae5561df16d38e251fe2fe8125a3148b + pristine_git_object: 8a1a58aab6b1819a1261787a613bca096bb20ef8 + docs/components/inputsreasoning.md: + id: ab39ad335ef0 + last_write_checksum: sha1:02460c25d7841b7c99a8da1ad5108fe32f72f780 + pristine_git_object: f68169e7f571e12cd6f485f2ba531f4add1e8002 + docs/components/inputsrole.md: + id: 94a7950b131d + last_write_checksum: sha1:d0df3609fd57ec61d9bde5cd2538ec462a3cd654 + pristine_git_object: 32122175f04d4bcb126f37b10cca3cbfc5fca3c7 + docs/components/inputsstatuscompleted1.md: + id: 36f2138f068f + last_write_checksum: sha1:720715e983f7676004c7478c842b027e9ec9cbd0 + pristine_git_object: 5862d8e18c1ae30d0d965ed86c855bf3289022c8 + docs/components/inputsstatuscompleted2.md: + id: 93adf4fdab40 + last_write_checksum: sha1:7ed56974f3cff07070e2fe4337814a68063bf45e + pristine_git_object: a07c2f65f49b4d7d3e6872140900eece8d188d63 + docs/components/inputsstatusincomplete1.md: + id: 735939d076c0 + last_write_checksum: sha1:cba77aec0c5dbd0fe9c12fb4dd0f49b7b4df91c9 + pristine_git_object: 3837df3a8bc1b189b45f74f0eab4aba57310cd9d + docs/components/inputsstatusincomplete2.md: + id: 12a3211df3f8 + last_write_checksum: sha1:dc8608363049ffad64fa23265957a93a8cdc181e + pristine_git_object: aba2e584245805266c57f5cef8884d2b57b6f6bf + docs/components/inputsstatusinprogress1.md: + id: 2c5f05df8d58 + last_write_checksum: sha1:fc5a666e9141f0b0812befffb1f678d7fe5c85c0 + pristine_git_object: 8d1328b930fe6cb8e00d2a42f1921853a8327e45 + docs/components/inputsstatusinprogress2.md: + id: 916087479cf9 + last_write_checksum: sha1:059769fdc810a93c50dd1ab9fb8f32141ee9f5f0 + pristine_git_object: 65cae77f8608f8c8106ed0343e36695e9c713cc6 + docs/components/inputsstatusunion1.md: + id: b10ed37973a8 + last_write_checksum: sha1:b676bd8f48fae807c6c9fbe876e0d0dcb138e789 + pristine_git_object: 233d4105a20743daa18490d7db3a50397beb3e3b + docs/components/inputsstatusunion2.md: + id: b77e7b47bfa8 + last_write_checksum: sha1:5292e7642249f595de569eeac0b61a777f62b6a7 + pristine_git_object: 2aa50a3a98fa1fab0cf4933e636fd4c0e6cbfe92 + docs/components/inputstypemessage.md: + id: 4122ab2e0f13 + last_write_checksum: sha1:233bbdffb6e0a7af73cff218ab360c6de5194365 + pristine_git_object: 5e9e171f51063f252324317bc06dc7f8b27fd82c + docs/components/inputstypereasoning.md: + id: 3d0c4a7b247b + last_write_checksum: sha1:1fd2de81fba75957cda0497fd82f58fa02ffc172 + pristine_git_object: 6ea63e29c55c16d4b8820875dae6371025a1422f + docs/components/inputsunion.md: + id: 80653539ba08 + last_write_checksum: sha1:2db13039e0309ce08f46dc305a75942bec7db0ee + pristine_git_object: 404cc4a69bca7b64c9172078420c72359ed9c2d8 + docs/components/inputsunion1.md: + id: d017aeaed00c + last_write_checksum: sha1:068bf732066c81337f1154932450cc0d80303e79 + pristine_git_object: de2e664b7a9331a428b5b042d105a743cfa31bf9 + docs/components/inputtext.md: + id: cf4503b3219c + last_write_checksum: sha1:25f67f798df55df68f7f8c8f604183ed4bd6d139 + pristine_git_object: 0ed5308e8c3966ceafe7037b9d3279cbdd62788d + docs/components/inputtexttype.md: + id: 5060f8d1c11d + last_write_checksum: sha1:f328a4d2fadde8103bd4fcf6a58fbec034e70e5e + pristine_git_object: 6181f0da9de76a20735b7b4bd8b174261db61578 + docs/components/inputtokensdetails.md: + id: 331af539199a + last_write_checksum: sha1:f05248e182d51b7c80541dc8784929f8032f5493 + pristine_git_object: 40de8ec7a8d12159943d98bb1ba4ec093483f234 + docs/components/inputvideo.md: + id: 5775df94513a + last_write_checksum: sha1:9096278894b57ece97edefbfcfbbbae5f91fb259 + pristine_git_object: bbe46c3e9304d61be59bd4c93b70b7a43e2b3b04 + docs/components/inputvideotype.md: + id: 9c33db0fda70 + last_write_checksum: sha1:e66c94b0c71f26f79953275dad240d08d90ff290 + pristine_git_object: 97c20b2bcf688db59cc6c0aadf61e963aa2f9629 + docs/components/instructtype.md: + id: 5276541098c4 + last_write_checksum: sha1:b0fdb6ec81d9e6d31e0cc0567568e7caeec7334e + pristine_git_object: 44c350d432bebc6e72a2367be0680dedf398772f + docs/components/internalserverresponseerrordata.md: + id: c7d253bbe0f1 + last_write_checksum: sha1:c95fa69b2e5ba1ad8801577e0833513b4045c733 + pristine_git_object: b320ded97617f2a84341aaf23e73be3e0d46546e + docs/components/legacychatcontentvideo.md: + id: 9a2b7bac8c07 + last_write_checksum: sha1:a6b313e115323750053500d55f0013f0868533ed + pristine_git_object: 124d040bd8452321a8271363cb1f9fa525a6e578 + docs/components/legacychatcontentvideotype.md: + id: 70e7ece41351 + last_write_checksum: sha1:bec40e9210c450f025f34e42f967fe1fef2c109f + pristine_git_object: 22ecba2663eaeccadf0d1c0283236d794afb2b09 + docs/components/legacywebsearchservertool.md: + id: "0e2991237936" + last_write_checksum: sha1:800a6dd7cbbc77d803df060aa2991e942b11ee35 + pristine_git_object: 403745f73149a7247290f2653e9b9903737fe9a2 + docs/components/legacywebsearchservertoolengine.md: + id: 96cdd1800966 + last_write_checksum: sha1:2797ba71a64dbf6f51542d20f9a853b8a8c60566 + pristine_git_object: 473b441f92491bbdb44b3735873a58cc425d5561 + docs/components/legacywebsearchservertoolfilters.md: + id: c345c58d827c + last_write_checksum: sha1:c760469e0d5126e07c00cb91ddc7db908f40ffb4 + pristine_git_object: c992fa1fffb3f9436842424da12bc7218f47c93b + docs/components/legacywebsearchservertooltype.md: + id: c5def381d385 + last_write_checksum: sha1:ea65b6214a79a7125bff8e6cca1f55863f5c1c08 + pristine_git_object: cfa9fd582c4d290d8700f34f092b5fd45d5a1172 + docs/components/listendpointsresponse.md: + id: b79a056a7034 + last_write_checksum: sha1:dfc1567089c65b8412b216586623eb2014e332cb + pristine_git_object: 89050e44901e67c37ab84a65c6d97f63f64a026b + docs/components/mcpservertool.md: + id: fcc92d12bf9a + last_write_checksum: sha1:1264f489c4609ab03424a49f11c19572c25aaa7c + pristine_git_object: 4025afb6a8101c9ff42783f3a2478660d32f982e + docs/components/mcpservertooltype.md: + id: 2090c8ba1a1b + last_write_checksum: sha1:7a7a827f064395ff5d952fd0dc775258b15f73c1 + pristine_git_object: 9c7e037d6bb5943e473b449b4d072af037e95ada + docs/components/memorylimit.md: + id: 6b23dc8e3b8d + last_write_checksum: sha1:af1899a519c3c3b50871014b17b50153050b59e8 + pristine_git_object: 39f5ae21785874af1f2ef0000e9fcecc000ec8fd + docs/components/modality.md: + id: c06a1698adc6 + last_write_checksum: sha1:9bbac55e2cb009dfd90e129cf3abd35dcab6d2ac + pristine_git_object: 54561e47866b619fda09c4168acaf5094a5158ad + docs/components/model.md: + id: 673ad57400cd + last_write_checksum: sha1:504edb8198debf509540c5db3a9c6166ea1b8734 + pristine_git_object: 5db2d5688977c09b67f2e5551c5f8a2b9c3ed9ed + docs/components/modelarchitecture.md: + id: 79816051e6e8 + last_write_checksum: sha1:176243942bbd83edf1612ef12abe322bb433b18d + pristine_git_object: 63f4c32305793fdbf6a75289a38b977122a5dab7 + docs/components/modelarchitectureinstructtype.md: + id: 3518ad912450 + last_write_checksum: sha1:e4745000d4820fa66c7b7994e676b061fbf38d96 + pristine_git_object: eabbbe356d5ed319279e02b0aa032253b67e3bb0 + docs/components/modelenum.md: + id: 578e84498f95 + last_write_checksum: sha1:e4c89141e391bb02c8b01ef243e414603937b527 + pristine_git_object: 0698ec66d69f7160750a558282c367f570465187 + docs/components/modelgroup.md: + id: a6a4b80844c2 + last_write_checksum: sha1:06712748fbdceed0908f6c6be3bbde84a8b7a964 + pristine_git_object: 377c57c720a633f07969eae664b39e5c5f607a07 + docs/components/modelscountresponse.md: + id: abdad0c1a02a + last_write_checksum: sha1:6c32f935021d24ff9eeae39f903f71b9ddaedf3d + pristine_git_object: 84bbce80ebf7ce2a93ad853bfe2f2a80a8395077 + docs/components/modelslistresponse.md: + id: 37e791d4f265 + last_write_checksum: sha1:f07b15965e2d9d70a6aad4894b51b8d008f64296 + pristine_git_object: dacf9fa2657ea04a081d37f741cdd1b7a54660dc + docs/components/moderation.md: + id: de90083e5402 + last_write_checksum: sha1:d0cd3160a76e89d8749cb27687b1bba3dac5089d + pristine_git_object: e537afb55f6f683d8e11dd14014db2c808c0a3ef + docs/components/never.md: + id: 43f2ea5e9932 + last_write_checksum: sha1:e6525fb53deebcdebcb5da707fd9f3250d8f2e9d + pristine_git_object: 32da565f2b04e672ba9efb037794ae5ee59c837a + docs/components/notfoundresponseerrordata.md: + id: fa528f1f7879 + last_write_checksum: sha1:8872a5d706d3a3392ae8c552f54ecc3c6df00f9b + pristine_git_object: 0ba248529a84feb2bf9d2f519895b3194349d2db + docs/components/openairesponsesannotation.md: + id: d8d10fd7804b + last_write_checksum: sha1:fa57b686a405727f7e305c17d9e97b981aec6ba7 + pristine_git_object: e3b6962893d7ecac7b171ce17969cf935186d256 + docs/components/openairesponsesrefusalcontent.md: + id: 864502b050dd + last_write_checksum: sha1:1bb95ad065dc2201dace99b89619f915aa59856d + pristine_git_object: 4709b80e87899ec62e058ba539d5e49d24c4e9cd + docs/components/openairesponsesrefusalcontenttype.md: + id: 0e2415eb75a6 + last_write_checksum: sha1:d934ac9cdb5b1125a8a60b26a25763356a854603 + pristine_git_object: e94bdd22c843ed46bc95f6fa256c23701416f12d + docs/components/openairesponsesresponsestatus.md: + id: baeac1c7fc78 + last_write_checksum: sha1:0e6be1f260a62e483e288efcec1b91c255ccac56 + pristine_git_object: a3628447cc8bb14c969544b1b57b4f1e4f82c9c7 + docs/components/openairesponsestoolchoice.md: + id: e0916138c088 + last_write_checksum: sha1:10ae047eeb5951e67b6e16bfdc61898e79f92b8d + pristine_git_object: 72b8738f1a2b1e34b51ddd61d3911e585cbcfd14 + docs/components/openairesponsestoolchoiceauto.md: + id: "864322169068" + last_write_checksum: sha1:4df5b1713e54f2fbcbf4acd91243b19f07898d40 + pristine_git_object: 5a958ab0c25e26ecc1ee4e4663a1cc4a51cf5d78 + docs/components/openairesponsestoolchoicefunction.md: + id: 98a6be9ff937 + last_write_checksum: sha1:73a64a8b021c84ac812f5522dacbaa7a8b7075c6 + pristine_git_object: 6889a238bde8f6e7b21e7a0f3686963fd3397425 + docs/components/openairesponsestoolchoicenone.md: + id: 7e44390a9041 + last_write_checksum: sha1:d6324a5ec32cf87e40ba5cc27f82b8eec52cc291 + pristine_git_object: d5c51acf219cee7536b94051c642e58dd117409a + docs/components/openairesponsestoolchoicerequired.md: + id: 1a18707d5f17 + last_write_checksum: sha1:ed310a851eb6b16175ff1aee2f1d51dc1ca63120 + pristine_git_object: 57aefba1d93597b1944cf8ce84a55e6578e1908f + docs/components/openairesponsestoolchoicetypefunction.md: + id: bf87379c3667 + last_write_checksum: sha1:9275e8d69c3615686c52f0c7f2607f79bedaa39c + pristine_git_object: de3caa3f6351a1cefab397803760aabee509a32d + docs/components/openairesponsestoolchoicetypewebsearchpreview.md: + id: a0dcc27980f9 + last_write_checksum: sha1:c56012a4d3ef1dcfc993f31529c9f21cd2f2d45b + pristine_git_object: 93b161b0908d956f47c9068a7107ae892f5244bd + docs/components/openairesponsestoolchoicetypewebsearchpreview20250311.md: + id: 60b749aa3da1 + last_write_checksum: sha1:8ee0320e41efba0ab518a0bf6cf91ed50ec3e41a + pristine_git_object: 3162d396225c6fa3f2597ed4aea08c8b1dc7db22 + docs/components/openairesponsestoolchoiceunion.md: + id: 0deaf8366a16 + last_write_checksum: sha1:6b100dab10a99ca8e44dbe724b91491808f2fb7c + pristine_git_object: 7ab787b20a7908ed75e103b7b8f973ea6838e4d7 + docs/components/openairesponsestruncation.md: + id: d4ad0cf0c093 + last_write_checksum: sha1:0adf4105f41726d94f43e9b76a7df2bb4cd791f3 + pristine_git_object: aafecaeb79126df177943a9c64776946f4248e2e + docs/components/openresponsesresult.md: + id: 9795b7de3f92 + last_write_checksum: sha1:7e29730e13b9285fc95f203a5d9ff341057e2859 + pristine_git_object: 148655006ed779c29596603a309dce948641083d + docs/components/openresponsesresultobject.md: + id: a8c7f7bc0b24 + last_write_checksum: sha1:3df49df80dda49ea4cb53f913931fd4754769b66 + pristine_git_object: 1ae6c220a9c087af683d65806061ef350e7f1fcf + docs/components/openresponsesresulttoolfunction.md: + id: add7bd8ba16c + last_write_checksum: sha1:abbb99035ef3d092dbf10592111f1dcf1a961860 + pristine_git_object: f3e896d5d9eb923f1f8d11ecaf53486b7360cb2e + docs/components/openresponsesresulttoolunion.md: + id: 3da3bd935d27 + last_write_checksum: sha1:07299abfdb408bacaa372bafb3edb4e946fc6108 + pristine_git_object: a284d86e98ad76267fc585c6cc6a9bfdd26c2bf0 + docs/components/openresponsesresulttype.md: + id: 11e423f51c0a + last_write_checksum: sha1:aafa032ff25d8adeec0c0bd0d995fdcebecb59b0 + pristine_git_object: 1fd0de22bc2eadd015eb6e04c46eafa3dc992af4 + docs/components/outputdatetimeitem.md: + id: eccb35ac217b + last_write_checksum: sha1:fb7447f3720cb522f23967abc06bb33496bdddf0 + pristine_git_object: 0f4c677683209714f76d864f9be5e65af8f6ad2b + docs/components/outputdatetimeitemstatus.md: + id: cb32e33b5a87 + last_write_checksum: sha1:ca0b9cfcd278336c8d8a17992e6f2870b677ab4a + pristine_git_object: 7e8ce5ec974187ec2869bcf4d330888d7026fb37 + docs/components/outputdatetimeitemtype.md: + id: 442b4d04e81f + last_write_checksum: sha1:57d010210f56af5a8cd00988ccd7c9032a7799f3 + pristine_git_object: b6680f420d6cad71e6e6012787f21c8fdc11e42f + docs/components/outputfilesearchcallitem.md: + id: e1453f81fc58 + last_write_checksum: sha1:836ba95ceaf0cee59053022b932d2f0a43dacdb8 + pristine_git_object: c039733e00249be4168477c9430cc074759b1b8f + docs/components/outputfilesearchcallitemtype.md: + id: 9879cb2103c5 + last_write_checksum: sha1:f3ed9f8762aa542168e2ccf5a4b7a9dc108dc4c8 + pristine_git_object: a1710707c286ba7a953f582fbd58d43b0ac380c4 + docs/components/outputformat.md: + id: 6699f32fe6fa + last_write_checksum: sha1:f02204f21f3fb218890b08c23458c4db9d27b634 + pristine_git_object: 7f5c5453ac49de51f495c9bc9ab491a02025e92b + docs/components/outputfunctioncallitem.md: + id: a0b3dcf93469 + last_write_checksum: sha1:163ad39b43bc3e137a87c94a45c586e0784d13cc + pristine_git_object: a5179a2004888c8230ae0686ab67868c24a32e74 + docs/components/outputfunctioncallitemstatuscompleted.md: + id: fcce7d103880 + last_write_checksum: sha1:a555c5ed9cfba8bb91a9f3bbfa561a4df06e1d6a + pristine_git_object: 55c2fb905bc9a38a14dd34831eb948d8506e20e2 + docs/components/outputfunctioncallitemstatusincomplete.md: + id: 160507e235ae + last_write_checksum: sha1:3c215f0c5e21eae91fbf5eb26ae468e468e4df9b + pristine_git_object: cfcd0c34f681f7f3a9ef7c9bd0f896521b097257 + docs/components/outputfunctioncallitemstatusinprogress.md: + id: 6616c36657a7 + last_write_checksum: sha1:eb94dd69b8444f41acbc8982fa0962a54cd7f78a + pristine_git_object: 6e112d842e6f4cc7a1778d008ed21b8c1add919e + docs/components/outputfunctioncallitemstatusunion.md: + id: a3604a9333be + last_write_checksum: sha1:bc86be445c5ad7f1761d9c786a7bd448fd0d80aa + pristine_git_object: 374d455477674e030c8725bb8ffe18d27f22242a + docs/components/outputfunctioncallitemtype.md: + id: e4f072d4f1d1 + last_write_checksum: sha1:042aa6381e2b6b199e9ec48f1554f011403525b6 + pristine_git_object: 31066e50f45a2f32c35d0389886757885704ea4a + docs/components/outputimagegenerationcallitem.md: + id: e91e03b12978 + last_write_checksum: sha1:b5a331bbdb21e15cb5c1946522f3ab074a498b4c + pristine_git_object: dac90486a2fbe6def009c2b79b55a5284a9ea9b2 + docs/components/outputimagegenerationcallitemtype.md: + id: 0a38d9247096 + last_write_checksum: sha1:9907040d8512c264d437364514ecbe6db6d2f743 + pristine_git_object: d7d592b96122136f2e4becd5edc72b95062d6237 + docs/components/outputinputimage.md: + id: 776d1d3ae41b + last_write_checksum: sha1:7469c33228e2fde6372221f83ecb530c6b82c262 + pristine_git_object: aa7fdb8838409707d493227f2bd91de719fc4cc1 + docs/components/outputitemimagegenerationcall.md: + id: 1338bdb69860 + last_write_checksum: sha1:6d4888c7863d4ff76962256201142558fc7f57b3 + pristine_git_object: 125c3632000065776bdd360122765a758caf6530 + docs/components/outputitemimagegenerationcalltype.md: + id: da05f040f584 + last_write_checksum: sha1:a7392cdfaa9599c069db92faf4b9f9a87603d29d + pristine_git_object: d9e663fcae49dba7885223f4f0848aa9f9a23002 + docs/components/outputitems.md: + id: 92565743132e + last_write_checksum: sha1:07933fffd557f1aafcee6dad398a3c7908a0658c + pristine_git_object: e2bd46bdf66e2fb405f61075d6498a30ae377178 + docs/components/outputmessage.md: + id: e0ec2ca7f0e2 + last_write_checksum: sha1:aeba62f08e8ba95d292bdfa5cd4c68902f50adb7 + pristine_git_object: 4cb87d599c03faed0897c7b4da75e63acda77e6a + docs/components/outputmessagecontent.md: + id: 034f3de27e7b + last_write_checksum: sha1:39b6fda5c977820fe327628faaa7617ee569c22a + pristine_git_object: d8ae814ddb4c7da2357ed9778a312a0944b5a331 + docs/components/outputmessageitem.md: + id: 3d3fe949119b + last_write_checksum: sha1:2188f92a73afeaee5788ad48d38e46944864426f + pristine_git_object: ba1712d3a47424b8fdb9a484b5648914461a2e2c + docs/components/outputmessageitemcontent.md: + id: 055891480f4f + last_write_checksum: sha1:ef754b5f638dffe88175af6a3fb73df886419983 + pristine_git_object: 36ee71813b2fa1da0da2ee6c4880188ec31206ed + docs/components/outputmessageitemphasecommentary.md: + id: 2f1503c77ccc + last_write_checksum: sha1:8c629f06c0932a055eea109b38bf473071093cf5 + pristine_git_object: ee704ed970b26e71a035a038d8cb1f8bb3b08356 + docs/components/outputmessageitemphasefinalanswer.md: + id: 6c93bcf38b39 + last_write_checksum: sha1:09078742f06217af0cea393cd7d2a0e4066d3fa5 + pristine_git_object: b3b952d68cf5b9d3a1e1bb6d8d4ae106f08893f7 + docs/components/outputmessageitemphaseunion.md: + id: 9b69d9a64777 + last_write_checksum: sha1:46c661c945174ee33849121e054aa0fe430ad5ec + pristine_git_object: 2fbdf87dd8ae6021dea0a3d2cd7c2c2f22c71529 + docs/components/outputmessageitemrole.md: + id: 496e4c217acd + last_write_checksum: sha1:846641600a4aac901bb19ba994b3cb34dc8c44a7 + pristine_git_object: b732b0a89cbda7fa2db0c466a265487c57b1871b + docs/components/outputmessageitemstatuscompleted.md: + id: b6cd1cc8ba33 + last_write_checksum: sha1:7ee1755e9a219db41a2b6ad766dc40bd8f1b701f + pristine_git_object: b307f80dab02fc912c47e7c97d70ec4c3464aaaa + docs/components/outputmessageitemstatusincomplete.md: + id: 180497f5c7c0 + last_write_checksum: sha1:536643179657467fb588fa64b3aa846c4cca0525 + pristine_git_object: 1355b75f2bc66a7d4c3510aa60005d15b93e11e6 + docs/components/outputmessageitemstatusinprogress.md: + id: eb8612667256 + last_write_checksum: sha1:26786e5b1f4ce86b5ad4141af22e99de9467dbb5 + pristine_git_object: ce9332fdb02355d2c237bd10984e5eb83ab27234 + docs/components/outputmessageitemstatusunion.md: + id: 7974c9a4d828 + last_write_checksum: sha1:39a2ffd313f8732210cee0aa1debd37ff8f0827e + pristine_git_object: 63ccd7c1600c54b18d2a18ad0b838cb8f757d02a + docs/components/outputmessageitemtype.md: + id: e98758a097b1 + last_write_checksum: sha1:692a033ea8ac6255de686529ddd737a75d84e3a6 + pristine_git_object: f3ed5615b60bea26ae102f1ccbef963d3aceec5a + docs/components/outputmessagephasecommentary.md: + id: c416b300e5bc + last_write_checksum: sha1:d09503d5a12f2fd238464caa256bfbfd61bd0627 + pristine_git_object: 1053c343d0c25c671cb520a01dcf04b6e1b55c5c + docs/components/outputmessagephasefinalanswer.md: + id: 3524cc1faba3 + last_write_checksum: sha1:b97064cdbfaaeed77bb2586d5b2e450cef17b013 + pristine_git_object: ce8cf69597eda00ed4f86109c4c6dda5b017428e + docs/components/outputmessagephaseunion.md: + id: eefba3f54379 + last_write_checksum: sha1:4c68a072da3fb0febaa33268d70c1dc5cd577624 + pristine_git_object: e5d9815d3538eb3db3f07c9a72ac9a2bbf2fa86a + docs/components/outputmessagerole.md: + id: aa0f2e7836a8 + last_write_checksum: sha1:8dd78ef95fa20e779a286470b63d7b2a960eaa16 + pristine_git_object: 21b161672376a909c3c6001faf08384c36def527 + docs/components/outputmessagestatuscompleted.md: + id: ff40415e6f24 + last_write_checksum: sha1:ea59c934372c4d89b46cf49485a11f7f9db08ad4 + pristine_git_object: 2b0254b54ac965cccf38402134f7f327c666426b + docs/components/outputmessagestatusincomplete.md: + id: ca1a9dea3732 + last_write_checksum: sha1:93b7be11330fede3e8059dc9a5fc5eb70d9c9226 + pristine_git_object: 3146b10a819f3b2121590b7037fdea012794d271 + docs/components/outputmessagestatusinprogress.md: + id: 4ad18865a578 + last_write_checksum: sha1:b61b67d1b11bfdeedffd0fd02bee99169a208d18 + pristine_git_object: eb31df43644e65ccbdf736e2321c9765a7f422b1 + docs/components/outputmessagestatusunion.md: + id: 7a62142dd1f4 + last_write_checksum: sha1:c7d9cbb0c993a850b86fa903101cc50f1c143ea1 + pristine_git_object: 6dae9adf19e27d54a9155c9bb9214db261155bff + docs/components/outputmessagetype.md: + id: 19adca1060a8 + last_write_checksum: sha1:797d31ef56cce6e7e770677288b56b3c3822d941 + pristine_git_object: acbedfe1aca86bfe4d682abcd075b89d872e9e06 + docs/components/outputmodality.md: + id: 8e1105f01041 + last_write_checksum: sha1:ac10a810ace775c137715a79ccc930fed7747706 + pristine_git_object: faae463c15299a9c9e20e2c9f21944813e00caca + docs/components/outputmodalityenum.md: + id: 9e9b5b751962 + last_write_checksum: sha1:e445a894b182e6fd805d5b9310d13b8a8520349d + pristine_git_object: c2beec6de41ecb535d9b22a97ad3a21f8e6a2f28 + docs/components/outputreasoningitem.md: + id: 5196f1ee0df3 + last_write_checksum: sha1:82a7f9323c12cdf15077bf430719c8724e65974b + pristine_git_object: 1ed034a1d0e6087ea0bababfa86074d5e41f6388 + docs/components/outputreasoningitemformat.md: + id: 4d0dcfdc5642 + last_write_checksum: sha1:5e41fa47fe1824ec9dabc2fd1fa82f3701c832cd + pristine_git_object: b808f81d563b3b5828791af2a423951160452c19 + docs/components/outputreasoningitemstatuscompleted.md: + id: 35ed5dfbdcc9 + last_write_checksum: sha1:78a2aa4842aab41e9734429e08c571430162a80e + pristine_git_object: aae076f344a70dd4a30937cb9b402321ac98af9e + docs/components/outputreasoningitemstatusincomplete.md: + id: 43b4ad54e87d + last_write_checksum: sha1:7e53e549866c95746c3bb33abf6a5b59a72619f5 + pristine_git_object: 6ae953e7faf30ef4b608737c5ab77ca71cacce62 + docs/components/outputreasoningitemstatusinprogress.md: + id: 2b59b3b21a92 + last_write_checksum: sha1:dba9bb9c65fa08cdcd58c6ebc0c696c8b28e391f + pristine_git_object: af4394f52256d0437f267b9313add877d21192a1 + docs/components/outputreasoningitemstatusunion.md: + id: 77e1e7fa2e9f + last_write_checksum: sha1:34e885561f24e3a3cdb024e6da976c67277e6f00 + pristine_git_object: 5c48772bbfe97445f03818c840d0f434fe4dc42e + docs/components/outputreasoningitemtype.md: + id: 2efd271441f7 + last_write_checksum: sha1:36a63bf61d927a595f3e58dd0b607a8937db9ff3 + pristine_git_object: 24800454b81c6b2f9a0180f283d793216bd90384 + docs/components/outputservertoolitem.md: + id: 87e536c2b92e + last_write_checksum: sha1:cff2c6957e34262ca131da6fb2b9f1724cdc0394 + pristine_git_object: fb6b6b434b3cc0993daf633eee12d80ca2e17f3b + docs/components/outputservertoolitemstatus.md: + id: 2b28c10bf6ff + last_write_checksum: sha1:c7593744dc45b7b5744e150f376dd9ce0e7b0f99 + pristine_git_object: af6820d0a5f9d81a7baaf8e55a1f2bcc268f2383 + docs/components/outputtokensdetails.md: + id: 5d5eb3509e1a + last_write_checksum: sha1:27eae80aebbee79d67c8c160cb13f2bbdbf12a8b + pristine_git_object: 430d40b25573760453873e2c56e85518eb2ebfda + docs/components/outputtype.md: + id: 6d5c120fbdae + last_write_checksum: sha1:f129808a3a3c912f1a5fdb7ca6573beca109cdb8 + pristine_git_object: 81e1750f55b3620ec46361e6f900f3341056ee43 + docs/components/outputwebsearchcallitem.md: + id: 7d5a537f4c7c + last_write_checksum: sha1:c38d2926b0f1fd76cc337d9e96205e6e52e6fccd + pristine_git_object: cff2080ab9e4bb53d3553aad108caa23daa3a754 + docs/components/parameter.md: + id: d1b8871be7f8 + last_write_checksum: sha1:b1802dc179a44a9dc7becd0b416822c029f07852 + pristine_git_object: b638d09adc65c3f8f2608ce4d46171e5bdfacf3c + docs/components/partition.md: + id: cc74439b2251 + last_write_checksum: sha1:de88a6dedcd65f73fca2bd1913f7cbfd0d62a4ba + pristine_git_object: 4f49e41600018e4f637c68dff196c78b912f8893 + docs/components/payloadtoolargeresponseerrordata.md: + id: d18653a5a59a + last_write_checksum: sha1:67a64e254ca93fa9115fd09bc3a2fb124c9c83cb + pristine_git_object: 197ba50a74a79f543c5c23f19a91df8848d94a61 + docs/components/paymentrequiredresponseerrordata.md: + id: 8f708f74af40 + last_write_checksum: sha1:7e562e9713bed00ee0af332eca1ebf936313f667 + pristine_git_object: e083b1f4b2e1470cb72994d1625937a78363e118 + docs/components/pdfparserengine.md: + id: bdc6d5dc0df4 + last_write_checksum: sha1:c067c380a8f05bec029d6e2ea339e00260e0412d + pristine_git_object: 8889dadd4b0ab13a4b0505ba1255e1718b51aa67 + docs/components/pdfparserengineenum.md: + id: dff22b29d290 + last_write_checksum: sha1:4e9e4de38617c4e98f5763fd4891c848867d2b8b + pristine_git_object: 87a419ab3588dea92d3569bc5b49607d5bf76293 + docs/components/pdfparserenginepdftext.md: + id: 5324e9930e4e + last_write_checksum: sha1:7097abc92c7493c8946214f29c0e96b18f4e7c6b + pristine_git_object: 84226b8778909aec357ac1207cba468a9351cd5c + docs/components/pdfparseroptions.md: + id: c0dac3d032e3 + last_write_checksum: sha1:b79f362961709409863df4a2b05fc6920f4587ad + pristine_git_object: 6bd996797e648b074c7e38ec77bf8f93306b1878 + docs/components/percentilelatencycutoffs.md: + id: 2e543a8a2907 + last_write_checksum: sha1:8235ed4e1c6c74a0038d35db3e68571f55482537 + pristine_git_object: 6a2c04f7d3c8b6e9f1d5151b92bd08991b836e4d + docs/components/percentilestats.md: + id: 1b4159e54240 + last_write_checksum: sha1:33924fa3e9065174b3d235abfe1da6cd8de3a559 + pristine_git_object: 6f47431682a0b8df76b71f7088bd60ae3b719cdf + docs/components/percentilethroughputcutoffs.md: + id: 5b84667c97a1 + last_write_checksum: sha1:5dd867ac4a1fecbe3807b8b371f2537ade03f5e4 + pristine_git_object: dff209d8cd956e99615d1cf6e7cd06f072cdbd2e + docs/components/perrequestlimits.md: + id: b3e279b3aa17 + last_write_checksum: sha1:df11f36c2025f8419eae1faa0f5542e32e311335 + pristine_git_object: 607ebc6c79c918a179b210d205e8b5b973226ee4 + docs/components/preferredmaxlatency.md: + id: 0b82201b730d + last_write_checksum: sha1:5dc1be79949b581650dbecd75ab4afccbf320a8b + pristine_git_object: ce96e64f8aabbc0085b02cffa107975c43a9284a + docs/components/preferredminthroughput.md: + id: a13cf3a5c7fa + last_write_checksum: sha1:977b30074dde478796286a42649cc8202b712419 + pristine_git_object: fd49bf88b75891b0f2a659a453ff3e3aa0d55ae8 + docs/components/preview20250311websearchservertool.md: + id: 0ba7bd853f96 + last_write_checksum: sha1:631bcb62be67a8b1d3cd5817380c15a876883994 + pristine_git_object: 0dc73e3a117f7aa0bdcafe0da443f224f7767ab3 + docs/components/preview20250311websearchservertoolengine.md: + id: 0abe4888932d + last_write_checksum: sha1:0e32338b5b9790ca5f49a45906937349d5d613a4 + pristine_git_object: 9e159d5e6951612d8150d58853c9b1f95bc8d7e6 + docs/components/preview20250311websearchservertoolfilters.md: + id: 93e245d72895 + last_write_checksum: sha1:2c223e01f193af4ae37aa700ce21736ad5ad2c8d + pristine_git_object: fdadb163ea66905410b7570ba02b2e3e6e10a75b + docs/components/preview20250311websearchservertooltype.md: + id: 7258d1f3ed79 + last_write_checksum: sha1:8fd6c12c225e6756938f25e97c6818a7477d9408 + pristine_git_object: 16caa8a6f0ac16b49437cb1a95e5c93781d98d01 + docs/components/previewwebsearchservertool.md: + id: b43bb7090a75 + last_write_checksum: sha1:f0f8241dc61527cdb2b41cb42397aecbe0bd2f4b + pristine_git_object: 73d06677c03a1839532402cdb9d5c241dbd6b41e + docs/components/previewwebsearchservertoolengine.md: + id: 741f450c1d8f + last_write_checksum: sha1:eee87201a26426172787af2982e92f829672c014 + pristine_git_object: 3d2a48f1652315c2448a2b6be8c882d37b5f93e2 + docs/components/previewwebsearchservertoolfilters.md: + id: 06e32d85821b + last_write_checksum: sha1:186041d014a25d0ebbe72ec24973b246c642f1d2 + pristine_git_object: 5e27502902730f8ebc9fd2cf39d8a87e8edcf963 + docs/components/previewwebsearchservertooltype.md: + id: c6073c9ee3eb + last_write_checksum: sha1:46f579d5f71a87b20d7ca0674004ced55c37121b + pristine_git_object: acff7387bf13fae0aac386037cc19e5d36f55782 + docs/components/previewwebsearchuserlocation.md: + id: 36921d9aba44 + last_write_checksum: sha1:c44bbc5af7a70e60eb908574723704d0f8440c15 + pristine_git_object: 843b2a6d9b9fccb67dbf7ad82f35cbe67da851cf + docs/components/previewwebsearchuserlocationtype.md: + id: fa0c85429645 + last_write_checksum: sha1:34d91154dfedd31083714270161a12817191c13c + pristine_git_object: 685705c19f968d6408d3bfc3d398eddb2ef5e52a + docs/components/pricing.md: + id: 15dca753d9eb + last_write_checksum: sha1:529e8ba25ca5edf4fef14c26630ed51c9b5df89c + pristine_git_object: a997dda76ae9521dd499a796c69279272f42d8e0 + docs/components/prompttokensdetails.md: + id: 58d2af57c508 + last_write_checksum: sha1:f95cce3bfd4a266e07027a7d56924c746b37e9b5 + pristine_git_object: a929f8769cb3a7341b97ea205e4784d568be78eb + docs/components/providername.md: + id: fe24a77d9911 + last_write_checksum: sha1:610b9e542cc0d7b774c1fc133b1fde5c8308ea12 + pristine_git_object: 25d8ded2e4c6062327f1440066057abf24935e2c + docs/components/provideroverloadedresponseerrordata.md: + id: c2a8cc4ec6df + last_write_checksum: sha1:1d206d00dc0d91b5ceec470579c6ce345cc23d29 + pristine_git_object: afebc305bd99e4b9b682bc2b82aadf318767083e + docs/components/providerpreferences.md: + id: 22d442ed4785 + last_write_checksum: sha1:31a21b8f81ad077301e6497f7ef146d3fd427473 + pristine_git_object: c95276b633ca63462b826652843324db3afc3ee3 + docs/components/providerpreferencesby.md: + id: 08ddbb3c669d + last_write_checksum: sha1:688a2d7ee10b13ea8fe7835b1a3387e9aa25472d + pristine_git_object: 2af40e5ad7e9951b7a7b731a4769f178946d0e0d + docs/components/providerpreferencesignore.md: + id: 13e56a8bb6a4 + last_write_checksum: sha1:9ba4bf53d6dbd64ca265a335696a4fad449ba6a0 + pristine_git_object: 2d18b70759ac1f28a7402f3833aab2e66cdb03df + docs/components/providerpreferencesmaxprice.md: + id: a585cad61e37 + last_write_checksum: sha1:ea25c68b1fa37786a23defda6852dcf45041c195 + pristine_git_object: fb14872176e26b2b37ce86bb2d2a7dac39b2115a + docs/components/providerpreferencesonly.md: + id: ebc63eab9ac8 + last_write_checksum: sha1:f60cd17501f5cf71cfd1a49a538ac21cdb132f0b + pristine_git_object: be68765de2e18a113986032ac3aa48cf1faf44b8 + docs/components/providerpreferencesorder.md: + id: 47f5e03f1a4c + last_write_checksum: sha1:a9429a108d9cbfc1b0810ae0d839800f60654525 + pristine_git_object: ccc7218a4057af0d0bd87cbcf399e3305efe4792 + docs/components/providerpreferencespartition.md: + id: 3ce968e1b44d + last_write_checksum: sha1:b821ad35e9f11e48c9f3cc6672673df782f19c93 + pristine_git_object: 147aefe4d9e2824cdbc2184f11b6fc492647f1d8 + docs/components/providerpreferencesprovidersort.md: + id: 2856a1eb4306 + last_write_checksum: sha1:cf2079b6045182f8dea3121e3121f1453b3cfef6 + pristine_git_object: 2f06e03a80296dbaddb5ba16ef4ca457c0497839 + docs/components/providerpreferencesprovidersortconfig.md: + id: eb732edec47f + last_write_checksum: sha1:edd978fc4b7dded3b44ebb11238ec4ddb1bbb9d8 + pristine_git_object: 95e5f0566bf32c3bd8e4f04285398433d0b1e12b + docs/components/providerpreferencesprovidersortconfigenum.md: + id: b4ad5fe913d5 + last_write_checksum: sha1:8db34ff61258a18987323066bd1d9081a9b58403 + pristine_git_object: 3e50142957a48a594e7dff0cd3c236349bcf4643 + docs/components/providerpreferencesprovidersortconfigunion.md: + id: 06a28e23e5a9 + last_write_checksum: sha1:a0244388066c7961f3449783ac15d316ab44f3a2 + pristine_git_object: 3b811f716be97e538f23aa97f83a7a8525adaee0 + docs/components/providerpreferencessortenum.md: + id: 74782e12d545 + last_write_checksum: sha1:6cc8720730bfaad057a85b2eb79b605d7aafdcd2 + pristine_git_object: 70cdaa9d783d6cef16b3030cddac5cde9e06c3a3 + docs/components/providerpreferencessortunion.md: + id: 9692a76779ae + last_write_checksum: sha1:aef3513308cce7c7978b6255e3d34607bcf22b85 + pristine_git_object: 172baacbaeacdab65e71d27dc2e5e62a4740983b + docs/components/providersort.md: + id: 290449b1880f + last_write_checksum: sha1:f15d65e5c226a222c3bfc0b9f55dd9ca0443d415 + pristine_git_object: 82a08f5d68f40b457dcd0685bc0ffaa47daf1922 + docs/components/providersortconfig.md: + id: 56a828258bd9 + last_write_checksum: sha1:979e7ccd8c9800941dc0d0f905b398e2797cdcc4 + pristine_git_object: 70db18a3a953e992834a54a5744f1a7245d081d0 + docs/components/publicendpoint.md: + id: 46f345cbc943 + last_write_checksum: sha1:13f0b08536e5158fab6ac21250392483b1e2d70b + pristine_git_object: 147ff5198dda9b2faa2b8fa89d16a88c5bedd609 + docs/components/publicendpointquantization.md: + id: c94b72bd3c23 + last_write_checksum: sha1:e79fcd7d4a2829c2f696b79f050e56f1343a86a4 + pristine_git_object: 7d0edd22dafe693920f18e0c0c99b852c6b3bb57 + docs/components/publicpricing.md: + id: 9d43651da8ad + last_write_checksum: sha1:160b21fa2437d7424acb07eaf02aba802c873be4 + pristine_git_object: c7ac704cd2ebe8ca2637987ac0e8628bbc01b788 + docs/components/quality.md: + id: dd4dd0d7b023 + last_write_checksum: sha1:6191307209f88c4d94d43a9f9b2e200a2b16cc66 + pristine_git_object: a09a4498e9247a867f25cb54f1898572125f48af + docs/components/quantization.md: + id: 0d17b4a78828 + last_write_checksum: sha1:992ee3fdd0f4e09c9f6e6426c413841fe34a86a5 + pristine_git_object: 7a0574a89d4c7836115ac16571dd32b7d9290914 + docs/components/ranker.md: + id: 5a14b8d09a01 + last_write_checksum: sha1:56664aff547bdcede5fb21eec2731a58d393c949 + pristine_git_object: 1257699c91a2cca868fddf12b03767c04fb4fe47 + docs/components/rankingoptions.md: + id: 9f0f4d6c014e + last_write_checksum: sha1:0588cedf315010f03ba831bbb382cb1252eb01a9 + pristine_git_object: b1917b130163ab7252e49ce934d82cf8cc463a32 + docs/components/reason.md: + id: f3e06a9de94d + last_write_checksum: sha1:cf117327a941137c34db136304bf50e4801c996d + pristine_git_object: 1c21d0457d1c635b8eff2a46144cac5e24840183 + docs/components/reasoning.md: + id: 57e5fc147254 + last_write_checksum: sha1:ce17ee66a534713a4b757d21665d94e81d347aa8 + pristine_git_object: 0a8755d71950a9ea630080887b46bde2e9438647 + docs/components/reasoningconfig.md: + id: a2d51e262631 + last_write_checksum: sha1:9f12f79bc754554e6dc4dac0d6717dd61ab8ee51 + pristine_git_object: 175f2cd361f99cf83cbddede7db45ade2c51a43c + docs/components/reasoningdeltaevent.md: + id: 5d657813c9af + last_write_checksum: sha1:4757d23d0f8519438e9f01ab516ad7680530c335 + pristine_git_object: a739481a15de3e5d32688f3e2502d71c21205136 + docs/components/reasoningdeltaeventtype.md: + id: 4bc6c0ee1182 + last_write_checksum: sha1:8eb7d791510905b901133c42357d712b799ba99c + pristine_git_object: 8fd61605be2b1caad008dafbc5fbae664c28b7b5 + docs/components/reasoningdetailencrypted.md: + id: 410e7c90e4d8 + last_write_checksum: sha1:54b44e1d4b9d6e764303562691ef8ca8133a23f0 + pristine_git_object: 685b2f45259a15e160273078ba2643ad7c75e030 + docs/components/reasoningdetailencryptedformat.md: + id: 32cb6fde4579 + last_write_checksum: sha1:9eea90a64a6800aad04735b3e701fb7c8a30d8cc + pristine_git_object: 5648e15b21e3fded75807a69ba5c96db79b8ece2 + docs/components/reasoningdetailencryptedtype.md: + id: 7c94a00c5b1e + last_write_checksum: sha1:dc3719ca804f71cae4ea2fab5c69e5fdd6ee355a + pristine_git_object: c574453756cfe8a0b11155d8267ab3d82736c4ef + docs/components/reasoningdetailsummary.md: + id: e3376a9e2eee + last_write_checksum: sha1:d5f99501f392e379de2f4e9ec81fccd5b1f1238a + pristine_git_object: 33fcfdf8afd27f7f76279821720bf06d747fd06a + docs/components/reasoningdetailsummaryformat.md: + id: 24a7afef11e0 + last_write_checksum: sha1:fe4cfa8f458eca8277ca2f5a8f7a43ba79669a76 + pristine_git_object: 2eae737321e5b244de76993b3be79311e06bf181 + docs/components/reasoningdetailsummarytype.md: + id: 158ee2616b70 + last_write_checksum: sha1:18e9a212106b11407027d66c899b6e3ed0271344 + pristine_git_object: 6de96b93584ce0fdacd35a8e29907e85e6cc05e9 + docs/components/reasoningdetailtext.md: + id: 6c40c8515f9f + last_write_checksum: sha1:b7152e06b8b99e6a66b463aa4a35b6cdca56ea42 + pristine_git_object: 5e224c0a74a50186bd67d2d9b754c6812ea414c9 + docs/components/reasoningdetailtextformat.md: + id: e6a41fb6eb21 + last_write_checksum: sha1:86f9d6bc3db6bb865f2337cb88179b770066777e + pristine_git_object: 8a48d10c1008710e02edd03161d2d155dfd5f3ba + docs/components/reasoningdetailtexttype.md: + id: f1f8a16d1bf2 + last_write_checksum: sha1:fef97ea7ffa115a973e97000d3ae7a79266c8684 + pristine_git_object: 2a56e429c7736198136c527b5a026e9cf674de7b + docs/components/reasoningdetailunion.md: + id: 4f4ffac94960 + last_write_checksum: sha1:648600715cfa16d1fbfb19f0b6f67820d2111b2d + pristine_git_object: af977b31f035f91343cdd22d68f162fb2eebd4b0 + docs/components/reasoningdoneevent.md: + id: 610fec27fa67 + last_write_checksum: sha1:4fa169b149ef5edebc2a44d4295c955630184da1 + pristine_git_object: 44f0982f2fe92bd140ec06e97f89aa2464920825 + docs/components/reasoningdoneeventtype.md: + id: 4cf951ef736e + last_write_checksum: sha1:e2e8bee66451ecf37dc65b38d919318f06899bf1 + pristine_git_object: 31d997aa9e0721cacdebfeb79ce3428d5ec79bf0 + docs/components/reasoningeffortenum.md: + id: d58402a4fd05 + last_write_checksum: sha1:3833cf0605475bf521cde4a7764c103ace76b1ac + pristine_git_object: 9527c2fd2943fc71100c4a0545e9362f95ca94a8 + docs/components/reasoningitem.md: + id: c9f6a9187222 + last_write_checksum: sha1:e2a1791124918174ee01a0f9b42704e37b8eaa77 + pristine_git_object: 8bf3e8c5a0ae9584a9c9a1a9992a390b24db7824 + docs/components/reasoningitemformat.md: + id: fb83d40fc55b + last_write_checksum: sha1:35a7573be40cffe930b1fc115d68132ac50ee9e7 + pristine_git_object: 5743fe030c3f0cf3dde7f8bafd2a7f0e9ba71195 + docs/components/reasoningitemstatuscompleted.md: + id: 2b082c1445db + last_write_checksum: sha1:866fa1bb8b3f8d1d68ff689a2c4f715dfdf4ea70 + pristine_git_object: 32a3e88cdfd13a8f13415ebc4994aca952e5207e + docs/components/reasoningitemstatusincomplete.md: + id: d6e7e8ff830d + last_write_checksum: sha1:aa4a4fab7958b0265b34d96702b574ce8bb8d2c2 + pristine_git_object: 494c5e53f21a6bc34f7eaeec53f3d144c750eb3e + docs/components/reasoningitemstatusinprogress.md: + id: 5e35190c8ae4 + last_write_checksum: sha1:9bf16645391f87571b5a2032bf1dab032ac5fd96 + pristine_git_object: 3591f71a2809de9de19096943df7418ed5244978 + docs/components/reasoningitemstatusunion.md: + id: 2776fa9436bb + last_write_checksum: sha1:ea654d7c824d785c0c9ce42cca776775fe496f37 + pristine_git_object: c4a9a0e2ceb72cdba4fd6ef72aa7f039050cd1fa + docs/components/reasoningitemtype.md: + id: d6495b934f4f + last_write_checksum: sha1:10fb39eed56fa8e6c87d24fbd4f263fd0a80807a + pristine_git_object: c14b732036c588a59aee3b04f8bec51d9a58c140 + docs/components/reasoningsummarypartaddedevent.md: + id: 3297c69f1031 + last_write_checksum: sha1:8cb37bd1b2b12cf19be078e1f1fd45371e38d59f + pristine_git_object: d80d5977ed9f88d717bc2e93a86115a358c4f6e5 + docs/components/reasoningsummarypartaddedeventtype.md: + id: 3a4846a7c613 + last_write_checksum: sha1:bd6003eeb746078a313b7f27c4560aa2c33ecb29 + pristine_git_object: aa5ebb968e19fb8c96c0fab86ba3f4d8e697c459 + docs/components/reasoningsummarypartdoneevent.md: + id: aae02dc325d9 + last_write_checksum: sha1:c6b9fc8a30eb67037ad2b23783e95ae70cba6707 + pristine_git_object: 6220eeb7faa868bd4e881414bf632fab71e28b6d + docs/components/reasoningsummarypartdoneeventtype.md: + id: 0630358b5fb6 + last_write_checksum: sha1:ce572a34e1cf9977e00bfca4838093088732772a + pristine_git_object: 9fec4ad23bad6f3f2e62ef6529859c58f9c70fd7 + docs/components/reasoningsummarytext.md: + id: c221ba8e3570 + last_write_checksum: sha1:da0240291bf99658d9bb09865dd00315b9849275 + pristine_git_object: 7bee8c5c067123523aba194df5cd0250ce1e417e + docs/components/reasoningsummarytextdeltaevent.md: + id: af44f6e43997 + last_write_checksum: sha1:abfc6c8788502fb3435237f9f61635e3adcac3fd + pristine_git_object: 1d6bb65b1fa97527a91e2d5741b0ffeee9cceec2 + docs/components/reasoningsummarytextdeltaeventtype.md: + id: cd79224d89a4 + last_write_checksum: sha1:4b1ac85310044496ef2b073786fce9a83d922be0 + pristine_git_object: b8d5ba75fbd46032fa02bdacad51a31225ad7fd4 + docs/components/reasoningsummarytextdoneevent.md: + id: 002e9b6317d6 + last_write_checksum: sha1:5c02a59552cac54fb678c1e4873034cef38accac + pristine_git_object: 7be33a1721622e13efbec2504a8903e1ffda0b96 + docs/components/reasoningsummarytextdoneeventtype.md: + id: f398db687eb5 + last_write_checksum: sha1:771287f4db2462e770c576c243e836a6991390f9 + pristine_git_object: a241b1f81f3c9c26dea5bbbdc6fa37a19541b712 + docs/components/reasoningsummarytexttype.md: + id: 7579578d3af3 + last_write_checksum: sha1:bbae6e3bc66ffc4661ac12c300fbc2061588733d + pristine_git_object: af36e333e2e50af756433ceffb26f2eb08442b61 + docs/components/reasoningsummaryverbosityenum.md: + id: 41371f991bed + last_write_checksum: sha1:ae1ca865de542b276bad0be2159ac94ac8e3712e + pristine_git_object: 97eda26c982a6e9f6adb3177ead7ad97f6626f32 + docs/components/reasoningtextcontent.md: + id: 4178daf4c506 + last_write_checksum: sha1:be81b290d91a007ce9dbc489c872e63d94dae4cc + pristine_git_object: 40aa10a23f24d07603880b3b38b3ffcdb304d65d + docs/components/reasoningtextcontenttype.md: + id: 22b777e7bb71 + last_write_checksum: sha1:a43be1428333ef3082148054dcacb73b4b7a4ee4 + pristine_git_object: f3646d44686e7d48c526d8417b0a56db35d7290d + docs/components/refusaldeltaevent.md: + id: 9c64cdf1cac4 + last_write_checksum: sha1:373335a4b6e8140a2dcd8d9bc07a8e0b53e92e31 + pristine_git_object: 6c18f8f061510f259f6004d48ba94b6498f1ad70 + docs/components/refusaldeltaeventtype.md: + id: 24a36da3d484 + last_write_checksum: sha1:ab1a0ada35eb3123f18f64416ef9c9f1e415681e + pristine_git_object: 8aadcc15109d8163d6632b1a4ddf87314641e12a + docs/components/refusaldoneevent.md: + id: 66de77a0628c + last_write_checksum: sha1:48dcbc60f3f124372a9ad0b5500023811e9b1ac2 + pristine_git_object: 290ad1574abaa1bbc861e77776db1898afcfe785 + docs/components/refusaldoneeventtype.md: + id: c4000667a2c8 + last_write_checksum: sha1:2ff86281263010d78e755cdd7289f5daffe05cbf + pristine_git_object: 7035e9e9bc9752c39ce6152d4691e92a55f34aa4 + docs/components/requesttimeoutresponseerrordata.md: + id: 25804cfd7f36 + last_write_checksum: sha1:fc01cafdce0dc5ea0e3def122b7885ab7afff9ed + pristine_git_object: 2e062ef576233d063d8117cdb312e2d88846ed33 + docs/components/requireapproval.md: + id: 4b47c7f7eca3 + last_write_checksum: sha1:32d315d07893bb67a6c23e84a6aa108c76de07cb + pristine_git_object: e69f115051478c4b12c9b949d5c83c441ad244fc + docs/components/requireapprovalalways.md: + id: 55b258963d0c + last_write_checksum: sha1:ae288dd0e2e6c79d0742ae899b05901c87337137 + pristine_git_object: 327ede05f1747ff4b354d36d5862c8d80def5c10 + docs/components/requireapprovalnever.md: + id: 0492eb1833e6 + last_write_checksum: sha1:6bca2b6eb5f2a564173ae4a3e468c61e3293a002 + pristine_git_object: 7cd7f146635d6a24361f1b881ccbe4e1828e3abc + docs/components/responseformat.md: + id: 21aa2dcdc770 + last_write_checksum: sha1:beafba5edaef205849f13eb3931243c3d55b1489 + pristine_git_object: db3b37662241eb32327684fa354b2dc80875d4de + docs/components/responseincludesenum.md: + id: dcdd5e53c3a4 + last_write_checksum: sha1:154df040e05c81e46dd8dd235fff354f41b7c8b5 + pristine_git_object: f69d88622286c505b54c290978c1ecb7b2e1562a + docs/components/responseoutputtext.md: + id: ef76a9bd7078 + last_write_checksum: sha1:6ad5165743fc7cbd992ac8b52b467b9770ab3024 + pristine_git_object: 1c8bea48339e162df286c0e5aa2c2621f1bb3e0e + docs/components/responseoutputtextlogprob.md: + id: 44ef4c916eea + last_write_checksum: sha1:08b767f0a37f17b0655af4acc5146f40f5dd0d95 + pristine_git_object: 8d54154542ed05be3a1b46ae8d2d51ca7df3b85e + docs/components/responseoutputtexttoplogprob.md: + id: e1cf9d75cdc9 + last_write_checksum: sha1:836c1a0d52511a99c64dc772e015a32aae3abdd4 + pristine_git_object: 4122cab9d93428aa34d65cbd5bd21a591505778f + docs/components/responseoutputtexttype.md: + id: eb2bc6b65d8f + last_write_checksum: sha1:103072feebd30b09d458646db4d0f4350a4c9a5d + pristine_git_object: 8c8a3d72507b265e29d24e7792edc352487c76ae + docs/components/responseserrorfield.md: + id: 0352cb1ba5bd + last_write_checksum: sha1:19734f3e9954c51112e3219231c2de6df552e3a6 + pristine_git_object: e21193bbab68ee5dfdb0a113e26ba70f82bcab55 + docs/components/responsesrequest.md: + id: cb5cd99790f3 + last_write_checksum: sha1:9e287870498b5d84623108fd4c644b80d4b0738c + pristine_git_object: c699d5a3a0c57197633ddc36c5d15ef4148cc662 + docs/components/responsesrequestidautorouter.md: + id: 0b33149d93de + last_write_checksum: sha1:7206b21c6dc1d8a0dad70d604f7cc6c0ffec6990 + pristine_git_object: 911845f61172eaea0d503087bb703fe25e95cb83 + docs/components/responsesrequestidcontextcompression.md: + id: cd4857c9cb8f + last_write_checksum: sha1:cd616d84b038356f2e1649f1388d5a77cd2a2d91 + pristine_git_object: 05ddb0655cd9482c820bc9ee7892cfa2947c977e + docs/components/responsesrequestidfileparser.md: + id: 48f5ef8828be + last_write_checksum: sha1:0731b696a9b17b81b7646e54526e5ef70f5b54f5 + pristine_git_object: b4a4d3644f817cdaa6f5f8d87fea0ae45af95795 + docs/components/responsesrequestidmoderation.md: + id: f524bc5e9224 + last_write_checksum: sha1:d5c23d7e4233c9580a99dd0a5d4f9df73b634a6f + pristine_git_object: 01847484ca8dc5b89f494f1073f4179776923d8d + docs/components/responsesrequestidresponsehealing.md: + id: 546f6d9b9c92 + last_write_checksum: sha1:7678da1daefb4bc788e806c725634821ec5eef13 + pristine_git_object: 828e86e7832ee676ebe820f7278002fc412ed8fc + docs/components/responsesrequestidweb.md: + id: 706ed77dc2be + last_write_checksum: sha1:204eb9db4654c4acde94446bb108b5f517e7bf2e + pristine_git_object: c26776524605f0d6e375ab26291e52d15c7d34ab + docs/components/responsesrequestignore.md: + id: 8da2f8893b96 + last_write_checksum: sha1:f1ef3c6fe68e727d7e3ae5fd2af8c7055cfddbaa + pristine_git_object: 9d12f105c563e08ff4a34592aa2bc28a3c0c382d + docs/components/responsesrequestimageconfig.md: + id: c7e2eb6479ef + last_write_checksum: sha1:daaf30cc6be1c88f3fef6b71e3266e78b4425a9b + pristine_git_object: 19366580d12681fcba6345af951f1babfac992bc + docs/components/responsesrequestmaxprice.md: + id: 047559d7fe98 + last_write_checksum: sha1:3da8fa94c98864800dd770f396f21d47a8bf1837 + pristine_git_object: dbb359a1d37ffbc7f13ac92ee51c0e1cac4da9e9 + docs/components/responsesrequestonly.md: + id: bd8170282405 + last_write_checksum: sha1:c384a2e5049c4955b301bddbebf30706573796d5 + pristine_git_object: ed6910ae43bed3e8e758ac93db629ef5ec3e7f69 + docs/components/responsesrequestorder.md: + id: a7e055e09fcf + last_write_checksum: sha1:27e61dc1c56f67002dfeb6036e2f14c4b114f831 + pristine_git_object: 0b3f0e0625bb0a8f118f90b57eb15af9dfaca4e0 + docs/components/responsesrequestpluginautorouter.md: + id: 8e6441aa9b17 + last_write_checksum: sha1:652050e3368acac8e6b24c1337e712762dbf59ba + pristine_git_object: 346b24f1f151f4586386a5b658d84dc85e43fdc6 + docs/components/responsesrequestplugincontextcompression.md: + id: bd9f1610ed11 + last_write_checksum: sha1:47a1e34f9a47a1318d3fa0a69fbb78fa726479aa + pristine_git_object: ee612114aac9236957afa8277930848412fd8d0f + docs/components/responsesrequestpluginfileparser.md: + id: a41c8a2a1d8c + last_write_checksum: sha1:b8b480371066968648529445c170f363b234c1ca + pristine_git_object: a98ab10c73ec2b1fbdd74518ff9b92c32a841f00 + docs/components/responsesrequestpluginmoderation.md: + id: d78e283c0e66 + last_write_checksum: sha1:df130cc7a83b619e4eceab0ccef7bf841a6a0e44 + pristine_git_object: b722b76efc7e1ebc6089b519d04018ff045ad620 + docs/components/responsesrequestpluginresponsehealing.md: + id: 1099f204ad30 + last_write_checksum: sha1:98f472a15cfadf911b12c479b5d78be3edc1436b + pristine_git_object: 6553f937ce424d424035788a8f4a99a092fcae9d + docs/components/responsesrequestpluginunion.md: + id: 29f36b502cdc + last_write_checksum: sha1:2ed0e7718c8bc158c13aa24cebdef3f510e9c37a + pristine_git_object: 62bc0ba2e0c0bf1af08054790a286edcd4e92e09 + docs/components/responsesrequestpluginweb.md: + id: 133b182f44b4 + last_write_checksum: sha1:8bb397f3fd88ecc2a2240dca22cd2fa245c1c6dc + pristine_git_object: 0d835807a1cbd4ef69baa349f9a0c21ac098b87f + docs/components/responsesrequestprovider.md: + id: b5433a95924a + last_write_checksum: sha1:a940f98c13fee88cc6cbedf4f1300f37563fefd7 + pristine_git_object: 178c12e585afd84b9c32ea62a2821f659a5088ac + docs/components/responsesrequestservicetier.md: + id: 79d0f5c6bdbe + last_write_checksum: sha1:759cbf960f90a2680f905be11049e8f88cf6ecda + pristine_git_object: 9eff92befce7294a62c1beab6f47cf037a215885 + docs/components/responsesrequestsort.md: + id: 9b6fb20e1aa0 + last_write_checksum: sha1:484e4f2450b718c46f35c387b9a8a698775be7d9 + pristine_git_object: 3dfb2ddf2cdf7755180e273ffa848751b10b1297 + docs/components/responsesrequesttoolfunction.md: + id: 834bf2b22f82 + last_write_checksum: sha1:6ee2bc4d6abaf89389df8374cee62e5c77f26450 + pristine_git_object: 4e9e877ebddb141ba9ad731c99e7489bbbeea008 + docs/components/responsesrequesttoolunion.md: + id: d6a807777d03 + last_write_checksum: sha1:960564f5db65b06b811859788c41439fb5d73924 + pristine_git_object: c8fb972045317bf08461945bccbf6f8c6b96c053 + docs/components/responsesrequesttrace.md: + id: ad010b52a1f5 + last_write_checksum: sha1:e24c52e0ea78a0af7ff4d5f31645f87eb6db189b + pristine_git_object: ec5575914f6427c270207a9265769e2d6a4840f7 + docs/components/responsesrequesttype.md: + id: 5bd80a5ef99f + last_write_checksum: sha1:96aba92528f15b2e26760ec90539b8fd7a0e9cc3 + pristine_git_object: a1b8e6cfcbd056ddb1daf6fcf7f217afde717698 + docs/components/searchcontextsizeenum.md: + id: ba037b375d32 + last_write_checksum: sha1:1802fbb5223f07b0db2e7503e12f59647b3608f9 + pristine_git_object: 75d3a14d662e8a753b6f8c02082582d16d854226 + docs/components/security.md: + id: beee40001fda + last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf + pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1 + docs/components/serviceunavailableresponseerrordata.md: + id: 6d65ecfd7ad3 + last_write_checksum: sha1:c0e9357b45a58f3da2d3520b502cec7dae5f3446 + pristine_git_object: 797c8310a34ec5ac85628fe7d60706221f14e573 + docs/components/shellservertool.md: + id: 3e196aa5ad05 + last_write_checksum: sha1:0019a7a2fb5879826ca7db5b779c3dd8a4fcad68 + pristine_git_object: 3441e6b088fa6b063f308ae20f62fdbe3133c461 + docs/components/shellservertooltype.md: + id: 2086eb6391e0 + last_write_checksum: sha1:cd5bcb2096f1315814b3e1575d9b61c65a7a707c + pristine_git_object: f93562afef4e0a5650d347c4e02b69703cef8029 + docs/components/size.md: + id: e4d18c7f0385 + last_write_checksum: sha1:3ee0ddd204fe2b2758b0ab883a37916d9af2ca43 + pristine_git_object: 4334c6b14cfc9af110ca8818ee954a7048ff7331 + docs/components/source.md: + id: feb017a05936 + last_write_checksum: sha1:239395e897144c41020cf4c6ba232a3ef3075776 + pristine_git_object: 372e3892d1484a19c6df1cb7ccfe00e56814afb9 + docs/components/stop.md: + id: 0d74a157c3ba + last_write_checksum: sha1:f1b797e3188274e4411a26f0934c1d455bd85bbb + pristine_git_object: c36d91088664634eb753f5029f6f5b444fa92b78 + docs/components/storedprompttemplate.md: + id: 3d993ee9614f + last_write_checksum: sha1:71634e702b280adfe115e8bd6a2159c9eab2107a + pristine_git_object: 0b3d0bcfd7082915b45ef9a4a8e74422857dd665 + docs/components/streamevents.md: + id: bdfd7bf6c2b0 + last_write_checksum: sha1:4420a69db7b471c77b029568c8cffcfc2a1a6276 + pristine_git_object: d16cfa143412065318bd0f3713124541cd6909ee + docs/components/streameventsresponsecompleted.md: + id: 072f9ee89867 + last_write_checksum: sha1:3363eab7ba1d953e7138616c21689227b1eb1c02 + pristine_git_object: 5af624c892600a9b4ea09b95cd34894c7550a7a2 + docs/components/streameventsresponsecreated.md: + id: 6019de1f7990 + last_write_checksum: sha1:82edb42c3b1e467a7e0caf6da0a449529dd88aab + pristine_git_object: ff22afe5421beb09dfe15ce985b0b8f8d2110e7b + docs/components/streameventsresponsefailed.md: + id: ebfa5a8944e2 + last_write_checksum: sha1:eec070ab456230e579623930d274b631db7dbd35 + pristine_git_object: 3d6061b878f449a54e783d396f1597d7a969e1c2 + docs/components/streameventsresponseincomplete.md: + id: 615fa03678b5 + last_write_checksum: sha1:2caec7e6a380bac49d536df563c283bfbb833550 + pristine_git_object: 40db8ccf593bb868ba211b077dabb68dd10dc631 + docs/components/streameventsresponseinprogress.md: + id: a690361889a5 + last_write_checksum: sha1:d76b8f85a98062f0cb20d16d8fd209f4cb7dc214 + pristine_git_object: cf1d85aad3cbd4c9594b4d2b110dda5e2b643b3e + docs/components/streameventsresponseoutputitemadded.md: + id: 28063376bbd6 + last_write_checksum: sha1:9f688b8ae1d270aaae888b81cc5318533d675c81 + pristine_git_object: bc6ca2d07a2968fdcb740ba7a788e7438bc4a388 + docs/components/streameventsresponseoutputitemdone.md: + id: 2f634ca953f8 + last_write_checksum: sha1:63aaf9d2560fe0e03396959dd0b1309558b8af84 + pristine_git_object: bc30235694b93a91750fdcf9b0033835c9e5c06f + docs/components/syntax.md: + id: 0cf5ab254bc8 + last_write_checksum: sha1:632fc2775ec4066a2b1ee403579ff59bdddb4a91 + pristine_git_object: 4b82eb64344981f49f6a8fa220eb817427f4de78 + docs/components/textconfig.md: + id: 11301a29023b + last_write_checksum: sha1:62e407146de6b41467b9ec8c630ad8ad8a3f1743 + pristine_git_object: cb4ddd8f20f0302ac0550682d8e75f162c78c0b3 + docs/components/textconfigverbosity.md: + id: d49483ecf413 + last_write_checksum: sha1:a51ce28b6733aa1b579c3f9dacee605e08086497 + pristine_git_object: 0bdb609ebbb664477effde646423a619b74738b9 + docs/components/textdeltaevent.md: + id: 339fe3591c0d + last_write_checksum: sha1:70631c818431b47267546d1832febf0bff746912 + pristine_git_object: 86c75b9b7e2849965e80869c6dc08dd8a0ca6a00 + docs/components/textdeltaeventlogprob.md: + id: 95ab5e8143b1 + last_write_checksum: sha1:24a9851cc9a567bfc35327987f3e7bf17658ec14 + pristine_git_object: bdc97deca309889559ec04502eaa28f9d2f0ac39 + docs/components/textdeltaeventtoplogprob.md: + id: 72f135af4e18 + last_write_checksum: sha1:e5c49b9eb7d4f112f5781b6bb6e996a0fb10268b + pristine_git_object: 368ea273da6d5a26aa6841d9d2a88601b6ba3fe1 + docs/components/textdeltaeventtype.md: + id: 5974fc3de118 + last_write_checksum: sha1:e1528095a4d640ed17fb13afabb333dddc6d7429 + pristine_git_object: 9cf69c3b33abbe4d7deb38eb9b9c9636c31c45ba + docs/components/textdoneevent.md: + id: ff45b02ca7a4 + last_write_checksum: sha1:caf21a99eb4d28e99bc333e4f7806ce5ee1a8888 + pristine_git_object: c3a3e490ac52be0f6fa3d6f099bf7b6613c95886 + docs/components/textdoneeventlogprob.md: + id: 12db57b51708 + last_write_checksum: sha1:42b24452d4a81b99fb22ab178f4857fc8fa3e893 + pristine_git_object: cbbf9d68459dd1e9be16017f7a3a294183a6bd69 + docs/components/textdoneeventtoplogprob.md: + id: 616aa640232c + last_write_checksum: sha1:a00c77e4a0d128d28f44ac075ad6ee09676dc471 + pristine_git_object: c04407d868e893dd385ba12228d3d226d778bfb5 + docs/components/textdoneeventtype.md: + id: f956af59ac8f + last_write_checksum: sha1:8e6b985ae16c0f7d56415e3502bdcd73e698c1d6 + pristine_git_object: 5c73058b054429983632f0542af4fc0fb50300c5 + docs/components/textextendedconfig.md: + id: 669e1815f825 + last_write_checksum: sha1:a64da07e11d1437c3c7453d7a6c8d3f2757a8af6 + pristine_git_object: cdda558b74a056f33dbc0f2cf63a02265087d7db + docs/components/textextendedconfigverbosity.md: + id: 355071ba1bcf + last_write_checksum: sha1:9457b6011994833a86a2223b544d9d7d1b7189b6 + pristine_git_object: bbb9988342a55552bdd3c0985cd9f6aa9a302bdd + docs/components/tokenizer.md: + id: f1ad3417d8d1 + last_write_checksum: sha1:71829de4c9562b3a1278d71cda93f6013d015334 + pristine_git_object: 375af174630ba6823687779c76aaf7df6f3b4993 + docs/components/toolcallstatusenum.md: + id: 549255cbb115 + last_write_checksum: sha1:1ed0af16714c3cc566b86680a98dcc96fca4dffc + pristine_git_object: 346b32ea6deeb551b60098178a19e0ffefdabcfa + docs/components/toomanyrequestsresponseerrordata.md: + id: f23681a41b53 + last_write_checksum: sha1:e5b3d8c0bced377d2da5cd4826d4fab9e45df3ec + pristine_git_object: a957677d324419e4de813b33b88a76667d3ca940 + docs/components/topproviderinfo.md: + id: c9e56036dd80 + last_write_checksum: sha1:458ed83efcd607ec75e62c39c126906c60874721 + pristine_git_object: 13539198953425cce18fbf1ede3d3f7017f56dd3 + docs/components/truncationenum.md: + id: 09dabd53f527 + last_write_checksum: sha1:5a20fed6f77eef737258571c39a7b7da551a6e1c + pristine_git_object: 4c713e8391c094279dad895d905196ec9feab49b + docs/components/type.md: + id: e97521853030 + last_write_checksum: sha1:bbb845cc877102b35f5a5f8bd974a5fbda8358ee + pristine_git_object: 6eaadffee54251674359022b19b8e7ab020a8a3d + docs/components/typecodeinterpreter.md: + id: a0ddc54bdcdc + last_write_checksum: sha1:0ce1975a7bfeeb5bd2499dfd265528be8481351d + pristine_git_object: 761e09a30b291600b670f94f41c404f40c81fec6 + docs/components/typecustom.md: + id: 7346206117ce + last_write_checksum: sha1:85677cff1322ca22fde8effb6d9e1f24351b12b8 + pristine_git_object: 798b1c511c91925b3d92a5dce1cce33b236b0754 + docs/components/typefilesearch.md: + id: 75b395ec49b7 + last_write_checksum: sha1:80dc01b6e9862ce234d31d6b571ff6b61ab2db2a + pristine_git_object: 36e3406f0b0d3ff96f949a4cac4b15f9081094f2 + docs/components/typefindinpage.md: + id: 1ad664e7de56 + last_write_checksum: sha1:10a3f3d7d83ea85fd1e8bb6cd4bb442ddc548e29 + pristine_git_object: 14fa7857b732f987fce03ce6672ef11cec4f06da + docs/components/typeopenpage.md: + id: 3e349476bb3c + last_write_checksum: sha1:795aceda2ea4559886aa768e536a738a42f49cc7 + pristine_git_object: 37b24080fbf349299ebecd8f7ee42a62c5c84de6 + docs/components/typeresponsecompleted.md: + id: 4a732cb5c0a8 + last_write_checksum: sha1:b06634b391318e338cc34d28cec16651cadd55f4 + pristine_git_object: 77875c6fa5191720f0e7c5c98d6e5047b4673d6e + docs/components/typeresponsecreated.md: + id: c6c3e5cf7745 + last_write_checksum: sha1:c715c4e5b71d2353f7f77ef36c683b4a30afb7c0 + pristine_git_object: 364b68bc991cbedee72d5c8989d858cc18bf9a37 + docs/components/typeresponsefailed.md: + id: d9d18f132fc3 + last_write_checksum: sha1:f971b53bf361b3565a7ec36502a89977502318f1 + pristine_git_object: 6ce28360db8977e985a651ca1073875133587f0b + docs/components/typeresponseincomplete.md: + id: 4502dcf6cd3d + last_write_checksum: sha1:24248fd5bc667326c0e69c56a0faa569dd37bdde + pristine_git_object: 3fea8780868b44c67c3613952740f2838ae8a4ee + docs/components/typeresponseinprogress.md: + id: 31bf9eb9f823 + last_write_checksum: sha1:f44d3cef2db709f1e4f655600c8179a759825961 + pristine_git_object: 6f2328e77c4f77845b7e0ffa6fa3af826dcfd21d + docs/components/typeresponseoutputitemadded.md: + id: c8db2ac8ee2b + last_write_checksum: sha1:a4ee147e3adb2f8c0dd49cc44ff58a8c586ad393 + pristine_git_object: b29c71ee34086640b5c944e6e0093b5133d8651e + docs/components/typeresponseoutputitemdone.md: + id: e7f0d18c3618 + last_write_checksum: sha1:e20d46472d3d43f876bc15eed251bba7a5267c51 + pristine_git_object: 4c6f4a659a7e6bc2858d8d0b6eb3d8d2881dbcb6 + docs/components/typesearch.md: + id: 61c60e55211d + last_write_checksum: sha1:390cbcc7add489ce06a860d4116ed721a98b4121 + pristine_git_object: bfea226955f7aae698b7841853c0f57719b7a69b + docs/components/typeurl.md: + id: 1c413c4e474f + last_write_checksum: sha1:a0924a8ec054894d559dc80c6332ecba519f687a + pristine_git_object: 8965e38333e756ec13deeeb4bf816bd11e4e3a60 + docs/components/typewebsearchcall.md: + id: d4647ca78da9 + last_write_checksum: sha1:0abbaba9c6c9a3722f755516331a80d5a1e7aac6 + pristine_git_object: f0a4b732e87cc1880ca26a5c8981552488ebaeeb + docs/components/unauthorizedresponseerrordata.md: + id: 79b657be05c4 + last_write_checksum: sha1:69e58ae8931fc723bbb4aa1212e50b97a83db709 + pristine_git_object: 1db2a3a9378d0eeb5de39f1d6621e69bbb7e0953 + docs/components/unprocessableentityresponseerrordata.md: + id: 6a36f0c9d959 + last_write_checksum: sha1:b7adc7ae81b79cb1436c8f85b45283fe52320d81 + pristine_git_object: 9ccd3c05cd75915c70aa542bb16e2a8f77bb91cd + docs/components/urlcitation.md: + id: 02c4f88e5f51 + last_write_checksum: sha1:1d1257827dd2202b2589d0b87e4c38047e15e759 + pristine_git_object: d98eb3b89f51843c105215beaf4a5d850cc87556 + docs/components/urlcitationtype.md: + id: 7631f8ba867e + last_write_checksum: sha1:6723ca63815f15e697b2e8ed1febd1bc0da0beca + pristine_git_object: 2b6e38f54f447f8fc794d3c35c1a0bc690cc4d2e + docs/components/usage.md: + id: 15e3eea02540 + last_write_checksum: sha1:04c5b234dfc7abe5c957f3dc2d54f9fb974c5e35 + pristine_git_object: 7707b15f8a4ba05029ee5726fdd48723af2f6dee + docs/components/value1.md: + id: a13f75759dc0 + last_write_checksum: sha1:0c7d94ae129961ad32dbc85fdc0958596316939b + pristine_git_object: a969ac11475c494d073feee546068913aff31a6f + docs/components/value2.md: + id: cb39f5b8da43 + last_write_checksum: sha1:b0b00e40babaaed031459e229396c37300e60d92 + pristine_git_object: a281d051c89234ebb83ea44f01c2f6d3e36c2894 + docs/components/variables.md: + id: ad5d1b284346 + last_write_checksum: sha1:30ebb41e8bac9a8d817b2c0ab0a9e9fded4a73ee + pristine_git_object: 0698d06289a06a6cfcd35f7069f2ef64a0aa0e25 + docs/components/websearchcallcompletedevent.md: + id: 8c338a61bc9d + last_write_checksum: sha1:39f63ce5dfc8e5561d9ee03846328917793febde + pristine_git_object: eb1d165edffa38c018f693e1bac4c19660bfbafb + docs/components/websearchcallcompletedeventtype.md: + id: 1a502d610554 + last_write_checksum: sha1:56512eed2eaff1c4cddda33efbaeab3dd2322e5c + pristine_git_object: d62999f7bc2df383fa86043fc57b563175844420 + docs/components/websearchcallinprogressevent.md: + id: 31189749d1bf + last_write_checksum: sha1:b776d4702919cd538a80e7691d422277951a7f7a + pristine_git_object: 52e1108b1f33c9718269adb81be9e4223fb6e324 + docs/components/websearchcallinprogresseventtype.md: + id: 15a11ab4c4b7 + last_write_checksum: sha1:f9d645c8458d7246b351f653c7058d343e53f640 + pristine_git_object: 41ae71672238c0c6e34302f7b692ed71d315dde6 + docs/components/websearchcallsearchingevent.md: + id: b182331a02b6 + last_write_checksum: sha1:1a8d3fae927c811526e6dff348df4a2b9a51e9ea + pristine_git_object: ec9bc6744734c450a7c9bd7d0300f9ca93a7a781 + docs/components/websearchcallsearchingeventtype.md: + id: 652bc30b0248 + last_write_checksum: sha1:debb8eaed5f86bac53f74f3e61380b2235470795 + pristine_git_object: f1771d0b194da9cadcbe7176c43059189745af44 + docs/components/websearchengine.md: + id: ec8b8ee1236a + last_write_checksum: sha1:59a0029e174957275203a64c9d2b4a502cd8c2bd + pristine_git_object: c0da50524ffa09ff15d26306df1bb1e9f7346998 + docs/components/websearchservertool.md: + id: 92cff6162ede + last_write_checksum: sha1:cb88d016e41fff439a79b05c8d1871f4bccef676 + pristine_git_object: 38c9e0b070518121aa569a0cce7a00568e136c94 + docs/components/websearchservertoolengine.md: + id: 477027aefc9a + last_write_checksum: sha1:503c5f2edcc44c2362f88720155cc8fcc09388f8 + pristine_git_object: a53a4e077fda0df4ada9f36f9b1b5a35af3f4fc0 + docs/components/websearchservertoolfilters.md: + id: 52a5640b6124 + last_write_checksum: sha1:2bf8119ec638fe97fe91220331e1c0319675a087 + pristine_git_object: 456c4ed9268d5183f11f67dac104a7cebd9a8012 + docs/components/websearchservertoolopenrouter.md: + id: 34b36452e3b3 + last_write_checksum: sha1:477fd3c6064e802b3d880f597d667d4b5d188114 + pristine_git_object: 701432f797d1ee96adfc6932a223e4f214ebc2c9 + docs/components/websearchservertoolopenrouterparameters.md: + id: 9dd0b802a379 + last_write_checksum: sha1:b1e42acaac7a2865a6fb995791843ede70edfe7e + pristine_git_object: 39446ea916e71987939143c5a18258aa3449025b + docs/components/websearchservertoolopenroutertype.md: + id: 709a7a44c3c9 + last_write_checksum: sha1:a2b894302d879e185fdad29ab6911c7a9b72f6ca + pristine_git_object: d126a4d405d71415b5b467b17810f2d97148d463 + docs/components/websearchservertooltype.md: + id: e16d860cb061 + last_write_checksum: sha1:505ba5b2c7ccccd75f531f163f5077916e2f1c63 + pristine_git_object: 13b6311489f87d206fe37c2b6446f7b0e8626547 + docs/components/websearchstatus.md: + id: b43113e03655 + last_write_checksum: sha1:b94a253e70c37b3c6aebaeb73b9956335e0b97b8 + pristine_git_object: 53303ec32abcff22251468692cf0aaacd746e307 + docs/components/websearchuserlocation.md: + id: dd5e502d8105 + last_write_checksum: sha1:d0751db3b12386419e79dd226477896147e110ec + pristine_git_object: 6fd81cd705c20c711c1adcda5e44c8dd73b50a04 + docs/components/websearchuserlocationtype.md: + id: ac432a0db67a + last_write_checksum: sha1:6b322242229459f409a83243db53ff8069fe1a3f + pristine_git_object: 8213d86aa4dea092924605829dce95a1f31b0897 + docs/errors/badgatewayresponseerror.md: + id: 32126b40d635 + last_write_checksum: sha1:86b3a24f2523bb4df0972bf2fca93dceb7a190a2 + pristine_git_object: 54c51b9dd9ed8dc98dd52c0e68ef5554677197f0 + docs/errors/badrequestresponseerror.md: + id: 557cbbed2def + last_write_checksum: sha1:91d337751953ebee60ebc85946706aad64aae951 + pristine_git_object: b7ca5ac0173bdb6d535d9aa86bf582f05ea7ca65 + docs/errors/conflictresponseerror.md: + id: a6291cc4fcfb + last_write_checksum: sha1:3dd3b7bad49f0f6648791dbd3a9609820eed4a71 + pristine_git_object: b3da3b7a122ddeda00203e6f0245673bafc70e98 + docs/errors/edgenetworktimeoutresponseerror.md: + id: 2e06bbd77e57 + last_write_checksum: sha1:21452cb7aababb75432da12ab9f73a4c446f6203 + pristine_git_object: b12eb0627b703ad6a81397d3d2fecd33c795613b + docs/errors/forbiddenresponseerror.md: + id: 7decb227f487 + last_write_checksum: sha1:283f0f2a777f118448acd3bed2b98a879a8175a7 + pristine_git_object: 290d3a4196ed994d4c8637490aa1449fbe624724 + docs/errors/internalserverresponseerror.md: + id: 7e8ff7f684b2 + last_write_checksum: sha1:7286bd98d0952f44d807965c284796fa8b271be4 + pristine_git_object: b625175afeab822bd2c84b7430bf711656813419 + docs/errors/notfoundresponseerror.md: + id: 24546e4ae2b1 + last_write_checksum: sha1:d7a17885213efd454b691f6ee5b899cd0ba692f2 + pristine_git_object: 80d0191686bee32f48f5df345b1bbf39b13e5fea + docs/errors/payloadtoolargeresponseerror.md: + id: 11b7364bb388 + last_write_checksum: sha1:fa2630842cf4627459da16d1aa3e1994a0f93cc0 + pristine_git_object: 322cefe3a38f280ea4b9b77ca68d17b7b063d277 + docs/errors/paymentrequiredresponseerror.md: + id: 1df8bf21f2ec + last_write_checksum: sha1:25494fb9511e5c0771065e7227db40c1c532675d + pristine_git_object: 1cf4c3f8a8ac361d2ba94b2abdde72ae9e73103e + docs/errors/provideroverloadedresponseerror.md: + id: bae15be73247 + last_write_checksum: sha1:9384bc2db38813760ea96dcf8d741e734297ddc0 + pristine_git_object: 9eff488317ce9c348cef09d3398581fa58812171 + docs/errors/requesttimeoutresponseerror.md: + id: 8d026980f8a1 + last_write_checksum: sha1:8ed616de74c14b661f415c8cc2ba06f193d04fff + pristine_git_object: 4f5d8f7c964859bce730da7ea3a85a71447d42f1 + docs/errors/serviceunavailableresponseerror.md: + id: 4673e5ccf763 + last_write_checksum: sha1:71084f978900f2f69880d767af428f1de2e51af2 + pristine_git_object: ecd703aef5447801f014a4e9479120af82877292 + docs/errors/toomanyrequestsresponseerror.md: + id: be0bd7d3b18d + last_write_checksum: sha1:51af9ddc560868b3766719af9a5d8eaf24eb051a + pristine_git_object: d03ed75e3fb9e8211a25051459708ce03dc69bde + docs/errors/unauthorizedresponseerror.md: + id: 500194829c27 + last_write_checksum: sha1:2d29af324a37fceabd072b787efae825dfe83cf2 + pristine_git_object: 7dd77440386a5708344749797bb608c79623830b + docs/errors/unprocessableentityresponseerror.md: + id: cc0e37e6516e + last_write_checksum: sha1:3f387fa8558b528884f8d7f61cbc576bb32924b9 + pristine_git_object: 33f001c56da91058dbab85aac79a77c48ddc869b + docs/models/internal/globals.md: + id: 9c173b87f41f + last_write_checksum: sha1:eb08bb4e1e88b4fd1740cd6737a7f5752a101c85 + pristine_git_object: 5b30448a3426ad7642d4e814f231b6970a1ec214 + docs/models/utils/retryconfig.md: + id: 4343ac43161c + last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d + pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf + docs/operations/apitype.md: + id: e271bff20dc7 + last_write_checksum: sha1:0d9e181be7e9a8f1f77bc1657e1ea9f3a0f5f71b + pristine_git_object: 15a30418de45735cbce4d76279733e99f8426577 + docs/operations/bulkassignkeystoguardrailglobals.md: + id: 10cab63c9a95 + last_write_checksum: sha1:5c7983931ef784a72f7dfec732eb7809d352c313 + pristine_git_object: 1b45a8531b22e0412e5e23d8d3491930a208f73e + docs/operations/bulkassignkeystoguardrailrequest.md: + id: 17f1b1837a1b + last_write_checksum: sha1:7d2f189b1e89951f3ee99cb4bedab924b5b9c6ba + pristine_git_object: ea428c6abb2a85880b9498a6ab217b865a8b2874 + docs/operations/bulkassignkeystoguardrailrequestbody.md: + id: d34f42cdd49f + last_write_checksum: sha1:2515443242c2122b24559962e3bba83f0cd0e82f + pristine_git_object: 38b45b39e03ca4d680314d9c3ae205256d4bff87 + docs/operations/bulkassignkeystoguardrailresponse.md: + id: ba15cdc12a46 + last_write_checksum: sha1:bf8c9e9ef203d07e43b2c6617c2b432a23b53587 + pristine_git_object: 11f3e6936e73a64560e72ffd9d77a19a1ddb4cc0 + docs/operations/bulkassignmemberstoguardrailglobals.md: + id: 5d30b7e9c735 + last_write_checksum: sha1:0830f7c17c8ab7961e54910742628de069d22871 + pristine_git_object: b970409d4cd5c37ada32927921add3b2b0f013c2 + docs/operations/bulkassignmemberstoguardrailrequest.md: + id: 6d6c7e9ae12f + last_write_checksum: sha1:2439993f7e5860a91ba7d79da4b9856355ed5783 + pristine_git_object: beaf17441eb3d783e231a6bb4069b192ed005d35 + docs/operations/bulkassignmemberstoguardrailrequestbody.md: + id: 0cbfdd8e16b3 + last_write_checksum: sha1:428fe76f730c54dbdc8079516ea2cba2ec6f90d2 + pristine_git_object: 505532ff0261622b4a289789788af2ebda9d6117 + docs/operations/bulkassignmemberstoguardrailresponse.md: + id: 5eea75c03c11 + last_write_checksum: sha1:71543d765329460d04391cb77d0535378507bfae + pristine_git_object: 402d357f19b9bcec073811a61acbc98c236acef1 + docs/operations/bulkunassignkeysfromguardrailglobals.md: + id: "491635767122" + last_write_checksum: sha1:06e7a6b0f052e73e5cacd480e3bff8ab7756d0b0 + pristine_git_object: 8472ab41760bcb0767280a0af1b4c2ac27ba4ee1 + docs/operations/bulkunassignkeysfromguardrailrequest.md: + id: fece8f279cf4 + last_write_checksum: sha1:83ead372b4f81521e3a3d0e22bca779a4567a47e + pristine_git_object: b80c239dbc8b44c18a125485396b1e0464352f2e + docs/operations/bulkunassignkeysfromguardrailrequestbody.md: + id: aa05e09a2421 + last_write_checksum: sha1:cc73ae32cb8c2ae265371212a34f0dfc6b5d6446 + pristine_git_object: 5f4b2bd1fbb96c7904bd13c786d2f09ac16e954b + docs/operations/bulkunassignkeysfromguardrailresponse.md: + id: ce0017a791f0 + last_write_checksum: sha1:3b72f6a8cbfca2cf5942bbd3ebd649cca3fa8ae4 + pristine_git_object: f789d2ae375e3f25474b53562da1835efaba2ba4 + docs/operations/bulkunassignmembersfromguardrailglobals.md: + id: 0fcd5a2477df + last_write_checksum: sha1:82475eb0c237f8fa9b1672684bc441c5ef5beb95 + pristine_git_object: 5df6bb6d4a2f35ddeefd0064318d867dbe4f078c + docs/operations/bulkunassignmembersfromguardrailrequest.md: + id: 682c7ea4ed8e + last_write_checksum: sha1:82a1ae956143eafc9079d915267f4b9c513bff31 + pristine_git_object: 90a94751989a93a7e94631ed8ed45cb9e8b0026b + docs/operations/bulkunassignmembersfromguardrailrequestbody.md: + id: c7e4e8c210f5 + last_write_checksum: sha1:0fc11e3f321f9ffed701abbde874c804890771df + pristine_git_object: 76855da93e358108c8e6f1b760d218dea58308f9 + docs/operations/bulkunassignmembersfromguardrailresponse.md: + id: 6fa28513237c + last_write_checksum: sha1:8880a7ac0b9223137e8debacabe38c594f6d0864 + pristine_git_object: 76e85b285366d5731dd1cb6cfc182907406fe741 + docs/operations/calldata.md: + id: 950f75cd8fa0 + last_write_checksum: sha1:b74cd6e7ef1233a3877dac00f473cd7c76bb775b + pristine_git_object: de7a031a64014b4578f0252e7ec088d4b09a68ff + docs/operations/category.md: + id: 694f17d9e80d + last_write_checksum: sha1:6437eb7bd8c0df1767aee6a6522c5a67fdfaddcd + pristine_git_object: f0fa9d7be281df813c938123cf7a67213c98e9b7 + docs/operations/content.md: + id: 33ab0eb04a0b + last_write_checksum: sha1:5a1a468675c152ae46d98cc4d68f26163a36bfa3 + pristine_git_object: 727997fcf2c2d7ecd0576adcd3fafc945c90ad61 + docs/operations/contentimageurl.md: + id: 8e6b0dcac568 + last_write_checksum: sha1:5bf1be8a325ba6d0c7d54f67917b330ad67ba802 + pristine_git_object: 3a624d568a823effd91a90dfc858add239b2b0bb + docs/operations/contenttext.md: + id: 01cceb61d42f + last_write_checksum: sha1:01d289dfa29f62018f461b0ace2a1fdb3af2da13 + pristine_git_object: 11ffb7a710b7d4fd11caaeb70f44ea77bee89d4f + docs/operations/createauthkeyscodecodechallengemethod.md: + id: d598c7da9363 + last_write_checksum: sha1:3b81340adcf218991f7829e692e64f484763de2b + pristine_git_object: cd496b740a0d914d6bf01b0b8c734440719a7126 + docs/operations/createauthkeyscodedata.md: + id: de024dcd716f + last_write_checksum: sha1:6e035396ed061e3c0142c3b16b161f8577eb0716 + pristine_git_object: 81adde90b2beab341e820ca58625c0c5d984f3e8 + docs/operations/createauthkeyscodeglobals.md: + id: dc07458757e2 + last_write_checksum: sha1:56a8ab12e43378b06746682f6ff831f9edb18452 + pristine_git_object: ab7e4e55f571f6299de54543c004424e37cd4090 + docs/operations/createauthkeyscoderequest.md: + id: 7cbb14ff950a + last_write_checksum: sha1:fc31d57a0b91cb76c150ff359c25b9d4ea239205 + pristine_git_object: 6dc06174a0f72d4b4d0f22bc88a3f8a941e7666f + docs/operations/createauthkeyscoderequestbody.md: + id: 402f2065cf8a + last_write_checksum: sha1:9d6bc13b6bbdf1f5b72afeecec10e1018e607eea + pristine_git_object: 76ceb7bb2b742673d692f177c091c82a14355e91 + docs/operations/createauthkeyscoderesponse.md: + id: 6c92952aa6b6 + last_write_checksum: sha1:c456860d3c44db9bd993e3e4371025d50be959f8 + pristine_git_object: acad71c0e6f4d79b6cc9a2e88e6b8a0f9af321a4 + docs/operations/createcoinbasechargedata.md: + id: eb6f66eb47b3 + last_write_checksum: sha1:bf75c37cdede3e9503cb76b52993f644037df322 + pristine_git_object: 9363cdf6948ab92053e313ae48f4aa1c66a7c980 + docs/operations/createcoinbasechargeglobals.md: + id: f991df871a9f + last_write_checksum: sha1:75b0e35461d66b1eed488b9298219f71b85841b9 + pristine_git_object: dcc7d37f19107efe84f79941648b2902585d6e2a + docs/operations/createcoinbasechargerequest.md: + id: a448dd5ceebb + last_write_checksum: sha1:4635ba463628d2e79523db64c810cca47e0cf078 + pristine_git_object: e6f030714c394386aa7f69d60532b01c3faa470a + docs/operations/createcoinbasechargeresponse.md: + id: 9fc6d8b1e3c2 + last_write_checksum: sha1:9e9f224237128b82d1dba1b1b8de785067a06d3e + pristine_git_object: d9d4bd99972294e02ce27d09b940b829246c6891 + docs/operations/createcoinbasechargesecurity.md: + id: e041c4c49e3d + last_write_checksum: sha1:0dd8c21a514db569ae6c073ac884fb44e66b5c31 + pristine_git_object: 7d58a21f28426d40a0ae7d755b18580916911d08 + docs/operations/createembeddingsdata.md: + id: b2123807ad9d + last_write_checksum: sha1:6c7ca4ed9b4552bbafd6978b034bd2117d216574 + pristine_git_object: 297dc692bb6d7112b3daa9d9b918fda66a0fccfe + docs/operations/createembeddingsglobals.md: + id: 57210fb0e38a + last_write_checksum: sha1:82fd92d8da52017a2e7892b5611af5168fe65a7a + pristine_git_object: 13b9e13d3c25a43c492fae346593bbbc46b52580 + docs/operations/createembeddingsrequest.md: + id: e680f1daef8d + last_write_checksum: sha1:a0619baba5928246740cb374bb8790a0be691093 + pristine_git_object: f0c5d8379e05cea0576254d5868bceaf6cbfff13 + docs/operations/createembeddingsrequestbody.md: + id: 1dc1b7920b56 + last_write_checksum: sha1:7c2b4a646406f08c7e772552ef7aa26fffcbbea6 + pristine_git_object: e4229b334906c36cd3690c2afe376cb10fdb8c9e + docs/operations/createembeddingsresponse.md: + id: 1314e0c18f0d + last_write_checksum: sha1:3585e9e490549efb1a71dfda28e0faa41b79eeea + pristine_git_object: 4c379be00bda8bdaa67de03470f76141803cd62c + docs/operations/createembeddingsresponsebody.md: + id: eb2fea5ac750 + last_write_checksum: sha1:0fc79e3014e71bd3d07e6db2f0b964e7ead8fe59 + pristine_git_object: 2252cfd18b3935127ee68316fb2130e213387b22 + docs/operations/createguardraildata.md: + id: c3dfc7f1a090 + last_write_checksum: sha1:7db1b52255a966374bb65fa07af1bafb4ed9d44a + pristine_git_object: 0cfc0cf12a0d0370d2196cf16286fd43e529a49b + docs/operations/createguardrailglobals.md: + id: 34f5b2a17330 + last_write_checksum: sha1:a43fb357b9c08974befd14a79da7623e72bc3245 + pristine_git_object: 862c3641250154a3e227d020738f893d316d391a + docs/operations/createguardrailrequest.md: + id: 2d8932b329b3 + last_write_checksum: sha1:c58574f8d0e0e2d0eec8f0d40dc5e682981304d9 + pristine_git_object: 1f1c9440c1475fb24034d20666289aa490bd9a54 + docs/operations/createguardrailrequestbody.md: + id: b683515dd4dd + last_write_checksum: sha1:42729c623234049d62d351711ce2b0a2e5d6af42 + pristine_git_object: 843fd1ea7fd043af2818b53427c5e2ef14334c78 + docs/operations/createguardrailresetintervalrequest.md: + id: dfd5668013f9 + last_write_checksum: sha1:8899f5440dd988f6a472e5ddf8ae9f88cfe711ab + pristine_git_object: 4d591a766941666964437a2339954740c5c4dc3b + docs/operations/createguardrailresetintervalresponse.md: + id: 20f5c0fcdb06 + last_write_checksum: sha1:573d5e213d588c1a6b3313b0614610927dcfe9f4 + pristine_git_object: b49fa04b6d5531653211958eb2fa4bb7e0cc5579 + docs/operations/createguardrailresponse.md: + id: a96622c2743d + last_write_checksum: sha1:3d6fc5670b3296d2b023581c03f3d77169ed6b8f + pristine_git_object: 4cf770bd215ff13d4ae89200b2515c7c5e177cf0 + docs/operations/createkeysdata.md: + id: 903a6d611ab2 + last_write_checksum: sha1:f323d972a4e5f139f055e25ffd33429b6b2e1ed5 + pristine_git_object: 6bbf38d24cc8913710524d8230e62676df3f5018 + docs/operations/createkeysglobals.md: + id: 15dd52d4443e + last_write_checksum: sha1:032800ca0e8b56a1819431b9b27fa09a5b4b09c9 + pristine_git_object: 6fea46171bad0253ad1bbf47ffda4eba140b2019 + docs/operations/createkeyslimitreset.md: + id: d2e99ed5a672 + last_write_checksum: sha1:1fd9511db6c28a2a7c6968ff0157f4e33fcbc982 + pristine_git_object: 5d1659c4ceffd5282b3fe7a4c106fff641af722e + docs/operations/createkeysrequest.md: + id: 57f03f411f99 + last_write_checksum: sha1:30bc04f324314ddff93990700cbb2e4329e39478 + pristine_git_object: 281d4e8f1aa1c1738331e228fea564d19114b7ee + docs/operations/createkeysrequestbody.md: + id: 9aee51637cee + last_write_checksum: sha1:ad36a3f9f254273972b1acdb98326a6ab87c44c5 + pristine_git_object: 067a1d5edacca2b778fe6408f0ea0658e637b053 + docs/operations/createkeysresponse.md: + id: 42bb3427e12b + last_write_checksum: sha1:ecdac228aea32490a6c114a32dcc90cec87de9a2 + pristine_git_object: 2db8887327d7a2406ecfd23ed5e2488fcd271524 + docs/operations/createresponsesglobals.md: + id: 9ea14f11bfeb + last_write_checksum: sha1:9586d395012468f47af06b82c7fd6f71b52bdb9c + pristine_git_object: 265872cbb44f436ced32612e7d880ad31d3fa41d + docs/operations/createresponsesrequest.md: + id: 98a355410675 + last_write_checksum: sha1:6a1943568a66018ee2163affcafb48d7f0bec052 + pristine_git_object: 6436099931b01df8e63cccfb364a260fd1750cad + docs/operations/createresponsesresponse.md: + id: a3d80d6706a3 + last_write_checksum: sha1:b02dd81018eb73c7761a32ead8011abff17d9962 + pristine_git_object: 5c515b1d273af54ccbf5e3d32b1677cbe867a1f2 + docs/operations/createresponsesresponsebody.md: + id: 5f7fc3c975e3 + last_write_checksum: sha1:e0be4cc8e221c4981f7400b5a08c6913883ffbf0 + pristine_git_object: 6190ddd8ff4518eaf4d79cd058a0ec5b436a6706 + docs/operations/datacenter.md: + id: b08a21cce65c + last_write_checksum: sha1:9f399d250c42bff63295881990961f871a36b8a9 + pristine_git_object: 51549248259fddd4e7822f3ceda9f972adfdef86 + docs/operations/deleteguardrailglobals.md: + id: fc24ed3e100f + last_write_checksum: sha1:303b76381d6ae26e8d39c5470d35bfbbbb5df0df + pristine_git_object: 8b3caa0462646cb84d12e677169a29c2f535620b + docs/operations/deleteguardrailrequest.md: + id: f746c227ab1e + last_write_checksum: sha1:f2ae275087247cb5df753ba94a6a922304ee7fa5 + pristine_git_object: 14aa025d53ead8b0c2f7d64b4a25bc2424261622 + docs/operations/deleteguardrailresponse.md: + id: 01d6299e4794 + last_write_checksum: sha1:61e36f6a68d31efdb1f40ea6dfea5d9bfdf98dc2 + pristine_git_object: b548b9ff0eedb2a2d0b394d253278c508f8bfc19 + docs/operations/deletekeysglobals.md: + id: b6346fb0dd73 + last_write_checksum: sha1:6e15f083ee437e9ed5f60702bdfb893b0b863d53 + pristine_git_object: 0bbd49855930a9f997e1f7a6941e393e4b1dd987 + docs/operations/deletekeysrequest.md: + id: 604f8b4a8be7 + last_write_checksum: sha1:70312fb7dd966699ade23b4ce1d865ec241ea648 + pristine_git_object: 61b97141c70a2a86eecf5a492e59dcd131ec8f25 + docs/operations/deletekeysresponse.md: + id: 843ae03c4c33 + last_write_checksum: sha1:3e34ea65b5397e4d1203306e4a08f12023ebfba2 + pristine_git_object: cc7cddbdde6e0f31ddbec25b8a01e7ece0b8e04c + docs/operations/embedding.md: + id: f269f99ee6d5 + last_write_checksum: sha1:2e6726480547ce12c49961ddf861401edfa46259 + pristine_git_object: 59f08e3d11d59a36593dedf259d77f797d3fe3ad + docs/operations/encodingformat.md: + id: 3ccae4d8f099 + last_write_checksum: sha1:8d6c4b29dea5ff7b0ae2b586951308fad99c60eb + pristine_git_object: 7d5941cfe6cea2e85b20d6fb0031e9b807bac471 + docs/operations/exchangeauthcodeforapikeycodechallengemethod.md: + id: df7142dcee15 + last_write_checksum: sha1:abf90e37d86ba401850965e0837d590fa7cd7d14 + pristine_git_object: eec31e8c5e222b872db0c53aef3dac3889879b5e + docs/operations/exchangeauthcodeforapikeyglobals.md: + id: f25fc784d760 + last_write_checksum: sha1:3ba6407369e5bf7d202eeb18036af247392ac51b + pristine_git_object: 91c87730d951c0b1d89bb4f876e3b2552127af81 + docs/operations/exchangeauthcodeforapikeyrequest.md: + id: 88d7fb3e304a + last_write_checksum: sha1:9d6b71d92c0a47b46a65aac74530b24b0b5eb8d6 + pristine_git_object: d818ef4262987790ae18de9675e53a087c9e2264 + docs/operations/exchangeauthcodeforapikeyrequestbody.md: + id: d4dadfc0846f + last_write_checksum: sha1:9ecfdc7dcdee06dedc0e9b7332ac285835aaccf3 + pristine_git_object: 1543d582736b48748a8d5726c9371af6fd40c90d + docs/operations/exchangeauthcodeforapikeyresponse.md: + id: 62e36bd89583 + last_write_checksum: sha1:f1f06cc15b7bf183358c6de9aa6351b70ca5e8bf + pristine_git_object: 11975e02a266c09b4c6c77409c7e8a42fe7cb537 + docs/operations/getcreditsdata.md: + id: 57e01e9078b5 + last_write_checksum: sha1:0f1d133fe4045e1b1d0e494e54bbb02b76d16607 + pristine_git_object: 9ba4582d555e52c1542c1a1660434dd987ca5407 + docs/operations/getcreditsglobals.md: + id: 83a1f9872049 + last_write_checksum: sha1:f0d59e9efe86e551f1a5ae616ccdf92cfd195860 + pristine_git_object: bb29d2dafec61744be14e47cd7b3c08b6ea2c23f + docs/operations/getcreditsrequest.md: + id: ca7cc8201079 + last_write_checksum: sha1:973b453d2a248ad281a95309de874c1fca385fae + pristine_git_object: f86e9758b6715315067659ed0adb0c6f4d94b92d + docs/operations/getcreditsresponse.md: + id: 9dd4a021eebd + last_write_checksum: sha1:36204666197a35bd352d2e2414f2d993748d01e2 + pristine_git_object: a58a336fb17cd33196da51df89c7803ba0cba363 + docs/operations/getcurrentkeydata.md: + id: e357cfe8cdcc + last_write_checksum: sha1:39a100ee48a6189fbc5fcc167155d3a0b6e35797 + pristine_git_object: 4c5ad958f1f3546f3428ece8b196e86870fb80cc + docs/operations/getcurrentkeyglobals.md: + id: 9d0a1314955f + last_write_checksum: sha1:3aaff7ab31036ad4edb525577759ec52c430e180 + pristine_git_object: 905f7d1dd7692126131c8dbb99a5204b39b06f4b + docs/operations/getcurrentkeyrequest.md: + id: d1cc7ac5a986 + last_write_checksum: sha1:f3df133d4942e098df43ef7b6d2bb4ac91a5b2d4 + pristine_git_object: e20974606ebe165785b5c3cf7a392d3acefcceee + docs/operations/getcurrentkeyresponse.md: + id: 37af8951de4d + last_write_checksum: sha1:8f8d06ebea5c9e17c36a638582b98a21adb3cf08 + pristine_git_object: 8f279e23350b014fdcb58036f59c42412db914c1 + docs/operations/getgenerationdata.md: + id: 89a3aab8da20 + last_write_checksum: sha1:eec7b35116e558c6dc36739f114297f6beb97de3 + pristine_git_object: a980f2a2fb391e8cdbb320ace99c96f33e213ac8 + docs/operations/getgenerationglobals.md: + id: 0d6e856c5861 + last_write_checksum: sha1:b5236815132dedf2b595fd520f1753d5ec8bb6e0 + pristine_git_object: 842003596b344b8b0ce3d74f0eb05e8157b4a4de + docs/operations/getgenerationrequest.md: + id: c830d67c6a95 + last_write_checksum: sha1:4fe7c3206dda93bd0b884c05187af559de791921 + pristine_git_object: 5fa33b65b73f4f471b51e4f83903a89f4241b968 + docs/operations/getgenerationresponse.md: + id: ab03c2c610cc + last_write_checksum: sha1:419e7fafd845db9c63545b55bf6ab1ecd6a04371 + pristine_git_object: 989c19a3997fe21716eea833ef30eef8a980b733 + docs/operations/getguardraildata.md: + id: b102d42f75a2 + last_write_checksum: sha1:f70c75a31edcf1fd3e785347ec5b7038894a7eef + pristine_git_object: 25bde01b6bced6fd4d1f1b9347881546a26b577b + docs/operations/getguardrailglobals.md: + id: 6cf14d555b8f + last_write_checksum: sha1:025d0a3b53ce5603d5d262a5db3ac54b5ce981d0 + pristine_git_object: 63bf9d69b85cad246cd1d5a2ba4ae47d9c6c4566 + docs/operations/getguardrailrequest.md: + id: c105f1324d76 + last_write_checksum: sha1:a0b3242a5fd017bdc1819eadc5e74b40b8e7bc2a + pristine_git_object: ad49c823ffd11b46d8a8ce2a67eed5bd71d09db8 + docs/operations/getguardrailresetinterval.md: + id: 998a5941a6be + last_write_checksum: sha1:d9d2fa81397c044592a02e00243a60b87c95ec1e + pristine_git_object: 48f4f0e1c260f8f0fb29053b75e052590c39f7bc + docs/operations/getguardrailresponse.md: + id: 707610da92cb + last_write_checksum: sha1:d348b887b4959295bf1c788d527ac93baf1f3a9d + pristine_git_object: 08739b60f2c47b9e8d0502359173e8bd35dcb81b + docs/operations/getkeydata.md: + id: 4fba05263947 + last_write_checksum: sha1:827b8de719f40fd8d28641c569b8e70cede3a43f + pristine_git_object: c4f0b560c646d9d80d02476de3455f55cc570cdb + docs/operations/getkeyglobals.md: + id: 7f990e0efc1e + last_write_checksum: sha1:12dcc44c433951cdd8c4136ae1a70702e2b3e47d + pristine_git_object: 585d2a336f873f80afd427063fe3d845be885adf + docs/operations/getkeyrequest.md: + id: 1f6e344b43eb + last_write_checksum: sha1:13b09743107d4c21db602e1befb1623eae7aa04f + pristine_git_object: b7b0a302d24d5964ce5a4bd24672d766362564cf + docs/operations/getkeyresponse.md: + id: c145b1a0dd5f + last_write_checksum: sha1:0a6ec7d718ba4bcd07e5e3b4002820a3107386b4 + pristine_git_object: 16994d0d310d36fe652ac13ac125f8eccd8fe8da + docs/operations/getmodelsglobals.md: + id: 61588f3029c8 + last_write_checksum: sha1:f1565d45f3d06f070a8bc5ebe53d6205656b4b3b + pristine_git_object: 9533d03cfb8ec3720fde4833d7260f4f645d6786 + docs/operations/getmodelsrequest.md: + id: ffb89fce8262 + last_write_checksum: sha1:53784ac82693cf6c8cd56b4243a697d27df2c88f + pristine_git_object: 1a66d5a3dab1d19bfe9b4f810ef73201dd702a81 + docs/operations/getuseractivityglobals.md: + id: 39aded6fc0f1 + last_write_checksum: sha1:53ccc45e0783444aa97f4e051b6ac6edc3acc588 + pristine_git_object: a67a41d74952a5d50a22e2c080f7f89fefd1993a + docs/operations/getuseractivityrequest.md: + id: 114457542fe3 + last_write_checksum: sha1:5da41028b088a42f12f4eee95f2dba4b33af5c58 + pristine_git_object: 6d4d521e2a95e4a803502e37d38a391cb525f28c + docs/operations/getuseractivityresponse.md: + id: 4176768b1f92 + last_write_checksum: sha1:d54b68325add3f560fdc88bab219153b0ebaf4f9 + pristine_git_object: 24cc9e1af56c4082bdcc2473ea7d122c6b7a7e93 + docs/operations/headquarters.md: + id: 3ccf7adf2542 + last_write_checksum: sha1:24ca86fa6e2ebabf4cb034f6e368901e5041ccc7 + pristine_git_object: 64ba03100172260705398517008edab83db1a1c1 + docs/operations/imageurl.md: + id: 3cc93f7b5a2a + last_write_checksum: sha1:f4f5ef46de9b16797c9779a2b2fefaedfd144c6d + pristine_git_object: cd90c034360cc55772c9953ee29524292f7fd9f0 + docs/operations/input.md: + id: c06b700f96ae + last_write_checksum: sha1:427fd4eb7f9fb9fb06ba0880b40a6ef8ac2ea81f + pristine_git_object: 455985900b46a8d308c755ee0f060bf32c93fa16 + docs/operations/inputunion.md: + id: 8bde108b50c7 + last_write_checksum: sha1:b04899ab29fd74e630548ec4a6982c60f0b8ae0a + pristine_git_object: 75550b62de7362443297d5894076e75569707133 + docs/operations/listdata.md: + id: 3a3029670d40 + last_write_checksum: sha1:89b37f48febc95e0e44e8a0d4f29a2bd38addd4e + pristine_git_object: a265ecacca908385ac90967e85fa375439b5702e + docs/operations/listembeddingsmodelsglobals.md: + id: 29c3a9629ff7 + last_write_checksum: sha1:a8b2d679ac7a558761e4289233d31084f4f7663e + pristine_git_object: 20150d7765210b3c5baf1fa3ecd1c2f50eecd163 + docs/operations/listembeddingsmodelsrequest.md: + id: 0f177abf51a7 + last_write_checksum: sha1:01e31efadca654393b158a6fbb21f7ed8db9318a + pristine_git_object: d3628eb9a4c4f75d511bad66af17942e2212f92f + docs/operations/listendpointsglobals.md: + id: 80acd2ab5391 + last_write_checksum: sha1:7f209fed5c7d0c7b41e4288a1a4f685c0a0bca05 + pristine_git_object: 5a8118765497e987ccb2ece257091931d6db1c64 + docs/operations/listendpointsrequest.md: + id: a3fb6a6f2c84 + last_write_checksum: sha1:f05b158c361d81ece3253b00b64a49a922a6800c + pristine_git_object: 86d4ace3b7d5d4fa12fdb871c356fc717364cfd9 + docs/operations/listendpointsresponse.md: + id: cfc28fb4b9f6 + last_write_checksum: sha1:12672b0118d4912dbf51dea68ecfc18a94654079 + pristine_git_object: d4a7a58857cc2b8681dcd4561d219b2b1aaaf5e0 + docs/operations/listendpointszdrglobals.md: + id: a2c6a0214809 + last_write_checksum: sha1:7992ef1026f739604835fbab28c5fdf28b8dff63 + pristine_git_object: 6abb940ea82d1562e0e0d915a229f40120e65963 + docs/operations/listendpointszdrrequest.md: + id: 6dabe97bb447 + last_write_checksum: sha1:98569a89d74aca1ae5c47fab1976c9fb9dba7ae5 + pristine_git_object: 727be2cdc85666532208ef7c84927440f1701421 + docs/operations/listendpointszdrresponse.md: + id: 37a957da8f54 + last_write_checksum: sha1:6892fe1fc31da14493b937171caec5f0fabb8daf + pristine_git_object: 54cf662af701995f7c04272d932f9a2e2731beeb + docs/operations/listglobals.md: + id: 32d30e56f680 + last_write_checksum: sha1:6b2661b1a208354794ee9f591c7581526d4641be + pristine_git_object: 53064e43a4cc24c142195b662f4dec2ba7218081 + docs/operations/listguardrailkeyassignmentsdata.md: + id: 6843acc9a614 + last_write_checksum: sha1:ca9dd85caae7eb06a6f61c580c66b5ad32d41585 + pristine_git_object: 285bd056cad1f40b95baa835b7f84c12db619bc8 + docs/operations/listguardrailkeyassignmentsglobals.md: + id: c1e1fe669380 + last_write_checksum: sha1:58b3d4cc562e3cf74fc46213db5792aec38900c3 + pristine_git_object: a9cc4a39cec08240575910f54e2d3066f013dca5 + docs/operations/listguardrailkeyassignmentsrequest.md: + id: c841f466ea37 + last_write_checksum: sha1:831929c0baf33a9b185d4d8e880f8f2e5b4c4a87 + pristine_git_object: e78c27159f6aadf0eb4816a0fb01badcbaaabc0a + docs/operations/listguardrailkeyassignmentsresponse.md: + id: 1d97f15080c2 + last_write_checksum: sha1:3f3539aa8e1232a5d8d226a6bf249d1d7a3f53ee + pristine_git_object: 90844cf50ba7c384520fa9fb465d14a09f7ffaea + docs/operations/listguardrailmemberassignmentsdata.md: + id: 94403dff8552 + last_write_checksum: sha1:fb4cde4456c145d180b67038810002050fc514e9 + pristine_git_object: 9b3be4f075bfb17950eeae78a698489ad2b485ae + docs/operations/listguardrailmemberassignmentsglobals.md: + id: 104391661d20 + last_write_checksum: sha1:fca243f432ac5f1e46b991c83b4ae0ac76a173df + pristine_git_object: 58ce40eb9573bf958f8063767bb57235c3d9595c + docs/operations/listguardrailmemberassignmentsrequest.md: + id: c2181183ceb0 + last_write_checksum: sha1:534f8e71454982cb56cdf22c7d825a0552d5c1ee + pristine_git_object: 2ebeffb068c574301bb63082d234b9a4a721d00f + docs/operations/listguardrailmemberassignmentsresponse.md: + id: 3148eb3110b1 + last_write_checksum: sha1:6c30414eb6995b503d153bad1349a2334eaaabe9 + pristine_git_object: ae1be1a57422c2723f6dc251c264617edc162ed0 + docs/operations/listguardrailsdata.md: + id: 13c79fcad988 + last_write_checksum: sha1:0486f7dc95a2d2fd3778e8eb3d7e5eca1861a38a + pristine_git_object: 4b94ae284ff08065b08e962f2fb9fe83c6921b89 + docs/operations/listguardrailsglobals.md: + id: ce7fe6f64d6e + last_write_checksum: sha1:14bc637a0e4375919159b6d2be79fbacde3d70b6 + pristine_git_object: 4a623f2b7664346b324037e5e099cc19a22e0f99 + docs/operations/listguardrailsrequest.md: + id: c00416201071 + last_write_checksum: sha1:383d074f5e60afa0b7dc2717891b7d7d83d79b4f + pristine_git_object: 598440f1f68dd2ca30e784014f91df327ead27a0 + docs/operations/listguardrailsresetinterval.md: + id: 880ab4949bca + last_write_checksum: sha1:59e89c6a8eed378f232370939bafe4b8d87e5c6a + pristine_git_object: 0c651fc2dc640931c9d3ebefd3bf358a514cf223 + docs/operations/listguardrailsresponse.md: + id: 0e85f301aa5c + last_write_checksum: sha1:967723e13274f3317da18372aadff828dcaf7e54 + pristine_git_object: ceb67284ea63f2d5b8610f410803a3da3b6f3a5b + docs/operations/listkeyassignmentsdata.md: + id: 878adc195a58 + last_write_checksum: sha1:d84d599d03a1876695c34c0145d2d3ab5c5fb95d + pristine_git_object: fa93d0daa4c9fbf9a7562d050bcc9e3d915c94c9 + docs/operations/listkeyassignmentsglobals.md: + id: eb16fba53032 + last_write_checksum: sha1:823375a0dc84574748befda39821c790b469a6b4 + pristine_git_object: 6c0713d69c8b9f3d7532681b73857042bf0e6474 + docs/operations/listkeyassignmentsrequest.md: + id: 0d0d4d33f476 + last_write_checksum: sha1:94be81e3988180059a5baadbf64eaa4c2f72ea96 + pristine_git_object: c3db738c6ab08b8e82b646a1a1a79309bda6eeb4 + docs/operations/listkeyassignmentsresponse.md: + id: "973479296236" + last_write_checksum: sha1:e143037d174445f03a6c8ac08d5c299636a80922 + pristine_git_object: 9f6529c7e819292ada0e013c1d4c0891eec845d4 + docs/operations/listmemberassignmentsdata.md: + id: 3631cc8c7f91 + last_write_checksum: sha1:78654bdc122895a0ec2d06a26da6723c12ce85be + pristine_git_object: 9d95d1e82a937f09a00908f9203fd89e03232276 + docs/operations/listmemberassignmentsglobals.md: + id: 4df3602b0efb + last_write_checksum: sha1:0e4513ed008550da90164df2dffdb82abb49b5ad + pristine_git_object: 7d4eb65315a19218dcd5c31e6ae67e68fdbc897e + docs/operations/listmemberassignmentsrequest.md: + id: b5c1c04b18fc + last_write_checksum: sha1:b4b348b8248f445c692654d58e0332a7de2c90d3 + pristine_git_object: 61416c7a3635130e7048ca3c8166d6b9f0f45c84 + docs/operations/listmemberassignmentsresponse.md: + id: 4dad56275a0a + last_write_checksum: sha1:6fec1c63eaed9bda69473a7eac1aa5e1046a4144 + pristine_git_object: 6a05f64587ed10bac12801ff32d5bab0556710eb + docs/operations/listmodelscountglobals.md: + id: 9d155afe292c + last_write_checksum: sha1:ad8222615eeb5f22a7dca9ad6008a97146fc22ad + pristine_git_object: 1c3931a3a1a06dd9862e488831586e56bed16030 + docs/operations/listmodelscountrequest.md: + id: bf7590298817 + last_write_checksum: sha1:41e3343e2082a2e1382fd7613bc0777ba2b02a1a + pristine_git_object: 02da5e2e3cd9d5dec1869d249ab348f1a613a16d + docs/operations/listmodelsuserglobals.md: + id: 69b5549f78e0 + last_write_checksum: sha1:55c10638b71726fda9336b32f2a2464392e25cf6 + pristine_git_object: b8ca3d373c3dce695fdc39be820d932603da5912 + docs/operations/listmodelsuserrequest.md: + id: a1486d2c099d + last_write_checksum: sha1:ca2fe8bbabe38b295a91831841f45eb8fa5c4bdc + pristine_git_object: 68b87e323737c9c05b2976022c6012fd6f0eaef3 + docs/operations/listmodelsusersecurity.md: + id: a5b7382e5fb8 + last_write_checksum: sha1:c4de0a5a996b4ad48cf50e0f5f35db05c882c574 + pristine_git_object: 3d42e13fcb006322664b3458e5399483ad0b73fb + docs/operations/listprovidersdata.md: + id: 576de3a80e5e + last_write_checksum: sha1:18f2ee1265d6335aec73bab1de1eea7a40dc6918 + pristine_git_object: ec9b21ba934ea63e8c203cd41621cf73e33ddd57 + docs/operations/listprovidersglobals.md: + id: cbf10c70be68 + last_write_checksum: sha1:00b1bc3b8b9781a6f71972c0975609a1cb6968e3 + pristine_git_object: 6aacb32d4be29dc18e901006356312491546e505 + docs/operations/listprovidersrequest.md: + id: 5beadbcc088f + last_write_checksum: sha1:3d3a5d51ab7f692658cab920debde2d3abf2aa6e + pristine_git_object: 9e96cc6d4d53196ac572a65150e6b1b1fcfaa976 + docs/operations/listprovidersresponse.md: + id: 749bf65c2ab2 + last_write_checksum: sha1:20b1f0862ecb643295b8e495178fe8d72d9077ac + pristine_git_object: 922cc65548995e12edbe83abf86732c4190c7a97 + docs/operations/listrequest.md: + id: 40bb7fe37ce6 + last_write_checksum: sha1:8fc93d41c56fad8e7dddef87513939f9216bdc63 + pristine_git_object: 0118178fafed3e05391368a4836d15bc45df678a + docs/operations/listresponse.md: + id: 14450e1d6614 + last_write_checksum: sha1:e432e29d3c7de8517cc16b59b958134ec561f09c + pristine_git_object: 255d266cb4cee8057210f820e560bba25858b82c + docs/operations/metadata.md: + id: d37b5c1d5589 + last_write_checksum: sha1:25049602671a379c289e2ca39d3097063aa509de + pristine_git_object: 87bf7e340fe3f01fac63933324afd2f25dda553b + docs/operations/object.md: + id: baee3544844d + last_write_checksum: sha1:2fba5ecf3f93c90460a972666d6acdfb597cafad + pristine_git_object: 39e8c0b8d9a5e406a04a4636556efc03072ee441 + docs/operations/objectembedding.md: + id: 7a144a9c7a29 + last_write_checksum: sha1:5f009bd24fd951128cdc546a6a5c937ab0426387 + pristine_git_object: 4f8c20dd33dceafda3362119a1cfb1e5133810d1 + docs/operations/providername.md: + id: 75b460b5d0af + last_write_checksum: sha1:a4af63f1b3fdfdd342491b3f895aaa9fb26a33a5 + pristine_git_object: 5bff3c054611c49b09a80561349d4d2531323592 + docs/operations/providerresponse.md: + id: 2e4a2f725850 + last_write_checksum: sha1:e46e252cad6be1bcc04c12fc36a3643aa3b75545 + pristine_git_object: cd0f8fb1779dd16d43f60288b44d6712f5f2573c + docs/operations/ratelimit.md: + id: 55ccfab9dcb0 + last_write_checksum: sha1:40125e5e688deec630a8c3503d9f69c4640dc27c + pristine_git_object: 635db2a1f5605d62a4a4a2dd83dbb9580cfdd8ef + docs/operations/sendchatcompletionrequestglobals.md: + id: 4ca845a0810c + last_write_checksum: sha1:da4e80f313c65f3534117604e4cb79de3516ec20 + pristine_git_object: 3256c024465d68f376df1e9498da94ce756bf320 + docs/operations/sendchatcompletionrequestrequest.md: + id: "220604035185" + last_write_checksum: sha1:c3a71c4d25935c66963331082096ae0ea641f839 + pristine_git_object: 2150e2f57e031e155668e7f85370965db96975bd + docs/operations/sendchatcompletionrequestresponse.md: + id: 354b29241c52 + last_write_checksum: sha1:baf6f1195eeabcb4742fec427127f2c33ffd9b3c + pristine_git_object: c4ba8c79c6ba3021472583b922c3ef01c4115bf4 + docs/operations/sendchatcompletionrequestresponsebody.md: + id: f89a67417d77 + last_write_checksum: sha1:3235dd5b19271fd86c2c03d79178948b1611e6ca + pristine_git_object: 4c840446aba01bd1283151184a07c582786ad9da + docs/operations/transferintent.md: + id: b95f9f6bcc0a + last_write_checksum: sha1:b7256dce12dc3cad6356e72f1a8ea5afe936e59f + pristine_git_object: f068e9ae1c42b359259b7441d9cc452353526d8f + docs/operations/typeimageurl.md: + id: 433d2dc21947 + last_write_checksum: sha1:24b83d5212d95f5e5ee95d1b9e47059613126ea1 + pristine_git_object: addee7e98752ed799d155ae114551ba3c0f9ad9f + docs/operations/typetext.md: + id: 58e69601e3dc + last_write_checksum: sha1:5abedb25856f0e45ef9b80e42cf6fe4aaeca0741 + pristine_git_object: fb9c2cfc86821cc2713c143ada5094af0e775f08 + docs/operations/updateguardraildata.md: + id: 51dea8eb28d9 + last_write_checksum: sha1:9968c751639f1a1f91080ca43c0731a8838dce28 + pristine_git_object: 2a97bda775ab6ff2eee7f9dbb16d480b6646e645 + docs/operations/updateguardrailglobals.md: + id: eb4357a0714c + last_write_checksum: sha1:3ebdcb875989055d04737285abb527a8ea30720b + pristine_git_object: d72ffed2d70092f83e5af65f6abc80e05590121e + docs/operations/updateguardrailrequest.md: + id: 655370b0fd4c + last_write_checksum: sha1:794558890881ff5441ab86671265cf6d6499d870 + pristine_git_object: 7ccfb1e1a4a236bb1a7a18026db943144111174c + docs/operations/updateguardrailrequestbody.md: + id: 17997d6d8577 + last_write_checksum: sha1:e48f8b6e4abe9765f71d07f98ffde5f7faf82a56 + pristine_git_object: 9365423254a5f86234331b4ee4985d0f0d2b6689 + docs/operations/updateguardrailresetintervalrequest.md: + id: 1e98235ccbf5 + last_write_checksum: sha1:4f28cc73ca343663a357550832b1a4f2dfb8e0a5 + pristine_git_object: b48624a6a9a7616e32da70b490784b744e02e4b9 + docs/operations/updateguardrailresetintervalresponse.md: + id: 42bdc91f2073 + last_write_checksum: sha1:8a05db87e69263da897dafb587c92067d7eb28de + pristine_git_object: 64ccf85362924e2b627c892f62c3a55e671ec7b7 + docs/operations/updateguardrailresponse.md: + id: be92b68f1025 + last_write_checksum: sha1:7e8cc3988e587e110b9aaf00d3ee0e369e36864f + pristine_git_object: 19b1364faf1136a2fdec1c6b45a3e82416cd473a + docs/operations/updatekeysdata.md: + id: 989d7ddeeb46 + last_write_checksum: sha1:82a277fe74215191e72efa6e898e9d718f98748a + pristine_git_object: 9eec6b57c3a6c1bfe6bcdc7b246df61d5b5d6f19 + docs/operations/updatekeysglobals.md: + id: fe06e9820a16 + last_write_checksum: sha1:bc44e1936abe8d3ce77e223aacb0326143a4a812 + pristine_git_object: 4588f44c69c7090c1ab11e9d2dd250118ba7703b + docs/operations/updatekeyslimitreset.md: + id: f5958b3ca67b + last_write_checksum: sha1:181e6d509793e869bb7433021c5ebe8133c4d511 + pristine_git_object: 7a91c14c09527cf868aff6fa189db2b2fd6d83c9 + docs/operations/updatekeysrequest.md: + id: 37aa3abce627 + last_write_checksum: sha1:1603455e650290825772fcd20308462e5bca3fad + pristine_git_object: 75e58386f5f7218a9c909fd8f7ca36a589f72a8a + docs/operations/updatekeysrequestbody.md: + id: fa955b3d03f9 + last_write_checksum: sha1:95bd5bee20c0ec6bef510c1dc3094a213abb5399 + pristine_git_object: 8d8ebb1e842deb8157b1d83832d1a67b424748ba + docs/operations/updatekeysresponse.md: + id: 594f08a35b03 + last_write_checksum: sha1:5f93e99eeca00cbe2af1348b390b11563867569a + pristine_git_object: bf4c26191b62070799de34a57a7d27478754527e + docs/operations/usage.md: + id: b333f5aae0e3 + last_write_checksum: sha1:41aed2c3ac763048a82831b15de181d3346d72ba + pristine_git_object: 90e936120e231dc4d16952adf15f34dba2333c0a + docs/operations/usagelimittype.md: + id: f83f3fcb36f8 + last_write_checksum: sha1:9c272d9908a57fdbd2b376e13c8fd226e7d4ce65 + pristine_git_object: 0d9e7c83f5ae8bab7f5f5cfa6e48805c00f56f40 + docs/operations/web3data.md: + id: d972a6efe20c + last_write_checksum: sha1:1d72084d83e1628573f14eaf096ce2d52cfe33dc + pristine_git_object: 18e0a9cb3ebb9d9dca10b0782fc08006b3c9e6d2 + docs/sdks/analytics/README.md: + id: 4c84abb05030 + last_write_checksum: sha1:bb8b0d3488aab3d9587698636b124bcb369cf327 + pristine_git_object: f10b397f86b982441c1be23e81772b71a136904d + docs/sdks/apikeys/README.md: + id: e2bd25998427 + last_write_checksum: sha1:fc3b72b8aa77d20784989641717c5cb4df0fddcf + pristine_git_object: 7b325c0acd88da7c15dba00a4165ee858db26765 + docs/sdks/chat/README.md: + id: 393193527c2c + last_write_checksum: sha1:95c783c0a34a00f3d6e12406a683635fc0714115 + pristine_git_object: c28f38d9890824ef84d5804b6916ab30005bfaed + docs/sdks/credits/README.md: + id: 81608135c0ff + last_write_checksum: sha1:61426e049087353ea55a2cb31fde922205e1c673 + pristine_git_object: 0d32728478dec69768c308ec202eb5d3d9a6a335 + docs/sdks/embeddings/README.md: + id: 15b5b04486c1 + last_write_checksum: sha1:93409aad79adcad06e751cb1b48907c0b261c663 + pristine_git_object: 0fb307762dbdd3bbb6b3bdb827a6a70f5a306da5 + docs/sdks/endpoints/README.md: + id: 80d3fa9f5f5b + last_write_checksum: sha1:6311913ee2c68e62fe1a590bbd5a87d16a5491db + pristine_git_object: 598fc203ed6923dea6aa6661cdc883ec62b1427d + docs/sdks/generations/README.md: + id: a7d12ae95fb1 + last_write_checksum: sha1:9b4aac4a3e0c1ca33794e72d66d9c0103136ad33 + pristine_git_object: bf57d215e03057a084452c814a186762744c4f5a + docs/sdks/guardrails/README.md: + id: f72b38a5a2a7 + last_write_checksum: sha1:d071e1bc9a8146be409aae3b3dbdd3250fb7c362 + pristine_git_object: fdcde880d4c567edffdf4df6a6a7915a3381a00c + docs/sdks/models/README.md: + id: b35bdf4bc7ed + last_write_checksum: sha1:c7013e1e1e7a5a8fd0acdfabf88fd21c761c80a1 + pristine_git_object: 3f63d9a01bb55e2d998f5e256c100458ddbc88d1 + docs/sdks/oauth/README.md: + id: 80ad2c1a7b62 + last_write_checksum: sha1:68cbfc8a92c79c02898180a46fc37fccafdae5df + pristine_git_object: 704edee5cbfe9fc00d3f639fe3d9d08d624e8cd6 + docs/sdks/providers/README.md: + id: b02aa45c0093 + last_write_checksum: sha1:576c938477d66de01f39db88b50caea41a6812d3 + pristine_git_object: b414ebc8a9ea57045833409e5deaa8aa21d283d1 + docs/sdks/responses/README.md: + id: e717bad14f63 + last_write_checksum: sha1:51d14850ac47888ead6678e6a42944314ae89e0c + pristine_git_object: ab1574e79547613ee54191690eb1de0adf254d02 + py.typed: + id: 258c3ed47ae4 + last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 + pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + pyproject.toml: + id: 5d07e7d72637 + last_write_checksum: sha1:7593c9eb167e36e170a72aade862f43ab08045c3 + pristine_git_object: 870fd0812919efc48010e6c7d9bbe46aa96c1416 + scripts/prepare_readme.py: + id: e0c5957a6035 + last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 + pristine_git_object: 03e9f9b59063c73d6f24995a77cdb971f3318d30 + scripts/publish.sh: + id: fe273b08f514 + last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3 + pristine_git_object: c35748f360329c2bc370e9b189f49b1a360b2c48 + src/openrouter/__init__.py: + id: 4514650f64eb + last_write_checksum: sha1:da077c0bdfcef64a4a5aea91a17292f72fa2b088 + pristine_git_object: 833c68cd526fe34aab2b7e7c45f974f7f4b9e120 + src/openrouter/_hooks/__init__.py: + id: 2768bef8a18d + last_write_checksum: sha1:e3111289afd28ad557c21d9e2f918caabfb7037d + pristine_git_object: 2ee66cdd592fe41731c24ddd407c8ca31c50aec1 + src/openrouter/_hooks/sdkhooks.py: + id: cec2d444af22 + last_write_checksum: sha1:4e71ec841a14e7a4ea598a02fbc2c248342dbb5e + pristine_git_object: bea18a51afb92e94dd85c09dedd566cecd468288 + src/openrouter/_hooks/types.py: + id: 265bf3035ab7 + last_write_checksum: sha1:77f7fb66371bba9fb16a209de6ff3b76eb6a5ef8 + pristine_git_object: 07ace03229fd3267623c8f48665d2c3a67c3565d + src/openrouter/_version.py: + id: d8d15ad6c586 + last_write_checksum: sha1:d8476683ff9a78259ad25f2dfc9e546390b188eb + pristine_git_object: 8d9fa361d452ddb180ae67eb92b63cb83abbca85 + src/openrouter/analytics.py: + id: cb406b5aaabb + last_write_checksum: sha1:e395dc6b6403e7a37f8cb4be2d679cd151dc6780 + pristine_git_object: 4d707db4d4b858c5b1ec1b0e57da6563191028e5 + src/openrouter/api_keys.py: + id: 876fac88fff6 + last_write_checksum: sha1:bf752210e32e95352f270876a9d292fa27f44cac + pristine_git_object: 0c1e8d0535afea2d27e6b5f7aa7e472357e79b9a + src/openrouter/basesdk.py: + id: c5733c5a1e12 + last_write_checksum: sha1:71f242fd9955e5a17a8d055e2210cc2708bb94fc + pristine_git_object: fcffdcc6eaa61a4b79f7f1f76458eeb27e8f896d + src/openrouter/beta.py: + id: fffdf54fd8f5 + last_write_checksum: sha1:64e68d68415d70fc30bb8f55491935c1c4bf7214 + pristine_git_object: 5e7c70d1f15e0699b4b4099322ef2217f66b4696 + src/openrouter/chat.py: + id: 723fdce15c1d + last_write_checksum: sha1:d6ff9357a1419cc81833e90085ae8d4e2d70a0a3 + pristine_git_object: e7855d1f5531df21d376dc9448b1ceb2fe86fbe3 + src/openrouter/components/__init__.py: + id: 81754e97b3f4 + last_write_checksum: sha1:067a64296fd5042deb6a57d067706e428fd4fadd + pristine_git_object: c61c2a699275b5c80558014eb1b6868ac6b5836b + src/openrouter/components/activityitem.py: + id: 3bbe7d35f459 + last_write_checksum: sha1:08483b6fe216e4bb2fd7205b1f6d7394af826f26 + pristine_git_object: 12c081ff73fd9e2dd5368d5222dc7a7f7e40a6ff + src/openrouter/components/annotationaddedevent.py: + id: dc032c9ad744 + last_write_checksum: sha1:1e1f68555f689211abd676734b682c57dc10b71c + pristine_git_object: 361c244fd34e9ef83db309e27a140acf74348a19 + src/openrouter/components/applypatchservertool.py: + id: fb93c63175d6 + last_write_checksum: sha1:4e388dc3b303e77308413810a0c090f760debeb2 + pristine_git_object: 0be07495eeb9ab2be9421d1a5deda27859865e57 + src/openrouter/components/badgatewayresponseerrordata.py: + id: f7a33d30d269 + last_write_checksum: sha1:338789c4e0dc85ac1c949f3b7d35127f7309bb98 + pristine_git_object: c1740ad4dfdd4c583b6fc1b4e85e1e0136bb4aeb + src/openrouter/components/badrequestresponseerrordata.py: + id: 8a9249ed4bdc + last_write_checksum: sha1:5f8d4edb53ad9fa297aab2c3ece9d43190af0fcb + pristine_git_object: caaacbde392cefe0e8be9a0991b42fa653909bc2 + src/openrouter/components/baseinputs_union.py: + id: d85e19ff642b + last_write_checksum: sha1:e8954407122f58508d4d988d601e41f4f56cf7ab + pristine_git_object: aac7cf9030e1d2b8a5c4b827a018a78da44a0d40 + src/openrouter/components/basereasoningconfig.py: + id: 8bd09a7e873a + last_write_checksum: sha1:96b2af5b716b1877b8f9a3465eb45dbac54e0ffa + pristine_git_object: 7c9263e40da48a5bc5ace8025db0d7ec4df5b16f + src/openrouter/components/chatassistantimages.py: + id: 993f9dcd8575 + last_write_checksum: sha1:0b6be31bb9c8b3bc8f2098af5b2bd12b62a710bb + pristine_git_object: c7866f6fa8967c301f6aa11b0b0431384ab79556 + src/openrouter/components/chatassistantmessage.py: + id: 16355b51794d + last_write_checksum: sha1:b322fdf991695147bc00c0a30d49cda5abcbc990 + pristine_git_object: 78199e8282f79750ec106a075031f5b80fc45291 + src/openrouter/components/chataudiooutput.py: + id: 99984fd282ee + last_write_checksum: sha1:b24a6bb454bd09fd1633380ebd8cb025eaf0b50e + pristine_git_object: 19bb084c3a33b22b1eb9017ffb81147d36b00e8f + src/openrouter/components/chatchoice.py: + id: f511174c4629 + last_write_checksum: sha1:36e7ea1e62f4e6be6a12c3f1a4832f1d9c24a2b6 + pristine_git_object: 6cb0225b86ac8abf591313167efa9c201826143f + src/openrouter/components/chatcontentaudio.py: + id: fae7bc57e73f + last_write_checksum: sha1:290b476989397cf4754c300d81aab3fd37728e48 + pristine_git_object: dc4293ec8e13838f75758aa399d4e1cbd9bdbbca + src/openrouter/components/chatcontentcachecontrol.py: + id: fa34483583b7 + last_write_checksum: sha1:b527c24061331c01b9d6b2262f703418045a0a1d + pristine_git_object: 11a86bf5470ce7fdd29146b82d5a9bc0a760a12b + src/openrouter/components/chatcontentfile.py: + id: 2a747b8033b8 + last_write_checksum: sha1:dc07f69e97578b2710f4370374710e1e593d9111 + pristine_git_object: 5101311b28c32f05c6951749dcc26467379ebeee + src/openrouter/components/chatcontentimage.py: + id: 6897abcd5da0 + last_write_checksum: sha1:a7bee3ab6a81b0a5cbabbaaec330b5de9d3256e7 + pristine_git_object: d7850d5affb888ee65c4157a2e6eee5f546eacce + src/openrouter/components/chatcontentitems.py: + id: c4253e14cbd3 + last_write_checksum: sha1:fcf9dda277b5f3bdd13f96abdff530e17dc13bb2 + pristine_git_object: 6a65c9c8fe9cc395adb9ee86f267d9e2264f42ae + src/openrouter/components/chatcontenttext.py: + id: 5301d8af31e7 + last_write_checksum: sha1:d5064f43da56d5745e899bbe98dc466966a39dd5 + pristine_git_object: 1fed3f58b99d0383d4495b616be6de7ee556b7c4 + src/openrouter/components/chatcontentvideo.py: + id: 42859cb5a9f4 + last_write_checksum: sha1:f60354c6602613f3f8628ca29330a6037fcf20e9 + pristine_git_object: 2ece45eb1a09feb63d8c1aafb66ac0094258c1d9 + src/openrouter/components/chatcontentvideoinput.py: + id: c5168472818a + last_write_checksum: sha1:f2cbf00b5d4a980e9a36720dc2512346234b36c1 + pristine_git_object: 48b8e57ca95d7dd50e7172de375eadb6d052ad35 + src/openrouter/components/chatdebugoptions.py: + id: 03e05dcf9b0e + last_write_checksum: sha1:fdd09315ba85dabd93ef0c1e9911309d58c12374 + pristine_git_object: 777d93efafd1f357560467682bc13d33c98a160b + src/openrouter/components/chatdevelopermessage.py: + id: bcba94e8d19a + last_write_checksum: sha1:25905b86816304eb3a34403cf90d76f5f050b14d + pristine_git_object: aaaf7424674b0fe89e1c8ae2446727ddf909629e + src/openrouter/components/chatfinishreasonenum.py: + id: "331394791883" + last_write_checksum: sha1:98f6b15af15986f5b3e9ac60c29bf9e5a70eeb5f + pristine_git_object: 00c38bd994222dadc92b530ad45c470e09fb2af8 + src/openrouter/components/chatformatgrammarconfig.py: + id: a852009cc661 + last_write_checksum: sha1:7148d362510561e407d81842a0a9bda113a91d22 + pristine_git_object: 9ea1098a687988f9061fb15558ecaa2e1d1ad1d9 + src/openrouter/components/chatformatjsonschemaconfig.py: + id: ab345e635f28 + last_write_checksum: sha1:a18ba704bd6ae8fbc62ae672c747e5d85e1e388e + pristine_git_object: be2887deab59168ef0ba6c703418c4622c7474c4 + src/openrouter/components/chatformatpythonconfig.py: + id: fac2069b3825 + last_write_checksum: sha1:2ada99d602a1e0f237b9afbcd80bdab3a622d92e + pristine_git_object: 7dfae30994e3dc8872e5c0a1f257ab61862ef081 + src/openrouter/components/chatformattextconfig.py: + id: a4c700b494f4 + last_write_checksum: sha1:af1072f3144f70e60e93dbeba0f386ee5e4e6ddd + pristine_git_object: 7a6140f2b8afb0cde9b031322a4284c9cbce7e33 + src/openrouter/components/chatfunctiontool.py: + id: 1fcf92f8a7da + last_write_checksum: sha1:9f7d78e0996035c68dfc1cd7dba8f946726840b0 + pristine_git_object: 22fd9cd3b196e5d82f00008772862b15998083c7 + src/openrouter/components/chatjsonschemaconfig.py: + id: d2278e414fab + last_write_checksum: sha1:69efa91d33e4767058c2d377814b820bb5104ab4 + pristine_git_object: 013154427936561c5aeb7180b325a033c26c23c3 + src/openrouter/components/chatmessages.py: + id: 3425ec393ea1 + last_write_checksum: sha1:ab650a5534acbd4f6269466a9dc1653a63fc6c16 + pristine_git_object: 7d3054f655015516e39ee6f41d946b3f722bad1d + src/openrouter/components/chatnamedtoolchoice.py: + id: 8dec655ada92 + last_write_checksum: sha1:44131d90f88d05e4d6460e96b13f776f4b209e75 + pristine_git_object: b725d19ab231201bd59feb3339fe2a65ee6b613a + src/openrouter/components/chatreasoningsummaryverbosityenum.py: + id: 8edd38b78444 + last_write_checksum: sha1:3bb67c7fd68492b13b967b49462568ea22ce79ee + pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810 + src/openrouter/components/chatrequest.py: + id: 5e39eaefa9cf + last_write_checksum: sha1:a7e22228e9fb8125f2f98286dd5bbdc02764cc42 + pristine_git_object: 0af80f72c6486dcca3f669c8023fb2158c09f3bf + src/openrouter/components/chatresult.py: + id: 9062fe2935fe + last_write_checksum: sha1:a00e8c236198ebc412448df0978ada8320cd6094 + pristine_git_object: 472df5b2091d62d509c7bc1a8db1ac6d3f765337 + src/openrouter/components/chatstreamchoice.py: + id: 356768c2edcc + last_write_checksum: sha1:cf82174e2028643980368429669ec1937f0947ee + pristine_git_object: 03e0839a13b0ab6601299dc4117e63a01b192da8 + src/openrouter/components/chatstreamchunk.py: + id: 16cdd8d4a3d1 + last_write_checksum: sha1:0ff3ca3499eb7013b97e3e8008dc41ef6e2797e3 + pristine_git_object: 59e17c203d2d8b39e2a997d9395b1fd2a468f407 + src/openrouter/components/chatstreamdelta.py: + id: 7484252729d4 + last_write_checksum: sha1:ca00bacdc826e6a5cf9aab973eba701ef22c0be7 + pristine_git_object: 540982efe82cd07b028c3c464225b8ca07c49ec3 + src/openrouter/components/chatstreamoptions.py: + id: 85e752c7d55e + last_write_checksum: sha1:9e989c9b9282d3a014d3933e6d2227ca242ae1f6 + pristine_git_object: 48eb279a4e3d4e04c484f5da2feb90e49a585fba + src/openrouter/components/chatstreamtoolcall.py: + id: 7afc3bcd51e4 + last_write_checksum: sha1:010ed05983d30593deba4018c045bcb9d15e6a3a + pristine_git_object: 0f25b0c526ecffa95f2dac92b3fe71ffd7f5ca56 + src/openrouter/components/chatsystemmessage.py: + id: 72524b9ccaed + last_write_checksum: sha1:d3113b29e851e983cb9694d6984b74316cc840b2 + pristine_git_object: e123812f43469e6755ccc16e317ab1eb1d30935f + src/openrouter/components/chattokenlogprob.py: + id: 6ddf9cf44f5a + last_write_checksum: sha1:9c91ea4df5ecd9fb2a98082a300e4ffe9a612cb4 + pristine_git_object: a52d234da8e20301a442e397d8fb58582d345ce4 + src/openrouter/components/chattokenlogprobs.py: + id: f173ce5bcc37 + last_write_checksum: sha1:8656ce700afff96f866555500521923d274c5aa7 + pristine_git_object: 037f8b50e5fa0dca36a9754ff01db39b63950ab6 + src/openrouter/components/chattoolcall.py: + id: 494372b36e05 + last_write_checksum: sha1:3f66bb07a4c3a78a3238a2ec54ed1995a5693d83 + pristine_git_object: 4788e38fabe8883e56ac44d37b350fe7c08f1f88 + src/openrouter/components/chattoolchoice.py: + id: 3188396ab842 + last_write_checksum: sha1:c78f3f3f7cb1824fd00775f95e51b79c02b0633b + pristine_git_object: 4bdebae06f62957cc2c962945714293aa239315d + src/openrouter/components/chattoolmessage.py: + id: 7c42588b57f4 + last_write_checksum: sha1:17abb79223b2c459fd20e29d2017b8440054986c + pristine_git_object: 1738954588ea6e6e498e402dc23ab619817cd494 + src/openrouter/components/chatusage.py: + id: f224a054bf45 + last_write_checksum: sha1:aabc8e93e433486fbf07147a6200dd7a6622cdd9 + pristine_git_object: 51f0bd676b3cdfcf3adf4a8a7abe54f902920f95 + src/openrouter/components/chatusermessage.py: + id: 7777191e729a + last_write_checksum: sha1:375139983530cae76be6a0f0e65665fe7c72b5f5 + pristine_git_object: c8ecec590b526ad840a2dc456e741a81f155eb65 + src/openrouter/components/chatwebsearchservertool.py: + id: 260cb1ea2a9f + last_write_checksum: sha1:0ba4039a86edfae0d2edd2e3ccc90fd43e391c60 + pristine_git_object: 48ad6da7900ec52e8290e59b3eeda43920720cc5 + src/openrouter/components/chatwebsearchshorthand.py: + id: 13091b97a3f6 + last_write_checksum: sha1:6bf695cea1ade1e8644bec9f28181eeebda60efa + pristine_git_object: 92d86d4bcc0680cc3b772a39ebdf012891ee8079 + src/openrouter/components/codeinterpreterservertool.py: + id: a72c520afbf9 + last_write_checksum: sha1:59ee01e6e91d0b9949170a9c1e45489fa08f3519 + pristine_git_object: 3342144f176dec419e453168b53ea7e3a3bd4ab3 + src/openrouter/components/codexlocalshelltool.py: + id: 74a77b6a8b21 + last_write_checksum: sha1:135cdc82ad9f65401da11274c786e471888e27e7 + pristine_git_object: ea86f79f7e10d7584621fb804ac56e7bb79578ba + src/openrouter/components/compoundfilter.py: + id: 0cab72c7a3bc + last_write_checksum: sha1:553b50c2656ddcd2b127d5ddc6b89670e2090cf0 + pristine_git_object: f4bcd5598acc997de4b2deaa3fa3c5f5403e1923 + src/openrouter/components/computeruseservertool.py: + id: 10d96ee539dc + last_write_checksum: sha1:3303ed08cb8269a190c2274fd3577c7c1a3922b3 + pristine_git_object: c1596a6463c30db9940a9ce5618a0a5e2aa91c46 + src/openrouter/components/conflictresponseerrordata.py: + id: 212cdf3bcdda + last_write_checksum: sha1:ee91dc17cf80f2aa72eb976fdf60ad4c094ca45b + pristine_git_object: fdbfb1678062f33794f10f032a13f127c35a7db7 + src/openrouter/components/contentpartaddedevent.py: + id: a074d4f3e193 + last_write_checksum: sha1:b2eaf5ef181c94a6e9f2cdde71f5eb8fd4a01950 + pristine_git_object: 8a0d0c7e6a89df258fd408d927d28d2e3b2b47b8 + src/openrouter/components/contentpartdoneevent.py: + id: ebc3878afbf6 + last_write_checksum: sha1:136ba4d68548992e58867fadd02098a37c5ccf42 + pristine_git_object: f9046afdcf5bdeab07df73495fad3b60b2e7fadb + src/openrouter/components/contextcompressionengine.py: + id: a3965275d07f + last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f + pristine_git_object: 7d5b6f700b28296f6879a4a87d65a794f3e96cb3 + src/openrouter/components/createchargerequest.py: + id: 9d406657b75e + last_write_checksum: sha1:3f249e03468bb102ea8f9345828db7fab5a61612 + pristine_git_object: 7fab3acdda03fa7a251cc290ed6cb818a261810d + src/openrouter/components/customtool.py: + id: e83b0c530680 + last_write_checksum: sha1:8c39362a8d105601a0a71d429580ac5a43ca94d9 + pristine_git_object: bc706a4a769d1e024d22b81389f849561dcaa0ff + src/openrouter/components/datacollection.py: + id: a0942bfa5b87 + last_write_checksum: sha1:481b33241b57867b54901f74d2e2801a341fcc74 + pristine_git_object: 0ab58be6bd3c5fd096e29e7b88c355832653bebc + src/openrouter/components/datetimeservertool.py: + id: 444350bd66f4 + last_write_checksum: sha1:5fba84fbab27da8328b66550cfcdd9aef7272cf9 + pristine_git_object: ced5c343d04435632a1dc5e998d44e7416303b93 + src/openrouter/components/defaultparameters.py: + id: 548f4f885c22 + last_write_checksum: sha1:4b5a1ec5c29450f60055a676685e09ea524e3c92 + pristine_git_object: 8af36cc061d64995ce57e088373394b31d6a024c + src/openrouter/components/easyinputmessage.py: + id: 72619a312585 + last_write_checksum: sha1:7cd7509a28229e5e8ce2c813a8acc68e51c86ac9 + pristine_git_object: b7a6d28c4fce743d331d637e7aa78dca9218b896 + src/openrouter/components/edgenetworktimeoutresponseerrordata.py: + id: dc53aae5b171 + last_write_checksum: sha1:5f40d76eafb399dfee5f6e5a8cc6eb94ecf3ff8b + pristine_git_object: b44fcaf3b15716035fc7bb13cac592f120e7afbf + src/openrouter/components/endpointstatus.py: + id: e935c578fce8 + last_write_checksum: sha1:8a9c8184852faf1e3ca9a478e48df41ccac6fc33 + pristine_git_object: ed5f8af0c599b1e55bb1939bc1d2aff0aeef610d + src/openrouter/components/errorevent.py: + id: 8e87043bec43 + last_write_checksum: sha1:23bbd8cfed63a979a827aedce8e42f66b5020f0f + pristine_git_object: 38fb52051a4646c60313429a8af3e5c1e788eefd + src/openrouter/components/filecitation.py: + id: ae9f50481422 + last_write_checksum: sha1:a0f00f66a78e415be312e3d70dbe3534b01a13d3 + pristine_git_object: 265b6ebd1afff4754f2f89995db5dc5e352f0cd7 + src/openrouter/components/filepath.py: + id: 9e37fa73a86a + last_write_checksum: sha1:55329bd8e0d1dbc1a4aeaa66ea443d9ec7f4ffb0 + pristine_git_object: 3afbce35ec42707a31317983382d5dc5ca108d03 + src/openrouter/components/filesearchservertool.py: + id: 8ecc4d4a0ddd + last_write_checksum: sha1:23500895c3f2aa7360c7f1f8e63ed649e7845956 + pristine_git_object: 347f0232681b0521b8ecc328813a0e3c0eab028e + src/openrouter/components/forbiddenresponseerrordata.py: + id: 93ae47a0c337 + last_write_checksum: sha1:dffd1d7517d9ad6ce139089de52a0308c2b234ec + pristine_git_object: a758f01d6d46b68516167fe9b4989cdae25bd308 + src/openrouter/components/formatjsonobjectconfig.py: + id: 4b0126b22c9f + last_write_checksum: sha1:9a42065639d0380af14f787748916a8ebb458599 + pristine_git_object: a530b83d7202df8626a379619592e71c964eabf8 + src/openrouter/components/formatjsonschemaconfig.py: + id: 93c37c13510f + last_write_checksum: sha1:6ff616ec064ffe29e6beaaf838c9bbf27c457da3 + pristine_git_object: 109f115a7afa21b2a88cefecee6330d72a9cdbb6 + src/openrouter/components/formats.py: + id: 26f57c67a9d5 + last_write_checksum: sha1:addc98a1b6687d0edbe18bed1de17af4cf17e03d + pristine_git_object: dcf042155235b73273a1e0e5ef29a505a911e98f + src/openrouter/components/formattextconfig.py: + id: 2e01bed905b9 + last_write_checksum: sha1:c192d45b9530804e6e75ec40829b50b9f1adf5fd + pristine_git_object: fddfc9b96954944ee881adc12430c9cb38aa835a + src/openrouter/components/functioncallargsdeltaevent.py: + id: 4e8187066efd + last_write_checksum: sha1:5609d2e599e47473f67d307cd77e24f8b4f231dd + pristine_git_object: b035dc305a9edbeb6f7a3240a42728f9494087e8 + src/openrouter/components/functioncallargsdoneevent.py: + id: f2f71a241c22 + last_write_checksum: sha1:c1aebd0c5adb36dc917a3512a1bd7e3543a0f9cc + pristine_git_object: 335579b1055222d8079666141a487c6eccc1ea0b + src/openrouter/components/functioncallitem.py: + id: 5e69afffd660 + last_write_checksum: sha1:a974a9001304dc4ac8b829f8436fd7491a620289 + pristine_git_object: 666d0b05553bcf21a4e48252731e8ef134626024 + src/openrouter/components/functioncalloutputitem.py: + id: bf659aa04e7d + last_write_checksum: sha1:0a12e07fb5148a167e32d96be37a98dcba3ebd36 + pristine_git_object: 5173384b7c17ab8bde006291251f101037146945 + src/openrouter/components/imagegencallcompletedevent.py: + id: cbf654faeb3e + last_write_checksum: sha1:c09c72377699dfcb9030c7353f7b9db1b955a268 + pristine_git_object: 72f087556941548dd5cbf4619f1ddceefe86240f + src/openrouter/components/imagegencallgeneratingevent.py: + id: e1a5027a61e8 + last_write_checksum: sha1:fd04a14c7cdd78778f51c0ebc2a5c0b22d167b3e + pristine_git_object: 91842cb6cc8da703c5abe8f7e00f2d2c0d576ed9 + src/openrouter/components/imagegencallinprogressevent.py: + id: 34a85e3f14ac + last_write_checksum: sha1:258165d78f66e7cf211872068f79b5905e2e5e77 + pristine_git_object: 4b9b6124f4168425e8e82e7848ff2db40bf3fc75 + src/openrouter/components/imagegencallpartialimageevent.py: + id: 8d83770569d5 + last_write_checksum: sha1:4214b25cfd389dbf53b40432c51f6a6bb4712d27 + pristine_git_object: 8be2e339feabee1471eb72f2b0d1c1d350f278c8 + src/openrouter/components/imagegenerationservertool.py: + id: 9c95bc975f2e + last_write_checksum: sha1:eb7a84cd0c722e5f630b43cd3f066d1fd5472162 + pristine_git_object: 98d922500f0ad926ae9915713eed1ce17d2c07dc + src/openrouter/components/imagegenerationstatus.py: + id: f257690edb46 + last_write_checksum: sha1:8ae33e94dc42144f3269a65834ed7d59aeab3c69 + pristine_git_object: eb59bfd0d4b89dde72504f8aa57533c689474ced + src/openrouter/components/incompletedetails.py: + id: 1984e5246b23 + last_write_checksum: sha1:494eaf7185deb1ef3b12d4e81711a8aec012445f + pristine_git_object: 56dc0963b67dead0ad9f529fd7e3275e95af73eb + src/openrouter/components/inputaudio.py: + id: f8f101a46dda + last_write_checksum: sha1:0698c45aeb49f8a15acd5ac64273d7ed3c879b56 + pristine_git_object: 0c0db5ec381b0db089364612eb22d3301995bb4d + src/openrouter/components/inputfile.py: + id: 19d9367db0d0 + last_write_checksum: sha1:5c785eb1494bf26d8d5f4c0af64464f13f69c585 + pristine_git_object: ec4f269eaf6a9f4577a7573b991eac4edef13b71 + src/openrouter/components/inputimage.py: + id: 995d068f1073 + last_write_checksum: sha1:7827e2a8eaab3a1471b8fd45dec1731d512fc654 + pristine_git_object: 9888ab5de7878104e96617c3a2a40e176d4aff86 + src/openrouter/components/inputmessageitem.py: + id: 6c5260d62714 + last_write_checksum: sha1:df17649d394440e06e567dd89343bdc35a165ff4 + pristine_git_object: 808a7fae141e9b6a56b438084808fad09da1a799 + src/openrouter/components/inputmodality.py: + id: ffa999fb401a + last_write_checksum: sha1:da607c1deed71fcc11d880b7cebe92471e2ec5d4 + pristine_git_object: 3b0c560bc9298bd40e2cdf1933ed0d5b98bb919b + src/openrouter/components/inputs_union.py: + id: 17d6239cb6a7 + last_write_checksum: sha1:ec70ed9240de14eacb0eed1cbe761eeb5376a770 + pristine_git_object: d846015e59ac03ea312649ec11ba8dd734c489d2 + src/openrouter/components/inputtext.py: + id: a995ae96be99 + last_write_checksum: sha1:768e2fa6174bdc3f5e69b8a9d4cffde625fe83db + pristine_git_object: cfc912b14c714db4b593930b4c5ab1f83017e8b0 + src/openrouter/components/inputvideo.py: + id: d262affd6f7e + last_write_checksum: sha1:60c1792ab1f440ae67b5b451fd4d195e02783161 + pristine_git_object: 3a2e1e59d105fa0fd794c9b8f3fa1fe51363c83e + src/openrouter/components/instructtype.py: + id: 411acdbfeb84 + last_write_checksum: sha1:6cc1744db62a53dfa1425c8cab508f5538cd3d50 + pristine_git_object: 4a58daf7d055e111ebf204b18ee413203f06b745 + src/openrouter/components/internalserverresponseerrordata.py: + id: 91397805fa13 + last_write_checksum: sha1:cb5655008ac7209608b832f0d28de8c21a0831c5 + pristine_git_object: 499f4923723d9e027cfc90e8481de44a123134b0 + src/openrouter/components/legacy_chatcontentvideo.py: + id: b06bf8b4b644 + last_write_checksum: sha1:13c50b1957251e4819fc8ac6545c64cfe940bc8f + pristine_git_object: b5dd4d1a0d29169acd66c3b92b04dd9cf5291f79 + src/openrouter/components/legacy_websearchservertool.py: + id: 8b28b05b8756 + last_write_checksum: sha1:2940666d2a72ae6ed075161b12c0004114851e06 + pristine_git_object: a04ab37fe6de98cb1070699df82c43410c33eee8 + src/openrouter/components/listendpointsresponse.py: + id: 7662d5774bdb + last_write_checksum: sha1:64dec808abc7a17b683d4db714b7ad7393d9c5bd + pristine_git_object: f4f947a311b93bb92cc9b6b4e1ec68c7a0f7a40c + src/openrouter/components/mcpservertool.py: + id: bb8aeb03a111 + last_write_checksum: sha1:59c63e9d3f8d59b08531e7b1edf2c2065efc6933 + pristine_git_object: c613dd3a3cd29b05646542fcf074ab9e702f36b9 + src/openrouter/components/model.py: + id: cef3adaa772b + last_write_checksum: sha1:96ed6b4e7899e632fa9e5e95ba70fca5d131207d + pristine_git_object: 256a8d288ef8fa55361c5aee04cac5ea7138efca + src/openrouter/components/modelarchitecture.py: + id: b37ac27e512b + last_write_checksum: sha1:bcd6d2ecddaa07eef2c60a46185cf41203a940c9 + pristine_git_object: 656f0c00b4e1f78ed6f5e792ce0f14e587da9cc1 + src/openrouter/components/modelgroup.py: + id: ffb5492b0d39 + last_write_checksum: sha1:5630b3d23157cbb8e7daa785338c37e46a0cf078 + pristine_git_object: ae6ee9e563fe319f0f5083789689b8ae91471e8d + src/openrouter/components/modelscountresponse.py: + id: c08f960ac611 + last_write_checksum: sha1:5203d03794da7f92723b9157998798f1d0ae09cf + pristine_git_object: e80d5135bfed4f0a8ab9956a8855892ae9efd8d2 + src/openrouter/components/modelslistresponse.py: + id: c2d4bb2cac89 + last_write_checksum: sha1:54bc618bea7ddcaa4e49082d601065c634fb2ea1 + pristine_git_object: 8497c58e5956b9344427e0147063b01ab86c7001 + src/openrouter/components/notfoundresponseerrordata.py: + id: 6ebceef7a039 + last_write_checksum: sha1:b57cbe36f5a56241d3736f59a6a10f974751feb4 + pristine_git_object: 5b8ca0ce252ca2fc909770c5c338793b05877a91 + src/openrouter/components/openairesponsesannotation.py: + id: 092d7d770eb3 + last_write_checksum: sha1:54d0c47c3486c15abd9a45622fa31607a946eaf6 + pristine_git_object: 1303f981ea1190c46bfcc6e538995a7a630fe4ee + src/openrouter/components/openairesponsesrefusalcontent.py: + id: e65dad8b00d3 + last_write_checksum: sha1:724d8cb2464bbb3a3ca6650961a5bf7d5fa0847f + pristine_git_object: 9500782547b2a7e58179d94f615d07c780e2a9e4 + src/openrouter/components/openairesponsesresponsestatus.py: + id: 8178c2b14bdd + last_write_checksum: sha1:0adab12817c56d82110d8fe2a7f08863f32003ba + pristine_git_object: cd39badb7af07d0bb5390e687427aebd6230ea76 + src/openrouter/components/openairesponsestoolchoice_union.py: + id: 1a0b229049a2 + last_write_checksum: sha1:8fffa04d07c64ab204c30f8f5dab0a20e277e5cf + pristine_git_object: 5db29bbc6640b8baa5f520de2f283cc760edc06b + src/openrouter/components/openairesponsestruncation.py: + id: 0c92464e7292 + last_write_checksum: sha1:5df4098cf0472d2df40fdcc1350f81d6059a9ab7 + pristine_git_object: c481d06cfb216c14cb5da8ef37526b64b1f6cfc9 + src/openrouter/components/openresponsesresult.py: + id: 78f7e33b19e6 + last_write_checksum: sha1:3f479eb987a35575cf7697bc182b52b43433385f + pristine_git_object: 7d7ae0a2e885a2b9a7aea640e73c600f4106fec2 + src/openrouter/components/outputdatetimeitem.py: + id: d7784d04fba3 + last_write_checksum: sha1:8126a324273007fd013dc8690409b45e7bd5f78d + pristine_git_object: d11192eef18693538137ad5a8a965b74f5045e48 + src/openrouter/components/outputfilesearchcallitem.py: + id: 61b88e4356a3 + last_write_checksum: sha1:ce9f9d53babfea56dc763955f6db6839329748ad + pristine_git_object: ce347e9432e00b57eab3dda08bea6c02bcc66345 + src/openrouter/components/outputfunctioncallitem.py: + id: 516ed67b5406 + last_write_checksum: sha1:074a4da1944fc9820aad080b2b2542a797d1b045 + pristine_git_object: f82f43bce7acf855be5986e14cb8dd613e88878c + src/openrouter/components/outputimagegenerationcallitem.py: + id: 48d20dc00e1c + last_write_checksum: sha1:fb120f939b41d9ca80ba8bbf154cb9ad6dfa28af + pristine_git_object: 2347dba6d8f66add652d655257cf5f021e4f8596 + src/openrouter/components/outputitemimagegenerationcall.py: + id: 0b4cbdbd733f + last_write_checksum: sha1:7e6ec3f9f8c20b44467f67eb29dbc735e0d2b97a + pristine_git_object: 857deaba996e9a3715bd188fea07c5e296b872a3 + src/openrouter/components/outputitems.py: + id: 90f107de3116 + last_write_checksum: sha1:394b6cdb81bb81e98401900dfaf65ddb0906d72a + pristine_git_object: 1936438d4a5010761b4c128136417b93b4f7b689 + src/openrouter/components/outputmessage.py: + id: c6828e87dbd3 + last_write_checksum: sha1:b608203c0fc29d1ce893504381f4444ffa09c550 + pristine_git_object: 497bcc03ffaa9d8db9ce253a56180bc92a15375c + src/openrouter/components/outputmessageitem.py: + id: 97dec64e783f + last_write_checksum: sha1:9bd2266f0c827b0ca854ee6b847559994eb5b2dc + pristine_git_object: fbe391becfa3c8baa417adb66374518d39e0a501 + src/openrouter/components/outputmodality.py: + id: 74c79e4cad45 + last_write_checksum: sha1:2f3327bc4da37835c4819749e6d4aef81afbc274 + pristine_git_object: b3120b07d91e2391b157cb695dc3aebb323e5899 + src/openrouter/components/outputmodalityenum.py: + id: 82bebf193d55 + last_write_checksum: sha1:2983ef9a3c82244eff5f8b1184637a1fef13573c + pristine_git_object: ccd5283d0d31048059abf6ff85677b5d1f9f4b7b + src/openrouter/components/outputreasoningitem.py: + id: 0bc0568f44f9 + last_write_checksum: sha1:06912ef8f32e785c0df069bb534296c168830ec8 + pristine_git_object: 5ab5d77ec8b163b3ba7220a31d4a6bcb9ccb09b9 + src/openrouter/components/outputservertoolitem.py: + id: 8f675ae75ccc + last_write_checksum: sha1:2168af0cc9366a855b61a77293b690aebfc98c50 + pristine_git_object: abfbff581efdd88f8aeaa27b385502d60f4f02ec + src/openrouter/components/outputwebsearchcallitem.py: + id: 8c94cd441023 + last_write_checksum: sha1:55ce991f9816055cc01fbd5dbfa6c6b37f3f0500 + pristine_git_object: 84d048cbef1cc78cdca6b65c1cf64cc970681720 + src/openrouter/components/parameter.py: + id: d76aede00388 + last_write_checksum: sha1:b78beaed494f5267301b0125960c26ef20011441 + pristine_git_object: b84cbf0a1ddb6ffd07ae9720d0a78954d7f0bbdc + src/openrouter/components/payloadtoolargeresponseerrordata.py: + id: 5209b3a61cc9 + last_write_checksum: sha1:ba13b793314af45716d3ed5572abaad213d01850 + pristine_git_object: ee1a068a86dbfe24300a5ee6220dcd90c6a860d9 + src/openrouter/components/paymentrequiredresponseerrordata.py: + id: 9a2591c3e458 + last_write_checksum: sha1:351fc58b6c4d4411e75389ef73b7f20744383822 + pristine_git_object: 83abd1e8a1155c9b715dcb00ea854b65868cd2aa + src/openrouter/components/pdfparserengine.py: + id: 7de19e0839ba + last_write_checksum: sha1:8863b097a3f85ef7cb5c73101db8cebafac81a37 + pristine_git_object: 36c5f8f3b56ccd23df6f7a4bd30a6c834359fd25 + src/openrouter/components/pdfparseroptions.py: + id: 704219f4af59 + last_write_checksum: sha1:ebaf4590ad78b4082b86fd9689ae447ab787a7dd + pristine_git_object: 4510e737dd18154f31fb91ea607db550c11f8290 + src/openrouter/components/percentilelatencycutoffs.py: + id: 00ca8d5c0100 + last_write_checksum: sha1:81d6bd48f353122c5106ecf3a8540588876fb2d9 + pristine_git_object: fa8175fcefc672bad9edcc8612dcc447723a723e + src/openrouter/components/percentilestats.py: + id: 9c88efe57f70 + last_write_checksum: sha1:c66a32149756893be4e46f16bf166cd9e36dd9f0 + pristine_git_object: e979e11469df4f37098d5804ffd3e5da217468b9 + src/openrouter/components/percentilethroughputcutoffs.py: + id: 652397163aaa + last_write_checksum: sha1:409e8a4c017d03a4f852bdbfae874fd126a434d5 + pristine_git_object: 17b28ced7a9ad1df064a5509d55b1ead8cb2a4a5 + src/openrouter/components/perrequestlimits.py: + id: 5a170d7d1f2e + last_write_checksum: sha1:0828a3a91c51ece02fda34da9c045dfbc4a49015 + pristine_git_object: d83c7d1d274a151720e92741fe20d1009bd841d1 + src/openrouter/components/preferredmaxlatency.py: + id: 20675ae045ba + last_write_checksum: sha1:279e300348daf2d15744ee9e0e6520639e95dfd2 + pristine_git_object: 523f7c9fb0e1a2be719b14c0e18409acaf222588 + src/openrouter/components/preferredminthroughput.py: + id: 3b95bff6e301 + last_write_checksum: sha1:74d3094c6b5ae6f1dd36d5714415d0cc416acb3e + pristine_git_object: ceb4be7e491c27a88e8c5987268e9cea098317e8 + src/openrouter/components/preview_20250311_websearchservertool.py: + id: ecfe1a37c34f + last_write_checksum: sha1:979b40bd602579cb09071bc167e4b6ddd59813bf + pristine_git_object: 883019b2be1b45b512a8f197910db36ccec47ae3 + src/openrouter/components/preview_websearchservertool.py: + id: 9c02777285ce + last_write_checksum: sha1:ce8d7487fe3cdba6526d956cf04840baccb6a43d + pristine_git_object: 0903c5a4bf9a57aea88673f266a6ce58db88863b + src/openrouter/components/preview_websearchuserlocation.py: + id: 40414eada27a + last_write_checksum: sha1:52707a8a06e2c03a4c671f909e42c6d1da6dabed + pristine_git_object: 72dd15242d7d35b2b493f90d0cdebf6f8a51d684 + src/openrouter/components/providername.py: + id: fcc722fa2fce + last_write_checksum: sha1:eb2c77e4fb86b3b7d34fde52cc9046791da32d32 + pristine_git_object: 413ecfcfef7cd94854eb677e2df7362847f953e4 + src/openrouter/components/provideroverloadedresponseerrordata.py: + id: 5b693682570e + last_write_checksum: sha1:41a977452d58b52cb9d4b3a85f4b7970529352d5 + pristine_git_object: f3d7756851495a1f1cdbf62fd62d20ff0ea07bf8 + src/openrouter/components/providerpreferences.py: + id: cdd58c8d664d + last_write_checksum: sha1:a480fec760655f5ab494ae626ba2c28fdb3cd3af + pristine_git_object: 819a6daf6a28c4ae98f20c39219ded335a9ae6a1 + src/openrouter/components/providersort.py: + id: 348e382bf494 + last_write_checksum: sha1:57551507f95cd2e16ef995e1c13f859fd0726152 + pristine_git_object: 7325f369b561dc4bbc73cdd97c72526c718d1085 + src/openrouter/components/providersortconfig.py: + id: 02719ff8dcd5 + last_write_checksum: sha1:349b29e136a62cfd3f7cba439fd958797ac4ee31 + pristine_git_object: 4e1073b4e3c10943c7035376f9984cd6559653a2 + src/openrouter/components/publicendpoint.py: + id: 848aa2ef9129 + last_write_checksum: sha1:37068961163092b9c887c0d9c82ba0ebf71a2a68 + pristine_git_object: 522f96bea1bd83abdd2cdf63020d078127feea7e + src/openrouter/components/publicpricing.py: + id: 96d115d83cc5 + last_write_checksum: sha1:9d57a7c06bf1db89dd6dfd3742e6d78ebf0fa99b + pristine_git_object: 0aef8d6ec575304043c57a355090e70066e6ff1e + src/openrouter/components/quantization.py: + id: bde317b3d703 + last_write_checksum: sha1:96b042899bfb818f20d282be76ad37fc948a599d + pristine_git_object: dfcecafdc6d2a3a3dbc7beec2f07e1258415b2b4 + src/openrouter/components/reasoningconfig.py: + id: 754fc31a7b69 + last_write_checksum: sha1:66f29e2f1a3c1537ab4d908606fb6c88873f3c94 + pristine_git_object: 513a56db69e31d6de0802ae56a64a4329bef0065 + src/openrouter/components/reasoningdeltaevent.py: + id: 6de06228d1f6 + last_write_checksum: sha1:c3a5e9b7210fc55ed26cf3d6f46077e2e5353547 + pristine_git_object: ef4af5f31e138ce1f293e28ee7fc9a2416124a55 + src/openrouter/components/reasoningdetailencrypted.py: + id: ae7d7526c9b5 + last_write_checksum: sha1:8bb3019754e8ab1cf0eb57c970c4bc1766d4f1ff + pristine_git_object: e8d1942f72ce4119989984db134db1bffdf5f68b + src/openrouter/components/reasoningdetailsummary.py: + id: 53bda5c72dc5 + last_write_checksum: sha1:27834e781ae9a8f32d5e35ff5463ddea20945992 + pristine_git_object: 19be6e512498314e715d31c99caaea8c595b13d5 + src/openrouter/components/reasoningdetailtext.py: + id: 62f254529b87 + last_write_checksum: sha1:dd1dc4c54ea5b2b8f5f176eaf1a10d655ab922b1 + pristine_git_object: 422067df630370298f029e2e60bceec05bcbcedc + src/openrouter/components/reasoningdetailunion.py: + id: 3326e0b80cdb + last_write_checksum: sha1:62dee592ffc9a930890e9879342bd37ece254285 + pristine_git_object: 636473021e0c5b515e38996a7576c70d41702ec9 + src/openrouter/components/reasoningdoneevent.py: + id: 5d7fc847e949 + last_write_checksum: sha1:e34f1cf97579f73ce5af1f9b2861c02f0e1b4abc + pristine_git_object: 3dcca9ff97e12328e3cb817bc811f039389c1261 + src/openrouter/components/reasoningeffortenum.py: + id: 98c047f96d0c + last_write_checksum: sha1:e3816f21742509719ceb9c00bd462aa2c2babe93 + pristine_git_object: 58d10b54a154bc72ea9766717ad0a9d66767797b + src/openrouter/components/reasoningitem.py: + id: 4345f446ad97 + last_write_checksum: sha1:1abd8b76fe628a073eb43ce6acc35a5a8ae1e108 + pristine_git_object: 9fdf1e6712e991f1fea6100cc53d733143588726 + src/openrouter/components/reasoningsummarypartaddedevent.py: + id: 006a060524d6 + last_write_checksum: sha1:6ec4fbbf0f7c3164078be3028d2369660377f392 + pristine_git_object: 1c451f8d2c184a05e211606bbee9ee4dd7ea948b + src/openrouter/components/reasoningsummarypartdoneevent.py: + id: 47e4f3e87c57 + last_write_checksum: sha1:62631df0a15d925544662b341929a90318a6955e + pristine_git_object: f22910435d017ff8cfd8d8d14a2ab2a20110e1af + src/openrouter/components/reasoningsummarytext.py: + id: a1dc6f00beb5 + last_write_checksum: sha1:c75be0683c4f90c725462eb635e37eb2a5afeb42 + pristine_git_object: 55e368fe9328dfd157bf0af79e200ac03dd1ff4b + src/openrouter/components/reasoningsummarytextdeltaevent.py: + id: 979527a4c6be + last_write_checksum: sha1:e559d46426275ab09822caa2cc2faf0f2d4f56bc + pristine_git_object: f5070ae6f8ef31598efd49049304e40eb1a04ac6 + src/openrouter/components/reasoningsummarytextdoneevent.py: + id: 326dee82fb46 + last_write_checksum: sha1:02e13d39eaaf275be48cd198d7ddbbb0ce436d85 + pristine_git_object: 2f0d77b8927f05fc4c9ff66230c248c7dccadf47 + src/openrouter/components/reasoningsummaryverbosityenum.py: + id: 65e0332c8bdc + last_write_checksum: sha1:b800a2c14bdadce75c099474755abbc3b8fdfd68 + pristine_git_object: 6cfcfb3743c593235446f93e552450fc4deee5a2 + src/openrouter/components/reasoningtextcontent.py: + id: 39e110f99aee + last_write_checksum: sha1:a0984180feec0759f24993f34d5ef88c8ec55723 + pristine_git_object: ecac43e98ab55ddc69cb9c95cc563653a7512f83 + src/openrouter/components/refusaldeltaevent.py: + id: 35558498ab4b + last_write_checksum: sha1:ea0266c203133fa91cec08475c5becf9f8a2d13a + pristine_git_object: fa8e88016faf5bbab83d9e2610d1fcf4d5183031 + src/openrouter/components/refusaldoneevent.py: + id: 57605bfcaca3 + last_write_checksum: sha1:de35056359d2a07c5f529d80503ba7d01fc3f846 + pristine_git_object: 78652316aa2ab2168252e696343a84a96fd1ad56 + src/openrouter/components/requesttimeoutresponseerrordata.py: + id: 2c5f5ceaf22d + last_write_checksum: sha1:2173f6ce9aedc0f4afbb76167bae56d0db186ebf + pristine_git_object: 50be74aa7d8198c25ecf4d858077ddded9fb740f + src/openrouter/components/responseincludesenum.py: + id: dff573cddd73 + last_write_checksum: sha1:71e46afb70c23cf988579d27b6df3ebf421f1684 + pristine_git_object: 9da58c5b22cbe284a9fa130b63c7d8ead77669c5 + src/openrouter/components/responseoutputtext.py: + id: cbc203c3ff40 + last_write_checksum: sha1:63efd82c28381d4463843500ab297528d4d97b01 + pristine_git_object: b92a2b126463dadca4cd157284a3b5245c39af04 + src/openrouter/components/responseserrorfield.py: + id: 565a88fd70a1 + last_write_checksum: sha1:3efa77fc8cd3aeef21266d3dcbf47717f7856830 + pristine_git_object: d3c77624292ba0985104a6125e462c305a633d84 + src/openrouter/components/responsesrequest.py: + id: 8c850080ec5d + last_write_checksum: sha1:705af4e77d8cd3d6359ce0fce589a318f50c7024 + pristine_git_object: 122a0414503f50c38e178bf9b2f3535af953269b + src/openrouter/components/searchcontextsizeenum.py: + id: c246413c0bd7 + last_write_checksum: sha1:863a664a9f17def86180b0407c8233c263acfae7 + pristine_git_object: 7faa97b80bfc0d362fd89c255adb708a4f7afc05 + src/openrouter/components/security.py: + id: ae2ca334218a + last_write_checksum: sha1:e6bfa94172df4c823ed9dd83b9b2614e6890d462 + pristine_git_object: 1870d08b6911340102b37f396673f35e4c8b99f1 + src/openrouter/components/serviceunavailableresponseerrordata.py: + id: 606d51d201e8 + last_write_checksum: sha1:8b76218af34c1287190b8d4ac5d7fc3545bbbac1 + pristine_git_object: 0b28bb2db7b7c195366e992bb71c03ac30cf9280 + src/openrouter/components/shellservertool.py: + id: ac0e4bd3caa3 + last_write_checksum: sha1:06f390a37d82c115be033bcfceb3e99b30e1fc92 + pristine_git_object: 7e26325a31eb3ed1dbd4323a0e61afc1f6bd885f + src/openrouter/components/storedprompttemplate.py: + id: 6be99e870ecd + last_write_checksum: sha1:6b7d17641d9e2b52010962cb586e32f99254db79 + pristine_git_object: ffb7a43e64bfef2809683fe60a5d17744ea345c3 + src/openrouter/components/streamevents.py: + id: 331636234c76 + last_write_checksum: sha1:49d5c11087cb3c2efdaa05067ac7dd6cb2d26187 + pristine_git_object: 58d269412183bc509ffa8e2fd0662f736331a1c2 + src/openrouter/components/textconfig.py: + id: cbd40c12b745 + last_write_checksum: sha1:737f5adabb641d1d30152cee2f9a8db1e43d697b + pristine_git_object: cf8fa534d38146d0734b6161264406d5d53b7955 + src/openrouter/components/textdeltaevent.py: + id: 6d1d416a373d + last_write_checksum: sha1:4d5beac405628644601e3495c8e2374ea36eb5d1 + pristine_git_object: c42bdbc2cb069e20dca83f071b9263b7aae83d69 + src/openrouter/components/textdoneevent.py: + id: 63884cd6f224 + last_write_checksum: sha1:dcf19ae3f92d11359ddc43e06701f9be89e5eb69 + pristine_git_object: a21655a423b92e8a4a5bccb789e2768b28049c93 + src/openrouter/components/textextendedconfig.py: + id: 150a449e46de + last_write_checksum: sha1:8e6dd8672fcc687c8a930c533d94daac4bb4ce5d + pristine_git_object: ee561b18699c16f952bc036a2d0903e0ea3a8d9b + src/openrouter/components/toolcallstatusenum.py: + id: 08e406c73b69 + last_write_checksum: sha1:677017415ce127b7d07a501585244306d5306a35 + pristine_git_object: feeccd7c2e4b9f3268cd2da11965e1e39183875e + src/openrouter/components/toomanyrequestsresponseerrordata.py: + id: 4dc67ae011a1 + last_write_checksum: sha1:e30024f0469a52dd7d249f8bc3b8c2cd28212790 + pristine_git_object: 19fda103cedcccd94e8feac9ee0a069454b06868 + src/openrouter/components/topproviderinfo.py: + id: 0517ce43cc77 + last_write_checksum: sha1:4a111af0fd6c2c83146b57035a9ead8f4c7b8d04 + pristine_git_object: 791263586bb834b9e8fc156d057c98413a52dffe + src/openrouter/components/truncationenum.py: + id: c28e5ced6582 + last_write_checksum: sha1:ddf1b1b96ee9864f36f9ce5eef2a00cfa5c526a3 + pristine_git_object: d848ca9e2bc6ec7219eb408ebf3b32c238bdb128 + src/openrouter/components/unauthorizedresponseerrordata.py: + id: 7d9755fc8395 + last_write_checksum: sha1:d614e72cc67bf6c4da7f57cf0f4367de726ec06d + pristine_git_object: 0fc3c7c3991891ae00ae2f624df78d21e0ae05a8 + src/openrouter/components/unprocessableentityresponseerrordata.py: + id: e8ca4a51f994 + last_write_checksum: sha1:d9ff0dea491e12d5ccb28607eb65f00fe8d694aa + pristine_git_object: 1c70ab3d8b23363543675abe5d3b3566aea113e7 + src/openrouter/components/urlcitation.py: + id: fe4578e64ea3 + last_write_checksum: sha1:e78bb25f909d1111245ee54b1c65855f4157059d + pristine_git_object: f5ad030dd383deb69b0bdfe15e9c87bb3c5de09b + src/openrouter/components/usage.py: + id: 965ca6748bf6 + last_write_checksum: sha1:1193d530ad11861f2b0f6fc7b2d329694a91de46 + pristine_git_object: 37e41bfe89a17e316de7ea20ef224dfdea92e20a + src/openrouter/components/websearchcallcompletedevent.py: + id: a5818af2b521 + last_write_checksum: sha1:818bd52b535c64998a9346722da3e7c69b9480e9 + pristine_git_object: 3e4c846c837b84edbbe7270e29b54956a0e6a314 + src/openrouter/components/websearchcallinprogressevent.py: + id: fc52afdffc58 + last_write_checksum: sha1:4d98068cb44767cdf2257c90e41b150badb0fd95 + pristine_git_object: 1bd1ad010f4b22ed961c8b4adee3945b8b27dd36 + src/openrouter/components/websearchcallsearchingevent.py: + id: 2aeb2f7f322d + last_write_checksum: sha1:400eebe552981a583ea943f902e608b6da81cea8 + pristine_git_object: 3d93cbc8b841f85413aad87fe31228a38fa721fc + src/openrouter/components/websearchengine.py: + id: 9e028088afc7 + last_write_checksum: sha1:d549940c1ee74aa82d7aff4ff3ce6846a8ff20f1 + pristine_git_object: 992db72e3236a262e2d93d2ed58f0ae44cc194bc + src/openrouter/components/websearchservertool.py: + id: 32c7333e3c21 + last_write_checksum: sha1:70a7a97879b318f8c63329050ae2ff2a841f42de + pristine_git_object: c59e38ca50e39c919bbaeb47972192b184b6161b + src/openrouter/components/websearchservertool_openrouter.py: + id: 3fcedc999f5b + last_write_checksum: sha1:02e8045a02fc9f658d5ba1e309933033f85126fd + pristine_git_object: b624ce7a6cb3772047533b57c5efa48fa5ff4cc5 + src/openrouter/components/websearchstatus.py: + id: 639330492ee8 + last_write_checksum: sha1:bd1285ae6b8fb2695468777c7b22d94ce06b520e + pristine_git_object: a607c88285f5f8b8e0f057750cde1b6cd14244df + src/openrouter/components/websearchuserlocation.py: + id: 26eff9609a46 + last_write_checksum: sha1:c39b72d0cc4dc694be1fd636926489f6f6b05dfd + pristine_git_object: 4ffc90b3f040fe0f18cad97cfa5220c7e5d26018 + src/openrouter/credits.py: + id: cdc961937101 + last_write_checksum: sha1:79ad92c18672321880a482bf32261488d9e48f32 + pristine_git_object: 43b95ff543d311823595bcaa754fa833cc831a2e + src/openrouter/embeddings.py: + id: 0374ace39067 + last_write_checksum: sha1:a491c4af1fe4bff2400012c19dc35f52a8eaca68 + pristine_git_object: 0709e4140b7304866b4c86a96918ace2555e8106 + src/openrouter/endpoints.py: + id: 465bbf2b7939 + last_write_checksum: sha1:ef1e846a154f78df6c3c238a217fc1bd31712a47 + pristine_git_object: 09823d301c103f8e65e9fb2b2153ce7a1d424bd2 + src/openrouter/errors/__init__.py: + id: 366154d0d60a + last_write_checksum: sha1:84e5bdd52a3e99fd8bbbd718fa4f075ae0df4f64 + pristine_git_object: dc5ef68c20dea9461abf913779f5f0e21defc829 + src/openrouter/errors/badgatewayresponse_error.py: + id: 818c3605ce23 + last_write_checksum: sha1:d9d2599c2be63be36d3891bc94e34535edb3f05a + pristine_git_object: b2138fd9fffc06d1715ecca8bf6dab150b3096fa + src/openrouter/errors/badrequestresponse_error.py: + id: 562928a0bbcb + last_write_checksum: sha1:dd8028bd3e353b2a279d0287393266f61337dac0 + pristine_git_object: eb34f266301fc7ba48b8d1403c5f4cf7e3291295 + src/openrouter/errors/conflictresponse_error.py: + id: 2411f691a552 + last_write_checksum: sha1:5dde74d955027d3d1ba8cbd5b19fc0a26538a55d + pristine_git_object: 4c23784060e905d4dbd1416f0060b2ba3a302c43 + src/openrouter/errors/edgenetworktimeoutresponse_error.py: + id: 2a740d29452a + last_write_checksum: sha1:11e8880778c0f2be20cb4c10e73daf5c8eb7bcb2 + pristine_git_object: c2881a581d72c7b444003ecd974dc0e38218afad + src/openrouter/errors/forbiddenresponse_error.py: + id: 4c1d3e6c95a4 + last_write_checksum: sha1:930eb57082f282587d05c77b243990d4bc32fdec + pristine_git_object: f9fd3e58e09630c176f4868c6a962c96c630eb8b + src/openrouter/errors/internalserverresponse_error.py: + id: a5ab5c4a53a9 + last_write_checksum: sha1:f91e21d4022b0ede924736ab9664e63d73e64b55 + pristine_git_object: 2d8be8210d37497052c01738f86f8520b1ab737c + src/openrouter/errors/no_response_error.py: + id: b8b987b5e306 + last_write_checksum: sha1:7f326424a7d5ae1bcd5c89a0d6b3dbda9138942f + pristine_git_object: 1deab64bc43e1e65bf3c412d326a4032ce342366 + src/openrouter/errors/notfoundresponse_error.py: + id: 283f4657fb1c + last_write_checksum: sha1:d678c505934d319d79c75e73a5d28e2f7eddda64 + pristine_git_object: 99c3f9feba614b608c0a5fe33fdfef773fd20e2b + src/openrouter/errors/openrouterdefaulterror.py: + id: ec1269b0a602 + last_write_checksum: sha1:c7e323985411ebc622a365df7d1560db134e5fb8 + pristine_git_object: 385e3ec7f830de2126281375fb343ff6719355ab + src/openrouter/errors/openroutererror.py: + id: 6ac00d5cfc54 + last_write_checksum: sha1:ff073c3d99d301b8c0f4dfede47106798a69ba31 + pristine_git_object: a3218e9a6bc8dfa4093c179225507d55e0dec027 + src/openrouter/errors/payloadtoolargeresponse_error.py: + id: 94bb184d04ae + last_write_checksum: sha1:c2880729e81e6f5085bb4007b111242202237bb9 + pristine_git_object: 8b9daa272db8aee6adfbd4105124c1f4adabfb12 + src/openrouter/errors/paymentrequiredresponse_error.py: + id: 323b9c0a7cdd + last_write_checksum: sha1:7829364046b6dba0f27ed58acae3506ae516253f + pristine_git_object: fe3b3c202d614b1cf15fff5629a0245f0deaaa38 + src/openrouter/errors/provideroverloadedresponse_error.py: + id: 78dc52b11d59 + last_write_checksum: sha1:d73ada51520ca201ebd0ebc828513e333c3a4a43 + pristine_git_object: bdb7061a773907ab29bd9da4e38b492af8886b22 + src/openrouter/errors/requesttimeoutresponse_error.py: + id: 74f87b9d42d2 + last_write_checksum: sha1:82642353a23643f25d2541f6b3801a80f5003c6a + pristine_git_object: 4937892a72d007b48f6852eedebc00db84c425b4 + src/openrouter/errors/responsevalidationerror.py: + id: 861959e3671e + last_write_checksum: sha1:96842d22bdaacde74bc581692af0230b4aa2684c + pristine_git_object: 8d0d6fd5911c93c00c6a272d3c91ff16573f468b + src/openrouter/errors/serviceunavailableresponse_error.py: + id: 18cc83a0fd00 + last_write_checksum: sha1:b9eb34e98c775abff6c18e756039aad1751249a4 + pristine_git_object: b94cfc22f031873c995c5e8fb9b334387c886c6a + src/openrouter/errors/toomanyrequestsresponse_error.py: + id: a3f4058d56a1 + last_write_checksum: sha1:b83e40a5ee6a542d13ed6e5abc65002c87d3c33d + pristine_git_object: bdf7914607cccd54fec4be42edd20b4aee00e069 + src/openrouter/errors/unauthorizedresponse_error.py: + id: b26af31a1ee9 + last_write_checksum: sha1:3bf21eac6390dad775f1c75e537cd324cec99650 + pristine_git_object: 7f9c5a66ea59adc6989a7e0e5fd731d542c4b45a + src/openrouter/errors/unprocessableentityresponse_error.py: + id: fac4aa89599e + last_write_checksum: sha1:5a76379b95c1c938e125641a1cb30568c1eae271 + pristine_git_object: 7304f75b9e8f3bef2d1c918f875420b26a15f8d7 + src/openrouter/generations.py: + id: 70e1c21042bc + last_write_checksum: sha1:0bb7915e08196820d93c66ceeed043c2eed0c847 + pristine_git_object: ccf3642d15d648c1ef5fa0f7764020e71334d56f + src/openrouter/guardrails.py: + id: 705839f34e66 + last_write_checksum: sha1:1e7af450df89f0df402e00064340d64bcdf76734 + pristine_git_object: 31dd3fb93d2a13972fd80dd029db980e3035abf1 + src/openrouter/httpclient.py: + id: e9311185443d + last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 + pristine_git_object: 89560b566073785535643e694c112bedbd3db13d + src/openrouter/models/__init__.py: + id: ed73b93abb3f + last_write_checksum: sha1:fd931d5c2d58b5f9189cc897e038d6d78e362dab + pristine_git_object: 726fc5eb391035492b4bea383d91cb7e23da04d3 + src/openrouter/models/internal/__init__.py: + id: b60fa9c4293c + last_write_checksum: sha1:5beaf7e5a713d3eead465c6edcfdeb7f8076175c + pristine_git_object: e7070a1222c2ed3fa3f6f54e6f122cae7ff9a449 + src/openrouter/models/internal/globals.py: + id: 1e9d361b36b6 + last_write_checksum: sha1:2bd2439b5618dfdae8069269f37e726c4d6f8ab8 + pristine_git_object: 701741bbf61e70c9dd84199249f2aa1192c30a18 + src/openrouter/models_.py: + id: 4e1ae1fe5b98 + last_write_checksum: sha1:bb33a62e4c0b82cd0434be0dd83570647dd06070 + pristine_git_object: 9da3b0011ccdd2b4e1afc7906d771a14930158db + src/openrouter/oauth.py: + id: 1948ce27255b + last_write_checksum: sha1:b14ff456d8c26f087e910744f7158634afb20e94 + pristine_git_object: b31df9fe79cf8e58d16e140e93e3ec2c358eb89e + src/openrouter/operations/__init__.py: + id: 9afcea1e7161 + last_write_checksum: sha1:f524d3b5a390b8b1dd392ff99fb69ba43b1b46d7 + pristine_git_object: f25347dbb31a15f83e8a12b8f3b05d87f8dd74ed + src/openrouter/operations/bulkassignkeystoguardrail.py: + id: 6d8435d51d9d + last_write_checksum: sha1:f900853fa8060a8a78674a3e386e7107f0233a44 + pristine_git_object: f258d3d4f0919e2f5f70b857c895906c0095ebda + src/openrouter/operations/bulkassignmemberstoguardrail.py: + id: 079706f81038 + last_write_checksum: sha1:8ec118f1e9f95c56121afec299150adef292229f + pristine_git_object: 1ebb22da17ed654ba0fee71d6706bd7adcb4ed6c + src/openrouter/operations/bulkunassignkeysfromguardrail.py: + id: 006249615b0e + last_write_checksum: sha1:bc1b57ff2dafb6dfdb121a25822796fe08c943d4 + pristine_git_object: 45cd84b00f28351da9f7572d8bffc48186238c3b + src/openrouter/operations/bulkunassignmembersfromguardrail.py: + id: 8127aafae1ef + last_write_checksum: sha1:f1970a20b75982f21ae94b1ade20cf0696c6e098 + pristine_git_object: ac6e0c12541c558adba126e92d1808aaccf4c9ab + src/openrouter/operations/createauthkeyscode.py: + id: 4253a437de22 + last_write_checksum: sha1:929010f051f34d9010cc6d94187fdbf6a52db85c + pristine_git_object: 610f4463df8df044f109675109397462d4821660 + src/openrouter/operations/createcoinbasecharge.py: + id: 7858e70dbf27 + last_write_checksum: sha1:9e729386e447df3122387b004bc75a4cb34665eb + pristine_git_object: dc83233e579abe8fc6b644d12c5fe12300af0e07 + src/openrouter/operations/createembeddings.py: + id: fe1160a960e9 + last_write_checksum: sha1:d6e7e034971ff17128e1d6cc132fb85fa95cf685 + pristine_git_object: bf520a6a9bbde8e95d6b1da3c96680202dc03e5f + src/openrouter/operations/createguardrail.py: + id: 52ed4b2f5903 + last_write_checksum: sha1:a4f3701ddb30431df0267cd3b54b87f1e281fd10 + pristine_git_object: 8f24ce49d37b1746af13d0eed0429a2d619d6cbd + src/openrouter/operations/createkeys.py: + id: 64ad31fdaa6c + last_write_checksum: sha1:cca4d2d6814b8886b51ef9e783bc89a2edf567a4 + pristine_git_object: 77d35e274da8783f89790aa8efa1e63e62821dd0 + src/openrouter/operations/createresponses.py: + id: afb834172b62 + last_write_checksum: sha1:55f5ba6a2eafc9d0519fa5aa072a1c22e42ed5f2 + pristine_git_object: e92bbc2995c3a3769c9cc45b0a6b6b690e67d02c + src/openrouter/operations/deleteguardrail.py: + id: 1fbdb98bbb85 + last_write_checksum: sha1:c5c3340fd1bda07cbe676c2a25ae8de9714017de + pristine_git_object: 2eade139fea29ce731dc5877d3eb26362626e971 + src/openrouter/operations/deletekeys.py: + id: 0bd72d53b0a0 + last_write_checksum: sha1:de3ec2a557ba007482a9d7ecaecef00cb6ead537 + pristine_git_object: 51d48818bce022ab5e9514ea48429e3aca75e997 + src/openrouter/operations/exchangeauthcodeforapikey.py: + id: 37bdd1517a07 + last_write_checksum: sha1:a3d39a96b3438e6e7569865b048a26b35187364d + pristine_git_object: eb44748fd5c0475185b663051b3ef58cb6d20b39 + src/openrouter/operations/getcredits.py: + id: 83155df53da5 + last_write_checksum: sha1:8b1eccdc3313fb35c0d5fdbfe63dbf64f35d460b + pristine_git_object: 54ebfd677a4050866cb070a1889169842f08f08a + src/openrouter/operations/getcurrentkey.py: + id: baf3e38db22c + last_write_checksum: sha1:01a15c9ba4f7800c527410eb5d7f98de68d377b2 + pristine_git_object: f293fd690dc6a5e3fbbd630fd2d505255f754b03 + src/openrouter/operations/getgeneration.py: + id: d7c64961334f + last_write_checksum: sha1:f93c85af7114ccd4d14ad380c552b8735395903f + pristine_git_object: 8a71781b05d3a5735cbc0e4121d2a22ba0e3c5bd + src/openrouter/operations/getguardrail.py: + id: 9b3309b59c64 + last_write_checksum: sha1:9cbff6569e2b7e34368252b14b9ed4125ba75f73 + pristine_git_object: f8f5d38c02f8575aec444f878d4aba7dcd43ff93 + src/openrouter/operations/getkey.py: + id: d9769da90865 + last_write_checksum: sha1:a077b20bdd05d124cf343563d0a1e3fc96bf6a46 + pristine_git_object: 66d56e05e1be9b6f6e31e5ef40c4f546ca8e6897 + src/openrouter/operations/getmodels.py: + id: 5bd5dfcb0125 + last_write_checksum: sha1:c15d8e05dca16da4cc6ac043ab809431682c3973 + pristine_git_object: 472068de469b53f7278d31ab244782e013af31c6 + src/openrouter/operations/getuseractivity.py: + id: 560a0e01c2c3 + last_write_checksum: sha1:72be3511150e52b5fa7c710e834089fb63bd805e + pristine_git_object: 9dacdcdb67cd780fba94835751f045e61e5c4e70 + src/openrouter/operations/list.py: + id: 3ced31e3804e + last_write_checksum: sha1:ce109f00215eb463662cbdcdf68b5ca43a8952ba + pristine_git_object: 649e842dfe359d3e24ecebd2c267ea98243abfd8 + src/openrouter/operations/listembeddingsmodels.py: + id: bf749a1f23d6 + last_write_checksum: sha1:654a4e7e7b486f1d321eeb11ef7a7fa928e501a6 + pristine_git_object: a4042eeccfd06d6fb1e5de741f1eb25e29347654 + src/openrouter/operations/listendpoints.py: + id: 62b7a5f21dec + last_write_checksum: sha1:18e9366b711d653136c6de3f38d41be054007124 + pristine_git_object: 4470cd27469e9d369edf1a02ec1e8f06b5005d3c + src/openrouter/operations/listendpointszdr.py: + id: 588bf206e92f + last_write_checksum: sha1:6d8e90c542ae6344e403767a3a4f8ec5d1d4dc75 + pristine_git_object: 23e735db74e27dc35e80b2f72cf386b0eeeb116d + src/openrouter/operations/listguardrailkeyassignments.py: + id: ee9d33f4de6b + last_write_checksum: sha1:1a6895f7c6a7f2fa882904fc5d9e1c9e1e99cc94 + pristine_git_object: 28a84b6c51144cf5e0a959da700eb33622158484 + src/openrouter/operations/listguardrailmemberassignments.py: + id: e36e679b02ec + last_write_checksum: sha1:c402ce1a6b606eacf1da355a3252a2f2e38f7e51 + pristine_git_object: 88cb8d0fae44518f8402f654fb64efd93b955ea6 + src/openrouter/operations/listguardrails.py: + id: c99a9e7be93c + last_write_checksum: sha1:a7486cadadaf355f88e22e410d30ffd7e7d9b483 + pristine_git_object: d6c1886a975c208173e6d13dfc9bad0fb9ad419c + src/openrouter/operations/listkeyassignments.py: + id: e26c11d1bd3c + last_write_checksum: sha1:dfb25c20d166a22038e231f935f8fe0fc4031194 + pristine_git_object: 36df9a6ea81dcf70093dd4d763479ff8cc6012dc + src/openrouter/operations/listmemberassignments.py: + id: a993b5549126 + last_write_checksum: sha1:2af738130bca56452a91f423656d1fe909e4134c + pristine_git_object: a6684dd39417aec662112023dee620f1303c89b3 + src/openrouter/operations/listmodelscount.py: + id: d588d81b71c2 + last_write_checksum: sha1:53314179fa961048fec7f4580962167c29020de7 + pristine_git_object: 3d8a59ac661eba1ad0fd192e0b58513435641be2 + src/openrouter/operations/listmodelsuser.py: + id: 16eb5946cf60 + last_write_checksum: sha1:bf9aee7db7762dcd082791962b962940dc7e16be + pristine_git_object: d25eea81bff3710243fca5874e934c024ab1f007 + src/openrouter/operations/listproviders.py: + id: cf6e2db15118 + last_write_checksum: sha1:0e735dbb5abab170ef0a090010c24de662ad0246 + pristine_git_object: be65217d38b52f1d12a2ac481dae3045f010b479 + src/openrouter/operations/sendchatcompletionrequest.py: + id: d9fee71bb577 + last_write_checksum: sha1:35f707844223de94c0ddcb0d7d67abb50dc0fa26 + pristine_git_object: ef5ccb09584600a7c8dc99c2f02a5d7f1c65f10e + src/openrouter/operations/updateguardrail.py: + id: 6cfb33d7d40c + last_write_checksum: sha1:b365877cf6dd2494565dd67477d4f2319b5b1bd1 + pristine_git_object: 77946e4271cebc9d510927863e47d6a2ef3e0e44 + src/openrouter/operations/updatekeys.py: + id: 56fb213253a8 + last_write_checksum: sha1:13798de8c313fd12b0c09bee84b5fc7ea17d3013 + pristine_git_object: c54d2e706039e6e630c9a3fe960949a1e539f2a9 + src/openrouter/providers.py: + id: debc4c48f149 + last_write_checksum: sha1:79410d5a3eb8c5d1d7a37efc004838f5b88f3eac + pristine_git_object: 31e1e3abdb396726cf54524e3ee3aedb047872e2 + src/openrouter/py.typed: + id: 89fd03eab092 + last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 + pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/openrouter/responses.py: + id: f2108fb635e1 + last_write_checksum: sha1:b5ee63ffb64a24f10ab625fcd5a9fec2a596ad24 + pristine_git_object: fbc9facc45e28082049bfc7af5ed218e872c84fc + src/openrouter/sdk.py: + id: ee9846c4c9c5 + last_write_checksum: sha1:1bee58213d72b76924c6ffd5c73f7dc99597738a + pristine_git_object: 5796a31460d94c12a0356aaaec81a0e57df118d8 + src/openrouter/sdkconfiguration.py: + id: 55773bb98d7c + last_write_checksum: sha1:c01826125c31a8b8bc99d9d679782c8758fae001 + pristine_git_object: 26433165a0b1c25d7bd3115b9b129b18f2dc9387 + src/openrouter/types/__init__.py: + id: 5eab536205b7 + last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed + pristine_git_object: fc76fe0c5505e29859b5d2bb707d48fd27661b8c + src/openrouter/types/basemodel.py: + id: 369e2d46ed57 + last_write_checksum: sha1:615d0b364fa924b0fef719958df34596cc7c1ae2 + pristine_git_object: 231c2e37283a76082f1a064c7aae47f8ee4ee694 + src/openrouter/utils/__init__.py: + id: d2221baccf50 + last_write_checksum: sha1:5d88356c206a32c694ae113178ca6325a9fc612a + pristine_git_object: 87192ddef2589a7778f85e1cd715d6d1e61ae0a6 + src/openrouter/utils/annotations.py: + id: 8999bda9dad2 + last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc + pristine_git_object: 12e0aa4f1151bb52474cc02e88397329b90703f6 + src/openrouter/utils/datetimes.py: + id: b95b8718acc3 + last_write_checksum: sha1:c721e4123000e7dc61ec52b28a739439d9e17341 + pristine_git_object: a6c52cd61bbe2d459046c940ce5e8c469f2f0664 + src/openrouter/utils/enums.py: + id: 110ef7d92d87 + last_write_checksum: sha1:786ba597f79dca6fbc0d87c591752bb8d775ecb7 + pristine_git_object: c3bc13cfc48794c143a64667f02e7949a8ce3fcc + src/openrouter/utils/eventstreaming.py: + id: 521c9b089a6b + last_write_checksum: sha1:bababae5d54b7efc360db701daa49e18a92c2f3b + pristine_git_object: 0969899bfc491e5e408d05643525f347ea95e4fc + src/openrouter/utils/forms.py: + id: ea40240d85c2 + last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 + pristine_git_object: f961e76beaf0a8b1fe0dda44754a74eebd3608e7 + src/openrouter/utils/headers.py: + id: 27516e637dba + last_write_checksum: sha1:7c6df233ee006332b566a8afa9ce9a245941d935 + pristine_git_object: 37864cbbbc40d1a47112bbfdd3ba79568fc8818a + src/openrouter/utils/logger.py: + id: f797063919f6 + last_write_checksum: sha1:b3b66f252bf929365bfa283ff98ac123a0eb67b7 + pristine_git_object: db55cd38e1db5cedb7be0b0f51c0d8243de126e7 + src/openrouter/utils/metadata.py: + id: 9e56bbf6b778 + last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 + pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + src/openrouter/utils/queryparams.py: + id: 01286f49bf3b + last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 + pristine_git_object: c04e0db82b68eca041f2cb2614d748fbac80fd41 + src/openrouter/utils/requestbodies.py: + id: 1273a1cf70c0 + last_write_checksum: sha1:e0a3a78158eba39880475d62d61be906625676b8 + pristine_git_object: d5240dd5f5efffabbd9aefa2f4a349511a9c75b4 + src/openrouter/utils/retries.py: + id: c4cf78e73a9a + last_write_checksum: sha1:5b97ac4f59357d70c2529975d50364c88bcad607 + pristine_git_object: 88a91b10cd2076b4a2c6cff2ac6bfaa5e3c5ad13 + src/openrouter/utils/security.py: + id: 2fb038256ad8 + last_write_checksum: sha1:2ace8b34d8b3b0bb6bb3b12f5bd0ea3853807877 + pristine_git_object: 6996c79fd27d6f77a3d8224e81bbfbe798d20fc8 + src/openrouter/utils/serializers.py: + id: b163f58f6f87 + last_write_checksum: sha1:a0d184ace7371a14a7d005cca7f358a03e3d4b07 + pristine_git_object: 378a14c0f86a867ca7b0eb7e620da82234c0ccc4 + src/openrouter/utils/unmarshal_json_response.py: + id: 3cf8a2573121 + last_write_checksum: sha1:8e77f7d9ad09be56c5e97a3c3d5b16bd20a4aa0d + pristine_git_object: f036c3a6c16e3d067a096996ddf0ca5d9aa41368 + src/openrouter/utils/url.py: + id: 3aa1a58ed55d + last_write_checksum: sha1:6479961baa90432ca25626f8e40a7bbc32e73b41 + pristine_git_object: c78ccbae426ce6d385709d97ce0b1c2813ea2418 + src/openrouter/utils/values.py: + id: 4ed16ed605f4 + last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553 + pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 +examples: + createResponses: + speakeasy-default-create-responses: + requestBody: + application/json: {"store": false, "service_tier": "auto", "stream": false} + responses: + "200": + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"type": "message", "status": "completed"}], "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": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "413": + application/json: {"error": {"code": 413, "message": "Request payload too large"}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + getUserActivity: + speakeasy-default-get-user-activity: + parameters: + query: + date: "2025-08-24" + responses: + "200": + application/json: {"data": [{"date": "2025-08-24", "model": "openai/gpt-4.1", "model_permaslug": "openai/gpt-4.1-2025-04-14", "endpoint_id": "550e8400-e29b-41d4-a716-446655440000", "provider_name": "OpenAI", "usage": 0.015, "byok_usage_inference": 0.012, "requests": 5, "prompt_tokens": 50, "completion_tokens": 125, "reasoning_tokens": 25}]} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getCredits: + speakeasy-default-get-credits: + responses: + "200": + application/json: {"data": {"total_credits": 100.5, "total_usage": 25.75}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createCoinbaseCharge: + speakeasy-default-create-coinbase-charge: + requestBody: + application/json: {"amount": 100, "sender": "0x1234567890123456789012345678901234567890", "chain_id": 1} + responses: + "200": + application/json: {"data": {"id": "", "created_at": "1706396327532", "expires_at": "1739956049454", "web3_data": {"transfer_intent": {"call_data": {"deadline": "", "fee_amount": "", "id": "", "operator": "", "prefix": "", "recipient": "", "recipient_amount": "", "recipient_currency": "", "refund_destination": "", "signature": ""}, "metadata": {"chain_id": 3470.69, "contract_address": "", "sender": ""}}}}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createEmbeddings: + speakeasy-default-create-embeddings: + requestBody: + application/json: {"input": "", "model": "Taurus"} + responses: + "200": + application/json: {"object": "list", "data": [], "model": "Land Cruiser"} + text/event-stream: "" + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + listEmbeddingsModels: + speakeasy-default-list-embeddings-models: + responses: + "200": + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getGeneration: + speakeasy-default-get-generation: + parameters: + query: + id: "" + responses: + "200": + application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": [], "user_agent": "", "http_referer": null}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + listModelsCount: + speakeasy-default-list-models-count: + responses: + "200": + application/json: {"data": {"count": 150}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + getModels: + speakeasy-default-get-models: + responses: + "200": + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listModelsUser: + speakeasy-default-list-models-user: + responses: + "200": + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + listEndpoints: + speakeasy-default-list-endpoints: + parameters: + path: + author: "" + 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_id": "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}}]}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listEndpointsZdr: + speakeasy-default-list-endpoints-zdr: + responses: + "200": + application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "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"], "uptime_last_30m": 99.5, "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}}]} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getParameters: + speakeasy-default-get-parameters: + parameters: + path: + author: "" + slug: "" + responses: + "200": + application/json: {"data": {"model": "openai/gpt-4", "supported_parameters": ["temperature", "top_p", "max_tokens"]}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listProviders: + speakeasy-default-list-providers: + responses: + "200": + application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy"}]} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + list: + speakeasy-default-list: + parameters: + query: + include_disabled: "false" + offset: "0" + responses: + "200": + application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}]} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createKeys: + speakeasy-default-create-keys: + requestBody: + application/json: {"name": "My New API Key"} + responses: + "201": + application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}, "key": "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"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + updateKeys: + speakeasy-default-update-keys: + parameters: + path: + hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" + requestBody: + application/json: {} + responses: + "200": + application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + deleteKeys: + speakeasy-default-delete-keys: + parameters: + path: + hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" + responses: + "200": + application/json: {"deleted": true} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getKey: + speakeasy-default-get-key: + parameters: + path: + hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" + responses: + "200": + application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z", "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getCurrentKey: + speakeasy-default-get-current-key: + responses: + "200": + application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000", "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + exchangeAuthCodeForAPIKey: + speakeasy-default-exchange-auth-code-for-API-key: + requestBody: + application/json: {"code": "auth_code_abc123def456"} + responses: + "200": + application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createAuthKeysCode: + speakeasy-default-create-auth-keys-code: + requestBody: + application/json: {"callback_url": "https://myapp.com/auth/callback"} + responses: + "200": + application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + sendChatCompletionRequest: + speakeasy-default-send-chat-completion-request: + requestBody: + application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} + responses: + "200": + application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion", "system_fingerprint": "fp_44709d6fcb"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "413": + application/json: {"error": {"code": 413, "message": "Request payload too large"}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error"}} + createCompletions: + speakeasy-default-create-completions: + requestBody: + application/json: {"prompt": [], "stream": false} + responses: + "200": + application/json: {"id": "", "object": "text_completion", "created": 7524.07, "model": "Aventador", "choices": [{"text": "", "index": 4622.44, "logprobs": {"tokens": [], "token_logprobs": [], "top_logprobs": [{"key": 6481.8, "key1": 6211.86, "key2": 4822.58}, {}, {"key": 6295.32, "key1": 8110.56, "key2": 5430.28}], "text_offset": [8533.93, 4728.06, 5798.08]}, "finish_reason": "length"}]} + "400": + application/json: {"error": {"code": "", "message": ""}} + "500": + application/json: {"error": {"code": "", "message": ""}} + listGuardrails: + speakeasy-default-list-guardrails: + responses: + "200": + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createGuardrail: + speakeasy-default-create-guardrail: + requestBody: + application/json: {"name": "My New Guardrail"} + responses: + "201": + application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + getGuardrail: + speakeasy-default-get-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + responses: + "200": + application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + updateGuardrail: + speakeasy-default-update-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + requestBody: + application/json: {} + responses: + "200": + application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + deleteGuardrail: + speakeasy-default-delete-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + responses: + "200": + application/json: {"deleted": true} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listKeyAssignments: + speakeasy-default-list-key-assignments: + responses: + "200": + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listMemberAssignments: + speakeasy-default-list-member-assignments: + responses: + "200": + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listGuardrailKeyAssignments: + speakeasy-default-list-guardrail-key-assignments: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + responses: + "200": + application/json: {"data": [], "total_count": 25} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkAssignKeysToGuardrail: + speakeasy-default-bulk-assign-keys-to-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + requestBody: + application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]} + responses: + "200": + application/json: {"assigned_count": 3} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + listGuardrailMemberAssignments: + speakeasy-default-list-guardrail-member-assignments: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + responses: + "200": + application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkAssignMembersToGuardrail: + speakeasy-default-bulk-assign-members-to-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + requestBody: + application/json: {"member_user_ids": ["user_abc123", "user_def456"]} + responses: + "200": + application/json: {"assigned_count": 2} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkUnassignKeysFromGuardrail: + speakeasy-default-bulk-unassign-keys-from-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + requestBody: + application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]} + responses: + "200": + application/json: {"unassigned_count": 3} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + bulkUnassignMembersFromGuardrail: + speakeasy-default-bulk-unassign-members-from-guardrail: + parameters: + path: + id: "550e8400-e29b-41d4-a716-446655440000" + requestBody: + application/json: {"member_user_ids": ["user_abc123", "user_def456"]} + responses: + "200": + application/json: {"unassigned_count": 2} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} +examplesVersion: 1.0.2 generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json @@ -976,557 +6051,3 @@ generatedFiles: - src/openrouter/utils/unmarshal_json_response.py - src/openrouter/utils/url.py - src/openrouter/utils/values.py -examples: - createResponses: - speakeasy-default-create-responses: - requestBody: - application/json: {"store": false, "service_tier": "auto", "stream": false} - responses: - "200": - application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "completed_at": 2510.63, "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "content": [{"type": "output_text", "text": "Hello! How can I help you today?"}]}], "error": null, "incomplete_details": null, "temperature": null, "top_p": null, "presence_penalty": 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": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "408": - application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} - "413": - application/json: {"error": {"code": 413, "message": "Request payload too large"}} - "422": - application/json: {"error": {"code": 422, "message": "Invalid argument"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "502": - application/json: {"error": {"code": 502, "message": "Provider returned error"}} - "503": - application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} - "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} - "529": - application/json: {"error": {"code": 529, "message": "Provider returned error"}} - getUserActivity: - speakeasy-default-get-user-activity: - parameters: - query: - date: "2025-08-24" - responses: - "200": - application/json: {"data": [{"date": "2025-08-24", "model": "openai/gpt-4.1", "model_permaslug": "openai/gpt-4.1-2025-04-14", "endpoint_id": "550e8400-e29b-41d4-a716-446655440000", "provider_name": "OpenAI", "usage": 0.015, "byok_usage_inference": 0.012, "requests": 5, "prompt_tokens": 50, "completion_tokens": 125, "reasoning_tokens": 25}]} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "403": - application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getCredits: - speakeasy-default-get-credits: - responses: - "200": - application/json: {"data": {"total_credits": 100.5, "total_usage": 25.75}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "403": - application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createCoinbaseCharge: - speakeasy-default-create-coinbase-charge: - requestBody: - application/json: {"amount": 100, "sender": "0x1234567890123456789012345678901234567890", "chain_id": 1} - responses: - "200": - application/json: {"data": {"id": "", "created_at": "1706396327532", "expires_at": "1739956049454", "web3_data": {"transfer_intent": {"call_data": {"deadline": "", "fee_amount": "", "id": "", "operator": "", "prefix": "", "recipient": "", "recipient_amount": "", "recipient_currency": "", "refund_destination": "", "signature": ""}, "metadata": {"chain_id": 3470.69, "contract_address": "", "sender": ""}}}}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createEmbeddings: - speakeasy-default-create-embeddings: - requestBody: - application/json: {"input": "", "model": "Taurus"} - responses: - "200": - application/json: {"object": "list", "data": [], "model": "Land Cruiser"} - text/event-stream: "" - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "502": - application/json: {"error": {"code": 502, "message": "Provider returned error"}} - "503": - application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} - "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} - "529": - application/json: {"error": {"code": 529, "message": "Provider returned error"}} - listEmbeddingsModels: - speakeasy-default-list-embeddings-models: - responses: - "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getGeneration: - speakeasy-default-get-generation: - parameters: - query: - id: "" - responses: - "200": - application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions", "router": "openrouter/auto", "provider_responses": []}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "502": - application/json: {"error": {"code": 502, "message": "Provider returned error"}} - "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} - "529": - application/json: {"error": {"code": 529, "message": "Provider returned error"}} - listModelsCount: - speakeasy-default-list-models-count: - responses: - "200": - application/json: {"data": {"count": 150}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getModels: - speakeasy-default-get-models: - responses: - "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listModelsUser: - speakeasy-default-list-models-user: - responses: - "200": - application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - listEndpoints: - speakeasy-default-list-endpoints: - parameters: - path: - author: "" - 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_id": "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}}]}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listEndpointsZdr: - speakeasy-default-list-endpoints-zdr: - responses: - "200": - application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "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"], "uptime_last_30m": 99.5, "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}}]} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getParameters: - speakeasy-default-get-parameters: - parameters: - path: - author: "" - slug: "" - responses: - "200": - application/json: {"data": {"model": "openai/gpt-4", "supported_parameters": ["temperature", "top_p", "max_tokens"]}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listProviders: - speakeasy-default-list-providers: - responses: - "200": - application/json: {"data": [{"name": "OpenAI", "slug": "openai", "privacy_policy_url": "https://openai.com/privacy"}]} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - list: - speakeasy-default-list: - parameters: - query: - include_disabled: "false" - offset: "0" - responses: - "200": - application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createKeys: - speakeasy-default-create-keys: - requestBody: - application/json: {"name": "My New API Key"} - responses: - "201": - application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - updateKeys: - speakeasy-default-update-keys: - parameters: - path: - hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" - requestBody: - application/json: {} - responses: - "200": - application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - deleteKeys: - speakeasy-default-delete-keys: - parameters: - path: - hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" - responses: - "200": - application/json: {"deleted": true} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getKey: - speakeasy-default-get-key: - parameters: - path: - hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943" - responses: - "200": - application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getCurrentKey: - speakeasy-default-get-current-key: - responses: - "200": - application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_management_key": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - exchangeAuthCodeForAPIKey: - speakeasy-default-exchange-auth-code-for-API-key: - requestBody: - application/json: {"code": "auth_code_abc123def456"} - responses: - "200": - application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "403": - application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createAuthKeysCode: - speakeasy-default-create-auth-keys-code: - requestBody: - application/json: {"callback_url": "https://myapp.com/auth/callback"} - responses: - "200": - application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - sendChatCompletionRequest: - speakeasy-default-send-chat-completion-request: - requestBody: - application/json: {"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is the capital of France?"}], "stream": false, "temperature": 0.7, "top_p": 1} - responses: - "200": - application/json: {"id": "chatcmpl-123", "choices": [{"finish_reason": "stop", "index": 0, "message": {"role": "assistant"}}], "created": 1677652288, "model": "openai/gpt-4", "object": "chat.completion"} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "402": - application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "408": - application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} - "413": - application/json: {"error": {"code": 413, "message": "Request payload too large"}} - "422": - application/json: {"error": {"code": 422, "message": "Invalid argument"}} - "429": - application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}} - "502": - application/json: {"error": {"code": 502, "message": "Provider returned error"}} - "503": - application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} - "524": - application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} - "529": - application/json: {"error": {"code": 529, "message": "Provider returned error"}} - createCompletions: - speakeasy-default-create-completions: - requestBody: - application/json: {"prompt": [], "stream": false} - responses: - "200": - application/json: {"id": "", "object": "text_completion", "created": 7524.07, "model": "Aventador", "choices": [{"text": "", "index": 4622.44, "logprobs": {"tokens": [], "token_logprobs": [], "top_logprobs": [{"key": 6481.8, "key1": 6211.86, "key2": 4822.58}, {}, {"key": 6295.32, "key1": 8110.56, "key2": 5430.28}], "text_offset": [8533.93, 4728.06, 5798.08]}, "finish_reason": "length"}]} - "400": - application/json: {"error": {"code": "", "message": ""}} - "500": - application/json: {"error": {"code": "", "message": ""}} - listGuardrails: - speakeasy-default-list-guardrails: - responses: - "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - createGuardrail: - speakeasy-default-create-guardrail: - requestBody: - application/json: {"name": "My New Guardrail"} - responses: - "201": - application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - getGuardrail: - speakeasy-default-get-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - responses: - "200": - application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - updateGuardrail: - speakeasy-default-update-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - requestBody: - application/json: {} - responses: - "200": - application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - deleteGuardrail: - speakeasy-default-delete-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - responses: - "200": - application/json: {"deleted": true} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listKeyAssignments: - speakeasy-default-list-key-assignments: - responses: - "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listMemberAssignments: - speakeasy-default-list-member-assignments: - responses: - "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listGuardrailKeyAssignments: - speakeasy-default-list-guardrail-key-assignments: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - responses: - "200": - application/json: {"data": [], "total_count": 25} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - bulkAssignKeysToGuardrail: - speakeasy-default-bulk-assign-keys-to-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - requestBody: - application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]} - responses: - "200": - application/json: {"assigned_count": 3} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - listGuardrailMemberAssignments: - speakeasy-default-list-guardrail-member-assignments: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - responses: - "200": - application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - bulkAssignMembersToGuardrail: - speakeasy-default-bulk-assign-members-to-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - requestBody: - application/json: {"member_user_ids": ["user_abc123", "user_def456"]} - responses: - "200": - application/json: {"assigned_count": 2} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - bulkUnassignKeysFromGuardrail: - speakeasy-default-bulk-unassign-keys-from-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - requestBody: - application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]} - responses: - "200": - application/json: {"unassigned_count": 3} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} - bulkUnassignMembersFromGuardrail: - speakeasy-default-bulk-unassign-members-from-guardrail: - parameters: - path: - id: "550e8400-e29b-41d4-a716-446655440000" - requestBody: - application/json: {"member_user_ids": ["user_abc123", "user_def456"]} - responses: - "200": - application/json: {"unassigned_count": 2} - "400": - application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} - "401": - application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} - "404": - application/json: {"error": {"code": 404, "message": "Resource not found"}} - "500": - application/json: {"error": {"code": 500, "message": "Internal Server Error"}} -examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index de660ae..232d0e4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,13 +25,14 @@ generation: schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: "" + persistentEdits: {} tests: generateTests: false generateNewTests: true skipResponseBodyAssertions: false preApplyUnionDiscriminators: true python: - version: 0.7.11 + version: 0.8.0 additionalDependencies: dev: {} main: {} @@ -46,6 +47,7 @@ python: - OpenRouter baseErrorName: OpenRouterError clientServerStatusCodesAsErrors: true + constFieldCasing: upper defaultErrorName: OpenRouterDefaultError description: Official Python Client SDK for OpenRouter. enableCustomCodeRegions: false @@ -77,6 +79,7 @@ python: outputModelSuffix: output packageManager: uv packageName: openrouter + preApplyUnionDiscriminators: false pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: flat diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 58e595c..8cb8137 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -209,6 +209,19 @@ components: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` + for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve + and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. required: - id - role @@ -222,7 +235,7 @@ components: content: - type: output_text text: Hello! How can I help you today? - ResponsesOutputMessage: + OutputMessageItem: allOf: - $ref: '#/components/schemas/OutputMessage' - type: object @@ -308,7 +321,7 @@ components: summary: - type: summary_text text: Analyzed the problem using first principles - ResponsesOutputItemReasoning: + OutputReasoningItem: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object @@ -385,7 +398,7 @@ components: name: get_weather arguments: '{"location":"San Francisco","unit":"celsius"}' call_id: call-abc123 - ResponsesOutputItemFunctionCall: + OutputFunctionCallItem: allOf: - $ref: '#/components/schemas/OutputItemFunctionCall' - type: object @@ -413,17 +426,77 @@ components: - web_search_call id: type: string + action: + oneOf: + - type: object + properties: + type: + type: string + enum: + - search + query: + type: string + queries: + type: array + items: + type: string + sources: + type: array + items: + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + required: + - type + - query + - type: object + properties: + type: + type: string + enum: + - open_page + url: + type: string + nullable: true + required: + - type + - type: object + properties: + type: + type: string + enum: + - find_in_page + pattern: + type: string + url: + type: string + required: + - type + - pattern + - url status: $ref: '#/components/schemas/WebSearchStatus' required: - type - id + - action - status example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed - ResponsesWebSearchCallOutput: + OutputWebSearchCallItem: allOf: - $ref: '#/components/schemas/OutputItemWebSearchCall' - type: object @@ -431,6 +504,9 @@ components: example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed OutputItemFileSearchCall: type: object @@ -459,7 +535,7 @@ components: - machine learning algorithms - neural networks status: completed - ResponsesOutputItemFileSearchCall: + OutputFileSearchCallItem: allOf: - $ref: '#/components/schemas/OutputItemFileSearchCall' - type: object @@ -503,7 +579,7 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed - ResponsesImageGenerationCall: + OutputImageGenerationCallItem: allOf: - $ref: '#/components/schemas/OutputItemImageGenerationCall' - type: object @@ -513,14 +589,40 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed - ResponsesOutputItem: + OutputServerToolItem: + type: object + properties: + type: + type: string + pattern: '^openrouter:' + description: Server tool type (e.g. openrouter:datetime, openrouter:web_search) + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + required: + - type + - status + additionalProperties: + nullable: true + description: A generic OpenRouter server tool output item + example: + type: openrouter:web_search + id: ws_tmp_abc123 + status: completed + OutputItems: anyOf: - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' - - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/OutputMessageItem' + - $ref: '#/components/schemas/OutputReasoningItem' + - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputWebSearchCallItem' + - $ref: '#/components/schemas/OutputFileSearchCallItem' + - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputServerToolItem' description: An output item from the response example: id: msg-abc123 @@ -564,7 +666,7 @@ components: example: code: rate_limit_exceeded message: Rate limit exceeded. Please try again later. - OpenAIResponsesIncompleteDetails: + IncompleteDetails: type: object nullable: true properties: @@ -602,7 +704,7 @@ components: - output_tokens - output_tokens_details - total_tokens - OpenResponsesUsage: + Usage: allOf: - $ref: '#/components/schemas/OpenAIResponsesUsage' - type: object @@ -642,7 +744,7 @@ components: upstream_inference_cost: null upstream_inference_input_cost: 0.0008 upstream_inference_output_cost: 0.0004 - ResponseInputText: + InputText: type: object properties: type: @@ -658,7 +760,7 @@ components: example: type: input_text text: Hello, how can I help you? - ResponseInputImage: + InputImage: type: object properties: type: @@ -682,7 +784,7 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - ResponseInputFile: + InputFile: type: object properties: type: @@ -705,7 +807,7 @@ components: type: input_file file_id: file-abc123 filename: document.pdf - ResponseInputAudio: + InputAudio: type: object properties: type: @@ -734,7 +836,7 @@ components: input_audio: data: SGVsbG8gV29ybGQ= format: mp3 - ToolCallStatus: + ToolCallStatusEnum: type: string nullable: true enum: @@ -742,7 +844,7 @@ components: - completed - incomplete example: completed - OpenAIResponsesInput: + BaseInputs: anyOf: - type: string - type: array @@ -773,18 +875,27 @@ components: - type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' discriminator: propertyName: type mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + input_audio: '#/components/schemas/InputAudio' - type: string + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true required: - role - content @@ -811,17 +922,17 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' discriminator: propertyName: type mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + input_audio: '#/components/schemas/InputAudio' required: - id - role @@ -838,9 +949,22 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -860,7 +984,7 @@ components: id: type: string status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -869,7 +993,7 @@ components: - $ref: '#/components/schemas/OutputItemImageGenerationCall' - $ref: '#/components/schemas/OutputMessage' - nullable: true - OpenResponsesRequestMetadata: + RequestMetadata: type: object nullable: true additionalProperties: @@ -881,7 +1005,7 @@ components: example: user_id: '123' session_id: abc-def-ghi - OpenResponsesFunctionTool: + FunctionTool: type: object properties: type: @@ -923,7 +1047,7 @@ components: - fahrenheit required: - location - ResponsesSearchContextSize: + SearchContextSizeEnum: type: string enum: - low @@ -931,7 +1055,7 @@ components: - high description: Size of the search context for web search tools example: medium - WebSearchPreviewToolUserLocation: + Preview_WebSearchUserLocation: type: object nullable: true properties: @@ -953,7 +1077,7 @@ components: nullable: true required: - type - OpenResponsesWebSearchPreviewTool: + Preview_WebSearchServerTool: type: object properties: type: @@ -961,15 +1085,50 @@ components: enum: - web_search_preview search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + $ref: '#/components/schemas/Preview_WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl + (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and + Parallel engines; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration example: type: web_search_preview - OpenResponsesWebSearchPreview20250311Tool: + Preview_20250311_WebSearchServerTool: type: object properties: type: @@ -977,15 +1136,50 @@ components: enum: - web_search_preview_2025_03_11 search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + $ref: '#/components/schemas/Preview_WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl + (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and + Parallel engines; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration (2025-03-11 version) example: type: web_search_preview_2025_03_11 - ResponsesWebSearchUserLocation: + WebSearchUserLocation: type: object nullable: true properties: @@ -1012,7 +1206,7 @@ components: country: USA region: California timezone: America/Los_Angeles - OpenResponsesWebSearchTool: + Legacy_WebSearchServerTool: type: object properties: type: @@ -1028,19 +1222,46 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + $ref: '#/components/schemas/WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl + (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and + Parallel engines; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration example: type: web_search + engine: auto filters: allowed_domains: - example.com - OpenResponsesWebSearch20250826Tool: + WebSearchServerTool: type: object properties: type: @@ -1056,18 +1277,421 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + $ref: '#/components/schemas/WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl + (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and + Parallel engines; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration (2025-08-26 version) example: type: web_search_2025_08_26 + engine: auto filters: allowed_domains: - example.com + CompoundFilter: + type: object + properties: + type: + type: string + enum: + - and + - or + filters: + type: array + items: + type: object + additionalProperties: + nullable: true + required: + - type + - filters + description: A compound filter that combines multiple comparison or compound filters + FileSearchServerTool: + type: object + properties: + type: + type: string + enum: + - file_search + vector_store_ids: + type: array + items: + type: string + filters: + anyOf: + - type: object + properties: + key: + type: string + type: + type: string + enum: + - eq + - ne + - gt + - gte + - lt + - lte + value: + anyOf: + - type: string + - type: number + - type: boolean + - type: array + items: + anyOf: + - type: string + - type: number + required: + - key + - type + - value + - $ref: '#/components/schemas/CompoundFilter' + - nullable: true + max_num_results: + type: integer + minimum: 1 + maximum: 50 + ranking_options: + type: object + properties: + ranker: + type: string + enum: + - auto + - default-2024-11-15 + score_threshold: + type: number + required: + - type + - vector_store_ids + description: File search tool configuration + example: + type: file_search + vector_store_ids: + - vs_abc123 + ComputerUseServerTool: + type: object + properties: + type: + type: string + enum: + - computer_use_preview + display_height: + type: number + display_width: + type: number + environment: + type: string + enum: + - windows + - mac + - linux + - ubuntu + - browser + required: + - type + - display_height + - display_width + - environment + description: Computer use preview tool configuration + example: + type: computer_use_preview + display_height: 768 + display_width: 1024 + environment: linux + CodeInterpreterServerTool: + type: object + properties: + type: + type: string + enum: + - code_interpreter + container: + anyOf: + - type: string + - type: object + properties: + type: + type: string + enum: + - auto + file_ids: + type: array + items: + type: string + memory_limit: + type: string + nullable: true + enum: + - 1g + - 4g + - 16g + - 64g + required: + - type + required: + - type + - container + description: Code interpreter tool configuration + example: + type: code_interpreter + container: auto + McpServerTool: + type: object + properties: + type: + type: string + enum: + - mcp + server_label: + type: string + allowed_tools: + anyOf: + - type: array + items: + type: string + - type: object + properties: + tool_names: + type: array + items: + type: string + read_only: + type: boolean + - nullable: true + - nullable: true + authorization: + type: string + connector_id: + type: string + enum: + - connector_dropbox + - connector_gmail + - connector_googlecalendar + - connector_googledrive + - connector_microsoftteams + - connector_outlookcalendar + - connector_outlookemail + - connector_sharepoint + headers: + type: object + nullable: true + additionalProperties: + type: string + require_approval: + anyOf: + - type: object + properties: + never: + type: object + properties: + tool_names: + type: array + items: + type: string + always: + type: object + properties: + tool_names: + type: array + items: + type: string + - type: string + enum: + - always + - type: string + enum: + - never + - nullable: true + - nullable: true + server_description: + type: string + server_url: + type: string + required: + - type + - server_label + description: MCP (Model Context Protocol) tool configuration + example: + type: mcp + server_label: my-server + server_url: https://example.com/mcp + ImageGenerationServerTool: + type: object + properties: + type: + type: string + enum: + - image_generation + background: + type: string + enum: + - transparent + - opaque + - auto + input_fidelity: + type: string + nullable: true + enum: + - high + - low + input_image_mask: + type: object + properties: + image_url: + type: string + file_id: + type: string + model: + type: string + enum: + - gpt-image-1 + - gpt-image-1-mini + moderation: + type: string + enum: + - auto + - low + output_compression: + type: number + output_format: + type: string + enum: + - png + - webp + - jpeg + partial_images: + type: number + quality: + type: string + enum: + - low + - medium + - high + - auto + size: + type: string + enum: + - 1024x1024 + - 1024x1536 + - 1536x1024 + - auto + required: + - type + description: Image generation tool configuration + example: + type: image_generation + quality: high + CodexLocalShellTool: + type: object + properties: + type: + type: string + enum: + - local_shell + required: + - type + description: Local shell tool configuration + example: + type: local_shell + ShellServerTool: + type: object + properties: + type: + type: string + enum: + - shell + required: + - type + description: Shell tool configuration + example: + type: shell + ApplyPatchServerTool: + type: object + properties: + type: + type: string + enum: + - apply_patch + required: + - type + description: Apply patch tool configuration + example: + type: apply_patch + CustomTool: + type: object + properties: + type: + type: string + enum: + - custom + name: + type: string + description: + type: string + format: + anyOf: + - type: object + properties: + type: + type: string + enum: + - text + required: + - type + - type: object + properties: + type: + type: string + enum: + - grammar + definition: + type: string + syntax: + type: string + enum: + - lark + - regex + required: + - type + - definition + - syntax + required: + - type + - name + description: Custom tool configuration + example: + type: custom + name: my_tool OpenAIResponsesToolChoice: anyOf: - type: string @@ -1102,7 +1726,7 @@ components: - web_search_preview required: - type - OpenAIResponsesPrompt: + StoredPromptTemplate: type: object nullable: true properties: @@ -1114,12 +1738,12 @@ components: additionalProperties: anyOf: - type: string - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' required: - id - OpenAIResponsesReasoningEffort: + ReasoningEffortEnum: type: string nullable: true enum: @@ -1129,7 +1753,7 @@ components: - low - minimal - none - ReasoningSummaryVerbosity: + ReasoningSummaryVerbosityEnum: type: string nullable: true enum: @@ -1137,30 +1761,21 @@ components: - concise - detailed example: auto - OpenAIResponsesReasoningConfig: + BaseReasoningConfig: type: object nullable: true properties: effort: - $ref: '#/components/schemas/OpenAIResponsesReasoningEffort' + $ref: '#/components/schemas/ReasoningEffortEnum' summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosity' - OpenAIResponsesServiceTier: - type: string - nullable: true - enum: - - auto - - default - - flex - - priority - - scale - OpenAIResponsesTruncation: + $ref: '#/components/schemas/ReasoningSummaryVerbosityEnum' + TruncationEnum: type: string nullable: true enum: - auto - disabled - ResponsesFormatText: + FormatTextConfig: type: object properties: type: @@ -1172,7 +1787,19 @@ components: description: Plain text response format example: type: text - ResponsesFormatTextJSONSchemaConfig: + FormatJsonObjectConfig: + type: object + properties: + type: + type: string + enum: + - json_object + required: + - type + description: JSON object response format + example: + type: json_object + FormatJsonSchemaConfig: type: object properties: type: @@ -1208,19 +1835,19 @@ components: type: number required: - name - ResponseFormatTextConfig: + Formats: anyOf: - - $ref: '#/components/schemas/ResponsesFormatText' - - $ref: '#/components/schemas/ResponseFormatJSONObject' - - $ref: '#/components/schemas/ResponsesFormatTextJSONSchemaConfig' + - $ref: '#/components/schemas/FormatTextConfig' + - $ref: '#/components/schemas/FormatJsonObjectConfig' + - $ref: '#/components/schemas/FormatJsonSchemaConfig' description: Text response format configuration example: type: text - ResponseTextConfig: + TextConfig: type: object properties: format: - $ref: '#/components/schemas/ResponseFormatTextConfig' + $ref: '#/components/schemas/Formats' verbosity: type: string nullable: true @@ -1233,7 +1860,16 @@ components: format: type: text verbosity: medium - OpenAIResponsesNonStreamingResponse: + ServiceTierEnum: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + BaseResponsesResult: type: object properties: id: @@ -1284,7 +1920,7 @@ components: error: $ref: '#/components/schemas/ResponsesErrorField' incomplete_details: - $ref: '#/components/schemas/OpenAIResponsesIncompleteDetails' + $ref: '#/components/schemas/IncompleteDetails' usage: $ref: '#/components/schemas/OpenAIResponsesUsage' max_tool_calls: @@ -1308,15 +1944,15 @@ components: type: number nullable: true instructions: - $ref: '#/components/schemas/OpenAIResponsesInput' + $ref: '#/components/schemas/BaseInputs' metadata: - $ref: '#/components/schemas/OpenResponsesRequestMetadata' + $ref: '#/components/schemas/RequestMetadata' tools: type: array items: oneOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - $ref: '#/components/schemas/FunctionTool' - type: object properties: {} description: Function tool definition @@ -1337,16 +1973,25 @@ components: - fahrenheit required: - location - - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' - - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: type: boolean prompt: - $ref: '#/components/schemas/OpenAIResponsesPrompt' + $ref: '#/components/schemas/StoredPromptTemplate' background: type: boolean nullable: true @@ -1354,15 +1999,15 @@ components: type: string nullable: true reasoning: - $ref: '#/components/schemas/OpenAIResponsesReasoningConfig' + $ref: '#/components/schemas/BaseReasoningConfig' service_tier: - $ref: '#/components/schemas/OpenAIResponsesServiceTier' + $ref: '#/components/schemas/ServiceTierEnum' store: type: boolean truncation: - $ref: '#/components/schemas/OpenAIResponsesTruncation' + $ref: '#/components/schemas/TruncationEnum' text: - $ref: '#/components/schemas/ResponseTextConfig' + $ref: '#/components/schemas/TextConfig' required: - id - object @@ -1382,17 +2027,20 @@ components: - tools - tool_choice - parallel_tool_calls - OpenResponsesNonStreamingResponse: + OpenResponsesResult: allOf: - - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + - $ref: '#/components/schemas/BaseResponsesResult' - type: object properties: output: type: array items: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' usage: - $ref: '#/components/schemas/OpenResponsesUsage' + $ref: '#/components/schemas/Usage' + service_tier: + type: string + nullable: true description: Complete non-streaming response from the Responses API example: id: resp-abc123 @@ -1427,7 +2075,7 @@ components: max_output_tokens: null metadata: null instructions: null - OpenResponsesCreatedEvent: + CreatedEvent: type: object properties: type: @@ -1435,7 +2083,7 @@ components: enum: - response.created response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1463,7 +2111,7 @@ components: top_p: null max_output_tokens: null sequence_number: 0 - OpenResponsesInProgressEvent: + InProgressEvent: type: object properties: type: @@ -1471,7 +2119,7 @@ components: enum: - response.in_progress response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1499,7 +2147,7 @@ components: top_p: null max_output_tokens: null sequence_number: 1 - OpenResponsesCompletedEvent: + CompletedEvent: type: object properties: type: @@ -1507,7 +2155,7 @@ components: enum: - response.completed response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1543,7 +2191,7 @@ components: top_p: null max_output_tokens: null sequence_number: 10 - OpenResponsesIncompleteEvent: + IncompleteEvent: type: object properties: type: @@ -1551,7 +2199,7 @@ components: enum: - response.incomplete response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1579,7 +2227,7 @@ components: top_p: null max_output_tokens: null sequence_number: 5 - OpenResponsesFailedEvent: + FailedEvent: type: object properties: type: @@ -1587,7 +2235,7 @@ components: enum: - response.failed response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1615,7 +2263,7 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - OpenAIResponsesErrorEvent: + BaseErrorEvent: type: object properties: type: @@ -1645,9 +2293,9 @@ components: message: Rate limit exceeded. Please try again later. param: null sequence_number: 2 - OpenResponsesErrorEvent: + ErrorEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesErrorEvent' + - $ref: '#/components/schemas/BaseErrorEvent' - type: object properties: {} description: Event emitted when an error occurs during streaming @@ -1657,7 +2305,7 @@ components: message: Rate limit exceeded. Please try again later. param: null sequence_number: 2 - OpenResponsesOutputItemAddedEvent: + OutputItemAddedEvent: type: object properties: type: @@ -1701,7 +2349,7 @@ components: role: assistant content: [] sequence_number: 2 - OpenResponsesOutputItemDoneEvent: + OutputItemDoneEvent: type: object properties: type: @@ -1748,7 +2396,7 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 - OpenResponsesContentPartAddedEvent: + BaseContentPartAddedEvent: type: object properties: type: @@ -1785,7 +2433,28 @@ components: text: '' annotations: [] sequence_number: 3 - OpenResponsesContentPartDoneEvent: + ContentPartAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseContentPartAddedEvent' + - type: object + properties: + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/ReasoningTextContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + description: Event emitted when a new content part is added to an output item + example: + type: response.content_part.added + output_index: 0 + item_id: item-1 + content_index: 0 + part: + type: output_text + text: '' + annotations: [] + sequence_number: 3 + BaseContentPartDoneEvent: type: object properties: type: @@ -1822,6 +2491,27 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 7 + ContentPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseContentPartDoneEvent' + - type: object + properties: + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/ReasoningTextContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + description: Event emitted when a content part is complete + example: + type: response.content_part.done + output_index: 0 + item_id: item-1 + content_index: 0 + part: + type: output_text + text: Hello! How can I help you? + annotations: [] + sequence_number: 7 OpenResponsesTopLogprobs: type: object properties: @@ -1829,6 +2519,10 @@ components: type: string logprob: type: number + bytes: + type: array + items: + type: number description: Alternative token with its log probability example: token: hello @@ -1844,6 +2538,10 @@ components: type: array items: $ref: '#/components/schemas/OpenResponsesTopLogprobs' + bytes: + type: array + items: + type: number required: - logprob - token @@ -1854,7 +2552,7 @@ components: top_logprobs: - token: hello logprob: -0.5 - OpenResponsesTextDeltaEvent: + BaseTextDeltaEvent: type: object properties: type: @@ -1892,7 +2590,46 @@ components: content_index: 0 delta: Hello sequence_number: 4 - OpenResponsesTextDoneEvent: + TextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDeltaEvent' + - type: object + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 + description: Event emitted when a text delta is streamed + example: + type: response.output_text.delta + logprobs: [] + output_index: 0 + item_id: item-1 + content_index: 0 + delta: Hello + sequence_number: 4 + BaseTextDoneEvent: type: object properties: type: @@ -1930,7 +2667,46 @@ components: text: Hello! How can I help you? sequence_number: 6 logprobs: [] - OpenResponsesRefusalDeltaEvent: + TextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDoneEvent' + - type: object + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 + description: Event emitted when text streaming is complete + example: + type: response.output_text.done + output_index: 0 + item_id: item-1 + content_index: 0 + text: Hello! How can I help you? + sequence_number: 6 + logprobs: [] + BaseRefusalDeltaEvent: type: object properties: type: @@ -1962,7 +2738,20 @@ components: content_index: 0 delta: I'm sorry sequence_number: 4 - OpenResponsesRefusalDoneEvent: + RefusalDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDeltaEvent' + - type: object + properties: {} + description: Event emitted when a refusal delta is streamed + example: + type: response.refusal.delta + output_index: 0 + item_id: item-1 + content_index: 0 + delta: I'm sorry + sequence_number: 4 + BaseRefusalDoneEvent: type: object properties: type: @@ -1994,7 +2783,20 @@ components: content_index: 0 refusal: I'm sorry, but I can't assist with that request. sequence_number: 6 - OpenResponsesOutputTextAnnotationAddedEvent: + RefusalDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDoneEvent' + - type: object + properties: {} + description: Event emitted when refusal streaming is complete + example: + type: response.refusal.done + output_index: 0 + item_id: item-1 + content_index: 0 + refusal: I'm sorry, but I can't assist with that request. + sequence_number: 6 + BaseAnnotationAddedEvent: type: object properties: type: @@ -2035,7 +2837,26 @@ components: title: Example start_index: 0 end_index: 7 - OpenResponsesFunctionCallArgumentsDeltaEvent: + AnnotationAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseAnnotationAddedEvent' + - type: object + properties: {} + description: Event emitted when a text annotation is added to output + example: + type: response.output_text.annotation.added + output_index: 0 + item_id: item-1 + content_index: 0 + sequence_number: 5 + annotation_index: 0 + annotation: + type: url_citation + url: https://example.com + title: Example + start_index: 0 + end_index: 7 + BaseFunctionCallArgsDeltaEvent: type: object properties: type: @@ -2063,7 +2884,19 @@ components: output_index: 0 delta: '{"city": "San' sequence_number: 4 - OpenResponsesFunctionCallArgumentsDoneEvent: + FunctionCallArgsDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent' + - type: object + properties: {} + description: Event emitted when function call arguments are being streamed + example: + type: response.function_call_arguments.delta + item_id: item-1 + output_index: 0 + delta: '{"city": "San' + sequence_number: 4 + BaseFunctionCallArgsDoneEvent: type: object properties: type: @@ -2095,7 +2928,20 @@ components: name: get_weather arguments: '{"city": "San Francisco", "units": "celsius"}' sequence_number: 6 - OpenAIResponsesReasoningDeltaEvent: + FunctionCallArgsDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseFunctionCallArgsDoneEvent' + - type: object + properties: {} + description: Event emitted when function call arguments streaming is complete + example: + type: response.function_call_arguments.done + item_id: item-1 + output_index: 0 + name: get_weather + arguments: '{"city": "San Francisco", "units": "celsius"}' + sequence_number: 6 + BaseReasoningDeltaEvent: type: object properties: type: @@ -2127,9 +2973,9 @@ components: content_index: 0 delta: First, we need sequence_number: 4 - OpenResponsesReasoningDeltaEvent: + ReasoningDeltaEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningDeltaEvent' + - $ref: '#/components/schemas/BaseReasoningDeltaEvent' - type: object properties: {} description: Event emitted when reasoning text delta is streamed @@ -2140,7 +2986,7 @@ components: content_index: 0 delta: First, we need sequence_number: 4 - OpenAIResponsesReasoningDoneEvent: + BaseReasoningDoneEvent: type: object properties: type: @@ -2172,9 +3018,9 @@ components: content_index: 0 text: First, we need to identify the key components and then combine them logically. sequence_number: 6 - OpenResponsesReasoningDoneEvent: + ReasoningDoneEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningDoneEvent' + - $ref: '#/components/schemas/BaseReasoningDoneEvent' - type: object properties: {} description: Event emitted when reasoning text streaming is complete @@ -2185,7 +3031,7 @@ components: content_index: 0 text: First, we need to identify the key components and then combine them logically. sequence_number: 6 - OpenAIResponsesReasoningSummaryPartAddedEvent: + BaseReasoningSummaryPartAddedEvent: type: object properties: type: @@ -2219,9 +3065,9 @@ components: type: summary_text text: '' sequence_number: 3 - OpenResponsesReasoningSummaryPartAddedEvent: + ReasoningSummaryPartAddedEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent' - type: object properties: {} description: Event emitted when a reasoning summary part is added @@ -2234,7 +3080,7 @@ components: type: summary_text text: '' sequence_number: 3 - OpenResponsesReasoningSummaryPartDoneEvent: + BaseReasoningSummaryPartDoneEvent: type: object properties: type: @@ -2268,7 +3114,22 @@ components: type: summary_text text: Analyzing the problem step by step to find the optimal solution. sequence_number: 7 - OpenAIResponsesReasoningSummaryTextDeltaEvent: + ReasoningSummaryPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent' + - type: object + properties: {} + description: Event emitted when a reasoning summary part is complete + example: + type: response.reasoning_summary_part.done + output_index: 0 + item_id: item-1 + summary_index: 0 + part: + type: summary_text + text: Analyzing the problem step by step to find the optimal solution. + sequence_number: 7 + BaseReasoningSummaryTextDeltaEvent: type: object properties: type: @@ -2300,9 +3161,9 @@ components: summary_index: 0 delta: Analyzing sequence_number: 4 - OpenResponsesReasoningSummaryTextDeltaEvent: + ReasoningSummaryTextDeltaEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent' - type: object properties: {} description: Event emitted when reasoning summary text delta is streamed @@ -2313,7 +3174,7 @@ components: summary_index: 0 delta: Analyzing sequence_number: 4 - OpenAIResponsesReasoningSummaryTextDoneEvent: + BaseReasoningSummaryTextDoneEvent: type: object properties: type: @@ -2345,9 +3206,9 @@ components: summary_index: 0 text: Analyzing the problem step by step to find the optimal solution. sequence_number: 6 - OpenResponsesReasoningSummaryTextDoneEvent: + ReasoningSummaryTextDoneEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent' - type: object properties: {} description: Event emitted when reasoning summary text streaming is complete @@ -2376,7 +3237,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallInProgress: + ImageGenCallInProgressEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress' - type: object @@ -2405,7 +3266,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallGenerating: + ImageGenCallGeneratingEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating' - type: object @@ -2440,7 +3301,7 @@ components: - sequence_number - partial_image_b64 - partial_image_index - OpenResponsesImageGenCallPartialImage: + ImageGenCallPartialImageEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage' - type: object @@ -2471,7 +3332,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallCompleted: + ImageGenCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' - type: object @@ -2482,14 +3343,101 @@ components: output_index: 0 sequence_number: 4 item_id: call-123 - OpenResponsesStreamEvent: + OpenAIResponsesWebSearchCallInProgress: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.in_progress + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallInProgressEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress' + - type: object + properties: {} + description: Web search call in progress + example: + type: response.web_search_call.in_progress + output_index: 0 + sequence_number: 1 + item_id: ws-123 + OpenAIResponsesWebSearchCallSearching: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.searching + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallSearchingEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching' + - type: object + properties: {} + description: Web search call is searching + example: + type: response.web_search_call.searching + output_index: 0 + sequence_number: 2 + item_id: ws-123 + OpenAIResponsesSearchCompleted: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.completed + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallCompletedEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' + - type: object + properties: {} + description: Web search call completed + example: + type: response.web_search_call.completed + output_index: 0 + sequence_number: 3 + item_id: ws-123 + StreamEvents: oneOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - $ref: '#/components/schemas/CreatedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is created example: type: response.created @@ -2512,11 +3460,11 @@ components: max_output_tokens: null sequence_number: 0 - allOf: - - $ref: '#/components/schemas/OpenResponsesInProgressEvent' + - $ref: '#/components/schemas/InProgressEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is in progress example: type: response.in_progress @@ -2539,11 +3487,11 @@ components: max_output_tokens: null sequence_number: 1 - allOf: - - $ref: '#/components/schemas/OpenResponsesCompletedEvent' + - $ref: '#/components/schemas/CompletedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response has completed successfully example: type: response.completed @@ -2574,11 +3522,11 @@ components: max_output_tokens: null sequence_number: 10 - allOf: - - $ref: '#/components/schemas/OpenResponsesIncompleteEvent' + - $ref: '#/components/schemas/IncompleteEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is incomplete example: type: response.incomplete @@ -2601,11 +3549,11 @@ components: max_output_tokens: null sequence_number: 5 - allOf: - - $ref: '#/components/schemas/OpenResponsesFailedEvent' + - $ref: '#/components/schemas/FailedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response has failed example: type: response.failed @@ -2627,13 +3575,13 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - - $ref: '#/components/schemas/OpenResponsesErrorEvent' + - $ref: '#/components/schemas/ErrorEvent' - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputItemAddedEvent' + - $ref: '#/components/schemas/OutputItemAddedEvent' - type: object properties: item: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' description: Event emitted when a new output item is added to the response example: type: response.output_item.added @@ -2646,11 +3594,11 @@ components: content: [] sequence_number: 2 - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputItemDoneEvent' + - $ref: '#/components/schemas/OutputItemDoneEvent' - type: object properties: item: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' description: Event emitted when an output item is complete example: type: response.output_item.done @@ -2665,160 +3613,28 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 - - allOf: - - $ref: '#/components/schemas/OpenResponsesContentPartAddedEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - description: Event emitted when a new content part is added to an output item - example: - type: response.content_part.added - output_index: 0 - item_id: item-1 - content_index: 0 - part: - type: output_text - text: '' - annotations: [] - sequence_number: 3 - - allOf: - - $ref: '#/components/schemas/OpenResponsesContentPartDoneEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - description: Event emitted when a content part is complete - example: - type: response.content_part.done - output_index: 0 - item_id: item-1 - content_index: 0 - part: - type: output_text - text: Hello! How can I help you? - annotations: [] - sequence_number: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesTextDeltaEvent' - - type: object - properties: {} - description: Event emitted when a text delta is streamed - example: - type: response.output_text.delta - logprobs: [] - output_index: 0 - item_id: item-1 - content_index: 0 - delta: Hello - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesTextDoneEvent' - - type: object - properties: {} - description: Event emitted when text streaming is complete - example: - type: response.output_text.done - output_index: 0 - item_id: item-1 - content_index: 0 - text: Hello! How can I help you? - sequence_number: 6 - logprobs: [] - - allOf: - - $ref: '#/components/schemas/OpenResponsesRefusalDeltaEvent' - - type: object - properties: {} - description: Event emitted when a refusal delta is streamed - example: - type: response.refusal.delta - output_index: 0 - item_id: item-1 - content_index: 0 - delta: I'm sorry - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesRefusalDoneEvent' - - type: object - properties: {} - description: Event emitted when refusal streaming is complete - example: - type: response.refusal.done - output_index: 0 - item_id: item-1 - content_index: 0 - refusal: I'm sorry, but I can't assist with that request. - sequence_number: 6 - - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputTextAnnotationAddedEvent' - - type: object - properties: {} - description: Event emitted when a text annotation is added to output - example: - type: response.output_text.annotation.added - output_index: 0 - item_id: item-1 - content_index: 0 - sequence_number: 5 - annotation_index: 0 - annotation: - type: url_citation - url: https://example.com - title: Example - start_index: 0 - end_index: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDeltaEvent' - - type: object - properties: {} - description: Event emitted when function call arguments are being streamed - example: - type: response.function_call_arguments.delta - item_id: item-1 - output_index: 0 - delta: '{"city": "San' - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDoneEvent' - - type: object - properties: {} - description: Event emitted when function call arguments streaming is complete - example: - type: response.function_call_arguments.done - item_id: item-1 - output_index: 0 - name: get_weather - arguments: '{"city": "San Francisco", "units": "celsius"}' - sequence_number: 6 - - $ref: '#/components/schemas/OpenResponsesReasoningDeltaEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningDoneEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartAddedEvent' - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartDoneEvent' - - type: object - properties: {} - description: Event emitted when a reasoning summary part is complete - example: - type: response.reasoning_summary_part.done - output_index: 0 - item_id: item-1 - summary_index: 0 - part: - type: summary_text - text: Analyzing the problem step by step to find the optimal solution. - sequence_number: 7 - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDeltaEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDoneEvent' - - $ref: '#/components/schemas/OpenResponsesImageGenCallInProgress' - - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' - - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' - - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' + - $ref: '#/components/schemas/ContentPartAddedEvent' + - $ref: '#/components/schemas/ContentPartDoneEvent' + - $ref: '#/components/schemas/TextDeltaEvent' + - $ref: '#/components/schemas/TextDoneEvent' + - $ref: '#/components/schemas/RefusalDeltaEvent' + - $ref: '#/components/schemas/RefusalDoneEvent' + - $ref: '#/components/schemas/AnnotationAddedEvent' + - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent' + - $ref: '#/components/schemas/FunctionCallArgsDoneEvent' + - $ref: '#/components/schemas/ReasoningDeltaEvent' + - $ref: '#/components/schemas/ReasoningDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/ImageGenCallInProgressEvent' + - $ref: '#/components/schemas/ImageGenCallGeneratingEvent' + - $ref: '#/components/schemas/ImageGenCallPartialImageEvent' + - $ref: '#/components/schemas/ImageGenCallCompletedEvent' + - $ref: '#/components/schemas/WebSearchCallInProgressEvent' + - $ref: '#/components/schemas/WebSearchCallSearchingEvent' + - $ref: '#/components/schemas/WebSearchCallCompletedEvent' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -3282,7 +4098,7 @@ components: error: code: 529 message: Provider returned error - OpenResponsesReasoning: + ReasoningItem: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object @@ -3312,7 +4128,7 @@ components: - type: summary_text text: Step by step analysis description: Reasoning output item with signature and format extensions - ResponseInputVideo: + InputVideo: type: object properties: type: @@ -3329,7 +4145,7 @@ components: example: type: input_video video_url: https://example.com/video.mp4 - OpenResponsesEasyInputMessage: + EasyInputMessage: type: object properties: type: @@ -3355,9 +4171,9 @@ components: - type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/InputText' - allOf: - - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/InputImage' - type: object properties: {} description: Image input content item @@ -3365,14 +4181,28 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' - - $ref: '#/components/schemas/ResponseInputVideo' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + - $ref: '#/components/schemas/InputVideo' - type: string + - nullable: true + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` + for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve + and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + example: final_answer required: - role - - content - OpenResponsesInputMessageItem: + InputMessageItem: type: object properties: id: @@ -3394,11 +4224,12 @@ components: - developer content: type: array + nullable: true items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/InputText' - allOf: - - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/InputImage' - type: object properties: {} description: Image input content item @@ -3406,13 +4237,12 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' - - $ref: '#/components/schemas/ResponseInputVideo' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + - $ref: '#/components/schemas/InputVideo' required: - role - - content - OpenResponsesFunctionToolCall: + FunctionCallItem: type: object properties: type: @@ -3428,7 +4258,7 @@ components: id: type: string status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -3443,7 +4273,7 @@ components: name: get_weather arguments: '{"location":"San Francisco"}' status: completed - OpenResponsesFunctionCallOutput: + FunctionCallOutputItem: type: object properties: type: @@ -3456,9 +4286,24 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - allOf: + - $ref: '#/components/schemas/InputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg + - $ref: '#/components/schemas/InputFile' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -3470,30 +4315,159 @@ components: call_id: call-abc123 output: '{"temperature":72,"conditions":"sunny"}' status: completed - OpenResponsesInput: + OutputDatetimeItem: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + datetime: + type: string + description: ISO 8601 datetime string + timezone: + type: string + description: IANA timezone name + required: + - type + - status + - datetime + - timezone + description: An openrouter:datetime server tool output item + example: + type: openrouter:datetime + id: dt_tmp_abc123 + status: completed + datetime: '2026-03-12T14:30:00.000Z' + timezone: UTC + Inputs: anyOf: - type: string - type: array items: anyOf: - - $ref: '#/components/schemas/OpenResponsesReasoning' - - $ref: '#/components/schemas/OpenResponsesEasyInputMessage' - - $ref: '#/components/schemas/OpenResponsesInputMessageItem' - - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' - - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' - - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ReasoningItem' + - $ref: '#/components/schemas/EasyInputMessage' + - $ref: '#/components/schemas/InputMessageItem' + - $ref: '#/components/schemas/FunctionCallItem' + - $ref: '#/components/schemas/FunctionCallOutputItem' + - allOf: + - $ref: '#/components/schemas/OutputMessageItem' + - type: object + properties: + content: + anyOf: + - type: array + items: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + - type: string + - nullable: true + example: + id: msg-123 + type: message + role: assistant + status: completed + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] + description: An output message item + - allOf: + - $ref: '#/components/schemas/OutputReasoningItem' + - type: object + properties: + summary: + type: array + nullable: true + items: + $ref: '#/components/schemas/ReasoningSummaryText' + example: + id: reasoning-123 + type: reasoning + status: completed + summary: + - type: summary_text + text: Analyzed the problem and found the optimal solution. + content: + - type: reasoning_text + text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 + description: An output item containing reasoning + - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputWebSearchCallItem' + - $ref: '#/components/schemas/OutputFileSearchCallItem' + - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputDatetimeItem' + - $ref: '#/components/schemas/OutputServerToolItem' description: Input for a response request - can be a string or array of items example: - role: user content: What is the weather today? - OpenResponsesResponseText: + DatetimeServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + parameters: + type: object + properties: + timezone: + type: string + description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + example: America/New_York + required: + - type + description: 'OpenRouter built-in server tool: returns the current date and time' + example: + type: openrouter:datetime + parameters: + timezone: America/New_York + WebSearchServerTool_OpenRouter: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + max_results: + type: number + minimum: 1 + maximum: 25 + description: Maximum number of search results to return per search call. Defaults to 5. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. + example: 20 + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 + TextExtendedConfig: allOf: - - $ref: '#/components/schemas/ResponseTextConfig' + - $ref: '#/components/schemas/TextConfig' - type: object properties: {} description: Text output configuration including format and verbosity @@ -3501,9 +4475,9 @@ components: format: type: text verbosity: medium - OpenResponsesReasoningConfig: + ReasoningConfig: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningConfig' + - $ref: '#/components/schemas/BaseReasoningConfig' - type: object nullable: true properties: @@ -3517,12 +4491,12 @@ components: example: summary: auto enabled: true - ResponsesOutputModality: + OutputModalityEnum: type: string enum: - text - image - OpenAIResponsesIncludable: + ResponseIncludesEnum: type: string enum: - file_search_call.results @@ -3530,6 +4504,13 @@ components: - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs + OpenAIResponsesTruncation: + type: string + nullable: true + enum: + - auto + - disabled + example: auto DataCollection: type: string nullable: true @@ -3548,6 +4529,7 @@ components: ProviderName: type: string enum: + - AkashML - AI21 - AionLabs - Alibaba @@ -3605,6 +4587,7 @@ components: - Parasail - Perplexity - Phala + - Reka - Relace - SambaNova - Seed @@ -3642,6 +4625,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price ProviderSortConfig: @@ -3654,6 +4638,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price partition: @@ -3747,36 +4732,49 @@ components: enum: - native - exa + - firecrawl + - parallel description: The search engine to use for web search. PDFParserEngine: - type: string - enum: - - mistral-ocr - - pdf-text - - native - description: The engine to use for parsing PDF files. + anyOf: + - type: string + enum: + - mistral-ocr + - native + - cloudflare-ai + - type: string + enum: + - pdf-text + description: >- + The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to + "cloudflare-ai". PDFParserOptions: type: object properties: engine: $ref: '#/components/schemas/PDFParserEngine' description: Options for PDF parsing. - OpenResponsesRequest: + ContextCompressionEngine: + type: string + enum: + - middle-out + description: The compression engine to use. Defaults to "middle-out". + ResponsesRequest: type: object properties: input: - $ref: '#/components/schemas/OpenResponsesInput' + $ref: '#/components/schemas/Inputs' instructions: type: string nullable: true metadata: - $ref: '#/components/schemas/OpenResponsesRequestMetadata' + $ref: '#/components/schemas/RequestMetadata' tools: type: array items: - oneOf: + anyOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - $ref: '#/components/schemas/FunctionTool' - type: object properties: {} description: Function tool definition @@ -3797,10 +4795,21 @@ components: - fahrenheit required: - location - - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' - - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -3813,9 +4822,9 @@ components: items: type: string text: - $ref: '#/components/schemas/OpenResponsesResponseText' + $ref: '#/components/schemas/TextExtendedConfig' reasoning: - $ref: '#/components/schemas/OpenResponsesReasoningConfig' + $ref: '#/components/schemas/ReasoningConfig' max_output_tokens: type: number nullable: true @@ -3862,7 +4871,7 @@ components: modalities: type: array items: - $ref: '#/components/schemas/ResponsesOutputModality' + $ref: '#/components/schemas/OutputModalityEnum' description: Output modalities for the response. Supported values are "text" and "image". example: - text @@ -3874,12 +4883,12 @@ components: type: string nullable: true prompt: - $ref: '#/components/schemas/OpenAIResponsesPrompt' + $ref: '#/components/schemas/StoredPromptTemplate' include: type: array nullable: true items: - $ref: '#/components/schemas/OpenAIResponsesIncludable' + $ref: '#/components/schemas/ResponseIncludesEnum' background: type: boolean nullable: true @@ -3892,13 +4901,16 @@ components: default: false service_tier: type: string + nullable: true enum: - auto + - default + - flex + - priority + - scale default: auto truncation: - allOf: - - $ref: '#/components/schemas/OpenAIResponsesTruncation' - - example: auto + $ref: '#/components/schemas/OpenAIResponsesTruncation' stream: type: boolean default: false @@ -4065,6 +5077,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -4091,6 +5125,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -4107,18 +5154,18 @@ components: x-fern-ignore: true user: type: string - maxLength: 128 + maxLength: 256 description: >- A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from - being affected by the actions of individual users. Maximum of 128 characters. + being affected by the actions of individual users. Maximum of 256 characters. session_id: type: string - maxLength: 128 + maxLength: 256 description: >- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes - precedence. Maximum of 128 characters. + precedence. Maximum of 256 characters. trace: type: object properties: @@ -4156,7 +5203,7 @@ components: properties: location: type: string - BaseAnthropicMessagesResponse: + BaseMessagesResult: type: object properties: id: @@ -4169,6 +5216,17 @@ components: type: string enum: - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at content: type: array items: @@ -4330,6 +5388,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -4337,6 +5427,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -4371,15 +5462,54 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -4387,6 +5517,38 @@ components: type: string enum: - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id tool_use_id: type: string content: @@ -4428,13 +5590,486 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large required: - type - error_code required: - type + - caller - tool_use_id - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id model: type: string stop_reason: @@ -4483,8 +6118,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests service_tier: type: string nullable: true @@ -4492,6 +6130,12 @@ components: - standard - priority - batch + speed: + type: string + nullable: true + enum: + - fast + - standard required: - input_tokens - output_tokens @@ -4505,21 +6149,205 @@ components: - id - type - role + - container - content - model - stop_reason - stop_sequence - usage - AnthropicMessagesResponse: + MessagesResult: allOf: - - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' + - $ref: '#/components/schemas/BaseMessagesResult' - type: object - properties: {} + properties: + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number + nullable: true + cache_read_input_tokens: + type: number + nullable: true + cache_creation: + type: object + nullable: true + properties: + ephemeral_5m_input_tokens: + type: number + ephemeral_1h_input_tokens: + type: number + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + speed: + type: string + nullable: true + enum: + - fast + - standard + cost: + type: number + nullable: true + is_byok: + type: boolean + cost_details: + type: object + nullable: true + properties: + upstream_inference_cost: + type: number + nullable: true + upstream_inference_prompt_cost: + type: number + upstream_inference_completions_cost: + type: number + required: + - upstream_inference_prompt_cost + - upstream_inference_completions_cost + required: + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions example: id: msg_01XFDUDYJgAACzvnptvVoYEL type: message role: assistant + container: null content: - type: text text: Hello! I'm doing well, thank you for asking. @@ -4536,362 +6364,1070 @@ components: inference_geo: null server_tool_use: null service_tier: standard - AnthropicMessagesStreamEvent: - oneOf: - - type: object + MessagesStartEvent: + type: object + properties: + type: + type: string + enum: + - message_start + message: + type: object properties: + id: + type: string type: type: string enum: - - message_start - message: + - message + role: + type: string + enum: + - assistant + container: type: object + nullable: true properties: id: type: string - type: + expires_at: type: string - enum: - - message - role: - type: string - enum: - - assistant - content: - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type + required: + - id + - expires_at + content: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: - text - - citations - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - name: - type: string - input: - nullable: true - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - file_id + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - file_id + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - file_id + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + required: + - type + - text + - citations + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - name: - type: string - enum: - - web_search - input: - nullable: true - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true type: type: string enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long + - document required: + - citations + - source + - title - type - - error_code - required: - - type - - tool_use_id - - content - model: - type: string - stop_reason: + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + nullable: true + stop_sequence: + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number nullable: true - stop_sequence: + cache_read_input_tokens: + type: number nullable: true - usage: + cache_creation: type: object + nullable: true properties: - input_tokens: + ephemeral_5m_input_tokens: type: number - output_tokens: + ephemeral_1h_input_tokens: type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + speed: + type: string + nullable: true + enum: + - fast + - standard required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider required: + - id - type - - message + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + required: + - type + - message + description: Event sent at the start of a streaming message + MessagesStreamEvents: + oneOf: + - $ref: '#/components/schemas/MessagesStartEvent' - type: object properties: type: @@ -4901,6 +7437,17 @@ components: delta: type: object properties: + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at stop_reason: type: string nullable: true @@ -4915,6 +7462,7 @@ components: type: string nullable: true required: + - container - stop_reason - stop_sequence usage: @@ -4937,8 +7485,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests required: - input_tokens - output_tokens @@ -5124,6 +7675,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -5131,6 +7714,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -5165,15 +7749,54 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -5181,6 +7804,38 @@ components: type: string enum: - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id tool_use_id: type: string content: @@ -5222,13 +7877,486 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large required: - type - error_code required: - type + - caller - tool_use_id - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id required: - type - index @@ -5473,7 +8601,7 @@ components: - type - error description: Union of all possible streaming events - OpenRouterAnthropicMessageParam: + MessagesMessageParam: type: object properties: role: @@ -6241,6 +9369,504 @@ components: required: - type - source + - type: object + properties: + type: + type: string + enum: + - tool_reference + tool_name: + type: string + required: + - type + - tool_name + - type: object + properties: + type: + type: string + enum: + - search_result + source: + type: string + title: + type: string + content: + type: array + items: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - text + citations: + type: object + properties: + enabled: + type: boolean + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source + - title + - content + - type: object + properties: + type: + type: string + enum: + - document + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - application/pdf + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - text + media_type: + type: string + enum: + - text/plain + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - content + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source + required: + - type + - content + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + context: + type: string + nullable: true + title: + type: string + nullable: true + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - source is_error: type: boolean cache_control: @@ -6297,6 +9923,12 @@ components: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 input: nullable: true cache_control: @@ -6575,7 +10207,92 @@ components: - role - content description: Anthropic message with OpenRouter extensions - AnthropicOutputConfig: + MessagesWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses + Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, + and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl + or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with + Firecrawl or native provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 + MessagesOutputConfig: type: object properties: effort: @@ -6590,8 +10307,26 @@ components: How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. example: medium - description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5. - AnthropicMessagesRequest: + format: + type: object + nullable: true + properties: + type: + type: string + enum: + - json_schema + schema: + type: object + additionalProperties: + nullable: true + required: + - type + - schema + description: >- + A schema to specify Claude's output format in responses. See [structured + outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. + MessagesRequest: type: object properties: model: @@ -6600,8 +10335,9 @@ components: type: number messages: type: array + nullable: true items: - $ref: '#/components/schemas/OpenRouterAnthropicMessageParam' + $ref: '#/components/schemas/MessagesMessageParam' system: anyOf: - type: string @@ -6767,8 +10503,6 @@ components: type: array items: type: string - stream: - type: boolean temperature: type: number top_p: @@ -6778,7 +10512,7 @@ components: tools: type: array items: - oneOf: + anyOf: - type: object properties: name: @@ -6790,8 +10524,7 @@ components: properties: type: type: string - enum: - - object + default: object properties: nullable: true required: @@ -6799,8 +10532,6 @@ components: nullable: true items: type: string - required: - - type additionalProperties: nullable: true type: @@ -6940,6 +10671,78 @@ components: required: - type - name + - type: object + properties: + type: + type: string + enum: + - web_search_20260209 + name: + type: string + enum: + - web_search + allowed_callers: + type: array + items: + type: string + enum: + - direct + - code_execution_20250825 + - code_execution_20260120 + allowed_domains: + type: array + nullable: true + items: + type: string + blocked_domains: + type: array + nullable: true + items: + type: string + max_uses: + type: number + nullable: true + user_location: + type: object + nullable: true + properties: + type: + type: string + enum: + - approximate + city: + type: string + nullable: true + country: + type: string + nullable: true + region: + type: string + nullable: true + timezone: + type: string + nullable: true + required: + - type + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + required: + - type + - name + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/MessagesWebSearchServerTool' tool_choice: oneOf: - type: object @@ -7017,6 +10820,159 @@ components: enum: - auto - standard_only + output_config: + $ref: '#/components/schemas/MessagesOutputConfig' + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + stream: + type: boolean + context_management: + type: object + nullable: true + properties: + edits: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - clear_tool_uses_20250919 + clear_at_least: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + clear_tool_inputs: + anyOf: + - type: boolean + - type: array + items: + type: string + - nullable: true + exclude_tools: + type: array + nullable: true + items: + type: string + keep: + type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + trigger: + oneOf: + - type: object + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + required: + - type + - type: object + properties: + type: + type: string + enum: + - clear_thinking_20251015 + keep: + anyOf: + - type: object + properties: + type: + type: string + enum: + - thinking_turns + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - all + required: + - type + - type: string + enum: + - all + required: + - type + - type: object + properties: + type: + type: string + enum: + - compact_20260112 + instructions: + type: string + nullable: true + pause_after_compaction: + type: boolean + trigger: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + required: + - type provider: type: object nullable: true @@ -7181,6 +11137,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -7207,6 +11185,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -7223,18 +11214,18 @@ components: x-fern-ignore: true user: type: string - maxLength: 128 + maxLength: 256 description: >- A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from - being affected by the actions of individual users. Maximum of 128 characters. + being affected by the actions of individual users. Maximum of 256 characters. session_id: type: string - maxLength: 128 + maxLength: 256 description: >- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes - precedence. Maximum of 128 characters. + precedence. Maximum of 256 characters. trace: type: object properties: @@ -7258,11 +11249,17 @@ components: type: array items: type: string - output_config: - $ref: '#/components/schemas/AnthropicOutputConfig' + speed: + type: string + enum: + - fast + - standard + description: >- + Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium + pricing. Defaults to `standard` when omitted. + example: fast required: - model - - max_tokens - messages description: Request schema for Anthropic Messages API endpoint example: @@ -7377,7 +11374,7 @@ components: error: code: 403 message: Only management keys can perform this operation - ChatCompletionFinishReason: + ChatFinishReasonEnum: type: string enum: - tool_calls @@ -7386,7 +11383,7 @@ components: - content_filter - error example: stop - ChatMessageContentItemCacheControl: + ChatContentCacheControl: type: object properties: type: @@ -7404,7 +11401,7 @@ components: example: type: ephemeral ttl: 5m - ChatMessageContentItemText: + ChatContentText: type: object properties: type: @@ -7414,7 +11411,7 @@ components: text: type: string cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + $ref: '#/components/schemas/ChatContentCacheControl' required: - type - text @@ -7422,7 +11419,7 @@ components: example: type: text text: Hello, world! - ChatMessageContentItemImage: + ChatContentImage: type: object properties: type: @@ -7453,7 +11450,7 @@ components: image_url: url: https://example.com/image.jpg detail: auto - ChatMessageContentItemAudio: + ChatContentAudio: type: object properties: type: @@ -7483,16 +11480,7 @@ components: input_audio: data: SGVsbG8gV29ybGQ= format: wav - VideoInput: - type: object - properties: - url: - type: string - description: 'URL of the video (data: URLs supported)' - required: - - url - description: Video input object - ChatMessageContentItemVideoLegacy: + Legacy_ChatContentVideo: type: object properties: type: @@ -7500,7 +11488,7 @@ components: enum: - input_video video_url: - $ref: '#/components/schemas/VideoInput' + $ref: '#/components/schemas/ChatContentVideoInput' required: - type - video_url @@ -7510,7 +11498,16 @@ components: type: input_video video_url: url: https://example.com/video.mp4 - ChatMessageContentItemVideo: + ChatContentVideoInput: + type: object + properties: + url: + type: string + description: 'URL of the video (data: URLs supported)' + required: + - url + description: Video input object + ChatContentVideo: type: object properties: type: @@ -7518,7 +11515,7 @@ components: enum: - video_url video_url: - $ref: '#/components/schemas/VideoInput' + $ref: '#/components/schemas/ChatContentVideoInput' required: - type - video_url @@ -7527,26 +11524,55 @@ components: type: video_url video_url: url: https://example.com/video.mp4 - ChatMessageContentItem: + ChatContentFile: + type: object + properties: + type: + type: string + enum: + - file + file: + type: object + properties: + file_data: + type: string + description: File content as base64 data URL or URL + file_id: + type: string + description: File ID for previously uploaded files + filename: + type: string + description: Original filename + required: + - type + - file + description: File content part for document processing + example: + type: file + file: + file_data: https://example.com/document.pdf + filename: document.pdf + ChatContentItems: oneOf: - - $ref: '#/components/schemas/ChatMessageContentItemText' - - $ref: '#/components/schemas/ChatMessageContentItemImage' - - $ref: '#/components/schemas/ChatMessageContentItemAudio' + - $ref: '#/components/schemas/ChatContentText' + - $ref: '#/components/schemas/ChatContentImage' + - $ref: '#/components/schemas/ChatContentAudio' - oneOf: - - $ref: '#/components/schemas/ChatMessageContentItemVideoLegacy' - - $ref: '#/components/schemas/ChatMessageContentItemVideo' + - $ref: '#/components/schemas/Legacy_ChatContentVideo' + - $ref: '#/components/schemas/ChatContentVideo' discriminator: propertyName: type mapping: - input_video: '#/components/schemas/ChatMessageContentItemVideoLegacy' - video_url: '#/components/schemas/ChatMessageContentItemVideo' + input_video: '#/components/schemas/Legacy_ChatContentVideo' + video_url: '#/components/schemas/ChatContentVideo' + - $ref: '#/components/schemas/ChatContentFile' discriminator: propertyName: type description: Content part for chat completion messages example: type: text text: Hello, world! - ChatMessageToolCall: + ChatToolCall: type: object properties: id: @@ -7691,12 +11717,12 @@ components: example: type: reasoning.summary summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - AssistantMessageReasoningDetails: + ChatReasoningDetails: type: array items: $ref: '#/components/schemas/ReasoningDetailUnion' description: Reasoning details for extended thinking models - AssistantMessageImages: + ChatAssistantImages: type: array items: type: object @@ -7715,7 +11741,28 @@ components: example: - image_url: url: data:image/png;base64,iVBORw0KGgo... - AssistantMessage: + ChatAudioOutput: + type: object + properties: + id: + type: string + description: Audio output identifier + expires_at: + type: number + description: Audio expiration timestamp + data: + type: string + description: Base64 encoded audio data + transcript: + type: string + description: Audio transcript + description: Audio output data or reference + example: + id: audio_abc123 + expires_at: 1677652400 + data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f + transcript: Hello! How can I help you today? + ChatAssistantMessage: type: object properties: role: @@ -7727,7 +11774,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' - nullable: true description: Assistant message content name: @@ -7736,7 +11783,7 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ChatMessageToolCall' + $ref: '#/components/schemas/ChatToolCall' description: Tool calls made by the assistant refusal: type: string @@ -7747,16 +11794,18 @@ components: nullable: true description: Reasoning output reasoning_details: - $ref: '#/components/schemas/AssistantMessageReasoningDetails' + $ref: '#/components/schemas/ChatReasoningDetails' images: - $ref: '#/components/schemas/AssistantMessageImages' + $ref: '#/components/schemas/ChatAssistantImages' + audio: + $ref: '#/components/schemas/ChatAudioOutput' required: - role description: Assistant message for requests and responses example: role: assistant content: The capital of France is Paris. - ChatMessageTokenLogprob: + ChatTokenLogprob: type: object properties: token: @@ -7804,7 +11853,7 @@ components: - token: ' Hello' logprob: -0.612345 bytes: null - ChatMessageTokenLogprobs: + ChatTokenLogprobs: type: object nullable: true properties: @@ -7812,17 +11861,16 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/ChatMessageTokenLogprob' + $ref: '#/components/schemas/ChatTokenLogprob' description: Log probabilities for content tokens refusal: type: array nullable: true items: - $ref: '#/components/schemas/ChatMessageTokenLogprob' + $ref: '#/components/schemas/ChatTokenLogprob' description: Log probabilities for refusal tokens required: - content - - refusal description: Log probabilities for the completion example: content: @@ -7831,12 +11879,12 @@ components: bytes: null top_logprobs: [] refusal: null - ChatResponseChoice: + ChatChoice: type: object properties: finish_reason: anyOf: - - $ref: '#/components/schemas/ChatCompletionFinishReason' + - $ref: '#/components/schemas/ChatFinishReasonEnum' - nullable: true - nullable: true index: @@ -7844,9 +11892,9 @@ components: description: Choice index example: 0 message: - $ref: '#/components/schemas/AssistantMessage' + $ref: '#/components/schemas/ChatAssistantMessage' logprobs: - $ref: '#/components/schemas/ChatMessageTokenLogprobs' + $ref: '#/components/schemas/ChatTokenLogprobs' required: - finish_reason - index @@ -7859,7 +11907,7 @@ components: role: assistant content: The capital of France is Paris. logprobs: null - ChatGenerationTokenUsage: + ChatUsage: type: object properties: completion_tokens: @@ -7922,7 +11970,7 @@ components: reasoning_tokens: 5 prompt_tokens_details: cached_tokens: 2 - ChatResponse: + ChatResult: type: object properties: id: @@ -7932,7 +11980,7 @@ components: choices: type: array items: - $ref: '#/components/schemas/ChatResponseChoice' + $ref: '#/components/schemas/ChatChoice' description: List of completion choices created: type: number @@ -7951,14 +11999,20 @@ components: nullable: true description: System fingerprint example: fp_44709d6fcb + service_tier: + type: string + nullable: true + description: The service tier used by the upstream provider for this request + example: default usage: - $ref: '#/components/schemas/ChatGenerationTokenUsage' + $ref: '#/components/schemas/ChatUsage' required: - id - choices - created - model - object + - system_fingerprint description: Chat completion response example: id: chatcmpl-123 @@ -7975,7 +12029,7 @@ components: prompt_tokens: 10 completion_tokens: 15 total_tokens: 25 - ChatStreamingMessageToolCall: + ChatStreamToolCall: type: object properties: index: @@ -8014,7 +12068,7 @@ components: function: name: get_weather arguments: '{"location":' - ChatStreamingMessageChunk: + ChatStreamDelta: type: object properties: role: @@ -8041,22 +12095,26 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ChatStreamingMessageToolCall' + $ref: '#/components/schemas/ChatStreamToolCall' description: Tool calls delta reasoning_details: - $ref: '#/components/schemas/AssistantMessageReasoningDetails' + $ref: '#/components/schemas/ChatReasoningDetails' + audio: + allOf: + - $ref: '#/components/schemas/ChatAudioOutput' + - description: Audio output data description: Delta changes in streaming response example: role: assistant content: Hello - ChatStreamingChoice: + ChatStreamChoice: type: object properties: delta: - $ref: '#/components/schemas/ChatStreamingMessageChunk' + $ref: '#/components/schemas/ChatStreamDelta' finish_reason: anyOf: - - $ref: '#/components/schemas/ChatCompletionFinishReason' + - $ref: '#/components/schemas/ChatFinishReasonEnum' - nullable: true - nullable: true index: @@ -8064,7 +12122,7 @@ components: description: Choice index example: 0 logprobs: - $ref: '#/components/schemas/ChatMessageTokenLogprobs' + $ref: '#/components/schemas/ChatTokenLogprobs' required: - delta - finish_reason @@ -8076,7 +12134,7 @@ components: role: assistant content: Hello finish_reason: null - ChatStreamingResponseChunk: + ChatStreamChunk: type: object properties: id: @@ -8086,7 +12144,7 @@ components: choices: type: array items: - $ref: '#/components/schemas/ChatStreamingChoice' + $ref: '#/components/schemas/ChatStreamChoice' description: List of streaming chunk choices created: type: number @@ -8102,9 +12160,13 @@ components: - chat.completion.chunk system_fingerprint: type: string - nullable: true description: System fingerprint example: fp_44709d6fcb + service_tier: + type: string + nullable: true + description: The service tier used by the upstream provider for this request + example: default error: type: object properties: @@ -8124,7 +12186,7 @@ components: message: Rate limit exceeded code: 429 usage: - $ref: '#/components/schemas/ChatGenerationTokenUsage' + $ref: '#/components/schemas/ChatUsage' required: - id - choices @@ -8144,7 +12206,7 @@ components: role: assistant content: Hello finish_reason: null - SystemMessage: + ChatSystemMessage: type: object properties: role: @@ -8156,7 +12218,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItemText' + $ref: '#/components/schemas/ChatContentText' description: System message content example: You are a helpful assistant. name: @@ -8171,7 +12233,7 @@ components: role: system content: You are a helpful assistant. name: Assistant Config - UserMessage: + ChatUserMessage: type: object properties: role: @@ -8183,7 +12245,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' description: User message content example: What is the capital of France? name: @@ -8197,7 +12259,7 @@ components: example: role: user content: What is the capital of France? - DeveloperMessage: + ChatDeveloperMessage: type: object properties: role: @@ -8209,7 +12271,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItemText' + $ref: '#/components/schemas/ChatContentText' description: Developer message content example: This is a message from the developer. name: @@ -8223,7 +12285,7 @@ components: example: role: developer content: This is a message from the developer. - ToolResponseMessage: + ChatToolMessage: type: object properties: role: @@ -8235,7 +12297,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' description: Tool response content example: The weather in San Francisco is 72°F and sunny. tool_call_id: @@ -8251,13 +12313,13 @@ components: role: tool content: The weather in San Francisco is 72°F and sunny. tool_call_id: call_abc123 - Message: + ChatMessages: oneOf: - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/DeveloperMessage' - - $ref: '#/components/schemas/AssistantMessage' - - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/ChatSystemMessage' + - $ref: '#/components/schemas/ChatUserMessage' + - $ref: '#/components/schemas/ChatDeveloperMessage' + - $ref: '#/components/schemas/ChatAssistantMessage' + - $ref: '#/components/schemas/ChatToolMessage' discriminator: propertyName: role description: Chat completion message with role-based discrimination @@ -8268,7 +12330,7 @@ components: type: string description: Model to use for completion example: openai/gpt-4 - ModelNames: + ChatModelNames: type: array items: allOf: @@ -8278,7 +12340,13 @@ components: example: - openai/gpt-4 - openai/gpt-4o - ResponseFormatText: + ChatReasoningSummaryVerbosityEnum: + type: string + enum: + - auto + - concise + - detailed + ChatFormatTextConfig: type: object properties: type: @@ -8290,19 +12358,7 @@ components: description: Default text response format example: type: text - ResponseFormatJSONObject: - type: object - properties: - type: - type: string - enum: - - json_object - required: - - type - description: JSON object response format - example: - type: json_object - JSONSchemaConfig: + ChatJsonSchemaConfig: type: object properties: name: @@ -8345,7 +12401,7 @@ components: required: - answer strict: true - ResponseFormatJSONSchema: + ChatFormatJsonSchemaConfig: type: object properties: type: @@ -8353,7 +12409,7 @@ components: enum: - json_schema json_schema: - $ref: '#/components/schemas/JSONSchemaConfig' + $ref: '#/components/schemas/ChatJsonSchemaConfig' required: - type - json_schema @@ -8369,7 +12425,7 @@ components: type: number required: - answer - ResponseFormatTextGrammar: + ChatFormatGrammarConfig: type: object properties: type: @@ -8387,7 +12443,7 @@ components: example: type: grammar grammar: root ::= "yes" | "no" - ResponseFormatTextPython: + ChatFormatPythonConfig: type: object properties: type: @@ -8411,7 +12467,7 @@ components: description: Streaming configuration options example: include_usage: true - NamedToolChoice: + ChatNamedToolChoice: type: object properties: type: @@ -8435,7 +12491,7 @@ components: type: function function: name: get_weather - ToolChoiceOption: + ChatToolChoice: anyOf: - type: string enum: @@ -8446,66 +12502,308 @@ components: - type: string enum: - required - - $ref: '#/components/schemas/NamedToolChoice' + - $ref: '#/components/schemas/ChatNamedToolChoice' description: Tool choice configuration example: auto - ToolDefinitionJson: + ChatWebSearchServerTool: type: object properties: type: type: string enum: - - function - function: + - openrouter:web_search + parameters: type: object properties: - name: + engine: type: string - maxLength: 64 - description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: get_weather - description: + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses + Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, + and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: type: string - description: Function description for the model - example: Get the current weather for a location - parameters: - type: object - additionalProperties: - nullable: true - description: Function parameters as JSON Schema object - example: - type: object - properties: - location: - type: string - description: City name - required: - - location - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false - required: - - name - description: Function definition for tool calling - example: - name: get_weather - description: Get the current weather for a location - parameters: + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: type: object properties: - location: + type: type: string - description: City name - required: - - location - cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl + or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with + Firecrawl or native provider search. required: - type - - function - description: Tool definition for function calling + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + engine: auto + max_results: 5 + ChatWebSearchShorthand: + type: object + properties: + type: + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl + (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and + Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic + loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa + engine; ignored with native provider search. + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or + native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl + or native provider search. + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. + "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses + Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, + and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is + reached, the tool will stop returning new results. Useful for controlling cost and context size in + agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the + Exa engine; ignored with native provider search. + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl + or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with + Firecrawl or native provider search. + required: + - type + description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + ChatFunctionTool: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + maxLength: 64 + description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: get_weather + description: + type: string + description: Function description for the model + example: Get the current weather for a location + parameters: + type: object + additionalProperties: + nullable: true + description: Function parameters as JSON Schema object + example: + type: object + properties: + location: + type: string + description: City name + required: + - location + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false + required: + - name + description: Function definition for tool calling + example: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + required: + - location + cache_control: + $ref: '#/components/schemas/ChatContentCacheControl' + required: + - type + - function + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/ChatWebSearchServerTool' + - $ref: '#/components/schemas/ChatWebSearchShorthand' + description: Tool definition for function calling (regular function or OpenRouter built-in server tool) example: type: function function: @@ -8524,7 +12822,7 @@ components: - fahrenheit required: - location - DebugOptions: + ChatDebugOptions: type: object properties: echo_upstream_body: @@ -8536,7 +12834,7 @@ components: description: Debug options for inspecting request transformations (streaming only) example: echo_upstream_body: true - ChatGenerationParams: + ChatRequest: type: object properties: provider: @@ -8703,6 +13001,28 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") + and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -8729,6 +13049,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -8749,11 +13082,11 @@ components: example: user-123 session_id: type: string - maxLength: 128 + maxLength: 256 description: >- A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes - precedence. Maximum of 128 characters. + precedence. Maximum of 256 characters. trace: type: object properties: @@ -8776,7 +13109,7 @@ components: messages: type: array items: - $ref: '#/components/schemas/Message' + $ref: '#/components/schemas/ChatMessages' minItems: 1 description: List of messages for the conversation example: @@ -8785,7 +13118,7 @@ components: model: $ref: '#/components/schemas/ModelName' models: - $ref: '#/components/schemas/ModelNames' + $ref: '#/components/schemas/ChatModelNames' frequency_penalty: type: number nullable: true @@ -8823,7 +13156,7 @@ components: type: number nullable: true minimum: 1 - description: Maximum tokens (deprecated, use max_completion_tokens) + description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' example: 100 metadata: type: object @@ -8857,7 +13190,7 @@ components: example: medium summary: anyOf: - - $ref: '#/components/schemas/ReasoningSummaryVerbosity' + - $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum' - nullable: true - nullable: true description: Configuration options for reasoning models @@ -8866,11 +13199,11 @@ components: summary: concise response_format: oneOf: - - $ref: '#/components/schemas/ResponseFormatText' - - $ref: '#/components/schemas/ResponseFormatJSONObject' - - $ref: '#/components/schemas/ResponseFormatJSONSchema' - - $ref: '#/components/schemas/ResponseFormatTextGrammar' - - $ref: '#/components/schemas/ResponseFormatTextPython' + - $ref: '#/components/schemas/ChatFormatTextConfig' + - $ref: '#/components/schemas/FormatJsonObjectConfig' + - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig' + - $ref: '#/components/schemas/ChatFormatGrammarConfig' + - $ref: '#/components/schemas/ChatFormatPythonConfig' discriminator: propertyName: type description: Response format configuration @@ -8912,11 +13245,11 @@ components: type: boolean nullable: true tool_choice: - $ref: '#/components/schemas/ToolChoiceOption' + $ref: '#/components/schemas/ChatToolChoice' tools: type: array items: - $ref: '#/components/schemas/ToolDefinitionJson' + $ref: '#/components/schemas/ChatFunctionTool' description: Available tools for function calling example: - type: function @@ -8932,7 +13265,7 @@ components: description: Nucleus sampling parameter (0-1) example: 1 debug: - $ref: '#/components/schemas/DebugOptions' + $ref: '#/components/schemas/ChatDebugOptions' image_config: type: object additionalProperties: @@ -8954,10 +13287,39 @@ components: enum: - text - image - description: Output modalities for the response. Supported values are "text" and "image". + - audio + description: Output modalities for the response. Supported values are "text", "image", and "audio". example: - text - image + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type + description: >- + Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last + cacheable block in the request. Currently supported for Anthropic Claude models. + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + description: The service tier to use for processing this request. + example: auto required: - messages description: Chat completion request parameters @@ -9209,6 +13571,7 @@ components: - image - embeddings - audio + - video example: text ModelArchitecture: type: object @@ -9356,17 +13719,34 @@ components: nullable: true minimum: 0 maximum: 1 + top_k: + type: integer + nullable: true + minimum: 0 frequency_penalty: type: number nullable: true minimum: -2 maximum: 2 + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + repetition_penalty: + type: number + nullable: true + minimum: 0 + maximum: 2 additionalProperties: false description: Default parameters for this model example: temperature: 0.7 top_p: 0.9 + top_k: 0 frequency_penalty: 0 + presence_penalty: 0 + repetition_penalty: 1 Model: type: object properties: @@ -9415,6 +13795,11 @@ components: description: List of supported parameters for this model default_parameters: $ref: '#/components/schemas/DefaultParameters' + knowledge_cutoff: + type: string + nullable: true + description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. + example: '2024-10-01' expiration_date: type: string nullable: true @@ -9463,6 +13848,7 @@ components: - top_p - max_tokens default_parameters: null + knowledge_cutoff: null expiration_date: null ModelsListResponseData: type: array @@ -9510,6 +13896,7 @@ components: - frequency_penalty - presence_penalty default_parameters: null + knowledge_cutoff: null expiration_date: null ModelsCountResponse: type: object @@ -9866,6 +14253,40 @@ components: p75: 38.5 p90: 28.3 p99: 15.1 + ConflictResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for ConflictResponse + example: + code: 409 + message: Resource conflict. Please try again later. + ConflictResponse: + type: object + properties: + error: + $ref: '#/components/schemas/ConflictResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Conflict - Resource conflict or concurrent modification + example: + error: + code: 409 + message: Resource conflict. Please try again later. parameters: {} securitySchemes: apiKey: @@ -9889,7 +14310,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenResponsesRequest' + $ref: '#/components/schemas/ResponsesRequest' required: true responses: '200': @@ -9897,13 +14318,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' text/event-stream: schema: type: object properties: data: - $ref: '#/components/schemas/OpenResponsesStreamEvent' + $ref: '#/components/schemas/StreamEvents' required: - data x-speakeasy-sse-sentinel: '[DONE]' @@ -10001,7 +14422,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AnthropicMessagesRequest' + $ref: '#/components/schemas/MessagesRequest' required: true responses: '200': @@ -10009,7 +14430,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AnthropicMessagesResponse' + $ref: '#/components/schemas/MessagesResult' text/event-stream: schema: type: object @@ -10017,7 +14438,7 @@ paths: event: type: string data: - $ref: '#/components/schemas/AnthropicMessagesStreamEvent' + $ref: '#/components/schemas/MessagesStreamEvents' required: - event - data @@ -10301,7 +14722,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatGenerationParams' + $ref: '#/components/schemas/ChatRequest' required: true responses: '200': @@ -10309,13 +14730,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatResponse' + $ref: '#/components/schemas/ChatResult' text/event-stream: schema: type: object properties: data: - $ref: '#/components/schemas/ChatStreamingResponseChunk' + $ref: '#/components/schemas/ChatStreamChunk' required: - data x-speakeasy-sse-sentinel: '[DONE]' @@ -10986,6 +15407,7 @@ paths: enum: - completions - embeddings + - video description: Type of API used for the generation router: type: string @@ -11035,6 +15457,7 @@ paths: - Together 2 - Ubicloud - 01.AI + - AkashML - AI21 - AionLabs - Alibaba @@ -11092,6 +15515,7 @@ paths: - Parasail - Perplexity - Phala + - Reka - Relace - SambaNova - Seed @@ -11119,6 +15543,14 @@ paths: required: - status description: List of provider responses for this generation, including fallback attempts + user_agent: + type: string + nullable: true + description: User-Agent header from the request + http_referer: + type: string + nullable: true + description: Referer header from the request required: - id - upstream_id @@ -11154,6 +15586,8 @@ paths: - api_type - router - provider_responses + - user_agent + - http_referer description: Generation data required: - data @@ -11213,6 +15647,19 @@ paths: - Models x-speakeasy-name-override: count summary: Get total count of available models + parameters: + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns the total count of available models @@ -11220,6 +15667,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsCountResponse' + '400': + description: Bad Request - Invalid output_modalities value + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' '500': description: Internal Server Error content: @@ -11260,6 +15713,18 @@ paths: required: false name: supported_parameters in: query + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, + embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query - schema: type: string required: false @@ -11445,6 +15910,520 @@ paths: nullable: true description: URL to the provider's status page example: https://status.openai.com + headquarters: + type: string + nullable: true + enum: + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AX + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BQ + - BR + - BS + - BT + - BV + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GF + - GG + - GH + - GI + - GL + - GM + - GN + - GP + - GQ + - GR + - GS + - GT + - GU + - GW + - GY + - HK + - HM + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - MQ + - MR + - MS + - MT + - MU + - MV + - MW + - MX + - MY + - MZ + - NA + - NC + - NE + - NF + - NG + - NI + - NL + - 'NO' + - NP + - NR + - NU + - NZ + - OM + - PA + - PE + - PF + - PG + - PH + - PK + - PL + - PM + - PN + - PR + - PS + - PT + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TF + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - UM + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - YE + - YT + - ZA + - ZM + - ZW + description: ISO 3166-1 Alpha-2 country code of the provider headquarters + example: US + datacenters: + type: array + nullable: true + items: + type: string + enum: + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AX + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BQ + - BR + - BS + - BT + - BV + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GF + - GG + - GH + - GI + - GL + - GM + - GN + - GP + - GQ + - GR + - GS + - GT + - GU + - GW + - GY + - HK + - HM + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - MQ + - MR + - MS + - MT + - MU + - MV + - MW + - MX + - MY + - MZ + - NA + - NC + - NE + - NF + - NG + - NI + - NL + - 'NO' + - NP + - NR + - NU + - NZ + - OM + - PA + - PE + - PF + - PG + - PH + - PK + - PL + - PM + - PN + - PR + - PS + - PT + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TF + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - UM + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - YE + - YT + - ZA + - ZM + - ZW + description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations + example: + - US + - IE required: - name - slug @@ -11455,6 +16434,10 @@ paths: privacy_policy_url: https://openai.com/privacy terms_of_service_url: https://openai.com/terms status_page_url: https://status.openai.com + headquarters: US + datacenters: + - US + - IE required: - data '500': @@ -11585,6 +16568,13 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created + the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -11604,6 +16594,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -11624,6 +16615,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: List of API keys required: - data @@ -11648,6 +16640,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '401': description: Unauthorized - Missing or invalid authentication content: @@ -11815,6 +16808,13 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created + the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -11834,6 +16834,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -11854,6 +16855,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The created API key information key: type: string @@ -11883,6 +16885,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: null expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 key: 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 '400': description: Bad Request - Invalid request parameters @@ -12059,6 +17062,13 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created + the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -12078,6 +17088,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -12098,6 +17109,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The updated API key information required: - data @@ -12122,6 +17134,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T16:00:00Z' expires_at: null + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '400': description: Bad Request - Invalid request parameters content: @@ -12319,6 +17332,13 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created + the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -12338,6 +17358,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -12358,6 +17379,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The API key information required: - data @@ -12382,6 +17404,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '401': description: Unauthorized - Missing or invalid authentication content: @@ -12486,6 +17509,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12524,6 +17555,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12547,6 +17579,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12618,6 +17651,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12645,6 +17687,7 @@ paths: - openai - anthropic - deepseek + ignored_providers: null allowed_models: null enforce_zdr: false required: true @@ -12699,6 +17742,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12737,6 +17788,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12755,6 +17807,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12846,6 +17899,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12884,6 +17945,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12902,6 +17964,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12986,6 +18049,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13057,6 +18129,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13095,6 +18175,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13111,6 +18192,7 @@ paths: reset_interval: weekly allowed_providers: - openai + ignored_providers: null allowed_models: null enforce_zdr: true created_at: '2025-08-24T10:30:00Z' @@ -14004,6 +19086,13 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created + the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: type: object properties: @@ -14046,6 +19135,7 @@ paths: - limit_remaining - limit_reset - include_byok_in_limit + - creator_user_id - rate_limit description: Current API key information example: @@ -14066,6 +19156,7 @@ paths: limit_reset: monthly include_byok_in_limit: false expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: requests: 1000 interval: 1h @@ -14091,6 +19182,7 @@ paths: limit_reset: monthly include_byok_in_limit: false expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: requests: 1000 interval: 1h @@ -14301,6 +19393,12 @@ paths: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + '409': + description: Conflict - App upsert conflict during auth code creation + content: + application/json: + schema: + $ref: '#/components/schemas/ConflictResponse' '500': description: Internal Server Error - Unexpected server error content: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 23a2512..7af13f0 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -210,6 +210,17 @@ components: anyOf: - $ref: '#/components/schemas/ResponseOutputText' - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. required: - id - role @@ -223,7 +234,7 @@ components: content: - type: output_text text: Hello! How can I help you today? - ResponsesOutputMessage: + OutputMessageItem: allOf: - $ref: '#/components/schemas/OutputMessage' - type: object @@ -309,7 +320,7 @@ components: summary: - type: summary_text text: Analyzed the problem using first principles - ResponsesOutputItemReasoning: + OutputReasoningItem: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object @@ -387,7 +398,7 @@ components: name: get_weather arguments: '{"location":"San Francisco","unit":"celsius"}' call_id: call-abc123 - ResponsesOutputItemFunctionCall: + OutputFunctionCallItem: allOf: - $ref: '#/components/schemas/OutputItemFunctionCall' - type: object @@ -416,17 +427,77 @@ components: - web_search_call id: type: string + action: + oneOf: + - type: object + properties: + type: + type: string + enum: + - search + query: + type: string + queries: + type: array + items: + type: string + sources: + type: array + items: + type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + required: + - type + - query + - type: object + properties: + type: + type: string + enum: + - open_page + url: + type: string + nullable: true + required: + - type + - type: object + properties: + type: + type: string + enum: + - find_in_page + pattern: + type: string + url: + type: string + required: + - type + - pattern + - url status: $ref: '#/components/schemas/WebSearchStatus' required: - type - id + - action - status example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed - ResponsesWebSearchCallOutput: + OutputWebSearchCallItem: allOf: - $ref: '#/components/schemas/OutputItemWebSearchCall' - type: object @@ -434,6 +505,9 @@ components: example: type: web_search_call id: search-abc123 + action: + type: search + query: OpenAI API status: completed OutputItemFileSearchCall: type: object @@ -462,7 +536,7 @@ components: - machine learning algorithms - neural networks status: completed - ResponsesOutputItemFileSearchCall: + OutputFileSearchCallItem: allOf: - $ref: '#/components/schemas/OutputItemFileSearchCall' - type: object @@ -507,7 +581,7 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed - ResponsesImageGenerationCall: + OutputImageGenerationCallItem: allOf: - $ref: '#/components/schemas/OutputItemImageGenerationCall' - type: object @@ -517,14 +591,41 @@ components: id: imagegen-abc123 result: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg== status: completed - ResponsesOutputItem: + OutputServerToolItem: + type: object + properties: + type: + type: string + pattern: '^openrouter:' + description: Server tool type (e.g. openrouter:datetime, openrouter:web_search) + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + x-speakeasy-unknown-values: allow + required: + - type + - status + additionalProperties: + nullable: true + description: A generic OpenRouter server tool output item + example: + type: openrouter:web_search + id: ws_tmp_abc123 + status: completed + OutputItems: anyOf: - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' - - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/OutputMessageItem' + - $ref: '#/components/schemas/OutputReasoningItem' + - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputWebSearchCallItem' + - $ref: '#/components/schemas/OutputFileSearchCallItem' + - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputServerToolItem' description: An output item from the response example: id: msg-abc123 @@ -569,7 +670,7 @@ components: example: code: rate_limit_exceeded message: Rate limit exceeded. Please try again later. - OpenAIResponsesIncompleteDetails: + IncompleteDetails: type: object nullable: true properties: @@ -608,7 +709,7 @@ components: - output_tokens - output_tokens_details - total_tokens - OpenResponsesUsage: + Usage: allOf: - $ref: '#/components/schemas/OpenAIResponsesUsage' - type: object @@ -648,7 +749,7 @@ components: upstream_inference_cost: null upstream_inference_input_cost: 0.0008 upstream_inference_output_cost: 0.0004 - ResponseInputText: + InputText: type: object properties: type: @@ -664,7 +765,7 @@ components: example: type: input_text text: Hello, how can I help you? - ResponseInputImage: + InputImage: type: object properties: type: @@ -689,7 +790,7 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - ResponseInputFile: + InputFile: type: object properties: type: @@ -712,7 +813,7 @@ components: type: input_file file_id: file-abc123 filename: document.pdf - ResponseInputAudio: + InputAudio: type: object properties: type: @@ -742,7 +843,7 @@ components: input_audio: data: SGVsbG8gV29ybGQ= format: mp3 - ToolCallStatus: + ToolCallStatusEnum: type: string nullable: true enum: @@ -751,7 +852,7 @@ components: - incomplete example: completed x-speakeasy-unknown-values: allow - OpenAIResponsesInput: + BaseInputs: anyOf: - type: string - type: array @@ -782,18 +883,27 @@ components: - type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' discriminator: propertyName: type mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + input_audio: '#/components/schemas/InputAudio' - type: string + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true required: - role - content @@ -820,17 +930,17 @@ components: type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' discriminator: propertyName: type mapping: - input_text: '#/components/schemas/ResponseInputText' - input_image: '#/components/schemas/ResponseInputImage' - input_file: '#/components/schemas/ResponseInputFile' - input_audio: '#/components/schemas/ResponseInputAudio' + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' + input_audio: '#/components/schemas/InputAudio' required: - id - role @@ -847,9 +957,22 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' + discriminator: + propertyName: type + mapping: + input_text: '#/components/schemas/InputText' + input_image: '#/components/schemas/InputImage' + input_file: '#/components/schemas/InputFile' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -869,7 +992,7 @@ components: id: type: string status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -878,7 +1001,7 @@ components: - $ref: '#/components/schemas/OutputItemImageGenerationCall' - $ref: '#/components/schemas/OutputMessage' - nullable: true - OpenResponsesRequestMetadata: + RequestMetadata: type: object nullable: true additionalProperties: @@ -889,7 +1012,7 @@ components: example: user_id: '123' session_id: abc-def-ghi - OpenResponsesFunctionTool: + FunctionTool: type: object properties: type: @@ -932,7 +1055,7 @@ components: x-speakeasy-unknown-values: allow required: - location - ResponsesSearchContextSize: + SearchContextSizeEnum: type: string enum: - low @@ -941,7 +1064,7 @@ components: description: Size of the search context for web search tools example: medium x-speakeasy-unknown-values: allow - WebSearchPreviewToolUserLocation: + Preview_WebSearchUserLocation: type: object nullable: true properties: @@ -963,7 +1086,7 @@ components: nullable: true required: - type - OpenResponsesWebSearchPreviewTool: + Preview_WebSearchServerTool: type: object properties: type: @@ -971,15 +1094,48 @@ components: enum: - web_search_preview search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + $ref: '#/components/schemas/Preview_WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration example: type: web_search_preview - OpenResponsesWebSearchPreview20250311Tool: + Preview_20250311_WebSearchServerTool: type: object properties: type: @@ -987,15 +1143,48 @@ components: enum: - web_search_preview_2025_03_11 search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/WebSearchPreviewToolUserLocation' + $ref: '#/components/schemas/Preview_WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + filters: + type: object + nullable: true + properties: + allowed_domains: + type: array + nullable: true + items: + type: string + excluded_domains: + type: array + nullable: true + items: + type: string required: - type description: Web search preview tool configuration (2025-03-11 version) example: type: web_search_preview_2025_03_11 - ResponsesWebSearchUserLocation: + WebSearchUserLocation: type: object nullable: true properties: @@ -1022,7 +1211,7 @@ components: country: USA region: California timezone: America/Los_Angeles - OpenResponsesWebSearchTool: + Legacy_WebSearchServerTool: type: object properties: type: @@ -1038,19 +1227,44 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + $ref: '#/components/schemas/WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration example: type: web_search + engine: auto filters: allowed_domains: - example.com - OpenResponsesWebSearch20250826Tool: + WebSearchServerTool: type: object properties: type: @@ -1066,18 +1280,433 @@ components: nullable: true items: type: string + excluded_domains: + type: array + nullable: true + items: + type: string search_context_size: - $ref: '#/components/schemas/ResponsesSearchContextSize' + $ref: '#/components/schemas/SearchContextSizeEnum' user_location: - $ref: '#/components/schemas/ResponsesWebSearchUserLocation' + $ref: '#/components/schemas/WebSearchUserLocation' + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 required: - type description: Web search tool configuration (2025-08-26 version) example: type: web_search_2025_08_26 + engine: auto filters: allowed_domains: - example.com + CompoundFilter: + type: object + properties: + type: + type: string + enum: + - and + - or + x-speakeasy-unknown-values: allow + filters: + type: array + items: + type: object + additionalProperties: + nullable: true + required: + - type + - filters + description: A compound filter that combines multiple comparison or compound filters + FileSearchServerTool: + type: object + properties: + type: + type: string + enum: + - file_search + vector_store_ids: + type: array + items: + type: string + filters: + anyOf: + - type: object + properties: + key: + type: string + type: + type: string + enum: + - eq + - ne + - gt + - gte + - lt + - lte + x-speakeasy-unknown-values: allow + value: + anyOf: + - type: string + - type: number + - type: boolean + - type: array + items: + anyOf: + - type: string + - type: number + required: + - key + - type + - value + - $ref: '#/components/schemas/CompoundFilter' + - nullable: true + max_num_results: + type: integer + minimum: 1 + maximum: 50 + ranking_options: + type: object + properties: + ranker: + type: string + enum: + - auto + - default-2024-11-15 + x-speakeasy-unknown-values: allow + score_threshold: + type: number + required: + - type + - vector_store_ids + description: File search tool configuration + example: + type: file_search + vector_store_ids: + - vs_abc123 + ComputerUseServerTool: + type: object + properties: + type: + type: string + enum: + - computer_use_preview + display_height: + type: number + display_width: + type: number + environment: + type: string + enum: + - windows + - mac + - linux + - ubuntu + - browser + x-speakeasy-unknown-values: allow + required: + - type + - display_height + - display_width + - environment + description: Computer use preview tool configuration + example: + type: computer_use_preview + display_height: 768 + display_width: 1024 + environment: linux + CodeInterpreterServerTool: + type: object + properties: + type: + type: string + enum: + - code_interpreter + container: + anyOf: + - type: string + - type: object + properties: + type: + type: string + enum: + - auto + file_ids: + type: array + items: + type: string + memory_limit: + type: string + nullable: true + enum: + - 1g + - 4g + - 16g + - 64g + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - container + description: Code interpreter tool configuration + example: + type: code_interpreter + container: auto + McpServerTool: + type: object + properties: + type: + type: string + enum: + - mcp + server_label: + type: string + allowed_tools: + anyOf: + - type: array + items: + type: string + - type: object + properties: + tool_names: + type: array + items: + type: string + read_only: + type: boolean + - nullable: true + - nullable: true + authorization: + type: string + connector_id: + type: string + enum: + - connector_dropbox + - connector_gmail + - connector_googlecalendar + - connector_googledrive + - connector_microsoftteams + - connector_outlookcalendar + - connector_outlookemail + - connector_sharepoint + x-speakeasy-unknown-values: allow + headers: + type: object + nullable: true + additionalProperties: + type: string + require_approval: + anyOf: + - type: object + properties: + never: + type: object + properties: + tool_names: + type: array + items: + type: string + always: + type: object + properties: + tool_names: + type: array + items: + type: string + - type: string + enum: + - always + - type: string + enum: + - never + - nullable: true + - nullable: true + server_description: + type: string + server_url: + type: string + required: + - type + - server_label + description: MCP (Model Context Protocol) tool configuration + example: + type: mcp + server_label: my-server + server_url: https://example.com/mcp + ImageGenerationServerTool: + type: object + properties: + type: + type: string + enum: + - image_generation + background: + type: string + enum: + - transparent + - opaque + - auto + x-speakeasy-unknown-values: allow + input_fidelity: + type: string + nullable: true + enum: + - high + - low + x-speakeasy-unknown-values: allow + input_image_mask: + type: object + properties: + image_url: + type: string + file_id: + type: string + model: + type: string + enum: + - gpt-image-1 + - gpt-image-1-mini + x-speakeasy-unknown-values: allow + moderation: + type: string + enum: + - auto + - low + x-speakeasy-unknown-values: allow + output_compression: + type: number + output_format: + type: string + enum: + - png + - webp + - jpeg + x-speakeasy-unknown-values: allow + partial_images: + type: number + quality: + type: string + enum: + - low + - medium + - high + - auto + x-speakeasy-unknown-values: allow + size: + type: string + enum: + - 1024x1024 + - 1024x1536 + - 1536x1024 + - auto + x-speakeasy-unknown-values: allow + required: + - type + description: Image generation tool configuration + example: + type: image_generation + quality: high + CodexLocalShellTool: + type: object + properties: + type: + type: string + enum: + - local_shell + required: + - type + description: Local shell tool configuration + example: + type: local_shell + ShellServerTool: + type: object + properties: + type: + type: string + enum: + - shell + required: + - type + description: Shell tool configuration + example: + type: shell + ApplyPatchServerTool: + type: object + properties: + type: + type: string + enum: + - apply_patch + required: + - type + description: Apply patch tool configuration + example: + type: apply_patch + CustomTool: + type: object + properties: + type: + type: string + enum: + - custom + name: + type: string + description: + type: string + format: + anyOf: + - type: object + properties: + type: + type: string + enum: + - text + required: + - type + - type: object + properties: + type: + type: string + enum: + - grammar + definition: + type: string + syntax: + type: string + enum: + - lark + - regex + x-speakeasy-unknown-values: allow + required: + - type + - definition + - syntax + required: + - type + - name + description: Custom tool configuration + example: + type: custom + name: my_tool OpenAIResponsesToolChoice: anyOf: - type: string @@ -1112,7 +1741,7 @@ components: - web_search_preview required: - type - OpenAIResponsesPrompt: + StoredPromptTemplate: type: object nullable: true properties: @@ -1124,12 +1753,12 @@ components: additionalProperties: anyOf: - type: string - - $ref: '#/components/schemas/ResponseInputText' - - $ref: '#/components/schemas/ResponseInputImage' - - $ref: '#/components/schemas/ResponseInputFile' + - $ref: '#/components/schemas/InputText' + - $ref: '#/components/schemas/InputImage' + - $ref: '#/components/schemas/InputFile' required: - id - OpenAIResponsesReasoningEffort: + ReasoningEffortEnum: type: string nullable: true enum: @@ -1140,7 +1769,7 @@ components: - minimal - none x-speakeasy-unknown-values: allow - ReasoningSummaryVerbosity: + ReasoningSummaryVerbosityEnum: type: string nullable: true enum: @@ -1149,32 +1778,22 @@ components: - detailed example: auto x-speakeasy-unknown-values: allow - OpenAIResponsesReasoningConfig: + BaseReasoningConfig: type: object nullable: true properties: effort: - $ref: '#/components/schemas/OpenAIResponsesReasoningEffort' + $ref: '#/components/schemas/ReasoningEffortEnum' summary: - $ref: '#/components/schemas/ReasoningSummaryVerbosity' - OpenAIResponsesServiceTier: - type: string - nullable: true - enum: - - auto - - default - - flex - - priority - - scale - x-speakeasy-unknown-values: allow - OpenAIResponsesTruncation: + $ref: '#/components/schemas/ReasoningSummaryVerbosityEnum' + TruncationEnum: type: string nullable: true enum: - auto - disabled x-speakeasy-unknown-values: allow - ResponsesFormatText: + FormatTextConfig: type: object properties: type: @@ -1186,7 +1805,19 @@ components: description: Plain text response format example: type: text - ResponsesFormatTextJSONSchemaConfig: + FormatJsonObjectConfig: + type: object + properties: + type: + type: string + enum: + - json_object + required: + - type + description: JSON object response format + example: + type: json_object + FormatJsonSchemaConfig: type: object properties: type: @@ -1222,19 +1853,19 @@ components: type: number required: - name - ResponseFormatTextConfig: + Formats: anyOf: - - $ref: '#/components/schemas/ResponsesFormatText' - - $ref: '#/components/schemas/ResponseFormatJSONObject' - - $ref: '#/components/schemas/ResponsesFormatTextJSONSchemaConfig' + - $ref: '#/components/schemas/FormatTextConfig' + - $ref: '#/components/schemas/FormatJsonObjectConfig' + - $ref: '#/components/schemas/FormatJsonSchemaConfig' description: Text response format configuration example: type: text - ResponseTextConfig: + TextConfig: type: object properties: format: - $ref: '#/components/schemas/ResponseFormatTextConfig' + $ref: '#/components/schemas/Formats' verbosity: type: string nullable: true @@ -1248,7 +1879,17 @@ components: format: type: text verbosity: medium - OpenAIResponsesNonStreamingResponse: + ServiceTierEnum: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + x-speakeasy-unknown-values: allow + BaseResponsesResult: type: object properties: id: @@ -1299,7 +1940,7 @@ components: error: $ref: '#/components/schemas/ResponsesErrorField' incomplete_details: - $ref: '#/components/schemas/OpenAIResponsesIncompleteDetails' + $ref: '#/components/schemas/IncompleteDetails' usage: $ref: '#/components/schemas/OpenAIResponsesUsage' max_tool_calls: @@ -1323,15 +1964,15 @@ components: type: number nullable: true instructions: - $ref: '#/components/schemas/OpenAIResponsesInput' + $ref: '#/components/schemas/BaseInputs' metadata: - $ref: '#/components/schemas/OpenResponsesRequestMetadata' + $ref: '#/components/schemas/RequestMetadata' tools: type: array items: oneOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - $ref: '#/components/schemas/FunctionTool' - type: object properties: {} description: Function tool definition @@ -1353,16 +1994,25 @@ components: x-speakeasy-unknown-values: allow required: - location - - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' - - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: type: boolean prompt: - $ref: '#/components/schemas/OpenAIResponsesPrompt' + $ref: '#/components/schemas/StoredPromptTemplate' background: type: boolean nullable: true @@ -1370,15 +2020,15 @@ components: type: string nullable: true reasoning: - $ref: '#/components/schemas/OpenAIResponsesReasoningConfig' + $ref: '#/components/schemas/BaseReasoningConfig' service_tier: - $ref: '#/components/schemas/OpenAIResponsesServiceTier' + $ref: '#/components/schemas/ServiceTierEnum' store: type: boolean truncation: - $ref: '#/components/schemas/OpenAIResponsesTruncation' + $ref: '#/components/schemas/TruncationEnum' text: - $ref: '#/components/schemas/ResponseTextConfig' + $ref: '#/components/schemas/TextConfig' required: - id - object @@ -1398,17 +2048,20 @@ components: - tools - tool_choice - parallel_tool_calls - OpenResponsesNonStreamingResponse: + OpenResponsesResult: allOf: - - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + - $ref: '#/components/schemas/BaseResponsesResult' - type: object properties: output: type: array items: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' usage: - $ref: '#/components/schemas/OpenResponsesUsage' + $ref: '#/components/schemas/Usage' + service_tier: + type: string + nullable: true description: Complete non-streaming response from the Responses API example: id: resp-abc123 @@ -1443,7 +2096,7 @@ components: max_output_tokens: null metadata: null instructions: null - OpenResponsesCreatedEvent: + CreatedEvent: type: object properties: type: @@ -1451,7 +2104,7 @@ components: enum: - response.created response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1479,7 +2132,7 @@ components: top_p: null max_output_tokens: null sequence_number: 0 - OpenResponsesInProgressEvent: + InProgressEvent: type: object properties: type: @@ -1487,7 +2140,7 @@ components: enum: - response.in_progress response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1515,7 +2168,7 @@ components: top_p: null max_output_tokens: null sequence_number: 1 - OpenResponsesCompletedEvent: + CompletedEvent: type: object properties: type: @@ -1523,7 +2176,7 @@ components: enum: - response.completed response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1559,7 +2212,7 @@ components: top_p: null max_output_tokens: null sequence_number: 10 - OpenResponsesIncompleteEvent: + IncompleteEvent: type: object properties: type: @@ -1567,7 +2220,7 @@ components: enum: - response.incomplete response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1595,7 +2248,7 @@ components: top_p: null max_output_tokens: null sequence_number: 5 - OpenResponsesFailedEvent: + FailedEvent: type: object properties: type: @@ -1603,7 +2256,7 @@ components: enum: - response.failed response: - $ref: '#/components/schemas/OpenAIResponsesNonStreamingResponse' + $ref: '#/components/schemas/BaseResponsesResult' sequence_number: type: number required: @@ -1631,7 +2284,7 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - OpenAIResponsesErrorEvent: + BaseErrorEvent: type: object properties: type: @@ -1661,9 +2314,9 @@ components: message: Rate limit exceeded. Please try again later. param: null sequence_number: 2 - OpenResponsesErrorEvent: + ErrorEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesErrorEvent' + - $ref: '#/components/schemas/BaseErrorEvent' - type: object properties: {} description: Event emitted when an error occurs during streaming @@ -1673,7 +2326,7 @@ components: message: Rate limit exceeded. Please try again later. param: null sequence_number: 2 - OpenResponsesOutputItemAddedEvent: + OutputItemAddedEvent: type: object properties: type: @@ -1717,7 +2370,7 @@ components: role: assistant content: [] sequence_number: 2 - OpenResponsesOutputItemDoneEvent: + OutputItemDoneEvent: type: object properties: type: @@ -1764,7 +2417,7 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 - OpenResponsesContentPartAddedEvent: + BaseContentPartAddedEvent: type: object properties: type: @@ -1801,7 +2454,28 @@ components: text: '' annotations: [] sequence_number: 3 - OpenResponsesContentPartDoneEvent: + ContentPartAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseContentPartAddedEvent' + - type: object + properties: + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/ReasoningTextContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + description: Event emitted when a new content part is added to an output item + example: + type: response.content_part.added + output_index: 0 + item_id: item-1 + content_index: 0 + part: + type: output_text + text: '' + annotations: [] + sequence_number: 3 + BaseContentPartDoneEvent: type: object properties: type: @@ -1838,6 +2512,27 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 7 + ContentPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseContentPartDoneEvent' + - type: object + properties: + part: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/ReasoningTextContent' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + description: Event emitted when a content part is complete + example: + type: response.content_part.done + output_index: 0 + item_id: item-1 + content_index: 0 + part: + type: output_text + text: Hello! How can I help you? + annotations: [] + sequence_number: 7 OpenResponsesTopLogprobs: type: object properties: @@ -1845,6 +2540,10 @@ components: type: string logprob: type: number + bytes: + type: array + items: + type: number description: Alternative token with its log probability example: token: hello @@ -1860,6 +2559,10 @@ components: type: array items: $ref: '#/components/schemas/OpenResponsesTopLogprobs' + bytes: + type: array + items: + type: number required: - logprob - token @@ -1870,7 +2573,7 @@ components: top_logprobs: - token: hello logprob: -0.5 - OpenResponsesTextDeltaEvent: + BaseTextDeltaEvent: type: object properties: type: @@ -1908,7 +2611,46 @@ components: content_index: 0 delta: Hello sequence_number: 4 - OpenResponsesTextDoneEvent: + TextDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDeltaEvent' + - type: object + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 + description: Event emitted when a text delta is streamed + example: + type: response.output_text.delta + logprobs: [] + output_index: 0 + item_id: item-1 + content_index: 0 + delta: Hello + sequence_number: 4 + BaseTextDoneEvent: type: object properties: type: @@ -1946,7 +2688,46 @@ components: text: Hello! How can I help you? sequence_number: 6 logprobs: [] - OpenResponsesRefusalDeltaEvent: + TextDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseTextDoneEvent' + - type: object + properties: + logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesLogProbs' + - type: object + properties: + top_logprobs: + type: array + items: + allOf: + - $ref: '#/components/schemas/OpenResponsesTopLogprobs' + - type: object + properties: {} + description: Alternative token with its log probability + example: + token: hello + logprob: -0.5 + description: Log probability information for a token + example: + logprob: -0.1 + token: world + top_logprobs: + - token: hello + logprob: -0.5 + description: Event emitted when text streaming is complete + example: + type: response.output_text.done + output_index: 0 + item_id: item-1 + content_index: 0 + text: Hello! How can I help you? + sequence_number: 6 + logprobs: [] + BaseRefusalDeltaEvent: type: object properties: type: @@ -1978,7 +2759,20 @@ components: content_index: 0 delta: I'm sorry sequence_number: 4 - OpenResponsesRefusalDoneEvent: + RefusalDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDeltaEvent' + - type: object + properties: {} + description: Event emitted when a refusal delta is streamed + example: + type: response.refusal.delta + output_index: 0 + item_id: item-1 + content_index: 0 + delta: I'm sorry + sequence_number: 4 + BaseRefusalDoneEvent: type: object properties: type: @@ -2010,7 +2804,20 @@ components: content_index: 0 refusal: I'm sorry, but I can't assist with that request. sequence_number: 6 - OpenResponsesOutputTextAnnotationAddedEvent: + RefusalDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseRefusalDoneEvent' + - type: object + properties: {} + description: Event emitted when refusal streaming is complete + example: + type: response.refusal.done + output_index: 0 + item_id: item-1 + content_index: 0 + refusal: I'm sorry, but I can't assist with that request. + sequence_number: 6 + BaseAnnotationAddedEvent: type: object properties: type: @@ -2051,7 +2858,26 @@ components: title: Example start_index: 0 end_index: 7 - OpenResponsesFunctionCallArgumentsDeltaEvent: + AnnotationAddedEvent: + allOf: + - $ref: '#/components/schemas/BaseAnnotationAddedEvent' + - type: object + properties: {} + description: Event emitted when a text annotation is added to output + example: + type: response.output_text.annotation.added + output_index: 0 + item_id: item-1 + content_index: 0 + sequence_number: 5 + annotation_index: 0 + annotation: + type: url_citation + url: https://example.com + title: Example + start_index: 0 + end_index: 7 + BaseFunctionCallArgsDeltaEvent: type: object properties: type: @@ -2079,7 +2905,19 @@ components: output_index: 0 delta: '{"city": "San' sequence_number: 4 - OpenResponsesFunctionCallArgumentsDoneEvent: + FunctionCallArgsDeltaEvent: + allOf: + - $ref: '#/components/schemas/BaseFunctionCallArgsDeltaEvent' + - type: object + properties: {} + description: Event emitted when function call arguments are being streamed + example: + type: response.function_call_arguments.delta + item_id: item-1 + output_index: 0 + delta: '{"city": "San' + sequence_number: 4 + BaseFunctionCallArgsDoneEvent: type: object properties: type: @@ -2111,7 +2949,20 @@ components: name: get_weather arguments: '{"city": "San Francisco", "units": "celsius"}' sequence_number: 6 - OpenAIResponsesReasoningDeltaEvent: + FunctionCallArgsDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseFunctionCallArgsDoneEvent' + - type: object + properties: {} + description: Event emitted when function call arguments streaming is complete + example: + type: response.function_call_arguments.done + item_id: item-1 + output_index: 0 + name: get_weather + arguments: '{"city": "San Francisco", "units": "celsius"}' + sequence_number: 6 + BaseReasoningDeltaEvent: type: object properties: type: @@ -2143,9 +2994,9 @@ components: content_index: 0 delta: First, we need sequence_number: 4 - OpenResponsesReasoningDeltaEvent: + ReasoningDeltaEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningDeltaEvent' + - $ref: '#/components/schemas/BaseReasoningDeltaEvent' - type: object properties: {} description: Event emitted when reasoning text delta is streamed @@ -2156,7 +3007,7 @@ components: content_index: 0 delta: First, we need sequence_number: 4 - OpenAIResponsesReasoningDoneEvent: + BaseReasoningDoneEvent: type: object properties: type: @@ -2188,9 +3039,9 @@ components: content_index: 0 text: First, we need to identify the key components and then combine them logically. sequence_number: 6 - OpenResponsesReasoningDoneEvent: + ReasoningDoneEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningDoneEvent' + - $ref: '#/components/schemas/BaseReasoningDoneEvent' - type: object properties: {} description: Event emitted when reasoning text streaming is complete @@ -2201,7 +3052,7 @@ components: content_index: 0 text: First, we need to identify the key components and then combine them logically. sequence_number: 6 - OpenAIResponsesReasoningSummaryPartAddedEvent: + BaseReasoningSummaryPartAddedEvent: type: object properties: type: @@ -2235,9 +3086,9 @@ components: type: summary_text text: '' sequence_number: 3 - OpenResponsesReasoningSummaryPartAddedEvent: + ReasoningSummaryPartAddedEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryPartAddedEvent' - type: object properties: {} description: Event emitted when a reasoning summary part is added @@ -2250,7 +3101,7 @@ components: type: summary_text text: '' sequence_number: 3 - OpenResponsesReasoningSummaryPartDoneEvent: + BaseReasoningSummaryPartDoneEvent: type: object properties: type: @@ -2284,7 +3135,22 @@ components: type: summary_text text: Analyzing the problem step by step to find the optimal solution. sequence_number: 7 - OpenAIResponsesReasoningSummaryTextDeltaEvent: + ReasoningSummaryPartDoneEvent: + allOf: + - $ref: '#/components/schemas/BaseReasoningSummaryPartDoneEvent' + - type: object + properties: {} + description: Event emitted when a reasoning summary part is complete + example: + type: response.reasoning_summary_part.done + output_index: 0 + item_id: item-1 + summary_index: 0 + part: + type: summary_text + text: Analyzing the problem step by step to find the optimal solution. + sequence_number: 7 + BaseReasoningSummaryTextDeltaEvent: type: object properties: type: @@ -2316,9 +3182,9 @@ components: summary_index: 0 delta: Analyzing sequence_number: 4 - OpenResponsesReasoningSummaryTextDeltaEvent: + ReasoningSummaryTextDeltaEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryTextDeltaEvent' - type: object properties: {} description: Event emitted when reasoning summary text delta is streamed @@ -2329,7 +3195,7 @@ components: summary_index: 0 delta: Analyzing sequence_number: 4 - OpenAIResponsesReasoningSummaryTextDoneEvent: + BaseReasoningSummaryTextDoneEvent: type: object properties: type: @@ -2361,9 +3227,9 @@ components: summary_index: 0 text: Analyzing the problem step by step to find the optimal solution. sequence_number: 6 - OpenResponsesReasoningSummaryTextDoneEvent: + ReasoningSummaryTextDoneEvent: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/BaseReasoningSummaryTextDoneEvent' - type: object properties: {} description: Event emitted when reasoning summary text streaming is complete @@ -2392,7 +3258,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallInProgress: + ImageGenCallInProgressEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallInProgress' - type: object @@ -2421,7 +3287,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallGenerating: + ImageGenCallGeneratingEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallGenerating' - type: object @@ -2456,7 +3322,7 @@ components: - sequence_number - partial_image_b64 - partial_image_index - OpenResponsesImageGenCallPartialImage: + ImageGenCallPartialImageEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallPartialImage' - type: object @@ -2487,7 +3353,7 @@ components: - item_id - output_index - sequence_number - OpenResponsesImageGenCallCompleted: + ImageGenCallCompletedEvent: allOf: - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' - type: object @@ -2498,14 +3364,101 @@ components: output_index: 0 sequence_number: 4 item_id: call-123 - OpenResponsesStreamEvent: + OpenAIResponsesWebSearchCallInProgress: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.in_progress + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallInProgressEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallInProgress' + - type: object + properties: {} + description: Web search call in progress + example: + type: response.web_search_call.in_progress + output_index: 0 + sequence_number: 1 + item_id: ws-123 + OpenAIResponsesWebSearchCallSearching: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.searching + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallSearchingEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesWebSearchCallSearching' + - type: object + properties: {} + description: Web search call is searching + example: + type: response.web_search_call.searching + output_index: 0 + sequence_number: 2 + item_id: ws-123 + OpenAIResponsesSearchCompleted: + type: object + properties: + type: + type: string + enum: + - response.web_search_call.completed + item_id: + type: string + output_index: + type: number + sequence_number: + type: number + required: + - type + - item_id + - output_index + - sequence_number + WebSearchCallCompletedEvent: + allOf: + - $ref: '#/components/schemas/OpenAIResponsesSearchCompleted' + - type: object + properties: {} + description: Web search call completed + example: + type: response.web_search_call.completed + output_index: 0 + sequence_number: 3 + item_id: ws-123 + StreamEvents: oneOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesCreatedEvent' + - $ref: '#/components/schemas/CreatedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is created example: type: response.created @@ -2528,11 +3481,11 @@ components: max_output_tokens: null sequence_number: 0 - allOf: - - $ref: '#/components/schemas/OpenResponsesInProgressEvent' + - $ref: '#/components/schemas/InProgressEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is in progress example: type: response.in_progress @@ -2555,11 +3508,11 @@ components: max_output_tokens: null sequence_number: 1 - allOf: - - $ref: '#/components/schemas/OpenResponsesCompletedEvent' + - $ref: '#/components/schemas/CompletedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response has completed successfully example: type: response.completed @@ -2590,11 +3543,11 @@ components: max_output_tokens: null sequence_number: 10 - allOf: - - $ref: '#/components/schemas/OpenResponsesIncompleteEvent' + - $ref: '#/components/schemas/IncompleteEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response is incomplete example: type: response.incomplete @@ -2617,11 +3570,11 @@ components: max_output_tokens: null sequence_number: 5 - allOf: - - $ref: '#/components/schemas/OpenResponsesFailedEvent' + - $ref: '#/components/schemas/FailedEvent' - type: object properties: response: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' description: Event emitted when a response has failed example: type: response.failed @@ -2643,13 +3596,13 @@ components: top_p: null max_output_tokens: null sequence_number: 3 - - $ref: '#/components/schemas/OpenResponsesErrorEvent' + - $ref: '#/components/schemas/ErrorEvent' - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputItemAddedEvent' + - $ref: '#/components/schemas/OutputItemAddedEvent' - type: object properties: item: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' description: Event emitted when a new output item is added to the response example: type: response.output_item.added @@ -2662,11 +3615,11 @@ components: content: [] sequence_number: 2 - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputItemDoneEvent' + - $ref: '#/components/schemas/OutputItemDoneEvent' - type: object properties: item: - $ref: '#/components/schemas/ResponsesOutputItem' + $ref: '#/components/schemas/OutputItems' description: Event emitted when an output item is complete example: type: response.output_item.done @@ -2681,160 +3634,28 @@ components: text: Hello! How can I help you? annotations: [] sequence_number: 8 - - allOf: - - $ref: '#/components/schemas/OpenResponsesContentPartAddedEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - description: Event emitted when a new content part is added to an output item - example: - type: response.content_part.added - output_index: 0 - item_id: item-1 - content_index: 0 - part: - type: output_text - text: '' - annotations: [] - sequence_number: 3 - - allOf: - - $ref: '#/components/schemas/OpenResponsesContentPartDoneEvent' - - type: object - properties: - part: - anyOf: - - $ref: '#/components/schemas/ResponseOutputText' - - $ref: '#/components/schemas/ReasoningTextContent' - - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' - description: Event emitted when a content part is complete - example: - type: response.content_part.done - output_index: 0 - item_id: item-1 - content_index: 0 - part: - type: output_text - text: Hello! How can I help you? - annotations: [] - sequence_number: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesTextDeltaEvent' - - type: object - properties: {} - description: Event emitted when a text delta is streamed - example: - type: response.output_text.delta - logprobs: [] - output_index: 0 - item_id: item-1 - content_index: 0 - delta: Hello - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesTextDoneEvent' - - type: object - properties: {} - description: Event emitted when text streaming is complete - example: - type: response.output_text.done - output_index: 0 - item_id: item-1 - content_index: 0 - text: Hello! How can I help you? - sequence_number: 6 - logprobs: [] - - allOf: - - $ref: '#/components/schemas/OpenResponsesRefusalDeltaEvent' - - type: object - properties: {} - description: Event emitted when a refusal delta is streamed - example: - type: response.refusal.delta - output_index: 0 - item_id: item-1 - content_index: 0 - delta: I'm sorry - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesRefusalDoneEvent' - - type: object - properties: {} - description: Event emitted when refusal streaming is complete - example: - type: response.refusal.done - output_index: 0 - item_id: item-1 - content_index: 0 - refusal: I'm sorry, but I can't assist with that request. - sequence_number: 6 - - allOf: - - $ref: '#/components/schemas/OpenResponsesOutputTextAnnotationAddedEvent' - - type: object - properties: {} - description: Event emitted when a text annotation is added to output - example: - type: response.output_text.annotation.added - output_index: 0 - item_id: item-1 - content_index: 0 - sequence_number: 5 - annotation_index: 0 - annotation: - type: url_citation - url: https://example.com - title: Example - start_index: 0 - end_index: 7 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDeltaEvent' - - type: object - properties: {} - description: Event emitted when function call arguments are being streamed - example: - type: response.function_call_arguments.delta - item_id: item-1 - output_index: 0 - delta: '{"city": "San' - sequence_number: 4 - - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionCallArgumentsDoneEvent' - - type: object - properties: {} - description: Event emitted when function call arguments streaming is complete - example: - type: response.function_call_arguments.done - item_id: item-1 - output_index: 0 - name: get_weather - arguments: '{"city": "San Francisco", "units": "celsius"}' - sequence_number: 6 - - $ref: '#/components/schemas/OpenResponsesReasoningDeltaEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningDoneEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartAddedEvent' - - allOf: - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryPartDoneEvent' - - type: object - properties: {} - description: Event emitted when a reasoning summary part is complete - example: - type: response.reasoning_summary_part.done - output_index: 0 - item_id: item-1 - summary_index: 0 - part: - type: summary_text - text: Analyzing the problem step by step to find the optimal solution. - sequence_number: 7 - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDeltaEvent' - - $ref: '#/components/schemas/OpenResponsesReasoningSummaryTextDoneEvent' - - $ref: '#/components/schemas/OpenResponsesImageGenCallInProgress' - - $ref: '#/components/schemas/OpenResponsesImageGenCallGenerating' - - $ref: '#/components/schemas/OpenResponsesImageGenCallPartialImage' - - $ref: '#/components/schemas/OpenResponsesImageGenCallCompleted' + - $ref: '#/components/schemas/ContentPartAddedEvent' + - $ref: '#/components/schemas/ContentPartDoneEvent' + - $ref: '#/components/schemas/TextDeltaEvent' + - $ref: '#/components/schemas/TextDoneEvent' + - $ref: '#/components/schemas/RefusalDeltaEvent' + - $ref: '#/components/schemas/RefusalDoneEvent' + - $ref: '#/components/schemas/AnnotationAddedEvent' + - $ref: '#/components/schemas/FunctionCallArgsDeltaEvent' + - $ref: '#/components/schemas/FunctionCallArgsDoneEvent' + - $ref: '#/components/schemas/ReasoningDeltaEvent' + - $ref: '#/components/schemas/ReasoningDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartAddedEvent' + - $ref: '#/components/schemas/ReasoningSummaryPartDoneEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDeltaEvent' + - $ref: '#/components/schemas/ReasoningSummaryTextDoneEvent' + - $ref: '#/components/schemas/ImageGenCallInProgressEvent' + - $ref: '#/components/schemas/ImageGenCallGeneratingEvent' + - $ref: '#/components/schemas/ImageGenCallPartialImageEvent' + - $ref: '#/components/schemas/ImageGenCallCompletedEvent' + - $ref: '#/components/schemas/WebSearchCallInProgressEvent' + - $ref: '#/components/schemas/WebSearchCallSearchingEvent' + - $ref: '#/components/schemas/WebSearchCallCompletedEvent' description: Union of all possible event types emitted during response streaming example: type: response.created @@ -3298,7 +4119,7 @@ components: error: code: 529 message: Provider returned error - OpenResponsesReasoning: + ReasoningItem: allOf: - $ref: '#/components/schemas/OutputItemReasoning' - type: object @@ -3329,7 +4150,7 @@ components: - type: summary_text text: Step by step analysis description: Reasoning output item with signature and format extensions - ResponseInputVideo: + InputVideo: type: object properties: type: @@ -3346,7 +4167,7 @@ components: example: type: input_video video_url: https://example.com/video.mp4 - OpenResponsesEasyInputMessage: + EasyInputMessage: type: object properties: type: @@ -3372,9 +4193,9 @@ components: - type: array items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/InputText' - allOf: - - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/InputImage' - type: object properties: {} description: Image input content item @@ -3382,14 +4203,26 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' - - $ref: '#/components/schemas/ResponseInputVideo' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + - $ref: '#/components/schemas/InputVideo' - type: string + - nullable: true + phase: + anyOf: + - type: string + enum: + - commentary + - type: string + enum: + - final_answer + - nullable: true + description: >- + The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + example: final_answer required: - role - - content - OpenResponsesInputMessageItem: + InputMessageItem: type: object properties: id: @@ -3411,11 +4244,12 @@ components: - developer content: type: array + nullable: true items: oneOf: - - $ref: '#/components/schemas/ResponseInputText' + - $ref: '#/components/schemas/InputText' - allOf: - - $ref: '#/components/schemas/ResponseInputImage' + - $ref: '#/components/schemas/InputImage' - type: object properties: {} description: Image input content item @@ -3423,13 +4257,12 @@ components: type: input_image detail: auto image_url: https://example.com/image.jpg - - $ref: '#/components/schemas/ResponseInputFile' - - $ref: '#/components/schemas/ResponseInputAudio' - - $ref: '#/components/schemas/ResponseInputVideo' + - $ref: '#/components/schemas/InputFile' + - $ref: '#/components/schemas/InputAudio' + - $ref: '#/components/schemas/InputVideo' required: - role - - content - OpenResponsesFunctionToolCall: + FunctionCallItem: type: object properties: type: @@ -3445,7 +4278,7 @@ components: id: type: string status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -3460,7 +4293,7 @@ components: name: get_weather arguments: '{"location":"San Francisco"}' status: completed - OpenResponsesFunctionCallOutput: + FunctionCallOutputItem: type: object properties: type: @@ -3473,9 +4306,24 @@ components: call_id: type: string output: - type: string + anyOf: + - type: string + - type: array + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - allOf: + - $ref: '#/components/schemas/InputImage' + - type: object + properties: {} + description: Image input content item + example: + type: input_image + detail: auto + image_url: https://example.com/image.jpg + - $ref: '#/components/schemas/InputFile' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/ToolCallStatusEnum' required: - type - call_id @@ -3487,30 +4335,159 @@ components: call_id: call-abc123 output: '{"temperature":72,"conditions":"sunny"}' status: completed - OpenResponsesInput: + OutputDatetimeItem: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + id: + type: string + status: + type: string + enum: + - completed + - in_progress + - incomplete + x-speakeasy-unknown-values: allow + datetime: + type: string + description: ISO 8601 datetime string + timezone: + type: string + description: IANA timezone name + required: + - type + - status + - datetime + - timezone + description: An openrouter:datetime server tool output item + example: + type: openrouter:datetime + id: dt_tmp_abc123 + status: completed + datetime: '2026-03-12T14:30:00.000Z' + timezone: UTC + Inputs: anyOf: - type: string - type: array items: anyOf: - - $ref: '#/components/schemas/OpenResponsesReasoning' - - $ref: '#/components/schemas/OpenResponsesEasyInputMessage' - - $ref: '#/components/schemas/OpenResponsesInputMessageItem' - - $ref: '#/components/schemas/OpenResponsesFunctionToolCall' - - $ref: '#/components/schemas/OpenResponsesFunctionCallOutput' - - $ref: '#/components/schemas/ResponsesOutputMessage' - - $ref: '#/components/schemas/ResponsesOutputItemReasoning' - - $ref: '#/components/schemas/ResponsesOutputItemFunctionCall' - - $ref: '#/components/schemas/ResponsesWebSearchCallOutput' - - $ref: '#/components/schemas/ResponsesOutputItemFileSearchCall' - - $ref: '#/components/schemas/ResponsesImageGenerationCall' + - $ref: '#/components/schemas/ReasoningItem' + - $ref: '#/components/schemas/EasyInputMessage' + - $ref: '#/components/schemas/InputMessageItem' + - $ref: '#/components/schemas/FunctionCallItem' + - $ref: '#/components/schemas/FunctionCallOutputItem' + - allOf: + - $ref: '#/components/schemas/OutputMessageItem' + - type: object + properties: + content: + anyOf: + - type: array + items: + anyOf: + - $ref: '#/components/schemas/ResponseOutputText' + - $ref: '#/components/schemas/OpenAIResponsesRefusalContent' + - type: string + - nullable: true + example: + id: msg-123 + type: message + role: assistant + status: completed + content: + - type: output_text + text: Hello! How can I help you? + annotations: [] + description: An output message item + - allOf: + - $ref: '#/components/schemas/OutputReasoningItem' + - type: object + properties: + summary: + type: array + nullable: true + items: + $ref: '#/components/schemas/ReasoningSummaryText' + example: + id: reasoning-123 + type: reasoning + status: completed + summary: + - type: summary_text + text: Analyzed the problem and found the optimal solution. + content: + - type: reasoning_text + text: First, we analyze the problem... + signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + format: anthropic-claude-v1 + description: An output item containing reasoning + - $ref: '#/components/schemas/OutputFunctionCallItem' + - $ref: '#/components/schemas/OutputWebSearchCallItem' + - $ref: '#/components/schemas/OutputFileSearchCallItem' + - $ref: '#/components/schemas/OutputImageGenerationCallItem' + - $ref: '#/components/schemas/OutputDatetimeItem' + - $ref: '#/components/schemas/OutputServerToolItem' description: Input for a response request - can be a string or array of items example: - role: user content: What is the weather today? - OpenResponsesResponseText: + DatetimeServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:datetime + parameters: + type: object + properties: + timezone: + type: string + description: IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + example: America/New_York + required: + - type + description: 'OpenRouter built-in server tool: returns the current date and time' + example: + type: openrouter:datetime + parameters: + timezone: America/New_York + WebSearchServerTool_OpenRouter: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + max_results: + type: number + minimum: 1 + maximum: 25 + description: Maximum number of search results to return per search call. Defaults to 5. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. + example: 20 + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 + TextExtendedConfig: allOf: - - $ref: '#/components/schemas/ResponseTextConfig' + - $ref: '#/components/schemas/TextConfig' - type: object properties: {} description: Text output configuration including format and verbosity @@ -3518,9 +4495,9 @@ components: format: type: text verbosity: medium - OpenResponsesReasoningConfig: + ReasoningConfig: allOf: - - $ref: '#/components/schemas/OpenAIResponsesReasoningConfig' + - $ref: '#/components/schemas/BaseReasoningConfig' - type: object nullable: true properties: @@ -3534,13 +4511,13 @@ components: example: summary: auto enabled: true - ResponsesOutputModality: + OutputModalityEnum: type: string enum: - text - image x-speakeasy-unknown-values: allow - OpenAIResponsesIncludable: + ResponseIncludesEnum: type: string enum: - file_search_call.results @@ -3549,6 +4526,14 @@ components: - reasoning.encrypted_content - code_interpreter_call.outputs x-speakeasy-unknown-values: allow + OpenAIResponsesTruncation: + type: string + nullable: true + enum: + - auto + - disabled + example: auto + x-speakeasy-unknown-values: allow DataCollection: type: string nullable: true @@ -3567,6 +4552,7 @@ components: ProviderName: type: string enum: + - AkashML - AI21 - AionLabs - Alibaba @@ -3624,6 +4610,7 @@ components: - Parasail - Perplexity - Phala + - Reka - Relace - SambaNova - Seed @@ -3663,6 +4650,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price x-speakeasy-unknown-values: allow @@ -3676,6 +4664,7 @@ components: - price - throughput - latency + - exacto description: The provider sorting strategy (price, throughput, latency) example: price x-speakeasy-unknown-values: allow @@ -3764,38 +4753,50 @@ components: enum: - native - exa + - firecrawl + - parallel description: The search engine to use for web search. x-speakeasy-unknown-values: allow PDFParserEngine: - type: string - enum: - - mistral-ocr - - pdf-text - - native - description: The engine to use for parsing PDF files. - x-speakeasy-unknown-values: allow + anyOf: + - type: string + enum: + - mistral-ocr + - native + - cloudflare-ai + x-speakeasy-unknown-values: allow + - type: string + enum: + - pdf-text + description: >- + The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". PDFParserOptions: type: object properties: engine: $ref: '#/components/schemas/PDFParserEngine' description: Options for PDF parsing. - OpenResponsesRequest: + ContextCompressionEngine: + type: string + enum: + - middle-out + description: The compression engine to use. Defaults to "middle-out". + ResponsesRequest: type: object properties: input: - $ref: '#/components/schemas/OpenResponsesInput' + $ref: '#/components/schemas/Inputs' instructions: type: string nullable: true metadata: - $ref: '#/components/schemas/OpenResponsesRequestMetadata' + $ref: '#/components/schemas/RequestMetadata' tools: type: array items: - oneOf: + anyOf: - allOf: - - $ref: '#/components/schemas/OpenResponsesFunctionTool' + - $ref: '#/components/schemas/FunctionTool' - type: object properties: {} description: Function tool definition @@ -3817,10 +4818,21 @@ components: x-speakeasy-unknown-values: allow required: - location - - $ref: '#/components/schemas/OpenResponsesWebSearchPreviewTool' - - $ref: '#/components/schemas/OpenResponsesWebSearchPreview20250311Tool' - - $ref: '#/components/schemas/OpenResponsesWebSearchTool' - - $ref: '#/components/schemas/OpenResponsesWebSearch20250826Tool' + - $ref: '#/components/schemas/Preview_WebSearchServerTool' + - $ref: '#/components/schemas/Preview_20250311_WebSearchServerTool' + - $ref: '#/components/schemas/Legacy_WebSearchServerTool' + - $ref: '#/components/schemas/WebSearchServerTool' + - $ref: '#/components/schemas/FileSearchServerTool' + - $ref: '#/components/schemas/ComputerUseServerTool' + - $ref: '#/components/schemas/CodeInterpreterServerTool' + - $ref: '#/components/schemas/McpServerTool' + - $ref: '#/components/schemas/ImageGenerationServerTool' + - $ref: '#/components/schemas/CodexLocalShellTool' + - $ref: '#/components/schemas/ShellServerTool' + - $ref: '#/components/schemas/ApplyPatchServerTool' + - $ref: '#/components/schemas/CustomTool' + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' tool_choice: $ref: '#/components/schemas/OpenAIResponsesToolChoice' parallel_tool_calls: @@ -3833,9 +4845,9 @@ components: items: type: string text: - $ref: '#/components/schemas/OpenResponsesResponseText' + $ref: '#/components/schemas/TextExtendedConfig' reasoning: - $ref: '#/components/schemas/OpenResponsesReasoningConfig' + $ref: '#/components/schemas/ReasoningConfig' max_output_tokens: type: number nullable: true @@ -3881,7 +4893,7 @@ components: modalities: type: array items: - $ref: '#/components/schemas/ResponsesOutputModality' + $ref: '#/components/schemas/OutputModalityEnum' description: Output modalities for the response. Supported values are "text" and "image". example: - text @@ -3893,12 +4905,12 @@ components: type: string nullable: true prompt: - $ref: '#/components/schemas/OpenAIResponsesPrompt' + $ref: '#/components/schemas/StoredPromptTemplate' include: type: array nullable: true items: - $ref: '#/components/schemas/OpenAIResponsesIncludable' + $ref: '#/components/schemas/ResponseIncludesEnum' background: type: boolean nullable: true @@ -3911,13 +4923,17 @@ components: default: false service_tier: type: string + nullable: true enum: - auto + - default + - flex + - priority + - scale default: auto + x-speakeasy-unknown-values: allow truncation: - allOf: - - $ref: '#/components/schemas/OpenAIResponsesTruncation' - - example: auto + $ref: '#/components/schemas/OpenAIResponsesTruncation' stream: type: boolean default: false @@ -4072,6 +5088,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -4098,6 +5134,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -4114,14 +5163,14 @@ components: x-speakeasy-unknown-values: allow user: type: string - maxLength: 128 + maxLength: 256 description: >- - A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. + A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. session_id: type: string - maxLength: 128 + maxLength: 256 description: >- - A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. trace: type: object properties: @@ -4157,7 +5206,7 @@ components: properties: location: type: string - BaseAnthropicMessagesResponse: + BaseMessagesResult: type: object properties: id: @@ -4170,6 +5219,17 @@ components: type: string enum: - assistant + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at content: type: array items: @@ -4331,6 +5391,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -4338,6 +5430,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -4372,15 +5465,55 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -4388,6 +5521,38 @@ components: type: string enum: - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id tool_use_id: type: string content: @@ -4429,14 +5594,493 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large x-speakeasy-unknown-values: allow required: - type - error_code required: - type + - caller - tool_use_id - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id model: type: string stop_reason: @@ -4486,8 +6130,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests service_tier: type: string nullable: true @@ -4496,6 +6143,13 @@ components: - priority - batch x-speakeasy-unknown-values: allow + speed: + type: string + nullable: true + enum: + - fast + - standard + x-speakeasy-unknown-values: allow required: - input_tokens - output_tokens @@ -4509,21 +6163,207 @@ components: - id - type - role + - container - content - model - stop_reason - stop_sequence - usage - AnthropicMessagesResponse: + MessagesResult: allOf: - - $ref: '#/components/schemas/BaseAnthropicMessagesResponse' + - $ref: '#/components/schemas/BaseMessagesResult' - type: object - properties: {} + properties: + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number + nullable: true + cache_read_input_tokens: + type: number + nullable: true + cache_creation: + type: object + nullable: true + properties: + ephemeral_5m_input_tokens: + type: number + ephemeral_1h_input_tokens: + type: number + required: + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + speed: + type: string + nullable: true + enum: + - fast + - standard + x-speakeasy-unknown-values: allow + cost: + type: number + nullable: true + is_byok: + type: boolean + cost_details: + type: object + nullable: true + properties: + upstream_inference_cost: + type: number + nullable: true + upstream_inference_prompt_cost: + type: number + upstream_inference_completions_cost: + type: number + required: + - upstream_inference_prompt_cost + - upstream_inference_completions_cost + required: + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + x-speakeasy-unknown-values: allow description: Non-streaming response from the Anthropic Messages API with OpenRouter extensions example: id: msg_01XFDUDYJgAACzvnptvVoYEL type: message role: assistant + container: null content: - type: text text: Hello! I'm doing well, thank you for asking. @@ -4540,364 +6380,1081 @@ components: inference_geo: null server_tool_use: null service_tier: standard - AnthropicMessagesStreamEvent: - oneOf: - - type: object + MessagesStartEvent: + type: object + properties: + type: + type: string + enum: + - message_start + message: + type: object properties: + id: + type: string type: type: string enum: - - message_start - message: + - message + role: + type: string + enum: + - assistant + container: type: object + nullable: true properties: id: type: string - type: + expires_at: type: string - enum: - - message - role: - type: string - enum: - - assistant - content: - type: array - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - text - text: - type: string - citations: - type: array - nullable: true - items: - oneOf: - - type: object - properties: - type: - type: string - enum: - - char_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_char_index: - type: number - end_char_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_char_index - - end_char_index - - file_id - - type: object - properties: - type: - type: string - enum: - - page_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_page_number: - type: number - end_page_number: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_page_number - - end_page_number - - file_id - - type: object - properties: - type: - type: string - enum: - - content_block_location - cited_text: - type: string - document_index: - type: number - document_title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - file_id: - type: string - nullable: true - required: - - type - - cited_text - - document_index - - document_title - - start_block_index - - end_block_index - - file_id - - type: object - properties: - type: - type: string - enum: - - web_search_result_location - cited_text: - type: string - encrypted_index: - type: string - title: - type: string - nullable: true - url: - type: string - required: - - type - - cited_text - - encrypted_index - - title - - url - - type: object - properties: - type: - type: string - enum: - - search_result_location - cited_text: - type: string - search_result_index: - type: number - source: - type: string - title: - type: string - nullable: true - start_block_index: - type: number - end_block_index: - type: number - required: - - type - - cited_text - - search_result_index - - source - - title - - start_block_index - - end_block_index - required: - - type + required: + - id + - expires_at + content: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: - text - - citations - - type: object - properties: - type: - type: string - enum: - - tool_use - id: - type: string - name: - type: string - input: - nullable: true - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - thinking - thinking: - type: string - signature: - type: string - required: - - type + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - file_id + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - file_id + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + file_id: + type: string + nullable: true + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - file_id + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + required: + - type + - text + - citations + - type: object + properties: + type: + type: string + enum: + - tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: - thinking - - signature - - type: object - properties: - type: - type: string - enum: - - redacted_thinking - data: - type: string - required: - - type - - data - - type: object - properties: - type: - type: string - enum: - - server_tool_use - id: - type: string - name: - type: string - enum: - - web_search - input: - nullable: true - required: - - type - - id - - name - - type: object - properties: - type: - type: string - enum: - - web_search_tool_result - tool_use_id: - type: string - content: - anyOf: - - type: array - items: - type: object - properties: - type: - type: string - enum: - - web_search_result - encrypted_content: - type: string - page_age: - type: string - nullable: true - title: - type: string - url: - type: string - required: - - type - - encrypted_content - - page_age - - title - - url - - type: object + thinking: + type: string + signature: + type: string + required: + - type + - thinking + - signature + - type: object + properties: + type: + type: string + enum: + - redacted_thinking + data: + type: string + required: + - type + - data + - type: object + properties: + type: + type: string + enum: + - server_tool_use + id: + type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + name: + type: string + enum: + - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow + input: + nullable: true + required: + - type + - id + - caller + - name + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + tool_use_id: + type: string + content: + anyOf: + - type: array + items: + type: object + properties: + type: + type: string + enum: + - web_search_result + encrypted_content: + type: string + page_age: + type: string + nullable: true + title: + type: string + url: + type: string + required: + - type + - encrypted_content + - page_age + - title + - url + - type: object + properties: + type: + type: string + enum: + - web_search_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - max_uses_exceeded + - too_many_requests + - query_too_long + - request_too_large + x-speakeasy-unknown-values: allow + required: + - type + - error_code + required: + - type + - caller + - tool_use_id + - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + - type: object + properties: + content: + type: object properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true type: type: string enum: - - web_search_tool_result_error - error_code: - type: string - enum: - - invalid_tool_input - - unavailable - - max_uses_exceeded - - too_many_requests - - query_too_long - x-speakeasy-unknown-values: allow + - document required: + - citations + - source + - title - type - - error_code - required: - - type - - tool_use_id - - content - model: - type: string - stop_reason: + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id + model: + type: string + stop_reason: + nullable: true + stop_sequence: + nullable: true + usage: + type: object + properties: + input_tokens: + type: number + output_tokens: + type: number + cache_creation_input_tokens: + type: number nullable: true - stop_sequence: + cache_read_input_tokens: + type: number nullable: true - usage: + cache_creation: type: object + nullable: true properties: - input_tokens: + ephemeral_5m_input_tokens: type: number - output_tokens: + ephemeral_1h_input_tokens: type: number - cache_creation_input_tokens: - type: number - nullable: true - cache_read_input_tokens: - type: number - nullable: true - cache_creation: - type: object - nullable: true - properties: - ephemeral_5m_input_tokens: - type: number - ephemeral_1h_input_tokens: - type: number - required: - - ephemeral_5m_input_tokens - - ephemeral_1h_input_tokens - inference_geo: - type: string - nullable: true - server_tool_use: - type: object - nullable: true - properties: - web_search_requests: - type: number - required: - - web_search_requests - service_tier: - type: string - nullable: true - enum: - - standard - - priority - - batch - x-speakeasy-unknown-values: allow required: - - input_tokens - - output_tokens - - cache_creation_input_tokens - - cache_read_input_tokens - - cache_creation - - inference_geo - - server_tool_use - - service_tier + - ephemeral_5m_input_tokens + - ephemeral_1h_input_tokens + inference_geo: + type: string + nullable: true + server_tool_use: + type: object + nullable: true + properties: + web_search_requests: + type: number + web_fetch_requests: + type: number + required: + - web_search_requests + - web_fetch_requests + service_tier: + type: string + nullable: true + enum: + - standard + - priority + - batch + x-speakeasy-unknown-values: allow + speed: + type: string + nullable: true + enum: + - fast + - standard + x-speakeasy-unknown-values: allow required: - - id - - type - - role - - content - - model - - stop_reason - - stop_sequence - - usage + - input_tokens + - output_tokens + - cache_creation_input_tokens + - cache_read_input_tokens + - cache_creation + - inference_geo + - server_tool_use + - service_tier + provider: + type: string + enum: + - AnyScale + - Atoma + - Cent-ML + - CrofAI + - Enfer + - GoPomelo + - HuggingFace + - Hyperbolic 2 + - InoCloud + - Kluster + - Lambda + - Lepton + - Lynn 2 + - Lynn + - Mancer + - Meta + - Modal + - Nineteen + - OctoAI + - Recursal + - Reflection + - Replicate + - SambaNova 2 + - SF Compute + - Targon + - Together 2 + - Ubicloud + - 01.AI + - AkashML + - AI21 + - AionLabs + - Alibaba + - Ambient + - Amazon Bedrock + - Amazon Nova + - Anthropic + - Arcee AI + - AtlasCloud + - Avian + - Azure + - BaseTen + - BytePlus + - Black Forest Labs + - Cerebras + - Chutes + - Cirrascale + - Clarifai + - Cloudflare + - Cohere + - Crusoe + - DeepInfra + - DeepSeek + - Featherless + - Fireworks + - Friendli + - GMICloud + - Google + - Google AI Studio + - Groq + - Hyperbolic + - Inception + - Inceptron + - InferenceNet + - Ionstream + - Infermatic + - Io Net + - Inflection + - Liquid + - Mara + - Mancer 2 + - Minimax + - ModelRun + - Mistral + - Modular + - Moonshot AI + - Morph + - NCompass + - Nebius + - NextBit + - Novita + - Nvidia + - OpenAI + - OpenInference + - Parasail + - Perplexity + - Phala + - Reka + - Relace + - SambaNova + - Seed + - SiliconFlow + - Sourceful + - StepFun + - Stealth + - StreamLake + - Switchpoint + - Together + - Upstage + - Venice + - WandB + - Xiaomi + - xAI + - Z.AI + - FakeProvider + x-speakeasy-unknown-values: allow required: + - id - type - - message + - role + - container + - content + - model + - stop_reason + - stop_sequence + - usage + required: + - type + - message + description: Event sent at the start of a streaming message + MessagesStreamEvents: + oneOf: + - $ref: '#/components/schemas/MessagesStartEvent' - type: object properties: type: @@ -4907,6 +7464,17 @@ components: delta: type: object properties: + container: + type: object + nullable: true + properties: + id: + type: string + expires_at: + type: string + required: + - id + - expires_at stop_reason: type: string nullable: true @@ -4922,6 +7490,7 @@ components: type: string nullable: true required: + - container - stop_reason - stop_sequence usage: @@ -4944,8 +7513,11 @@ components: properties: web_search_requests: type: number + web_fetch_requests: + type: number required: - web_search_requests + - web_fetch_requests required: - input_tokens - output_tokens @@ -5131,6 +7703,38 @@ components: - tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string input: @@ -5138,6 +7742,7 @@ components: required: - type - id + - caller - name - type: object properties: @@ -5172,15 +7777,55 @@ components: - server_tool_use id: type: string + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id name: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow input: nullable: true required: - type - id + - caller - name - type: object properties: @@ -5188,6 +7833,38 @@ components: type: string enum: - web_search_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id tool_use_id: type: string content: @@ -5229,14 +7906,493 @@ components: - max_uses_exceeded - too_many_requests - query_too_long + - request_too_large x-speakeasy-unknown-values: allow required: - type - error_code required: - type + - caller - tool_use_id - content + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result + caller: + oneOf: + - type: object + properties: + type: + type: string + enum: + - direct + required: + - type + - type: object + properties: + type: + type: string + enum: + - code_execution_20250825 + tool_id: + type: string + required: + - type + - tool_id + - type: object + properties: + type: + type: string + enum: + - code_execution_20260120 + tool_id: + type: string + required: + - type + - tool_id + content: + oneOf: + - type: object + properties: + type: + type: string + enum: + - web_fetch_tool_result_error + error_code: + type: string + enum: + - invalid_tool_input + - url_too_long + - url_not_allowed + - url_not_accessible + - unsupported_content_type + - too_many_requests + - max_uses_exceeded + - unavailable + x-speakeasy-unknown-values: allow + required: + - type + - error_code + - type: object + properties: + content: + type: object + properties: + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + required: + - enabled + source: + anyOf: + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - application/pdf + type: + type: string + enum: + - base64 + required: + - data + - media_type + - type + - type: object + properties: + data: + type: string + media_type: + type: string + enum: + - text/plain + type: + type: string + enum: + - text + required: + - data + - media_type + - type + title: + type: string + nullable: true + type: + type: string + enum: + - document + required: + - citations + - source + - title + - type + retrieved_at: + type: string + nullable: true + type: + type: string + enum: + - web_fetch_result + url: + type: string + required: + - content + - retrieved_at + - type + - url + tool_use_id: + type: string + required: + - type + - caller + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - code_execution_output + required: + - file_id + - type + encrypted_stdout: + type: string + return_code: + type: number + stderr: + type: string + type: + type: string + enum: + - encrypted_code_execution_result + required: + - content + - encrypted_stdout + - return_code + - stderr + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - bash_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - output_file_too_large + x-speakeasy-unknown-values: allow + type: + type: string + enum: + - bash_code_execution_tool_result_error + required: + - error_code + - type + - type: object + properties: + content: + type: array + items: + type: object + properties: + file_id: + type: string + type: + type: string + enum: + - bash_code_execution_output + required: + - file_id + - type + return_code: + type: number + stderr: + type: string + stdout: + type: string + type: + type: string + enum: + - bash_code_execution_result + required: + - content + - return_code + - stderr + - stdout + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - text_editor_code_execution_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + - file_not_found + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - text_editor_code_execution_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + content: + type: string + file_type: + type: string + enum: + - text + - image + - pdf + x-speakeasy-unknown-values: allow + num_lines: + type: number + nullable: true + start_line: + type: number + nullable: true + total_lines: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_view_result + required: + - content + - file_type + - num_lines + - start_line + - total_lines + - type + - type: object + properties: + is_file_update: + type: boolean + type: + type: string + enum: + - text_editor_code_execution_create_result + required: + - is_file_update + - type + - type: object + properties: + lines: + type: array + nullable: true + items: + type: string + new_lines: + type: number + nullable: true + new_start: + type: number + nullable: true + old_lines: + type: number + nullable: true + old_start: + type: number + nullable: true + type: + type: string + enum: + - text_editor_code_execution_str_replace_result + required: + - lines + - new_lines + - new_start + - old_lines + - old_start + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - tool_search_tool_result + content: + oneOf: + - type: object + properties: + error_code: + type: string + enum: + - invalid_tool_input + - unavailable + - too_many_requests + - execution_time_exceeded + x-speakeasy-unknown-values: allow + error_message: + type: string + nullable: true + type: + type: string + enum: + - tool_search_tool_result_error + required: + - error_code + - error_message + - type + - type: object + properties: + tool_references: + type: array + items: + type: object + properties: + tool_name: + type: string + type: + type: string + enum: + - tool_reference + required: + - tool_name + - type + type: + type: string + enum: + - tool_search_tool_search_result + required: + - tool_references + - type + tool_use_id: + type: string + required: + - type + - content + - tool_use_id + - type: object + properties: + type: + type: string + enum: + - container_upload + file_id: + type: string + required: + - type + - file_id required: - type - index @@ -5481,7 +8637,7 @@ components: - type - error description: Union of all possible streaming events - OpenRouterAnthropicMessageParam: + MessagesMessageParam: type: object properties: role: @@ -6261,6 +9417,510 @@ components: required: - type - source + - type: object + properties: + type: + type: string + enum: + - tool_reference + tool_name: + type: string + required: + - type + - tool_name + - type: object + properties: + type: + type: string + enum: + - search_result + source: + type: string + title: + type: string + content: + type: array + items: + type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - text + citations: + type: object + properties: + enabled: + type: boolean + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - source + - title + - content + - type: object + properties: + type: + type: string + enum: + - document + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - application/pdf + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - text + media_type: + type: string + enum: + - text/plain + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - content + content: + anyOf: + - type: string + - type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - text + text: + type: string + citations: + type: array + nullable: true + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - char_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_char_index: + type: number + end_char_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_char_index + - end_char_index + - type: object + properties: + type: + type: string + enum: + - page_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_page_number: + type: number + end_page_number: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_page_number + - end_page_number + - type: object + properties: + type: + type: string + enum: + - content_block_location + cited_text: + type: string + document_index: + type: number + document_title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - document_index + - document_title + - start_block_index + - end_block_index + - type: object + properties: + type: + type: string + enum: + - web_search_result_location + cited_text: + type: string + encrypted_index: + type: string + title: + type: string + nullable: true + url: + type: string + required: + - type + - cited_text + - encrypted_index + - title + - url + - type: object + properties: + type: + type: string + enum: + - search_result_location + cited_text: + type: string + search_result_index: + type: number + source: + type: string + title: + type: string + nullable: true + start_block_index: + type: number + end_block_index: + type: number + required: + - type + - cited_text + - search_result_index + - source + - title + - start_block_index + - end_block_index + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - text + - type: object + properties: + type: + type: string + enum: + - image + source: + oneOf: + - type: object + properties: + type: + type: string + enum: + - base64 + media_type: + type: string + enum: + - image/jpeg + - image/png + - image/gif + - image/webp + x-speakeasy-unknown-values: allow + data: + type: string + required: + - type + - media_type + - data + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - source + required: + - type + - content + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + required: + - type + - url + citations: + type: object + nullable: true + properties: + enabled: + type: boolean + context: + type: string + nullable: true + title: + type: string + nullable: true + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - source is_error: type: boolean cache_control: @@ -6318,6 +9978,13 @@ components: type: string enum: - web_search + - web_fetch + - code_execution + - bash_code_execution + - text_editor_code_execution + - tool_search_tool_regex + - tool_search_tool_bm25 + x-speakeasy-unknown-values: allow input: nullable: true cache_control: @@ -6601,7 +10268,86 @@ components: - role - content description: Anthropic message with OpenRouter extensions - AnthropicOutputConfig: + MessagesWebSearchServerTool: + type: object + properties: + type: + type: string + enum: + - openrouter:web_search + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + required: + - type + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + max_results: 5 + MessagesOutputConfig: type: object properties: effort: @@ -6616,8 +10362,25 @@ components: How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, or `max`. example: medium x-speakeasy-unknown-values: allow - description: Configuration for controlling output behavior. Currently supports the effort parameter for Claude Opus 4.5. - AnthropicMessagesRequest: + format: + type: object + nullable: true + properties: + type: + type: string + enum: + - json_schema + schema: + type: object + additionalProperties: + nullable: true + required: + - type + - schema + description: >- + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + description: Configuration for controlling output behavior. Supports the effort parameter and structured output format. + MessagesRequest: type: object properties: model: @@ -6626,8 +10389,9 @@ components: type: number messages: type: array + nullable: true items: - $ref: '#/components/schemas/OpenRouterAnthropicMessageParam' + $ref: '#/components/schemas/MessagesMessageParam' system: anyOf: - type: string @@ -6794,8 +10558,6 @@ components: type: array items: type: string - stream: - type: boolean temperature: type: number top_p: @@ -6805,7 +10567,7 @@ components: tools: type: array items: - oneOf: + anyOf: - type: object properties: name: @@ -6817,8 +10579,7 @@ components: properties: type: type: string - enum: - - object + default: object properties: nullable: true required: @@ -6826,8 +10587,6 @@ components: nullable: true items: type: string - required: - - type additionalProperties: nullable: true type: @@ -6971,6 +10730,80 @@ components: required: - type - name + - type: object + properties: + type: + type: string + enum: + - web_search_20260209 + name: + type: string + enum: + - web_search + allowed_callers: + type: array + items: + type: string + enum: + - direct + - code_execution_20250825 + - code_execution_20260120 + x-speakeasy-unknown-values: allow + allowed_domains: + type: array + nullable: true + items: + type: string + blocked_domains: + type: array + nullable: true + items: + type: string + max_uses: + type: number + nullable: true + user_location: + type: object + nullable: true + properties: + type: + type: string + enum: + - approximate + city: + type: string + nullable: true + country: + type: string + nullable: true + region: + type: string + nullable: true + timezone: + type: string + nullable: true + required: + - type + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + required: + - type + - name + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/MessagesWebSearchServerTool' tool_choice: oneOf: - type: object @@ -7049,6 +10882,160 @@ components: - auto - standard_only x-speakeasy-unknown-values: allow + output_config: + $ref: '#/components/schemas/MessagesOutputConfig' + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + stream: + type: boolean + context_management: + type: object + nullable: true + properties: + edits: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - clear_tool_uses_20250919 + clear_at_least: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + clear_tool_inputs: + anyOf: + - type: boolean + - type: array + items: + type: string + - nullable: true + exclude_tools: + type: array + nullable: true + items: + type: string + keep: + type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + trigger: + oneOf: + - type: object + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - tool_uses + value: + type: number + required: + - type + - value + required: + - type + - type: object + properties: + type: + type: string + enum: + - clear_thinking_20251015 + keep: + anyOf: + - type: object + properties: + type: + type: string + enum: + - thinking_turns + value: + type: number + required: + - type + - value + - type: object + properties: + type: + type: string + enum: + - all + required: + - type + - type: string + enum: + - all + required: + - type + - type: object + properties: + type: + type: string + enum: + - compact_20260112 + instructions: + type: string + nullable: true + pause_after_compaction: + type: boolean + trigger: + type: object + nullable: true + properties: + type: + type: string + enum: + - input_tokens + value: + type: number + required: + - type + - value + required: + - type provider: type: object nullable: true @@ -7201,6 +11188,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -7227,6 +11234,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -7243,14 +11263,14 @@ components: x-speakeasy-unknown-values: allow user: type: string - maxLength: 128 + maxLength: 256 description: >- - A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. + A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. session_id: type: string - maxLength: 128 + maxLength: 256 description: >- - A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. trace: type: object properties: @@ -7272,11 +11292,17 @@ components: type: array items: type: string - output_config: - $ref: '#/components/schemas/AnthropicOutputConfig' + speed: + type: string + enum: + - fast + - standard + description: >- + Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted. + example: fast + x-speakeasy-unknown-values: allow required: - model - - max_tokens - messages description: Request schema for Anthropic Messages API endpoint example: @@ -7391,7 +11417,7 @@ components: error: code: 403 message: Only management keys can perform this operation - ChatCompletionFinishReason: + ChatFinishReasonEnum: type: string enum: - tool_calls @@ -7401,7 +11427,7 @@ components: - error example: stop x-speakeasy-unknown-values: allow - ChatMessageContentItemCacheControl: + ChatContentCacheControl: type: object properties: type: @@ -7420,7 +11446,7 @@ components: example: type: ephemeral ttl: 5m - ChatMessageContentItemText: + ChatContentText: type: object properties: type: @@ -7430,7 +11456,7 @@ components: text: type: string cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + $ref: '#/components/schemas/ChatContentCacheControl' required: - type - text @@ -7438,7 +11464,7 @@ components: example: type: text text: Hello, world! - ChatMessageContentItemImage: + ChatContentImage: type: object properties: type: @@ -7470,7 +11496,7 @@ components: image_url: url: https://example.com/image.jpg detail: auto - ChatMessageContentItemAudio: + ChatContentAudio: type: object properties: type: @@ -7499,16 +11525,7 @@ components: input_audio: data: SGVsbG8gV29ybGQ= format: wav - VideoInput: - type: object - properties: - url: - type: string - description: 'URL of the video (data: URLs supported)' - required: - - url - description: Video input object - ChatMessageContentItemVideoLegacy: + Legacy_ChatContentVideo: type: object properties: type: @@ -7516,7 +11533,7 @@ components: enum: - input_video video_url: - $ref: '#/components/schemas/VideoInput' + $ref: '#/components/schemas/ChatContentVideoInput' required: - type - video_url @@ -7526,7 +11543,16 @@ components: type: input_video video_url: url: https://example.com/video.mp4 - ChatMessageContentItemVideo: + ChatContentVideoInput: + type: object + properties: + url: + type: string + description: 'URL of the video (data: URLs supported)' + required: + - url + description: Video input object + ChatContentVideo: type: object properties: type: @@ -7534,7 +11560,7 @@ components: enum: - video_url video_url: - $ref: '#/components/schemas/VideoInput' + $ref: '#/components/schemas/ChatContentVideoInput' required: - type - video_url @@ -7543,26 +11569,55 @@ components: type: video_url video_url: url: https://example.com/video.mp4 - ChatMessageContentItem: + ChatContentFile: + type: object + properties: + type: + type: string + enum: + - file + file: + type: object + properties: + file_data: + type: string + description: File content as base64 data URL or URL + file_id: + type: string + description: File ID for previously uploaded files + filename: + type: string + description: Original filename + required: + - type + - file + description: File content part for document processing + example: + type: file + file: + file_data: https://example.com/document.pdf + filename: document.pdf + ChatContentItems: oneOf: - - $ref: '#/components/schemas/ChatMessageContentItemText' - - $ref: '#/components/schemas/ChatMessageContentItemImage' - - $ref: '#/components/schemas/ChatMessageContentItemAudio' + - $ref: '#/components/schemas/ChatContentText' + - $ref: '#/components/schemas/ChatContentImage' + - $ref: '#/components/schemas/ChatContentAudio' - oneOf: - - $ref: '#/components/schemas/ChatMessageContentItemVideoLegacy' - - $ref: '#/components/schemas/ChatMessageContentItemVideo' + - $ref: '#/components/schemas/Legacy_ChatContentVideo' + - $ref: '#/components/schemas/ChatContentVideo' discriminator: propertyName: type mapping: - input_video: '#/components/schemas/ChatMessageContentItemVideoLegacy' - video_url: '#/components/schemas/ChatMessageContentItemVideo' + input_video: '#/components/schemas/Legacy_ChatContentVideo' + video_url: '#/components/schemas/ChatContentVideo' + - $ref: '#/components/schemas/ChatContentFile' discriminator: propertyName: type description: Content part for chat completion messages example: type: text text: Hello, world! - ChatMessageToolCall: + ChatToolCall: type: object properties: id: @@ -7710,12 +11765,12 @@ components: example: type: reasoning.summary summary: The model analyzed the problem by first identifying key constraints, then evaluating possible solutions... - AssistantMessageReasoningDetails: + ChatReasoningDetails: type: array items: $ref: '#/components/schemas/ReasoningDetailUnion' description: Reasoning details for extended thinking models - AssistantMessageImages: + ChatAssistantImages: type: array items: type: object @@ -7734,7 +11789,28 @@ components: example: - image_url: url: data:image/png;base64,iVBORw0KGgo... - AssistantMessage: + ChatAudioOutput: + type: object + properties: + id: + type: string + description: Audio output identifier + expires_at: + type: number + description: Audio expiration timestamp + data: + type: string + description: Base64 encoded audio data + transcript: + type: string + description: Audio transcript + description: Audio output data or reference + example: + id: audio_abc123 + expires_at: 1677652400 + data: UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f + transcript: Hello! How can I help you today? + ChatAssistantMessage: type: object properties: role: @@ -7746,7 +11822,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' - nullable: true description: Assistant message content name: @@ -7755,7 +11831,7 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ChatMessageToolCall' + $ref: '#/components/schemas/ChatToolCall' description: Tool calls made by the assistant refusal: type: string @@ -7766,16 +11842,18 @@ components: nullable: true description: Reasoning output reasoning_details: - $ref: '#/components/schemas/AssistantMessageReasoningDetails' + $ref: '#/components/schemas/ChatReasoningDetails' images: - $ref: '#/components/schemas/AssistantMessageImages' + $ref: '#/components/schemas/ChatAssistantImages' + audio: + $ref: '#/components/schemas/ChatAudioOutput' required: - role description: Assistant message for requests and responses example: role: assistant content: The capital of France is Paris. - ChatMessageTokenLogprob: + ChatTokenLogprob: type: object properties: token: @@ -7823,7 +11901,7 @@ components: - token: ' Hello' logprob: -0.612345 bytes: null - ChatMessageTokenLogprobs: + ChatTokenLogprobs: type: object nullable: true properties: @@ -7831,17 +11909,16 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/ChatMessageTokenLogprob' + $ref: '#/components/schemas/ChatTokenLogprob' description: Log probabilities for content tokens refusal: type: array nullable: true items: - $ref: '#/components/schemas/ChatMessageTokenLogprob' + $ref: '#/components/schemas/ChatTokenLogprob' description: Log probabilities for refusal tokens required: - content - - refusal description: Log probabilities for the completion example: content: @@ -7850,12 +11927,12 @@ components: bytes: null top_logprobs: [] refusal: null - ChatResponseChoice: + ChatChoice: type: object properties: finish_reason: anyOf: - - $ref: '#/components/schemas/ChatCompletionFinishReason' + - $ref: '#/components/schemas/ChatFinishReasonEnum' - nullable: true - nullable: true index: @@ -7863,9 +11940,9 @@ components: description: Choice index example: 0 message: - $ref: '#/components/schemas/AssistantMessage' + $ref: '#/components/schemas/ChatAssistantMessage' logprobs: - $ref: '#/components/schemas/ChatMessageTokenLogprobs' + $ref: '#/components/schemas/ChatTokenLogprobs' required: - finish_reason - index @@ -7878,7 +11955,7 @@ components: role: assistant content: The capital of France is Paris. logprobs: null - ChatGenerationTokenUsage: + ChatUsage: type: object properties: completion_tokens: @@ -7941,7 +12018,7 @@ components: reasoning_tokens: 5 prompt_tokens_details: cached_tokens: 2 - ChatResponse: + ChatResult: type: object properties: id: @@ -7951,7 +12028,7 @@ components: choices: type: array items: - $ref: '#/components/schemas/ChatResponseChoice' + $ref: '#/components/schemas/ChatChoice' description: List of completion choices created: type: number @@ -7970,14 +12047,20 @@ components: nullable: true description: System fingerprint example: fp_44709d6fcb + service_tier: + type: string + nullable: true + description: The service tier used by the upstream provider for this request + example: default usage: - $ref: '#/components/schemas/ChatGenerationTokenUsage' + $ref: '#/components/schemas/ChatUsage' required: - id - choices - created - model - object + - system_fingerprint description: Chat completion response example: id: chatcmpl-123 @@ -7994,7 +12077,7 @@ components: prompt_tokens: 10 completion_tokens: 15 total_tokens: 25 - ChatStreamingMessageToolCall: + ChatStreamToolCall: type: object properties: index: @@ -8033,7 +12116,7 @@ components: function: name: get_weather arguments: '{"location":' - ChatStreamingMessageChunk: + ChatStreamDelta: type: object properties: role: @@ -8060,22 +12143,26 @@ components: tool_calls: type: array items: - $ref: '#/components/schemas/ChatStreamingMessageToolCall' + $ref: '#/components/schemas/ChatStreamToolCall' description: Tool calls delta reasoning_details: - $ref: '#/components/schemas/AssistantMessageReasoningDetails' + $ref: '#/components/schemas/ChatReasoningDetails' + audio: + allOf: + - $ref: '#/components/schemas/ChatAudioOutput' + - description: Audio output data description: Delta changes in streaming response example: role: assistant content: Hello - ChatStreamingChoice: + ChatStreamChoice: type: object properties: delta: - $ref: '#/components/schemas/ChatStreamingMessageChunk' + $ref: '#/components/schemas/ChatStreamDelta' finish_reason: anyOf: - - $ref: '#/components/schemas/ChatCompletionFinishReason' + - $ref: '#/components/schemas/ChatFinishReasonEnum' - nullable: true - nullable: true index: @@ -8083,7 +12170,7 @@ components: description: Choice index example: 0 logprobs: - $ref: '#/components/schemas/ChatMessageTokenLogprobs' + $ref: '#/components/schemas/ChatTokenLogprobs' required: - delta - finish_reason @@ -8095,7 +12182,7 @@ components: role: assistant content: Hello finish_reason: null - ChatStreamingResponseChunk: + ChatStreamChunk: type: object properties: id: @@ -8105,7 +12192,7 @@ components: choices: type: array items: - $ref: '#/components/schemas/ChatStreamingChoice' + $ref: '#/components/schemas/ChatStreamChoice' description: List of streaming chunk choices created: type: number @@ -8121,9 +12208,13 @@ components: - chat.completion.chunk system_fingerprint: type: string - nullable: true description: System fingerprint example: fp_44709d6fcb + service_tier: + type: string + nullable: true + description: The service tier used by the upstream provider for this request + example: default error: type: object properties: @@ -8143,7 +12234,7 @@ components: message: Rate limit exceeded code: 429 usage: - $ref: '#/components/schemas/ChatGenerationTokenUsage' + $ref: '#/components/schemas/ChatUsage' required: - id - choices @@ -8163,7 +12254,7 @@ components: role: assistant content: Hello finish_reason: null - SystemMessage: + ChatSystemMessage: type: object properties: role: @@ -8175,7 +12266,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItemText' + $ref: '#/components/schemas/ChatContentText' description: System message content example: You are a helpful assistant. name: @@ -8190,7 +12281,7 @@ components: role: system content: You are a helpful assistant. name: Assistant Config - UserMessage: + ChatUserMessage: type: object properties: role: @@ -8202,7 +12293,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' description: User message content example: What is the capital of France? name: @@ -8216,7 +12307,7 @@ components: example: role: user content: What is the capital of France? - DeveloperMessage: + ChatDeveloperMessage: type: object properties: role: @@ -8228,7 +12319,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItemText' + $ref: '#/components/schemas/ChatContentText' description: Developer message content example: This is a message from the developer. name: @@ -8242,7 +12333,7 @@ components: example: role: developer content: This is a message from the developer. - ToolResponseMessage: + ChatToolMessage: type: object properties: role: @@ -8254,7 +12345,7 @@ components: - type: string - type: array items: - $ref: '#/components/schemas/ChatMessageContentItem' + $ref: '#/components/schemas/ChatContentItems' description: Tool response content example: The weather in San Francisco is 72°F and sunny. tool_call_id: @@ -8270,13 +12361,13 @@ components: role: tool content: The weather in San Francisco is 72°F and sunny. tool_call_id: call_abc123 - Message: + ChatMessages: oneOf: - - $ref: '#/components/schemas/SystemMessage' - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/DeveloperMessage' - - $ref: '#/components/schemas/AssistantMessage' - - $ref: '#/components/schemas/ToolResponseMessage' + - $ref: '#/components/schemas/ChatSystemMessage' + - $ref: '#/components/schemas/ChatUserMessage' + - $ref: '#/components/schemas/ChatDeveloperMessage' + - $ref: '#/components/schemas/ChatAssistantMessage' + - $ref: '#/components/schemas/ChatToolMessage' discriminator: propertyName: role description: Chat completion message with role-based discrimination @@ -8287,7 +12378,7 @@ components: type: string description: Model to use for completion example: openai/gpt-4 - ModelNames: + ChatModelNames: type: array items: allOf: @@ -8297,7 +12388,14 @@ components: example: - openai/gpt-4 - openai/gpt-4o - ResponseFormatText: + ChatReasoningSummaryVerbosityEnum: + type: string + enum: + - auto + - concise + - detailed + x-speakeasy-unknown-values: allow + ChatFormatTextConfig: type: object properties: type: @@ -8309,19 +12407,7 @@ components: description: Default text response format example: type: text - ResponseFormatJSONObject: - type: object - properties: - type: - type: string - enum: - - json_object - required: - - type - description: JSON object response format - example: - type: json_object - JSONSchemaConfig: + ChatJsonSchemaConfig: type: object properties: name: @@ -8364,7 +12450,7 @@ components: required: - answer strict: true - ResponseFormatJSONSchema: + ChatFormatJsonSchemaConfig: type: object properties: type: @@ -8372,7 +12458,7 @@ components: enum: - json_schema json_schema: - $ref: '#/components/schemas/JSONSchemaConfig' + $ref: '#/components/schemas/ChatJsonSchemaConfig' required: - type - json_schema @@ -8388,7 +12474,7 @@ components: type: number required: - answer - ResponseFormatTextGrammar: + ChatFormatGrammarConfig: type: object properties: type: @@ -8406,7 +12492,7 @@ components: example: type: grammar grammar: root ::= "yes" | "no" - ResponseFormatTextPython: + ChatFormatPythonConfig: type: object properties: type: @@ -8430,7 +12516,7 @@ components: description: Streaming configuration options example: include_usage: true - NamedToolChoice: + ChatNamedToolChoice: type: object properties: type: @@ -8454,7 +12540,7 @@ components: type: function function: name: get_weather - ToolChoiceOption: + ChatToolChoice: anyOf: - type: string enum: @@ -8465,66 +12551,291 @@ components: - type: string enum: - required - - $ref: '#/components/schemas/NamedToolChoice' + - $ref: '#/components/schemas/ChatNamedToolChoice' description: Tool choice configuration example: auto - ToolDefinitionJson: + ChatWebSearchServerTool: type: object properties: type: type: string enum: - - function - function: + - openrouter:web_search + parameters: type: object properties: - name: + engine: type: string - maxLength: 64 - description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) - example: get_weather - description: + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: type: string - description: Function description for the model - example: Get the current weather for a location - parameters: - type: object - additionalProperties: - nullable: true - description: Function parameters as JSON Schema object - example: - type: object - properties: - location: - type: string - description: City name - required: - - location - strict: - type: boolean - nullable: true - description: Enable strict schema adherence - example: false - required: - - name - description: Function definition for tool calling - example: - name: get_weather - description: Get the current weather for a location - parameters: + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: type: object properties: - location: + type: type: string - description: City name - required: - - location - cache_control: - $ref: '#/components/schemas/ChatMessageContentItemCacheControl' + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. required: - type - - function - description: Tool definition for function calling + description: 'OpenRouter built-in server tool: searches the web for current information' + example: + type: openrouter:web_search + parameters: + engine: auto + max_results: 5 + ChatWebSearchShorthand: + type: object + properties: + type: + type: string + enum: + - web_search + - web_search_preview + - web_search_preview_2025_03_11 + - web_search_2025_08_26 + x-speakeasy-unknown-values: allow + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + parameters: + type: object + properties: + engine: + type: string + enum: + - auto + - native + - exa + - firecrawl + - parallel + description: >- + Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. + example: auto + x-speakeasy-unknown-values: allow + max_results: + type: number + minimum: 1 + maximum: 25 + description: >- + Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. + example: 5 + max_total_results: + type: number + minimum: 1 + description: >- + Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. + example: 20 + search_context_size: + type: string + enum: + - low + - medium + - high + description: >- + How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search. + x-speakeasy-unknown-values: allow + user_location: + type: object + properties: + type: + type: string + enum: + - approximate + city: + type: string + region: + type: string + country: + type: string + timezone: + type: string + description: Approximate user location for location-biased results. + allowed_domains: + type: array + items: + type: string + description: >- + Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + excluded_domains: + type: array + items: + type: string + description: >- + Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search. + required: + - type + description: Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + ChatFunctionTool: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + function: + type: object + properties: + name: + type: string + maxLength: 64 + description: Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + example: get_weather + description: + type: string + description: Function description for the model + example: Get the current weather for a location + parameters: + type: object + additionalProperties: + nullable: true + description: Function parameters as JSON Schema object + example: + type: object + properties: + location: + type: string + description: City name + required: + - location + strict: + type: boolean + nullable: true + description: Enable strict schema adherence + example: false + required: + - name + description: Function definition for tool calling + example: + name: get_weather + description: Get the current weather for a location + parameters: + type: object + properties: + location: + type: string + description: City name + required: + - location + cache_control: + $ref: '#/components/schemas/ChatContentCacheControl' + required: + - type + - function + - $ref: '#/components/schemas/DatetimeServerTool' + - $ref: '#/components/schemas/ChatWebSearchServerTool' + - $ref: '#/components/schemas/ChatWebSearchShorthand' + description: Tool definition for function calling (regular function or OpenRouter built-in server tool) example: type: function function: @@ -8544,7 +12855,7 @@ components: x-speakeasy-unknown-values: allow required: - location - DebugOptions: + ChatDebugOptions: type: object properties: echo_upstream_body: @@ -8555,7 +12866,7 @@ components: description: Debug options for inspecting request transformations (streaming only) example: echo_upstream_body: true - ChatGenerationParams: + ChatRequest: type: object properties: provider: @@ -8710,6 +13021,26 @@ components: type: string engine: $ref: '#/components/schemas/WebSearchEngine' + include_domains: + type: array + items: + type: string + description: >- + A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog + exclude_domains: + type: array + items: + type: string + description: >- + A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + example: + - example.com + - '*.substack.com' + - openai.com/blog required: - id - type: object @@ -8736,6 +13067,19 @@ components: description: Set to false to disable the response-healing plugin for this request. Defaults to true. required: - id + - type: object + properties: + id: + type: string + enum: + - context-compression + enabled: + type: boolean + description: Set to false to disable the context-compression plugin for this request. Defaults to true. + engine: + $ref: '#/components/schemas/ContextCompressionEngine' + required: + - id description: Plugins you want to enable for this request, including their settings. route: type: string @@ -8756,9 +13100,9 @@ components: example: user-123 session_id: type: string - maxLength: 128 + maxLength: 256 description: >- - A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. trace: type: object properties: @@ -8779,7 +13123,7 @@ components: messages: type: array items: - $ref: '#/components/schemas/Message' + $ref: '#/components/schemas/ChatMessages' minItems: 1 description: List of messages for the conversation example: @@ -8788,7 +13132,7 @@ components: model: $ref: '#/components/schemas/ModelName' models: - $ref: '#/components/schemas/ModelNames' + $ref: '#/components/schemas/ChatModelNames' frequency_penalty: type: number nullable: true @@ -8826,7 +13170,7 @@ components: type: number nullable: true minimum: 1 - description: Maximum tokens (deprecated, use max_completion_tokens) + description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' example: 100 metadata: type: object @@ -8861,7 +13205,7 @@ components: x-speakeasy-unknown-values: allow summary: anyOf: - - $ref: '#/components/schemas/ReasoningSummaryVerbosity' + - $ref: '#/components/schemas/ChatReasoningSummaryVerbosityEnum' - nullable: true - nullable: true description: Configuration options for reasoning models @@ -8870,11 +13214,11 @@ components: summary: concise response_format: oneOf: - - $ref: '#/components/schemas/ResponseFormatText' - - $ref: '#/components/schemas/ResponseFormatJSONObject' - - $ref: '#/components/schemas/ResponseFormatJSONSchema' - - $ref: '#/components/schemas/ResponseFormatTextGrammar' - - $ref: '#/components/schemas/ResponseFormatTextPython' + - $ref: '#/components/schemas/ChatFormatTextConfig' + - $ref: '#/components/schemas/FormatJsonObjectConfig' + - $ref: '#/components/schemas/ChatFormatJsonSchemaConfig' + - $ref: '#/components/schemas/ChatFormatGrammarConfig' + - $ref: '#/components/schemas/ChatFormatPythonConfig' discriminator: propertyName: type description: Response format configuration @@ -8915,11 +13259,11 @@ components: type: boolean nullable: true tool_choice: - $ref: '#/components/schemas/ToolChoiceOption' + $ref: '#/components/schemas/ChatToolChoice' tools: type: array items: - $ref: '#/components/schemas/ToolDefinitionJson' + $ref: '#/components/schemas/ChatFunctionTool' description: Available tools for function calling example: - type: function @@ -8935,7 +13279,7 @@ components: description: Nucleus sampling parameter (0-1) example: 1 debug: - $ref: '#/components/schemas/DebugOptions' + $ref: '#/components/schemas/ChatDebugOptions' image_config: type: object additionalProperties: @@ -8956,11 +13300,41 @@ components: enum: - text - image + - audio x-speakeasy-unknown-values: allow - description: Output modalities for the response. Supported values are "text" and "image". + description: Output modalities for the response. Supported values are "text", "image", and "audio". example: - text - image + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + x-speakeasy-unknown-values: allow + required: + - type + description: >- + Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + service_tier: + type: string + nullable: true + enum: + - auto + - default + - flex + - priority + - scale + description: The service tier to use for processing this request. + example: auto + x-speakeasy-unknown-values: allow required: - messages description: Chat completion request parameters @@ -9206,6 +13580,7 @@ components: - image - embeddings - audio + - video example: text x-speakeasy-unknown-values: allow ModelArchitecture: @@ -9356,17 +13731,34 @@ components: nullable: true minimum: 0 maximum: 1 + top_k: + type: integer + nullable: true + minimum: 0 frequency_penalty: type: number nullable: true minimum: -2 maximum: 2 + presence_penalty: + type: number + nullable: true + minimum: -2 + maximum: 2 + repetition_penalty: + type: number + nullable: true + minimum: 0 + maximum: 2 additionalProperties: false description: Default parameters for this model example: temperature: 0.7 top_p: 0.9 + top_k: 0 frequency_penalty: 0 + presence_penalty: 0 + repetition_penalty: 1 Model: type: object properties: @@ -9415,6 +13807,11 @@ components: description: List of supported parameters for this model default_parameters: $ref: '#/components/schemas/DefaultParameters' + knowledge_cutoff: + type: string + nullable: true + description: The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. + example: '2024-10-01' expiration_date: type: string nullable: true @@ -9463,6 +13860,7 @@ components: - top_p - max_tokens default_parameters: null + knowledge_cutoff: null expiration_date: null ModelsListResponseData: type: array @@ -9510,6 +13908,7 @@ components: - frequency_penalty - presence_penalty default_parameters: null + knowledge_cutoff: null expiration_date: null ModelsCountResponse: type: object @@ -9865,7 +14264,63 @@ components: p75: 38.5 p90: 28.3 p99: 15.1 - parameters: {AppIdentifier: {name: HTTP-Referer, in: header, schema: {type: string}, description: "The app identifier should be your app's URL and is used as the primary identifier for rankings.\nThis is used to track API usage per application.\n"}, AppDisplayName: {name: X-Title, in: header, schema: {type: string}, description: "The app display name allows you to customize how your app appears in OpenRouter's dashboard.\n"}} + ConflictResponseErrorData: + type: object + properties: + code: + type: integer + message: + type: string + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + required: + - code + - message + description: Error data for ConflictResponse + example: + code: 409 + message: Resource conflict. Please try again later. + ConflictResponse: + type: object + properties: + error: + $ref: '#/components/schemas/ConflictResponseErrorData' + user_id: + type: string + nullable: true + required: + - error + description: Conflict - Resource conflict or concurrent modification + example: + error: + code: 409 + message: Resource conflict. Please try again later. + parameters: + AppIdentifier: + name: HTTP-Referer + in: header + schema: + type: string + description: | + The app identifier should be your app's URL and is used as the primary identifier for rankings. + This is used to track API usage per application. + AppDisplayName: + name: X-OpenRouter-Title + in: header + schema: + type: string + description: | + The app display name allows you to customize how your app appears in OpenRouter's dashboard. + AppCategories: + name: X-OpenRouter-Categories + in: header + schema: + type: string + description: | + Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. securitySchemes: apiKey: type: http @@ -9888,7 +14343,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenResponsesRequest' + $ref: '#/components/schemas/ResponsesRequest' required: true responses: '200': @@ -9896,13 +14351,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenResponsesNonStreamingResponse' + $ref: '#/components/schemas/OpenResponsesResult' text/event-stream: schema: type: object properties: data: - $ref: '#/components/schemas/OpenResponsesStreamEvent' + $ref: '#/components/schemas/StreamEvents' required: - data x-speakeasy-sse-sentinel: '[DONE]' @@ -9988,6 +14443,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /messages: post: x-speakeasy-ignore: true @@ -10002,7 +14458,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AnthropicMessagesRequest' + $ref: '#/components/schemas/MessagesRequest' required: true responses: '200': @@ -10010,7 +14466,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AnthropicMessagesResponse' + $ref: '#/components/schemas/MessagesResult' text/event-stream: schema: type: object @@ -10018,7 +14474,7 @@ paths: event: type: string data: - $ref: '#/components/schemas/AnthropicMessagesStreamEvent' + $ref: '#/components/schemas/MessagesStreamEvents' required: - event - data @@ -10219,6 +14675,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /activity: get: tags: @@ -10291,6 +14748,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /chat/completions: post: x-speakeasy-group: chat @@ -10306,7 +14764,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatGenerationParams' + $ref: '#/components/schemas/ChatRequest' required: true responses: '200': @@ -10314,13 +14772,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatResponse' + $ref: '#/components/schemas/ChatResult' text/event-stream: schema: type: object properties: data: - $ref: '#/components/schemas/ChatStreamingResponseChunk' + $ref: '#/components/schemas/ChatStreamChunk' required: - data x-speakeasy-sse-sentinel: '[DONE]' @@ -10405,6 +14863,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /credits: get: x-speakeasy-name-override: getCredits @@ -10467,6 +14926,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /credits/coinbase: post: security: @@ -10592,6 +15052,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /embeddings: post: x-speakeasy-name-override: generate @@ -10799,6 +15260,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /embeddings/models: get: tags: @@ -10829,6 +15291,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /generation: get: tags: @@ -11006,6 +15469,7 @@ paths: enum: - completions - embeddings + - video description: Type of API used for the generation x-speakeasy-unknown-values: allow router: @@ -11056,6 +15520,7 @@ paths: - Together 2 - Ubicloud - 01.AI + - AkashML - AI21 - AionLabs - Alibaba @@ -11113,6 +15578,7 @@ paths: - Parasail - Perplexity - Phala + - Reka - Relace - SambaNova - Seed @@ -11141,6 +15607,14 @@ paths: required: - status description: List of provider responses for this generation, including fallback attempts + user_agent: + type: string + nullable: true + description: User-Agent header from the request + http_referer: + type: string + nullable: true + description: Referer header from the request required: - id - upstream_id @@ -11176,6 +15650,8 @@ paths: - api_type - router - provider_responses + - user_agent + - http_referer description: Generation data required: - data @@ -11232,12 +15708,24 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/count: get: tags: - Models x-speakeasy-name-override: count summary: Get total count of available models + parameters: + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns the total count of available models @@ -11245,6 +15733,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ModelsCountResponse' + '400': + description: Bad Request - Invalid output_modalities value + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' '500': description: Internal Server Error content: @@ -11255,6 +15749,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models: get: tags: @@ -11289,6 +15784,16 @@ paths: required: false name: supported_parameters in: query + - schema: + type: string + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + example: text + required: false + description: >- + Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". + name: output_modalities + in: query responses: '200': description: Returns a list of models or RSS feed @@ -11312,6 +15817,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/user: get: tags: @@ -11351,6 +15857,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /models/{author}/{slug}/endpoints: get: tags: @@ -11396,6 +15903,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /endpoints/zdr: get: tags: @@ -11426,6 +15934,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /providers: get: tags: @@ -11469,6 +15978,522 @@ paths: nullable: true description: URL to the provider's status page example: https://status.openai.com + headquarters: + type: string + nullable: true + enum: + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AX + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BQ + - BR + - BS + - BT + - BV + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GF + - GG + - GH + - GI + - GL + - GM + - GN + - GP + - GQ + - GR + - GS + - GT + - GU + - GW + - GY + - HK + - HM + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - MQ + - MR + - MS + - MT + - MU + - MV + - MW + - MX + - MY + - MZ + - NA + - NC + - NE + - NF + - NG + - NI + - NL + - 'NO' + - NP + - NR + - NU + - NZ + - OM + - PA + - PE + - PF + - PG + - PH + - PK + - PL + - PM + - PN + - PR + - PS + - PT + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TF + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - UM + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - YE + - YT + - ZA + - ZM + - ZW + description: ISO 3166-1 Alpha-2 country code of the provider headquarters + example: US + x-speakeasy-unknown-values: allow + datacenters: + type: array + nullable: true + items: + type: string + enum: + - AD + - AE + - AF + - AG + - AI + - AL + - AM + - AO + - AQ + - AR + - AS + - AT + - AU + - AW + - AX + - AZ + - BA + - BB + - BD + - BE + - BF + - BG + - BH + - BI + - BJ + - BL + - BM + - BN + - BO + - BQ + - BR + - BS + - BT + - BV + - BW + - BY + - BZ + - CA + - CC + - CD + - CF + - CG + - CH + - CI + - CK + - CL + - CM + - CN + - CO + - CR + - CU + - CV + - CW + - CX + - CY + - CZ + - DE + - DJ + - DK + - DM + - DO + - DZ + - EC + - EE + - EG + - EH + - ER + - ES + - ET + - FI + - FJ + - FK + - FM + - FO + - FR + - GA + - GB + - GD + - GE + - GF + - GG + - GH + - GI + - GL + - GM + - GN + - GP + - GQ + - GR + - GS + - GT + - GU + - GW + - GY + - HK + - HM + - HN + - HR + - HT + - HU + - ID + - IE + - IL + - IM + - IN + - IO + - IQ + - IR + - IS + - IT + - JE + - JM + - JO + - JP + - KE + - KG + - KH + - KI + - KM + - KN + - KP + - KR + - KW + - KY + - KZ + - LA + - LB + - LC + - LI + - LK + - LR + - LS + - LT + - LU + - LV + - LY + - MA + - MC + - MD + - ME + - MF + - MG + - MH + - MK + - ML + - MM + - MN + - MO + - MP + - MQ + - MR + - MS + - MT + - MU + - MV + - MW + - MX + - MY + - MZ + - NA + - NC + - NE + - NF + - NG + - NI + - NL + - 'NO' + - NP + - NR + - NU + - NZ + - OM + - PA + - PE + - PF + - PG + - PH + - PK + - PL + - PM + - PN + - PR + - PS + - PT + - PW + - PY + - QA + - RE + - RO + - RS + - RU + - RW + - SA + - SB + - SC + - SD + - SE + - SG + - SH + - SI + - SJ + - SK + - SL + - SM + - SN + - SO + - SR + - SS + - ST + - SV + - SX + - SY + - SZ + - TC + - TD + - TF + - TG + - TH + - TJ + - TK + - TL + - TM + - TN + - TO + - TR + - TT + - TV + - TW + - TZ + - UA + - UG + - UM + - US + - UY + - UZ + - VA + - VC + - VE + - VG + - VI + - VN + - VU + - WF + - WS + - YE + - YT + - ZA + - ZM + - ZW + x-speakeasy-unknown-values: allow + description: ISO 3166-1 Alpha-2 country codes of the provider datacenter locations + example: + - US + - IE required: - name - slug @@ -11479,6 +16504,10 @@ paths: privacy_policy_url: https://openai.com/privacy terms_of_service_url: https://openai.com/terms status_page_url: https://status.openai.com + headquarters: US + datacenters: + - US + - IE required: - data '500': @@ -11490,6 +16519,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /keys: get: operationId: list @@ -11611,6 +16641,12 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -11630,6 +16666,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -11650,6 +16687,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: List of API keys required: - data @@ -11674,6 +16712,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '401': description: Unauthorized - Missing or invalid authentication content: @@ -11839,6 +16878,12 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -11858,6 +16903,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -11878,6 +16924,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The created API key information key: type: string @@ -11907,6 +16954,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: null expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 key: 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 '400': description: Bad Request - Invalid request parameters @@ -11936,6 +16984,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /keys/{hash}: patch: x-speakeasy-name-override: update @@ -12086,6 +17135,12 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -12105,6 +17160,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -12125,6 +17181,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The updated API key information required: - data @@ -12149,6 +17206,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T16:00:00Z' expires_at: null + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '400': description: Bad Request - Invalid request parameters content: @@ -12346,6 +17404,12 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 required: - hash - name @@ -12365,6 +17429,7 @@ paths: - byok_usage_monthly - created_at - updated_at + - creator_user_id example: hash: f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 name: My Production Key @@ -12385,6 +17450,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 description: The API key information required: - data @@ -12409,6 +17475,7 @@ paths: created_at: '2025-08-24T10:30:00Z' updated_at: '2025-08-24T15:45:00Z' expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 '401': description: Unauthorized - Missing or invalid authentication content: @@ -12436,6 +17503,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails: get: operationId: listGuardrails @@ -12516,6 +17584,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12554,6 +17630,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12577,6 +17654,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12648,6 +17726,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12675,6 +17762,7 @@ paths: - openai - anthropic - deepseek + ignored_providers: null allowed_models: null enforce_zdr: false required: true @@ -12730,6 +17818,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12768,6 +17864,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12786,6 +17883,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12811,6 +17909,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}: get: operationId: getGuardrail @@ -12881,6 +17980,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -12919,6 +18026,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -12937,6 +18045,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13022,6 +18131,15 @@ paths: - openai - anthropic - deepseek + ignored_providers: + type: array + nullable: true + items: + type: string + minItems: 1 + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13094,6 +18212,14 @@ paths: - openai - anthropic - google + ignored_providers: + type: array + nullable: true + items: + type: string + description: List of provider IDs to exclude from routing + example: + - azure allowed_models: type: array nullable: true @@ -13132,6 +18258,7 @@ paths: - openai - anthropic - google + ignored_providers: null allowed_models: null enforce_zdr: false created_at: '2025-08-24T10:30:00Z' @@ -13148,6 +18275,7 @@ paths: reset_interval: weekly allowed_providers: - openai + ignored_providers: null allowed_models: null enforce_zdr: true created_at: '2025-08-24T10:30:00Z' @@ -13231,6 +18359,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/assignments/keys: get: operationId: listKeyAssignments @@ -13332,6 +18461,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/assignments/members: get: operationId: listMemberAssignments @@ -13428,6 +18558,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/keys: get: operationId: listGuardrailKeyAssignments @@ -13618,6 +18749,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/members: get: operationId: listGuardrailMemberAssignments @@ -13804,6 +18936,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/keys/remove: post: operationId: bulkUnassignKeysFromGuardrail @@ -13882,6 +19015,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /guardrails/{id}/assignments/members/remove: post: operationId: bulkUnassignMembersFromGuardrail @@ -13961,6 +19095,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /key: get: operationId: getCurrentKey @@ -14054,6 +19189,12 @@ paths: format: date-time description: ISO 8601 UTC timestamp when the API key expires, or null if no expiration example: '2027-12-31T23:59:59Z' + creator_user_id: + type: string + nullable: true + description: >- + The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. + example: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: type: object properties: @@ -14096,6 +19237,7 @@ paths: - limit_remaining - limit_reset - include_byok_in_limit + - creator_user_id - rate_limit description: Current API key information example: @@ -14116,6 +19258,7 @@ paths: limit_reset: monthly include_byok_in_limit: false expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: requests: 1000 interval: 1h @@ -14141,6 +19284,7 @@ paths: limit_reset: monthly include_byok_in_limit: false expires_at: '2027-12-31T23:59:59Z' + creator_user_id: user_2dHFtVWx2n56w6HkM0000000000 rate_limit: requests: 1000 interval: 1h @@ -14160,6 +19304,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /auth/keys: post: operationId: exchangeAuthCodeForAPIKey @@ -14241,6 +19386,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /auth/keys/code: post: x-speakeasy-name-override: createAuthCode @@ -14359,6 +19505,12 @@ paths: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' + '409': + description: Conflict - App upsert conflict during auth code creation + content: + application/json: + schema: + $ref: '#/components/schemas/ConflictResponse' '500': description: Internal Server Error - Unexpected server error content: @@ -14369,6 +19521,7 @@ paths: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" tags: - name: API Keys description: API key management endpoints @@ -14406,3 +19559,4 @@ x-speakeasy-globals: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" diff --git a/.speakeasy/overlays/add-headers.overlay.yaml b/.speakeasy/overlays/add-headers.overlay.yaml index a6a3474..91f56e8 100644 --- a/.speakeasy/overlays/add-headers.overlay.yaml +++ b/.speakeasy/overlays/add-headers.overlay.yaml @@ -1,17 +1,18 @@ overlay: 1.0.0 x-speakeasy-jsonpath: rfc9535 info: - title: Add HTTP-Referer and X-Title as global parameters + title: Add HTTP-Referer and X-OpenRouter-Title as global parameters version: 0.0.0 actions: # Add global parameters for app identification - target: $ - description: Add x-speakeasy-globals for HTTP-Referer and X-Title headers + description: Add x-speakeasy-globals for HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers update: x-speakeasy-globals: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" # Add component parameters - target: $.components @@ -27,12 +28,19 @@ actions: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. AppDisplayName: - name: X-Title + name: X-OpenRouter-Title in: header schema: type: string description: | The app display name allows you to customize how your app appears in OpenRouter's dashboard. + AppCategories: + name: X-OpenRouter-Categories + in: header + schema: + type: string + description: | + Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. # Add header parameters to all paths so Speakeasy matches them with globals - target: $.paths[*] @@ -41,3 +49,4 @@ actions: parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5d22d6c..e4d3fc9 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.666.0 +speakeasyVersion: 1.680.0 sources: -OAS: sourceNamespace: open-router-chat-completions-api @@ -8,23 +8,22 @@ sources: - latest OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8a64fb1c1030c87db14bca3af4883e06b9d5853c153a5fd0f2e4c15166e034dd - sourceBlobDigest: sha256:7f6d7d20424f27ec13e6ae45a1599dab23f2573a69d634b1bb1c346f8a328ae9 + sourceRevisionDigest: sha256:c6e52cd6931f7230cd3c226f7482b02dc0dfd682cd14540deb6f721fc0fe9d83 + sourceBlobDigest: sha256:01ccba21dd9b8695a4071a9f75c329c4c57fdc2c8dfc0ee189ddb2e5ea1dfecb tags: - latest - - main - 1.0.0 targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:8a64fb1c1030c87db14bca3af4883e06b9d5853c153a5fd0f2e4c15166e034dd - sourceBlobDigest: sha256:7f6d7d20424f27ec13e6ae45a1599dab23f2573a69d634b1bb1c346f8a328ae9 + sourceRevisionDigest: sha256:c6e52cd6931f7230cd3c226f7482b02dc0dfd682cd14540deb6f721fc0fe9d83 + sourceBlobDigest: sha256:01ccba21dd9b8695a4071a9f75c329c4c57fdc2c8dfc0ee189ddb2e5ea1dfecb codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:349390cb3f04fb4fdd6292a33ff1ee0659846fe1e3f03bede5bf13f3e70c447f + codeSamplesRevisionDigest: sha256:1a98221b7ae69cb68277c44cbbaac0c80b5260821b687848445bbc6dddc26894 workflow: workflowVersion: 1.0.0 - speakeasyVersion: 1.666.0 + speakeasyVersion: 1.680.0 sources: OpenRouter API: inputs: diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 89a9bc6..c273ecf 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: 1.666.0 +speakeasyVersion: 1.680.0 sources: OpenRouter API: inputs: diff --git a/README-PYPI.md b/README-PYPI.md index 8dd9349..5f7e784 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -183,7 +183,8 @@ def main(): with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: # Rest of application here... @@ -194,7 +195,8 @@ async def amain(): async with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: # Rest of application here... diff --git a/README.md b/README.md index 8dd9349..5f7e784 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,8 @@ def main(): with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: # Rest of application here... @@ -194,7 +195,8 @@ async def amain(): async with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: # Rest of application here... diff --git a/USAGE.md b/USAGE.md index 96d2883..dfa6a25 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,7 +7,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -33,7 +34,8 @@ async def main(): async with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: diff --git a/docs/components/by.md b/docs/components/by.md index 87730c5..557c891 100644 --- a/docs/components/by.md +++ b/docs/components/by.md @@ -9,4 +9,5 @@ The provider sorting strategy (price, throughput, latency) | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/defaultparameters.md b/docs/components/defaultparameters.md index b343b60..da72f0d 100644 --- a/docs/components/defaultparameters.md +++ b/docs/components/defaultparameters.md @@ -9,4 +9,7 @@ Default parameters for this model | ------------------------- | ------------------------- | ------------------------- | ------------------------- | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/modality.md b/docs/components/modality.md index 4edb378..54561e4 100644 --- a/docs/components/modality.md +++ b/docs/components/modality.md @@ -6,4 +6,5 @@ | Name | Value | | ------- | ------- | | `TEXT` | text | -| `IMAGE` | image | \ No newline at end of file +| `IMAGE` | image | +| `AUDIO` | audio | \ No newline at end of file diff --git a/docs/components/model.md b/docs/components/model.md index 86c7cd6..5db2d56 100644 --- a/docs/components/model.md +++ b/docs/components/model.md @@ -19,5 +19,6 @@ Information about an AI model available on OpenRouter | `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
} | | `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {
"prompt_tokens": 1000,
"completion_tokens": 1000
} | | `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | | -| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"frequency_penalty": 0
} | +| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {
"temperature": 0.7,
"top_p": 0.9,
"top_k": 0,
"frequency_penalty": 0,
"presence_penalty": 0,
"repetition_penalty": 1
} | +| `knowledge_cutoff` | *OptionalNullable[str]* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | | `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 | \ No newline at end of file diff --git a/docs/components/outputmessage.md b/docs/components/outputmessage.md index 4ce0ea9..4cb87d5 100644 --- a/docs/components/outputmessage.md +++ b/docs/components/outputmessage.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *str* | :heavy_check_mark: | N/A | -| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A | -| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A | -| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A | -| `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A | +| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A | +| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A | +| `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A | +| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | \ No newline at end of file diff --git a/docs/components/outputmodality.md b/docs/components/outputmodality.md index 1601276..faae463 100644 --- a/docs/components/outputmodality.md +++ b/docs/components/outputmodality.md @@ -8,4 +8,5 @@ | `TEXT` | text | | `IMAGE` | image | | `EMBEDDINGS` | embeddings | -| `AUDIO` | audio | \ No newline at end of file +| `AUDIO` | audio | +| `VIDEO` | video | \ No newline at end of file diff --git a/docs/components/pdfparserengine.md b/docs/components/pdfparserengine.md index 8d3c25c..8889dad 100644 --- a/docs/components/pdfparserengine.md +++ b/docs/components/pdfparserengine.md @@ -1,12 +1,19 @@ # PDFParserEngine -The engine to use for parsing PDF files. +The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". -## Values +## Supported Types + +### `components.PDFParserEngineEnum` + +```python +value: components.PDFParserEngineEnum = /* values here */ +``` + +### `components.PDFParserEnginePDFText` + +```python +value: components.PDFParserEnginePDFText = /* values here */ +``` -| Name | Value | -| ------------- | ------------- | -| `MISTRAL_OCR` | mistral-ocr | -| `PDF_TEXT` | pdf-text | -| `NATIVE` | native | \ No newline at end of file diff --git a/docs/components/pdfparseroptions.md b/docs/components/pdfparseroptions.md index 3718a3d..6bd9967 100644 --- a/docs/components/pdfparseroptions.md +++ b/docs/components/pdfparseroptions.md @@ -5,6 +5,6 @@ Options for PDF parsing. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | \ No newline at end of file diff --git a/docs/components/providername.md b/docs/components/providername.md index 66caed6..25d8ded 100644 --- a/docs/components/providername.md +++ b/docs/components/providername.md @@ -5,6 +5,7 @@ | Name | Value | | ------------------- | ------------------- | +| `AKASH_ML` | AkashML | | `AI21` | AI21 | | `AION_LABS` | AionLabs | | `ALIBABA` | Alibaba | @@ -62,6 +63,7 @@ | `PARASAIL` | Parasail | | `PERPLEXITY` | Perplexity | | `PHALA` | Phala | +| `REKA` | Reka | | `RELACE` | Relace | | `SAMBA_NOVA` | SambaNova | | `SEED` | Seed | diff --git a/docs/components/providerpreferencesby.md b/docs/components/providerpreferencesby.md index 3202834..2af40e5 100644 --- a/docs/components/providerpreferencesby.md +++ b/docs/components/providerpreferencesby.md @@ -9,4 +9,5 @@ The provider sorting strategy (price, throughput, latency) | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/providerpreferencesprovidersort.md b/docs/components/providerpreferencesprovidersort.md index 396da79..2f06e03 100644 --- a/docs/components/providerpreferencesprovidersort.md +++ b/docs/components/providerpreferencesprovidersort.md @@ -9,4 +9,5 @@ The provider sorting strategy (price, throughput, latency) | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/providerpreferencesprovidersortconfigenum.md b/docs/components/providerpreferencesprovidersortconfigenum.md index 12ef73b..3e50142 100644 --- a/docs/components/providerpreferencesprovidersortconfigenum.md +++ b/docs/components/providerpreferencesprovidersortconfigenum.md @@ -7,4 +7,5 @@ | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/providerpreferencessortenum.md b/docs/components/providerpreferencessortenum.md index 4b608c9..70cdaa9 100644 --- a/docs/components/providerpreferencessortenum.md +++ b/docs/components/providerpreferencessortenum.md @@ -7,4 +7,5 @@ | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/providersort.md b/docs/components/providersort.md index ca5b358..82a08f5 100644 --- a/docs/components/providersort.md +++ b/docs/components/providersort.md @@ -9,4 +9,5 @@ The provider sorting strategy (price, throughput, latency) | ------------ | ------------ | | `PRICE` | price | | `THROUGHPUT` | throughput | -| `LATENCY` | latency | \ No newline at end of file +| `LATENCY` | latency | +| `EXACTO` | exacto | \ No newline at end of file diff --git a/docs/components/responseformat.md b/docs/components/responseformat.md index e1a8d06..db3b376 100644 --- a/docs/components/responseformat.md +++ b/docs/components/responseformat.md @@ -5,33 +5,33 @@ Response format configuration ## Supported Types -### `components.ResponseFormatText` +### `components.ChatFormatTextConfig` ```python -value: components.ResponseFormatText = /* values here */ +value: components.ChatFormatTextConfig = /* values here */ ``` -### `components.ResponseFormatJSONObject` +### `components.FormatJSONObjectConfig` ```python -value: components.ResponseFormatJSONObject = /* values here */ +value: components.FormatJSONObjectConfig = /* values here */ ``` -### `components.ResponseFormatJSONSchema` +### `components.ChatFormatJSONSchemaConfig` ```python -value: components.ResponseFormatJSONSchema = /* values here */ +value: components.ChatFormatJSONSchemaConfig = /* values here */ ``` -### `components.ResponseFormatTextGrammar` +### `components.ChatFormatGrammarConfig` ```python -value: components.ResponseFormatTextGrammar = /* values here */ +value: components.ChatFormatGrammarConfig = /* values here */ ``` -### `components.ResponseFormatTextPython` +### `components.ChatFormatPythonConfig` ```python -value: components.ResponseFormatTextPython = /* values here */ +value: components.ChatFormatPythonConfig = /* values here */ ``` diff --git a/docs/components/responseoutputtext.md b/docs/components/responseoutputtext.md index 0fba621..1c8bea4 100644 --- a/docs/components/responseoutputtext.md +++ b/docs/components/responseoutputtext.md @@ -8,4 +8,4 @@ | `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A | | `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A | -| `logprobs` | List[[components.Logprob](../components/logprob.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `logprobs` | List[[components.ResponseOutputTextLogprob](../components/responseoutputtextlogprob.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/variables.md b/docs/components/variables.md index 7d76762..0698d06 100644 --- a/docs/components/variables.md +++ b/docs/components/variables.md @@ -9,21 +9,21 @@ value: str = /* values here */ ``` -### `components.ResponseInputText` +### `components.InputText` ```python -value: components.ResponseInputText = /* values here */ +value: components.InputText = /* values here */ ``` -### `components.ResponseInputImage` +### `components.InputImage` ```python -value: components.ResponseInputImage = /* values here */ +value: components.InputImage = /* values here */ ``` -### `components.ResponseInputFile` +### `components.InputFile` ```python -value: components.ResponseInputFile = /* values here */ +value: components.InputFile = /* values here */ ``` diff --git a/docs/components/websearchengine.md b/docs/components/websearchengine.md index 0b843a8..c0da505 100644 --- a/docs/components/websearchengine.md +++ b/docs/components/websearchengine.md @@ -5,7 +5,9 @@ The search engine to use for web search. ## Values -| Name | Value | -| -------- | -------- | -| `NATIVE` | native | -| `EXA` | exa | \ No newline at end of file +| Name | Value | +| ----------- | ----------- | +| `NATIVE` | native | +| `EXA` | exa | +| `FIRECRAWL` | firecrawl | +| `PARALLEL` | parallel | \ No newline at end of file diff --git a/docs/models/internal/globals.md b/docs/models/internal/globals.md index 5399b31..5b30448 100644 --- a/docs/models/internal/globals.md +++ b/docs/models/internal/globals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/apitype.md b/docs/operations/apitype.md index 6cc34e4..15a3041 100644 --- a/docs/operations/apitype.md +++ b/docs/operations/apitype.md @@ -8,4 +8,5 @@ Type of API used for the generation | Name | Value | | ------------- | ------------- | | `COMPLETIONS` | completions | -| `EMBEDDINGS` | embeddings | \ No newline at end of file +| `EMBEDDINGS` | embeddings | +| `VIDEO` | video | \ No newline at end of file diff --git a/docs/operations/bulkassignkeystoguardrailglobals.md b/docs/operations/bulkassignkeystoguardrailglobals.md index e54eb49..1b45a85 100644 --- a/docs/operations/bulkassignkeystoguardrailglobals.md +++ b/docs/operations/bulkassignkeystoguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/bulkassignkeystoguardrailrequest.md b/docs/operations/bulkassignkeystoguardrailrequest.md index 61e77dd..ea428c6 100644 --- a/docs/operations/bulkassignkeystoguardrailrequest.md +++ b/docs/operations/bulkassignkeystoguardrailrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/operations/bulkassignmemberstoguardrailglobals.md b/docs/operations/bulkassignmemberstoguardrailglobals.md index 0194980..b970409 100644 --- a/docs/operations/bulkassignmemberstoguardrailglobals.md +++ b/docs/operations/bulkassignmemberstoguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/bulkassignmemberstoguardrailrequest.md b/docs/operations/bulkassignmemberstoguardrailrequest.md index 25ff165..beaf174 100644 --- a/docs/operations/bulkassignmemberstoguardrailrequest.md +++ b/docs/operations/bulkassignmemberstoguardrailrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/operations/bulkunassignkeysfromguardrailglobals.md b/docs/operations/bulkunassignkeysfromguardrailglobals.md index 7241f74..8472ab4 100644 --- a/docs/operations/bulkunassignkeysfromguardrailglobals.md +++ b/docs/operations/bulkunassignkeysfromguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/bulkunassignkeysfromguardrailrequest.md b/docs/operations/bulkunassignkeysfromguardrailrequest.md index 07aa84f..b80c239 100644 --- a/docs/operations/bulkunassignkeysfromguardrailrequest.md +++ b/docs/operations/bulkunassignkeysfromguardrailrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/operations/bulkunassignmembersfromguardrailglobals.md b/docs/operations/bulkunassignmembersfromguardrailglobals.md index 57ed776..5df6bb6 100644 --- a/docs/operations/bulkunassignmembersfromguardrailglobals.md +++ b/docs/operations/bulkunassignmembersfromguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/bulkunassignmembersfromguardrailrequest.md b/docs/operations/bulkunassignmembersfromguardrailrequest.md index f85e43e..90a9475 100644 --- a/docs/operations/bulkunassignmembersfromguardrailrequest.md +++ b/docs/operations/bulkunassignmembersfromguardrailrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/operations/createauthkeyscodeglobals.md b/docs/operations/createauthkeyscodeglobals.md index cc084f7..ab7e4e5 100644 --- a/docs/operations/createauthkeyscodeglobals.md +++ b/docs/operations/createauthkeyscodeglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createauthkeyscoderequest.md b/docs/operations/createauthkeyscoderequest.md index 2fa48ef..6dc0617 100644 --- a/docs/operations/createauthkeyscoderequest.md +++ b/docs/operations/createauthkeyscoderequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `request_body` | [operations.CreateAuthKeysCodeRequestBody](../operations/createauthkeyscoderequestbody.md) | :heavy_check_mark: | N/A | {
"callback_url": "https://myapp.com/auth/callback",
"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
"code_challenge_method": "S256",
"limit": 100
} | \ No newline at end of file diff --git a/docs/operations/createcoinbasechargeglobals.md b/docs/operations/createcoinbasechargeglobals.md index 5287403..dcc7d37 100644 --- a/docs/operations/createcoinbasechargeglobals.md +++ b/docs/operations/createcoinbasechargeglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createcoinbasechargerequest.md b/docs/operations/createcoinbasechargerequest.md index d90e033..e6f0307 100644 --- a/docs/operations/createcoinbasechargerequest.md +++ b/docs/operations/createcoinbasechargerequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `create_charge_request` | [components.CreateChargeRequest](../components/createchargerequest.md) | :heavy_check_mark: | N/A | {
"amount": 100,
"sender": "0x1234567890123456789012345678901234567890",
"chain_id": 1
} | \ No newline at end of file diff --git a/docs/operations/createembeddingsglobals.md b/docs/operations/createembeddingsglobals.md index adb19bc..13b9e13 100644 --- a/docs/operations/createembeddingsglobals.md +++ b/docs/operations/createembeddingsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createembeddingsrequest.md b/docs/operations/createembeddingsrequest.md index cace1a6..f0c5d83 100644 --- a/docs/operations/createembeddingsrequest.md +++ b/docs/operations/createembeddingsrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/createguardraildata.md b/docs/operations/createguardraildata.md index f98ee89..0cfc0cf 100644 --- a/docs/operations/createguardraildata.md +++ b/docs/operations/createguardraildata.md @@ -13,6 +13,7 @@ The created guardrail | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 | | `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalResponse]](../operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/operations/createguardrailglobals.md b/docs/operations/createguardrailglobals.md index b11f112..862c364 100644 --- a/docs/operations/createguardrailglobals.md +++ b/docs/operations/createguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createguardrailrequest.md b/docs/operations/createguardrailrequest.md index ff71d5e..1f1c944 100644 --- a/docs/operations/createguardrailrequest.md +++ b/docs/operations/createguardrailrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `request_body` | [operations.CreateGuardrailRequestBody](../operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `request_body` | [operations.CreateGuardrailRequestBody](../operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New Guardrail",
"description": "A guardrail for limiting API usage",
"limit_usd": 50,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"deepseek"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false
} | \ No newline at end of file diff --git a/docs/operations/createguardrailrequestbody.md b/docs/operations/createguardrailrequestbody.md index 0dae486..843fd1e 100644 --- a/docs/operations/createguardrailrequestbody.md +++ b/docs/operations/createguardrailrequestbody.md @@ -10,5 +10,6 @@ | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 | | `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | \ No newline at end of file diff --git a/docs/operations/createguardrailresponse.md b/docs/operations/createguardrailresponse.md index 0afc006..4cf770b 100644 --- a/docs/operations/createguardrailresponse.md +++ b/docs/operations/createguardrailresponse.md @@ -5,6 +5,6 @@ Guardrail created successfully ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateGuardrailData](../operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.CreateGuardrailData](../operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/operations/createkeysdata.md b/docs/operations/createkeysdata.md index cd28aac..6bbf38d 100644 --- a/docs/operations/createkeysdata.md +++ b/docs/operations/createkeysdata.md @@ -5,24 +5,25 @@ The created API key information ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | -| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | -| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | -| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | -| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | -| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | -| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | -| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | +| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | +| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | +| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | +| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | +| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | +| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | +| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | +| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | +| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 | \ No newline at end of file diff --git a/docs/operations/createkeysglobals.md b/docs/operations/createkeysglobals.md index 3c02678..6fea461 100644 --- a/docs/operations/createkeysglobals.md +++ b/docs/operations/createkeysglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createkeysrequest.md b/docs/operations/createkeysrequest.md index b949a60..281d4e8 100644 --- a/docs/operations/createkeysrequest.md +++ b/docs/operations/createkeysrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `request_body` | [operations.CreateKeysRequestBody](../operations/createkeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "My New API Key",
"limit": 50,
"limit_reset": "monthly",
"include_byok_in_limit": true,
"expires_at": "2027-12-31T23:59:59Z"
} | \ No newline at end of file diff --git a/docs/operations/createkeysresponse.md b/docs/operations/createkeysresponse.md index cf2b1cf..2db8887 100644 --- a/docs/operations/createkeysresponse.md +++ b/docs/operations/createkeysresponse.md @@ -5,7 +5,7 @@ API key created successfully ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z"
} | -| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} | +| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 | \ No newline at end of file diff --git a/docs/operations/createresponsesglobals.md b/docs/operations/createresponsesglobals.md index 6b6ca55..265872c 100644 --- a/docs/operations/createresponsesglobals.md +++ b/docs/operations/createresponsesglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/createresponsesrequest.md b/docs/operations/createresponsesrequest.md index 1eba6ef..6436099 100644 --- a/docs/operations/createresponsesrequest.md +++ b/docs/operations/createresponsesrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `open_responses_request` | [components.OpenResponsesRequest](../components/openresponsesrequest.md) | :heavy_check_mark: | N/A | {
"model": "anthropic/claude-4.5-sonnet-20250929",
"input": [
{
"type": "message",
"content": "Hello, how are you?",
"role": "user"
}
],
"temperature": 0.7,
"top_p": 0.9,
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
}
}
]
} | \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `responses_request` | [components.ResponsesRequest](../components/responsesrequest.md) | :heavy_check_mark: | N/A | {
"model": "anthropic/claude-4.5-sonnet-20250929",
"input": [
{
"type": "message",
"content": "Hello, how are you?",
"role": "user"
}
],
"temperature": 0.7,
"top_p": 0.9,
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string"
}
}
}
}
]
} | \ No newline at end of file diff --git a/docs/operations/createresponsesresponse.md b/docs/operations/createresponsesresponse.md index 849c938..5c515b1 100644 --- a/docs/operations/createresponsesresponse.md +++ b/docs/operations/createresponsesresponse.md @@ -3,15 +3,15 @@ ## Supported Types -### `components.OpenResponsesNonStreamingResponse` +### `components.OpenResponsesResult` ```python -value: components.OpenResponsesNonStreamingResponse = /* values here */ +value: components.OpenResponsesResult = /* values here */ ``` -### `Union[eventstreaming.EventStream[components.OpenResponsesStreamEvent], eventstreaming.EventStreamAsync[components.OpenResponsesStreamEvent]]` +### `Union[eventstreaming.EventStream[components.StreamEvents], eventstreaming.EventStreamAsync[components.StreamEvents]]` ```python -value: Union[eventstreaming.EventStream[components.OpenResponsesStreamEvent], eventstreaming.EventStreamAsync[components.OpenResponsesStreamEvent]] = /* values here */ +value: Union[eventstreaming.EventStream[components.StreamEvents], eventstreaming.EventStreamAsync[components.StreamEvents]] = /* values here */ ``` diff --git a/docs/operations/createresponsesresponsebody.md b/docs/operations/createresponsesresponsebody.md index 046baea..6190ddd 100644 --- a/docs/operations/createresponsesresponsebody.md +++ b/docs/operations/createresponsesresponsebody.md @@ -7,4 +7,4 @@ Successful response | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [components.OpenResponsesStreamEvent](../components/openresponsesstreamevent.md) | :heavy_check_mark: | Union of all possible event types emitted during response streaming | {
"type": "response.created",
"response": {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "in_progress",
"output": [],
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"metadata": null,
"instructions": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null
},
"sequence_number": 0
} | \ No newline at end of file +| `data` | [components.StreamEvents](../components/streamevents.md) | :heavy_check_mark: | Union of all possible event types emitted during response streaming | {
"type": "response.created",
"response": {
"id": "resp-abc123",
"object": "response",
"created_at": 1704067200,
"model": "gpt-4",
"status": "in_progress",
"output": [],
"tools": [],
"tool_choice": "auto",
"parallel_tool_calls": true,
"error": null,
"incomplete_details": null,
"metadata": null,
"instructions": null,
"temperature": null,
"top_p": null,
"max_output_tokens": null
},
"sequence_number": 0
} | \ No newline at end of file diff --git a/docs/operations/deleteguardrailglobals.md b/docs/operations/deleteguardrailglobals.md index f3c784f..8b3caa0 100644 --- a/docs/operations/deleteguardrailglobals.md +++ b/docs/operations/deleteguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/deleteguardrailrequest.md b/docs/operations/deleteguardrailrequest.md index 148b738..14aa025 100644 --- a/docs/operations/deleteguardrailrequest.md +++ b/docs/operations/deleteguardrailrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/operations/deletekeysglobals.md b/docs/operations/deletekeysglobals.md index b987a26..0bbd498 100644 --- a/docs/operations/deletekeysglobals.md +++ b/docs/operations/deletekeysglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/deletekeysrequest.md b/docs/operations/deletekeysrequest.md index 4c6e567..61b9714 100644 --- a/docs/operations/deletekeysrequest.md +++ b/docs/operations/deletekeysrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | \ No newline at end of file diff --git a/docs/operations/exchangeauthcodeforapikeyglobals.md b/docs/operations/exchangeauthcodeforapikeyglobals.md index 1f4c2b5..91c8773 100644 --- a/docs/operations/exchangeauthcodeforapikeyglobals.md +++ b/docs/operations/exchangeauthcodeforapikeyglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/exchangeauthcodeforapikeyrequest.md b/docs/operations/exchangeauthcodeforapikeyrequest.md index d175446..d818ef4 100644 --- a/docs/operations/exchangeauthcodeforapikeyrequest.md +++ b/docs/operations/exchangeauthcodeforapikeyrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `request_body` | [operations.ExchangeAuthCodeForAPIKeyRequestBody](../operations/exchangeauthcodeforapikeyrequestbody.md) | :heavy_check_mark: | N/A | {
"code": "auth_code_abc123def456",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"code_challenge_method": "S256"
} | \ No newline at end of file diff --git a/docs/operations/getcreditsglobals.md b/docs/operations/getcreditsglobals.md index ea59176..bb29d2d 100644 --- a/docs/operations/getcreditsglobals.md +++ b/docs/operations/getcreditsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getcreditsrequest.md b/docs/operations/getcreditsrequest.md index e6066dc..f86e975 100644 --- a/docs/operations/getcreditsrequest.md +++ b/docs/operations/getcreditsrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getcurrentkeydata.md b/docs/operations/getcurrentkeydata.md index 3e11b0c..4c5ad95 100644 --- a/docs/operations/getcurrentkeydata.md +++ b/docs/operations/getcurrentkeydata.md @@ -24,4 +24,5 @@ Current API key information | `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | | `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 | | ~~`rate_limit`~~ | [operations.RateLimit](../operations/ratelimit.md) | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Legacy rate limit information about a key. Will always return -1. | {
"requests": 1000,
"interval": "1h",
"note": "This field is deprecated and safe to ignore."
} | \ No newline at end of file diff --git a/docs/operations/getcurrentkeyglobals.md b/docs/operations/getcurrentkeyglobals.md index fd90af9..905f7d1 100644 --- a/docs/operations/getcurrentkeyglobals.md +++ b/docs/operations/getcurrentkeyglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getcurrentkeyrequest.md b/docs/operations/getcurrentkeyrequest.md index fd28cff..e209746 100644 --- a/docs/operations/getcurrentkeyrequest.md +++ b/docs/operations/getcurrentkeyrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getcurrentkeyresponse.md b/docs/operations/getcurrentkeyresponse.md index b27c3a5..8f279e2 100644 --- a/docs/operations/getcurrentkeyresponse.md +++ b/docs/operations/getcurrentkeyresponse.md @@ -5,6 +5,6 @@ API key details ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {
"label": "sk-or-v1-au7...890",
"limit": 100,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"expires_at": "2027-12-31T23:59:59Z",
"rate_limit": {
"requests": 1000,
"interval": "1h",
"note": "This field is deprecated and safe to ignore."
}
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {
"label": "sk-or-v1-au7...890",
"limit": 100,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"is_free_tier": false,
"is_management_key": false,
"is_provisioning_key": false,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000",
"rate_limit": {
"requests": 1000,
"interval": "1h",
"note": "This field is deprecated and safe to ignore."
}
} | \ No newline at end of file diff --git a/docs/operations/getgenerationdata.md b/docs/operations/getgenerationdata.md index f8c54d1..a980f2a 100644 --- a/docs/operations/getgenerationdata.md +++ b/docs/operations/getgenerationdata.md @@ -40,4 +40,6 @@ Generation data | `external_user` | *Nullable[str]* | :heavy_check_mark: | External user identifier | user-123 | | `api_type` | [Nullable[operations.APIType]](../operations/apitype.md) | :heavy_check_mark: | Type of API used for the generation | | | `router` | *Nullable[str]* | :heavy_check_mark: | Router used for the request (e.g., openrouter/auto) | openrouter/auto | -| `provider_responses` | List[[operations.ProviderResponse](../operations/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | \ No newline at end of file +| `provider_responses` | List[[operations.ProviderResponse](../operations/providerresponse.md)] | :heavy_check_mark: | List of provider responses for this generation, including fallback attempts | | +| `user_agent` | *Nullable[str]* | :heavy_check_mark: | User-Agent header from the request | | +| `http_referer` | *Nullable[str]* | :heavy_check_mark: | Referer header from the request | | \ No newline at end of file diff --git a/docs/operations/getgenerationglobals.md b/docs/operations/getgenerationglobals.md index e8e8104..8420035 100644 --- a/docs/operations/getgenerationglobals.md +++ b/docs/operations/getgenerationglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getgenerationrequest.md b/docs/operations/getgenerationrequest.md index ec8100a..5fa33b6 100644 --- a/docs/operations/getgenerationrequest.md +++ b/docs/operations/getgenerationrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/getguardraildata.md b/docs/operations/getguardraildata.md index 5a31535..25bde01 100644 --- a/docs/operations/getguardraildata.md +++ b/docs/operations/getguardraildata.md @@ -13,6 +13,7 @@ The guardrail | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 | | `reset_interval` | [OptionalNullable[operations.GetGuardrailResetInterval]](../operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/operations/getguardrailglobals.md b/docs/operations/getguardrailglobals.md index e9b5b80..63bf9d6 100644 --- a/docs/operations/getguardrailglobals.md +++ b/docs/operations/getguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getguardrailrequest.md b/docs/operations/getguardrailrequest.md index e8d2af8..ad49c82 100644 --- a/docs/operations/getguardrailrequest.md +++ b/docs/operations/getguardrailrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/operations/getguardrailresponse.md b/docs/operations/getguardrailresponse.md index ee53506..08739b6 100644 --- a/docs/operations/getguardrailresponse.md +++ b/docs/operations/getguardrailresponse.md @@ -5,6 +5,6 @@ Guardrail details ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetGuardrailData](../operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.GetGuardrailData](../operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/operations/getkeydata.md b/docs/operations/getkeydata.md index 3ada9d0..c4f0b56 100644 --- a/docs/operations/getkeydata.md +++ b/docs/operations/getkeydata.md @@ -5,24 +5,25 @@ The API key information ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | -| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | -| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | -| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | -| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | -| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | -| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | -| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | +| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | +| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | +| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | +| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | +| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | +| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | +| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | +| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | +| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 | \ No newline at end of file diff --git a/docs/operations/getkeyglobals.md b/docs/operations/getkeyglobals.md index c88bdda..585d2a3 100644 --- a/docs/operations/getkeyglobals.md +++ b/docs/operations/getkeyglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getkeyrequest.md b/docs/operations/getkeyrequest.md index 519c418..b7b0a30 100644 --- a/docs/operations/getkeyrequest.md +++ b/docs/operations/getkeyrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | \ No newline at end of file diff --git a/docs/operations/getkeyresponse.md b/docs/operations/getkeyresponse.md index c25cba3..16994d0 100644 --- a/docs/operations/getkeyresponse.md +++ b/docs/operations/getkeyresponse.md @@ -5,6 +5,6 @@ API key details ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} | \ No newline at end of file diff --git a/docs/operations/getmodelsglobals.md b/docs/operations/getmodelsglobals.md index 31e9969..9533d03 100644 --- a/docs/operations/getmodelsglobals.md +++ b/docs/operations/getmodelsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getmodelsrequest.md b/docs/operations/getmodelsrequest.md index 469aeb5..1a66d5a 100644 --- a/docs/operations/getmodelsrequest.md +++ b/docs/operations/getmodelsrequest.md @@ -3,9 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | -| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | +| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | \ No newline at end of file diff --git a/docs/operations/getuseractivityglobals.md b/docs/operations/getuseractivityglobals.md index cfcdb0a..a67a41d 100644 --- a/docs/operations/getuseractivityglobals.md +++ b/docs/operations/getuseractivityglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/getuseractivityrequest.md b/docs/operations/getuseractivityrequest.md index 97457f0..6d4d521 100644 --- a/docs/operations/getuseractivityrequest.md +++ b/docs/operations/getuseractivityrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | \ No newline at end of file diff --git a/docs/operations/listdata.md b/docs/operations/listdata.md index b43de29..a265eca 100644 --- a/docs/operations/listdata.md +++ b/docs/operations/listdata.md @@ -3,24 +3,25 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | -| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | -| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | -| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | -| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | -| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | -| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | -| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | +| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | +| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | +| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | +| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | +| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | +| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | +| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | +| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | +| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 | \ No newline at end of file diff --git a/docs/operations/listembeddingsmodelsglobals.md b/docs/operations/listembeddingsmodelsglobals.md index 6cf29a9..20150d7 100644 --- a/docs/operations/listembeddingsmodelsglobals.md +++ b/docs/operations/listembeddingsmodelsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listembeddingsmodelsrequest.md b/docs/operations/listembeddingsmodelsrequest.md index 1dd1657..d3628eb 100644 --- a/docs/operations/listembeddingsmodelsrequest.md +++ b/docs/operations/listembeddingsmodelsrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listendpointsglobals.md b/docs/operations/listendpointsglobals.md index b00c95a..5a81187 100644 --- a/docs/operations/listendpointsglobals.md +++ b/docs/operations/listendpointsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listendpointsrequest.md b/docs/operations/listendpointsrequest.md index 39a1d0d..86d4ace 100644 --- a/docs/operations/listendpointsrequest.md +++ b/docs/operations/listendpointsrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `author` | *str* | :heavy_check_mark: | N/A | | `slug` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/operations/listendpointszdrglobals.md b/docs/operations/listendpointszdrglobals.md index a858e43..6abb940 100644 --- a/docs/operations/listendpointszdrglobals.md +++ b/docs/operations/listendpointszdrglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listendpointszdrrequest.md b/docs/operations/listendpointszdrrequest.md index ab1f161..727be2c 100644 --- a/docs/operations/listendpointszdrrequest.md +++ b/docs/operations/listendpointszdrrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listglobals.md b/docs/operations/listglobals.md index 8d10965..53064e4 100644 --- a/docs/operations/listglobals.md +++ b/docs/operations/listglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listguardrailkeyassignmentsglobals.md b/docs/operations/listguardrailkeyassignmentsglobals.md index d431a1d..a9cc4a3 100644 --- a/docs/operations/listguardrailkeyassignmentsglobals.md +++ b/docs/operations/listguardrailkeyassignmentsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listguardrailkeyassignmentsrequest.md b/docs/operations/listguardrailkeyassignmentsrequest.md index bb75011..e78c271 100644 --- a/docs/operations/listguardrailkeyassignmentsrequest.md +++ b/docs/operations/listguardrailkeyassignmentsrequest.md @@ -6,7 +6,8 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/operations/listguardrailmemberassignmentsglobals.md b/docs/operations/listguardrailmemberassignmentsglobals.md index efaa3d9..58ce40e 100644 --- a/docs/operations/listguardrailmemberassignmentsglobals.md +++ b/docs/operations/listguardrailmemberassignmentsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listguardrailmemberassignmentsrequest.md b/docs/operations/listguardrailmemberassignmentsrequest.md index 313f1c3..2ebeffb 100644 --- a/docs/operations/listguardrailmemberassignmentsrequest.md +++ b/docs/operations/listguardrailmemberassignmentsrequest.md @@ -6,7 +6,8 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/operations/listguardrailsdata.md b/docs/operations/listguardrailsdata.md index 7457408..4b94ae2 100644 --- a/docs/operations/listguardrailsdata.md +++ b/docs/operations/listguardrailsdata.md @@ -11,6 +11,7 @@ | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 | | `reset_interval` | [OptionalNullable[operations.ListGuardrailsResetInterval]](../operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/operations/listguardrailsglobals.md b/docs/operations/listguardrailsglobals.md index 65ea039..4a623f2 100644 --- a/docs/operations/listguardrailsglobals.md +++ b/docs/operations/listguardrailsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listguardrailsrequest.md b/docs/operations/listguardrailsrequest.md index 4e3330b..598440f 100644 --- a/docs/operations/listguardrailsrequest.md +++ b/docs/operations/listguardrailsrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/operations/listkeyassignmentsglobals.md b/docs/operations/listkeyassignmentsglobals.md index b606693..6c0713d 100644 --- a/docs/operations/listkeyassignmentsglobals.md +++ b/docs/operations/listkeyassignmentsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listkeyassignmentsrequest.md b/docs/operations/listkeyassignmentsrequest.md index ce886c0..c3db738 100644 --- a/docs/operations/listkeyassignmentsrequest.md +++ b/docs/operations/listkeyassignmentsrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/operations/listmemberassignmentsglobals.md b/docs/operations/listmemberassignmentsglobals.md index 9cd0e16..7d4eb65 100644 --- a/docs/operations/listmemberassignmentsglobals.md +++ b/docs/operations/listmemberassignmentsglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listmemberassignmentsrequest.md b/docs/operations/listmemberassignmentsrequest.md index 8ec3f2a..61416c7 100644 --- a/docs/operations/listmemberassignmentsrequest.md +++ b/docs/operations/listmemberassignmentsrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | \ No newline at end of file diff --git a/docs/operations/listmodelscountglobals.md b/docs/operations/listmodelscountglobals.md index b0ddc73..1c3931a 100644 --- a/docs/operations/listmodelscountglobals.md +++ b/docs/operations/listmodelscountglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listmodelscountrequest.md b/docs/operations/listmodelscountrequest.md index 95df935..02da5e2 100644 --- a/docs/operations/listmodelscountrequest.md +++ b/docs/operations/listmodelscountrequest.md @@ -3,7 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | \ No newline at end of file diff --git a/docs/operations/listmodelsuserglobals.md b/docs/operations/listmodelsuserglobals.md index 59b2ab0..b8ca3d3 100644 --- a/docs/operations/listmodelsuserglobals.md +++ b/docs/operations/listmodelsuserglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listmodelsuserrequest.md b/docs/operations/listmodelsuserrequest.md index 9113594..68b87e3 100644 --- a/docs/operations/listmodelsuserrequest.md +++ b/docs/operations/listmodelsuserrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listprovidersdata.md b/docs/operations/listprovidersdata.md index 9679171..ec9b21b 100644 --- a/docs/operations/listprovidersdata.md +++ b/docs/operations/listprovidersdata.md @@ -3,10 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Display name of the provider | OpenAI | -| `slug` | *str* | :heavy_check_mark: | URL-friendly identifier for the provider | openai | -| `privacy_policy_url` | *Nullable[str]* | :heavy_check_mark: | URL to the provider's privacy policy | https://openai.com/privacy | -| `terms_of_service_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's terms of service | https://openai.com/terms | -| `status_page_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's status page | https://status.openai.com | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Display name of the provider | OpenAI | +| `slug` | *str* | :heavy_check_mark: | URL-friendly identifier for the provider | openai | +| `privacy_policy_url` | *Nullable[str]* | :heavy_check_mark: | URL to the provider's privacy policy | https://openai.com/privacy | +| `terms_of_service_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's terms of service | https://openai.com/terms | +| `status_page_url` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the provider's status page | https://status.openai.com | +| `headquarters` | [OptionalNullable[operations.Headquarters]](../operations/headquarters.md) | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country code of the provider headquarters | US | +| `datacenters` | List[[operations.Datacenter](../operations/datacenter.md)] | :heavy_minus_sign: | ISO 3166-1 Alpha-2 country codes of the provider datacenter locations | [
"US",
"IE"
] | \ No newline at end of file diff --git a/docs/operations/listprovidersglobals.md b/docs/operations/listprovidersglobals.md index 2edb4d2..6aacb32 100644 --- a/docs/operations/listprovidersglobals.md +++ b/docs/operations/listprovidersglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listprovidersrequest.md b/docs/operations/listprovidersrequest.md index a06e73d..9e96cc6 100644 --- a/docs/operations/listprovidersrequest.md +++ b/docs/operations/listprovidersrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/listrequest.md b/docs/operations/listrequest.md index d2ab395..0118178 100644 --- a/docs/operations/listrequest.md +++ b/docs/operations/listrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | \ No newline at end of file diff --git a/docs/operations/providername.md b/docs/operations/providername.md index 86b88ca..5bff3c0 100644 --- a/docs/operations/providername.md +++ b/docs/operations/providername.md @@ -33,6 +33,7 @@ | `TOGETHER_2` | Together 2 | | `UBICLOUD` | Ubicloud | | `ONE_DOT_AI` | 01.AI | +| `AKASH_ML` | AkashML | | `AI21` | AI21 | | `AION_LABS` | AionLabs | | `ALIBABA` | Alibaba | @@ -90,6 +91,7 @@ | `PARASAIL` | Parasail | | `PERPLEXITY` | Perplexity | | `PHALA` | Phala | +| `REKA` | Reka | | `RELACE` | Relace | | `SAMBA_NOVA` | SambaNova | | `SEED` | Seed | diff --git a/docs/operations/sendchatcompletionrequestglobals.md b/docs/operations/sendchatcompletionrequestglobals.md index b37d22f..3256c02 100644 --- a/docs/operations/sendchatcompletionrequestglobals.md +++ b/docs/operations/sendchatcompletionrequestglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/sendchatcompletionrequestrequest.md b/docs/operations/sendchatcompletionrequestrequest.md index 9eefdae..2150e2f 100644 --- a/docs/operations/sendchatcompletionrequestrequest.md +++ b/docs/operations/sendchatcompletionrequestrequest.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `chat_generation_params` | [components.ChatGenerationParams](../components/chatgenerationparams.md) | :heavy_check_mark: | N/A | {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"model": "openai/gpt-4",
"temperature": 0.7,
"max_tokens": 150
} | \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `chat_request` | [components.ChatRequest](../components/chatrequest.md) | :heavy_check_mark: | N/A | {
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"model": "openai/gpt-4",
"temperature": 0.7,
"max_tokens": 150
} | \ No newline at end of file diff --git a/docs/operations/sendchatcompletionrequestresponse.md b/docs/operations/sendchatcompletionrequestresponse.md index 4bdd885..c4ba8c7 100644 --- a/docs/operations/sendchatcompletionrequestresponse.md +++ b/docs/operations/sendchatcompletionrequestresponse.md @@ -3,15 +3,15 @@ ## Supported Types -### `components.ChatResponse` +### `components.ChatResult` ```python -value: components.ChatResponse = /* values here */ +value: components.ChatResult = /* values here */ ``` -### `Union[eventstreaming.EventStream[components.ChatStreamingResponseChunk], eventstreaming.EventStreamAsync[components.ChatStreamingResponseChunk]]` +### `Union[eventstreaming.EventStream[components.ChatStreamChunk], eventstreaming.EventStreamAsync[components.ChatStreamChunk]]` ```python -value: Union[eventstreaming.EventStream[components.ChatStreamingResponseChunk], eventstreaming.EventStreamAsync[components.ChatStreamingResponseChunk]] = /* values here */ +value: Union[eventstreaming.EventStream[components.ChatStreamChunk], eventstreaming.EventStreamAsync[components.ChatStreamChunk]] = /* values here */ ``` diff --git a/docs/operations/sendchatcompletionrequestresponsebody.md b/docs/operations/sendchatcompletionrequestresponsebody.md index 82acd8b..4c84044 100644 --- a/docs/operations/sendchatcompletionrequestresponsebody.md +++ b/docs/operations/sendchatcompletionrequestresponsebody.md @@ -7,4 +7,4 @@ Successful chat completion response | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [components.ChatStreamingResponseChunk](../components/chatstreamingresponsechunk.md) | :heavy_check_mark: | Streaming chat completion chunk | {
"id": "chatcmpl-123",
"object": "chat.completion.chunk",
"created": 1677652288,
"model": "openai/gpt-4",
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "Hello"
},
"finish_reason": null
}
]
} | \ No newline at end of file +| `data` | [components.ChatStreamChunk](../components/chatstreamchunk.md) | :heavy_check_mark: | Streaming chat completion chunk | {
"id": "chatcmpl-123",
"object": "chat.completion.chunk",
"created": 1677652288,
"model": "openai/gpt-4",
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "Hello"
},
"finish_reason": null
}
]
} | \ No newline at end of file diff --git a/docs/operations/updateguardraildata.md b/docs/operations/updateguardraildata.md index 8ef0a03..2a97bda 100644 --- a/docs/operations/updateguardraildata.md +++ b/docs/operations/updateguardraildata.md @@ -13,6 +13,7 @@ The updated guardrail | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 | | `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalResponse]](../operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"google"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [
"openai/gpt-5.2-20251211",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z | diff --git a/docs/operations/updateguardrailglobals.md b/docs/operations/updateguardrailglobals.md index fc66661..d72ffed 100644 --- a/docs/operations/updateguardrailglobals.md +++ b/docs/operations/updateguardrailglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/updateguardrailrequest.md b/docs/operations/updateguardrailrequest.md index 04fe91c..7ccfb1e 100644 --- a/docs/operations/updateguardrailrequest.md +++ b/docs/operations/updateguardrailrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | | `request_body` | [operations.UpdateGuardrailRequestBody](../operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated Guardrail Name",
"description": "Updated description",
"limit_usd": 75,
"reset_interval": "weekly"
} | \ No newline at end of file diff --git a/docs/operations/updateguardrailrequestbody.md b/docs/operations/updateguardrailrequestbody.md index fe16a07..9365423 100644 --- a/docs/operations/updateguardrailrequestbody.md +++ b/docs/operations/updateguardrailrequestbody.md @@ -10,5 +10,6 @@ | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 | | `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true | \ No newline at end of file diff --git a/docs/operations/updateguardrailresponse.md b/docs/operations/updateguardrailresponse.md index c068ca8..19b1364 100644 --- a/docs/operations/updateguardrailresponse.md +++ b/docs/operations/updateguardrailresponse.md @@ -5,6 +5,6 @@ Guardrail updated successfully ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateGuardrailData](../operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.UpdateGuardrailData](../operations/updateguardraildata.md) | :heavy_check_mark: | The updated guardrail | {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Guardrail",
"description": "Guardrail for production environment",
"limit_usd": 100,
"reset_interval": "monthly",
"allowed_providers": [
"openai",
"anthropic",
"google"
],
"ignored_providers": null,
"allowed_models": null,
"enforce_zdr": false,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z"
} | \ No newline at end of file diff --git a/docs/operations/updatekeysdata.md b/docs/operations/updatekeysdata.md index 9105534..9eec6b5 100644 --- a/docs/operations/updatekeysdata.md +++ b/docs/operations/updatekeysdata.md @@ -5,24 +5,25 @@ The updated API key information ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | -| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | -| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | -| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | -| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | -| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | -| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | -| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | -| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | -| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | -| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | -| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | -| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | -| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | -| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | -| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | -| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | -| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | +| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key | +| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 | +| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false | +| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 | +| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 | +| `limit_reset` | *Nullable[str]* | :heavy_check_mark: | Type of limit reset for the API key | monthly | +| `include_byok_in_limit` | *bool* | :heavy_check_mark: | Whether to include external BYOK usage in the credit limit | false | +| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 | +| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 | +| `usage_weekly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday) | 25.5 | +| `usage_monthly` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC month | 25.5 | +| `byok_usage` | *float* | :heavy_check_mark: | Total external BYOK usage (in USD) for the API key | 17.38 | +| `byok_usage_daily` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC day | 17.38 | +| `byok_usage_weekly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for the current UTC week (Monday-Sunday) | 17.38 | +| `byok_usage_monthly` | *float* | :heavy_check_mark: | External BYOK usage (in USD) for current UTC month | 17.38 | +| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was created | 2025-08-24T10:30:00Z | +| `updated_at` | *Nullable[str]* | :heavy_check_mark: | ISO 8601 timestamp of when the API key was last updated | 2025-08-24T15:45:00Z | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | ISO 8601 UTC timestamp when the API key expires, or null if no expiration | 2027-12-31T23:59:59Z | +| `creator_user_id` | *Nullable[str]* | :heavy_check_mark: | The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID. | user_2dHFtVWx2n56w6HkM0000000000 | \ No newline at end of file diff --git a/docs/operations/updatekeysglobals.md b/docs/operations/updatekeysglobals.md index c13bcc6..4588f44 100644 --- a/docs/operations/updatekeysglobals.md +++ b/docs/operations/updatekeysglobals.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| \ No newline at end of file +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/operations/updatekeysrequest.md b/docs/operations/updatekeysrequest.md index c2c5c25..75e5838 100644 --- a/docs/operations/updatekeysrequest.md +++ b/docs/operations/updatekeysrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | | `request_body` | [operations.UpdateKeysRequestBody](../operations/updatekeysrequestbody.md) | :heavy_check_mark: | N/A | {
"name": "Updated API Key Name",
"disabled": false,
"limit": 75,
"limit_reset": "daily",
"include_byok_in_limit": true
} | \ No newline at end of file diff --git a/docs/operations/updatekeysresponse.md b/docs/operations/updatekeysresponse.md index 6f58ec3..bf4c261 100644 --- a/docs/operations/updatekeysresponse.md +++ b/docs/operations/updatekeysresponse.md @@ -5,6 +5,6 @@ API key updated successfully ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [operations.UpdateKeysData](../operations/updatekeysdata.md) | :heavy_check_mark: | The updated API key information | {
"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
"name": "My Production Key",
"label": "sk-or-v1-0e6...1c96",
"disabled": false,
"limit": 100,
"limit_remaining": 74.5,
"limit_reset": "monthly",
"include_byok_in_limit": false,
"usage": 25.5,
"usage_daily": 25.5,
"usage_weekly": 25.5,
"usage_monthly": 25.5,
"byok_usage": 17.38,
"byok_usage_daily": 17.38,
"byok_usage_weekly": 17.38,
"byok_usage_monthly": 17.38,
"created_at": "2025-08-24T10:30:00Z",
"updated_at": "2025-08-24T15:45:00Z",
"expires_at": "2027-12-31T23:59:59Z",
"creator_user_id": "user_2dHFtVWx2n56w6HkM0000000000"
} | \ No newline at end of file diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 781dc23..f10b397 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -1,5 +1,4 @@ # Analytics -(*analytics*) ## Overview @@ -23,7 +22,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -39,7 +39,8 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `date_` | *Optional[str]* | :heavy_minus_sign: | Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). | 2025-08-24 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/docs/sdks/apikeys/README.md b/docs/sdks/apikeys/README.md index eaa58d5..7b325c0 100644 --- a/docs/sdks/apikeys/README.md +++ b/docs/sdks/apikeys/README.md @@ -1,5 +1,4 @@ # APIKeys -(*api_keys*) ## Overview @@ -28,7 +27,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -44,7 +44,8 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `include_disabled` | *Optional[str]* | :heavy_minus_sign: | Whether to include disabled API keys in the response | false | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of API keys to skip for pagination | 0 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -76,7 +77,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -93,7 +95,8 @@ with OpenRouter( | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | Name for the new API key | My New API Key | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | Optional spending limit for the API key in USD | 50 | | `limit_reset` | [OptionalNullable[operations.CreateKeysLimitReset]](../../operations/createkeyslimitreset.md) | :heavy_minus_sign: | Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. | monthly | | `include_byok_in_limit` | *Optional[bool]* | :heavy_minus_sign: | Whether to include BYOK usage in the limit | true | @@ -128,7 +131,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -145,7 +149,8 @@ with OpenRouter( | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to update | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `name` | *Optional[str]* | :heavy_minus_sign: | New name for the API key | Updated API Key Name | | `disabled` | *Optional[bool]* | :heavy_minus_sign: | Whether to disable the API key | false | | `limit` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit for the API key in USD | 75 | @@ -182,7 +187,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -199,7 +205,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -230,7 +237,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -247,7 +255,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -278,7 +287,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -294,7 +304,8 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index a64005c..c28f38d 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -1,5 +1,4 @@ # Chat -(*chat*) ## Overview @@ -21,7 +20,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -47,14 +47,15 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `messages` | List[[components.Message](../../components/message.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"role": "user",
"content": "Hello!"
}
] | +| `messages` | List[[components.ChatMessages](../../components/chatmessages.md)] | :heavy_check_mark: | List of messages for the conversation | [
{
"role": "user",
"content": "Hello!"
}
] | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `provider` | [OptionalNullable[components.ChatGenerationParamsProvider]](../../components/chatgenerationparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | -| `plugins` | List[[components.ChatGenerationParamsPluginUnion](../../components/chatgenerationparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `provider` | [OptionalNullable[components.ChatRequestProvider]](../../components/chatrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | +| `plugins` | List[[components.ChatRequestPluginUnion](../../components/chatrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | | `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | user-123 | -| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | -| `trace` | [Optional[components.ChatGenerationParamsTrace]](../../components/chatgenerationparamstrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | +| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | | +| `trace` | [Optional[components.ChatRequestTrace]](../../components/chatrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | | `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | openai/gpt-4 | | `models` | List[*str*] | :heavy_minus_sign: | Models to use for completion | [
"openai/gpt-4",
"openai/gpt-4o"
] | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | 0 | @@ -62,7 +63,7 @@ with OpenRouter( | `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | false | | `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | 5 | | `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | 100 | -| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | 100 | +| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. | 100 | | `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | {
"user_id": "user-123",
"session_id": "session-456"
} | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | 0 | | `reasoning` | [Optional[components.Reasoning]](../../components/reasoning.md) | :heavy_minus_sign: | Configuration options for reasoning models | {
"effort": "medium",
"summary": "concise"
} | @@ -73,12 +74,14 @@ with OpenRouter( | `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../../components/chatstreamoptions.md) | :heavy_minus_sign: | Streaming configuration options | {
"include_usage": true
} | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | 0.7 | | `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[components.ToolChoiceOption]](../../components/toolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | auto | -| `tools` | List[[components.ToolDefinitionJSON](../../components/tooldefinitionjson.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] | +| `tool_choice` | [Optional[components.ChatToolChoice]](../../components/chattoolchoice.md) | :heavy_minus_sign: | Tool choice configuration | auto | +| `tools` | List[[components.ChatFunctionTool](../../components/chatfunctiontool.md)] | :heavy_minus_sign: | Available tools for function calling | [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather"
}
}
] | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | 1 | -| `debug` | [Optional[components.DebugOptions]](../../components/debugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} | -| `image_config` | Dict[str, [components.ChatGenerationParamsImageConfig](../../components/chatgenerationparamsimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | -| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | +| `debug` | [Optional[components.ChatDebugOptions]](../../components/chatdebugoptions.md) | :heavy_minus_sign: | Debug options for inspecting request transformations (streaming only) | {
"echo_upstream_body": true
} | +| `image_config` | Dict[str, [components.ChatRequestImageConfig](../../components/chatrequestimageconfig.md)] | :heavy_minus_sign: | Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. | {
"aspect_ratio": "16:9"
} | +| `modalities` | List[[components.Modality](../../components/modality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text", "image", and "audio". | [
"text",
"image"
] | +| `cache_control` | [Optional[components.CacheControl]](../../components/cachecontrol.md) | :heavy_minus_sign: | Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | | +| `service_tier` | [OptionalNullable[components.ChatRequestServiceTier]](../../components/chatrequestservicetier.md) | :heavy_minus_sign: | The service tier to use for processing this request. | auto | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/credits/README.md b/docs/sdks/credits/README.md index 5744ee5..0d32728 100644 --- a/docs/sdks/credits/README.md +++ b/docs/sdks/credits/README.md @@ -1,5 +1,4 @@ # Credits -(*credits*) ## Overview @@ -24,7 +23,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -40,7 +40,8 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -70,7 +71,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", ) as open_router: res = open_router.credits.create_coinbase_charge(security=operations.CreateCoinbaseChargeSecurity( @@ -91,7 +93,8 @@ with OpenRouter( | `sender` | *str* | :heavy_check_mark: | N/A | | `chain_id` | [components.ChainID](../../components/chainid.md) | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/embeddings/README.md b/docs/sdks/embeddings/README.md index 5a383c1..0fb3077 100644 --- a/docs/sdks/embeddings/README.md +++ b/docs/sdks/embeddings/README.md @@ -1,5 +1,4 @@ # Embeddings -(*embeddings*) ## Overview @@ -24,7 +23,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -42,7 +42,8 @@ with OpenRouter( | `input` | [operations.InputUnion](../../operations/inputunion.md) | :heavy_check_mark: | N/A | | `model` | *str* | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `encoding_format` | [Optional[operations.EncodingFormat]](../../operations/encodingformat.md) | :heavy_minus_sign: | N/A | | `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A | | `user` | *Optional[str]* | :heavy_minus_sign: | N/A | @@ -84,7 +85,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -100,7 +102,8 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/endpoints/README.md b/docs/sdks/endpoints/README.md index 2e74416..598fc20 100644 --- a/docs/sdks/endpoints/README.md +++ b/docs/sdks/endpoints/README.md @@ -1,5 +1,4 @@ # Endpoints -(*endpoints*) ## Overview @@ -24,7 +23,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -42,7 +42,8 @@ with OpenRouter( | `author` | *str* | :heavy_check_mark: | N/A | | `slug` | *str* | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -71,7 +72,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -87,7 +89,8 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/generations/README.md b/docs/sdks/generations/README.md index cc602ad..bf57d21 100644 --- a/docs/sdks/generations/README.md +++ b/docs/sdks/generations/README.md @@ -1,5 +1,4 @@ # Generations -(*generations*) ## Overview @@ -23,7 +22,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -40,7 +40,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/guardrails/README.md b/docs/sdks/guardrails/README.md index 3e4a07f..fdcde88 100644 --- a/docs/sdks/guardrails/README.md +++ b/docs/sdks/guardrails/README.md @@ -1,5 +1,4 @@ # Guardrails -(*guardrails*) ## Overview @@ -35,7 +34,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -51,7 +51,8 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -82,7 +83,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -99,11 +101,13 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage | | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 | | `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2",
"anthropic/claude-4.5-opus-20251124",
"deepseek/deepseek-r1-0528:free"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -135,7 +139,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -152,7 +157,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -182,7 +188,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -199,12 +206,14 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description | | `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 | | `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly | | `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [
"openai",
"anthropic",
"deepseek"
] | +| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [
"azure"
] | | `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [
"openai/gpt-5.2"
] | | `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -237,7 +246,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -254,7 +264,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -284,7 +295,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -300,7 +312,8 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -331,7 +344,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -347,7 +361,8 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -378,7 +393,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -395,7 +411,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -427,7 +444,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -447,7 +465,8 @@ with OpenRouter( | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -478,7 +497,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -495,7 +515,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 | | `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -527,7 +548,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -548,7 +570,8 @@ with OpenRouter( | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [
"user_abc123",
"user_def456"
] | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -579,7 +602,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -599,7 +623,8 @@ with OpenRouter( | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
] | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -630,7 +655,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -651,7 +677,8 @@ with OpenRouter( | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [
"user_abc123",
"user_def456"
] | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 4140cc6..3f63d9a 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -1,5 +1,4 @@ # Models -(*models*) ## Overview @@ -25,7 +24,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -38,11 +38,13 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -52,6 +54,7 @@ with OpenRouter( | Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | @@ -69,7 +72,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -82,13 +86,15 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | -| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `category` | [Optional[operations.Category]](../../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming | +| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `output_modalities` | *Optional[str]* | :heavy_minus_sign: | Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or "all" to include all models. Defaults to "text". | text | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -116,7 +122,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", ) as open_router: res = open_router.models.list_for_user(security=operations.ListModelsUserSecurity( @@ -134,7 +141,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `security` | [operations.ListModelsUserSecurity](../../operations/listmodelsusersecurity.md) | :heavy_check_mark: | N/A | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md index 198b2d6..704edee 100644 --- a/docs/sdks/oauth/README.md +++ b/docs/sdks/oauth/README.md @@ -1,5 +1,4 @@ # OAuth -(*o_auth*) ## Overview @@ -24,7 +23,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -41,7 +41,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `code` | *str* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `code_verifier` | *Optional[str]* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk | | `code_challenge_method` | [OptionalNullable[operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod]](../../operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -73,7 +74,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -90,7 +92,8 @@ with OpenRouter( | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | | `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | | `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | @@ -109,5 +112,6 @@ with OpenRouter( | ---------------------------------- | ---------------------------------- | ---------------------------------- | | errors.BadRequestResponseError | 400 | application/json | | errors.UnauthorizedResponseError | 401 | application/json | +| errors.ConflictResponseError | 409 | application/json | | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/providers/README.md b/docs/sdks/providers/README.md index fcec440..b414ebc 100644 --- a/docs/sdks/providers/README.md +++ b/docs/sdks/providers/README.md @@ -1,5 +1,4 @@ # Providers -(*providers*) ## Overview @@ -23,7 +22,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -39,7 +39,8 @@ with OpenRouter( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index 0a725df..ab1574e 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -1,5 +1,4 @@ -# Responses -(*beta.responses*) +# Beta.Responses ## Overview @@ -23,7 +22,8 @@ import os with OpenRouter( http_referer="", - x_title="", + x_open_router_title="", + x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: @@ -41,17 +41,18 @@ with OpenRouter( | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `input` | [Optional[components.OpenResponsesInput]](../../components/openresponsesinput.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `input` | [Optional[components.InputsUnion]](../../components/inputsunion.md) | :heavy_minus_sign: | Input for a response request - can be a string or array of items | [
{
"role": "user",
"content": "What is the weather today?"
}
] | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {
"user_id": "123",
"session_id": "abc-def-ghi"
} | -| `tools` | List[[components.OpenResponsesRequestToolUnion](../../components/openresponsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[components.ResponsesRequestToolUnion](../../components/responsesrequesttoolunion.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[components.OpenAIResponsesToolChoiceUnion]](../../components/openairesponsestoolchoiceunion.md) | :heavy_minus_sign: | N/A | | | `parallel_tool_calls` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | | `model` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `models` | List[*str*] | :heavy_minus_sign: | N/A | | -| `text` | [Optional[components.OpenResponsesResponseText]](../../components/openresponsesresponsetext.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} | -| `reasoning` | [OptionalNullable[components.OpenResponsesReasoningConfig]](../../components/openresponsesreasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"summary": "auto",
"enabled": true
} | +| `text` | [Optional[components.TextExtendedConfig]](../../components/textextendedconfig.md) | :heavy_minus_sign: | Text output configuration including format and verbosity | {
"format": {
"type": "text"
},
"verbosity": "medium"
} | +| `reasoning` | [OptionalNullable[components.ReasoningConfig]](../../components/reasoningconfig.md) | :heavy_minus_sign: | Configuration for reasoning mode in the response | {
"summary": "auto",
"enabled": true
} | | `max_output_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | @@ -60,22 +61,22 @@ with OpenRouter( | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | | `top_k` | *Optional[float]* | :heavy_minus_sign: | N/A | | -| `image_config` | Dict[str, [components.OpenResponsesRequestImageConfig](../../components/openresponsesrequestimageconfig.md)] | :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` | List[[components.ResponsesOutputModality](../../components/responsesoutputmodality.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | +| `image_config` | Dict[str, [components.ResponsesRequestImageConfig](../../components/responsesrequestimageconfig.md)] | :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` | List[[components.OutputModalityEnum](../../components/outputmodalityenum.md)] | :heavy_minus_sign: | Output modalities for the response. Supported values are "text" and "image". | [
"text",
"image"
] | | `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `prompt` | [OptionalNullable[components.OpenAIResponsesPrompt]](../../components/openairesponsesprompt.md) | :heavy_minus_sign: | N/A | | -| `include` | List[[components.OpenAIResponsesIncludable](../../components/openairesponsesincludable.md)] | :heavy_minus_sign: | N/A | | +| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../../components/storedprompttemplate.md) | :heavy_minus_sign: | N/A | | +| `include` | List[[components.ResponseIncludesEnum](../../components/responseincludesenum.md)] | :heavy_minus_sign: | N/A | | | `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | | `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [Optional[components.ServiceTier]](../../components/servicetier.md) | :heavy_minus_sign: | N/A | | -| `truncation` | [OptionalNullable[components.Truncation]](../../components/truncation.md) | :heavy_minus_sign: | N/A | auto | +| `service_tier` | [OptionalNullable[components.ResponsesRequestServiceTier]](../../components/responsesrequestservicetier.md) | :heavy_minus_sign: | N/A | | +| `truncation` | [OptionalNullable[components.OpenAIResponsesTruncation]](../../components/openairesponsestruncation.md) | :heavy_minus_sign: | N/A | auto | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `provider` | [OptionalNullable[components.OpenResponsesRequestProvider]](../../components/openresponsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | -| `plugins` | List[[components.OpenResponsesRequestPluginUnion](../../components/openresponsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | -| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. | | -| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. | | -| `trace` | [Optional[components.OpenResponsesRequestTrace]](../../components/openresponsesrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | +| `provider` | [OptionalNullable[components.ResponsesRequestProvider]](../../components/responsesrequestprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | +| `plugins` | List[[components.ResponsesRequestPluginUnion](../../components/responsesrequestpluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | +| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. | | +| `session_id` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. | | +| `trace` | [Optional[components.ResponsesRequestTrace]](../../components/responsesrequesttrace.md) | :heavy_minus_sign: | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/pyproject.toml b/pyproject.toml index 0d48888..870fd08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "0.7.11" +version = "0.8.0" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 8cf17ae..8d9fa36 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.7.11" +__version__: str = "0.8.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.768.0" -__user_agent__: str = "speakeasy-sdk/python 0.7.11 2.768.0 1.0.0 openrouter" +__gen_version__: str = "2.788.4" +__user_agent__: str = "speakeasy-sdk/python 0.8.0 2.788.4 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/analytics.py b/src/openrouter/analytics.py index 1e6a8c1..4d707db 100644 --- a/src/openrouter/analytics.py +++ b/src/openrouter/analytics.py @@ -16,7 +16,8 @@ class Analytics(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, date_: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -30,7 +31,9 @@ class Analytics(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). :param retries: Override the default retry configuration for this method @@ -50,7 +53,8 @@ class Analytics(BaseSDK): request = operations.GetUserActivityRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, date_=date_, ) @@ -68,7 +72,8 @@ class Analytics(BaseSDK): http_headers=http_headers, _globals=operations.GetUserActivityGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -138,7 +143,8 @@ class Analytics(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, date_: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -152,7 +158,9 @@ class Analytics(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param date_: Filter by a single UTC date in the last 30 days (YYYY-MM-DD format). :param retries: Override the default retry configuration for this method @@ -172,7 +180,8 @@ class Analytics(BaseSDK): request = operations.GetUserActivityRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, date_=date_, ) @@ -190,7 +199,8 @@ class Analytics(BaseSDK): http_headers=http_headers, _globals=operations.GetUserActivityGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/api_keys.py b/src/openrouter/api_keys.py index c87c6f1..0c1e8d0 100644 --- a/src/openrouter/api_keys.py +++ b/src/openrouter/api_keys.py @@ -17,7 +17,8 @@ class APIKeys(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, include_disabled: Optional[str] = None, offset: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -32,7 +33,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param include_disabled: Whether to include disabled API keys in the response :param offset: Number of API keys to skip for pagination @@ -53,7 +56,8 @@ class APIKeys(BaseSDK): request = operations.ListRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, include_disabled=include_disabled, offset=offset, ) @@ -72,7 +76,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.ListGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -137,7 +142,8 @@ class APIKeys(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, include_disabled: Optional[str] = None, offset: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -152,7 +158,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param include_disabled: Whether to include disabled API keys in the response :param offset: Number of API keys to skip for pagination @@ -173,7 +181,8 @@ class APIKeys(BaseSDK): request = operations.ListRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, include_disabled=include_disabled, offset=offset, ) @@ -192,7 +201,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.ListGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -258,7 +268,8 @@ class APIKeys(BaseSDK): *, name: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, limit: OptionalNullable[float] = UNSET, limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET, include_byok_in_limit: Optional[bool] = None, @@ -276,7 +287,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param limit: Optional spending limit for the API key in USD :param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. @@ -299,7 +312,8 @@ class APIKeys(BaseSDK): request = operations.CreateKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateKeysRequestBody( name=name, limit=limit, @@ -323,7 +337,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.CreateKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -401,7 +416,8 @@ class APIKeys(BaseSDK): *, name: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, limit: OptionalNullable[float] = UNSET, limit_reset: OptionalNullable[operations.CreateKeysLimitReset] = UNSET, include_byok_in_limit: Optional[bool] = None, @@ -419,7 +435,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param limit: Optional spending limit for the API key in USD :param limit_reset: Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday. @@ -442,7 +460,8 @@ class APIKeys(BaseSDK): request = operations.CreateKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateKeysRequestBody( name=name, limit=limit, @@ -466,7 +485,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.CreateKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -544,7 +564,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, name: Optional[str] = None, disabled: Optional[bool] = None, limit: OptionalNullable[float] = UNSET, @@ -563,7 +584,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param name: New name for the API key :param disabled: Whether to disable the API key @@ -587,7 +610,8 @@ class APIKeys(BaseSDK): request = operations.UpdateKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, request_body=operations.UpdateKeysRequestBody( name=name, @@ -612,7 +636,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.UpdateKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -695,7 +720,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, name: Optional[str] = None, disabled: Optional[bool] = None, limit: OptionalNullable[float] = UNSET, @@ -714,7 +740,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param name: New name for the API key :param disabled: Whether to disable the API key @@ -738,7 +766,8 @@ class APIKeys(BaseSDK): request = operations.UpdateKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, request_body=operations.UpdateKeysRequestBody( name=name, @@ -763,7 +792,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.UpdateKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -846,7 +876,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -860,7 +891,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -879,7 +912,8 @@ class APIKeys(BaseSDK): request = operations.DeleteKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, ) @@ -897,7 +931,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.DeleteKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -968,7 +1003,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -982,7 +1018,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1001,7 +1039,8 @@ class APIKeys(BaseSDK): request = operations.DeleteKeysRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, ) @@ -1019,7 +1058,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.DeleteKeysGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1090,7 +1130,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1104,7 +1145,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1123,7 +1166,8 @@ class APIKeys(BaseSDK): request = operations.GetKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, ) @@ -1141,7 +1185,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.GetKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1212,7 +1257,8 @@ class APIKeys(BaseSDK): *, hash: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1226,7 +1272,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1245,7 +1293,8 @@ class APIKeys(BaseSDK): request = operations.GetKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, hash=hash, ) @@ -1263,7 +1312,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.GetKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1333,7 +1383,8 @@ class APIKeys(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1346,7 +1397,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1365,7 +1418,8 @@ class APIKeys(BaseSDK): request = operations.GetCurrentKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -1382,7 +1436,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.GetCurrentKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1442,7 +1497,8 @@ class APIKeys(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1455,7 +1511,9 @@ class APIKeys(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1474,7 +1532,8 @@ class APIKeys(BaseSDK): request = operations.GetCurrentKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -1491,7 +1550,8 @@ class APIKeys(BaseSDK): http_headers=http_headers, _globals=operations.GetCurrentKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/chat.py b/src/openrouter/chat.py index 0830ebe..e7855d1 100644 --- a/src/openrouter/chat.py +++ b/src/openrouter/chat.py @@ -20,28 +20,27 @@ class Chat(BaseSDK): def send( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -70,30 +69,34 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> components.ChatResponse: + ) -> components.ChatResult: r"""Create a chat completion Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. @@ -102,12 +105,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -116,7 +121,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -132,7 +137,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -144,28 +151,27 @@ class Chat(BaseSDK): def send( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -194,30 +200,34 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> eventstreaming.EventStream[components.ChatStreamingResponseChunk]: + ) -> eventstreaming.EventStream[components.ChatStreamChunk]: r"""Create a chat completion Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. @@ -226,12 +236,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -240,7 +252,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -256,7 +268,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -267,28 +281,27 @@ class Chat(BaseSDK): def send( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -317,25 +330,29 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -349,12 +366,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -363,7 +382,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -379,7 +398,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -398,20 +419,23 @@ class Chat(BaseSDK): request = operations.SendChatCompletionRequestRequest( http_referer=http_referer, - x_title=x_title, - chat_generation_params=components.ChatGenerationParams( + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + chat_request=components.ChatRequest( provider=utils.get_pydantic_model( - provider, OptionalNullable[components.ChatGenerationParamsProvider] + provider, OptionalNullable[components.ChatRequestProvider] ), plugins=utils.get_pydantic_model( - plugins, Optional[List[components.ChatGenerationParamsPluginUnion]] + plugins, Optional[List[components.ChatRequestPluginUnion]] ), user=user, session_id=session_id, trace=utils.get_pydantic_model( - trace, Optional[components.ChatGenerationParamsTrace] + trace, Optional[components.ChatRequestTrace] + ), + messages=utils.get_pydantic_model( + messages, List[components.ChatMessages] ), - messages=utils.get_pydantic_model(messages, List[components.Message]), model=model, models=models, frequency_penalty=frequency_penalty, @@ -437,17 +461,21 @@ class Chat(BaseSDK): temperature=temperature, parallel_tool_calls=parallel_tool_calls, tool_choice=utils.get_pydantic_model( - tool_choice, Optional[components.ToolChoiceOption] + tool_choice, Optional[components.ChatToolChoice] ), tools=utils.get_pydantic_model( - tools, Optional[List[components.ToolDefinitionJSON]] + tools, Optional[List[components.ChatFunctionTool]] ), top_p=top_p, debug=utils.get_pydantic_model( - debug, Optional[components.DebugOptions] + debug, Optional[components.ChatDebugOptions] ), image_config=image_config, modalities=modalities, + cache_control=utils.get_pydantic_model( + cache_control, Optional[components.CacheControl] + ), + service_tier=service_tier, ), ) @@ -465,15 +493,12 @@ class Chat(BaseSDK): http_headers=http_headers, _globals=operations.SendChatCompletionRequestGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.chat_generation_params, - False, - False, - "json", - components.ChatGenerationParams, + request.chat_request, False, False, "json", components.ChatRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -523,7 +548,7 @@ class Chat(BaseSDK): if utils.match_response(http_res, "200", "application/json"): http_res_text = utils.stream_to_text(http_res) return unmarshal_json_response( - components.ChatResponse, http_res, http_res_text + components.ChatResult, http_res, http_res_text ) if utils.match_response(http_res, "200", "text/event-stream"): return eventstreaming.EventStream( @@ -652,28 +677,27 @@ class Chat(BaseSDK): async def send_async( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -702,30 +726,34 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> components.ChatResponse: + ) -> components.ChatResult: r"""Create a chat completion Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. @@ -734,12 +762,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -748,7 +778,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -764,7 +794,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -776,28 +808,27 @@ class Chat(BaseSDK): async def send_async( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -826,30 +857,34 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> eventstreaming.EventStreamAsync[components.ChatStreamingResponseChunk]: + ) -> eventstreaming.EventStreamAsync[components.ChatStreamChunk]: r"""Create a chat completion Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. @@ -858,12 +893,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -872,7 +909,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -888,7 +925,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -899,28 +938,27 @@ class Chat(BaseSDK): async def send_async( self, *, - messages: Union[List[components.Message], List[components.MessageTypedDict]], + messages: Union[ + List[components.ChatMessages], List[components.ChatMessagesTypedDict] + ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, provider: OptionalNullable[ Union[ - components.ChatGenerationParamsProvider, - components.ChatGenerationParamsProviderTypedDict, + components.ChatRequestProvider, components.ChatRequestProviderTypedDict ] ] = UNSET, plugins: Optional[ Union[ - List[components.ChatGenerationParamsPluginUnion], - List[components.ChatGenerationParamsPluginUnionTypedDict], + List[components.ChatRequestPluginUnion], + List[components.ChatRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ - Union[ - components.ChatGenerationParamsTrace, - components.ChatGenerationParamsTraceTypedDict, - ] + Union[components.ChatRequestTrace, components.ChatRequestTraceTypedDict] ] = None, model: Optional[str] = None, models: Optional[List[str]] = None, @@ -949,25 +987,29 @@ class Chat(BaseSDK): temperature: OptionalNullable[float] = 1, parallel_tool_calls: OptionalNullable[bool] = UNSET, tool_choice: Optional[ - Union[components.ToolChoiceOption, components.ToolChoiceOptionTypedDict] + Union[components.ChatToolChoice, components.ChatToolChoiceTypedDict] ] = None, tools: Optional[ Union[ - List[components.ToolDefinitionJSON], - List[components.ToolDefinitionJSONTypedDict], + List[components.ChatFunctionTool], + List[components.ChatFunctionToolTypedDict], ] ] = None, top_p: OptionalNullable[float] = 1, debug: Optional[ - Union[components.DebugOptions, components.DebugOptionsTypedDict] + Union[components.ChatDebugOptions, components.ChatDebugOptionsTypedDict] ] = None, image_config: Optional[ Union[ - Dict[str, components.ChatGenerationParamsImageConfig], - Dict[str, components.ChatGenerationParamsImageConfigTypedDict], + Dict[str, components.ChatRequestImageConfig], + Dict[str, components.ChatRequestImageConfigTypedDict], ] ] = None, modalities: Optional[List[components.Modality]] = None, + cache_control: Optional[ + Union[components.CacheControl, components.CacheControlTypedDict] + ] = None, + service_tier: OptionalNullable[components.ChatRequestServiceTier] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -981,12 +1023,14 @@ class Chat(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. :param user: Unique user identifier - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param model: Model to use for completion :param models: Models to use for completion @@ -995,7 +1039,7 @@ class Chat(BaseSDK): :param logprobs: Return log probabilities :param top_logprobs: Number of top log probabilities to return (0-20) :param max_completion_tokens: Maximum tokens in completion - :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens) + :param max_tokens: Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. :param metadata: Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) :param presence_penalty: Presence penalty (-2.0 to 2.0) :param reasoning: Configuration options for reasoning models @@ -1011,7 +1055,9 @@ class Chat(BaseSDK): :param top_p: Nucleus sampling parameter (0-1) :param debug: Debug options for inspecting request transformations (streaming only) :param image_config: Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. - :param modalities: Output modalities for the response. Supported values are \"text\" and \"image\". + :param modalities: Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\". + :param cache_control: Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. + :param service_tier: The service tier to use for processing this request. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1030,20 +1076,23 @@ class Chat(BaseSDK): request = operations.SendChatCompletionRequestRequest( http_referer=http_referer, - x_title=x_title, - chat_generation_params=components.ChatGenerationParams( + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + chat_request=components.ChatRequest( provider=utils.get_pydantic_model( - provider, OptionalNullable[components.ChatGenerationParamsProvider] + provider, OptionalNullable[components.ChatRequestProvider] ), plugins=utils.get_pydantic_model( - plugins, Optional[List[components.ChatGenerationParamsPluginUnion]] + plugins, Optional[List[components.ChatRequestPluginUnion]] ), user=user, session_id=session_id, trace=utils.get_pydantic_model( - trace, Optional[components.ChatGenerationParamsTrace] + trace, Optional[components.ChatRequestTrace] + ), + messages=utils.get_pydantic_model( + messages, List[components.ChatMessages] ), - messages=utils.get_pydantic_model(messages, List[components.Message]), model=model, models=models, frequency_penalty=frequency_penalty, @@ -1069,17 +1118,21 @@ class Chat(BaseSDK): temperature=temperature, parallel_tool_calls=parallel_tool_calls, tool_choice=utils.get_pydantic_model( - tool_choice, Optional[components.ToolChoiceOption] + tool_choice, Optional[components.ChatToolChoice] ), tools=utils.get_pydantic_model( - tools, Optional[List[components.ToolDefinitionJSON]] + tools, Optional[List[components.ChatFunctionTool]] ), top_p=top_p, debug=utils.get_pydantic_model( - debug, Optional[components.DebugOptions] + debug, Optional[components.ChatDebugOptions] ), image_config=image_config, modalities=modalities, + cache_control=utils.get_pydantic_model( + cache_control, Optional[components.CacheControl] + ), + service_tier=service_tier, ), ) @@ -1097,15 +1150,12 @@ class Chat(BaseSDK): http_headers=http_headers, _globals=operations.SendChatCompletionRequestGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.chat_generation_params, - False, - False, - "json", - components.ChatGenerationParams, + request.chat_request, False, False, "json", components.ChatRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1155,7 +1205,7 @@ class Chat(BaseSDK): if utils.match_response(http_res, "200", "application/json"): http_res_text = await utils.stream_to_text_async(http_res) return unmarshal_json_response( - components.ChatResponse, http_res, http_res_text + components.ChatResult, http_res, http_res_text ) if utils.match_response(http_res, "200", "text/event-stream"): return eventstreaming.EventStreamAsync( diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index 051bc59..c61c2a6 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -7,18 +7,15 @@ import sys if TYPE_CHECKING: from .activityitem import ActivityItem, ActivityItemTypedDict - from .assistantmessage import ( - AssistantMessage, - AssistantMessageContent, - AssistantMessageContentTypedDict, - AssistantMessageRole, - AssistantMessageTypedDict, + from .annotationaddedevent import ( + AnnotationAddedEvent, + AnnotationAddedEventType, + AnnotationAddedEventTypedDict, ) - from .assistantmessageimages import ( - AssistantMessageImages, - AssistantMessageImagesImageURL, - AssistantMessageImagesImageURLTypedDict, - AssistantMessageImagesTypedDict, + from .applypatchservertool import ( + ApplyPatchServerTool, + ApplyPatchServerToolType, + ApplyPatchServerToolTypedDict, ) from .badgatewayresponseerrordata import ( BadGatewayResponseErrorData, @@ -28,52 +25,217 @@ if TYPE_CHECKING: BadRequestResponseErrorData, BadRequestResponseErrorDataTypedDict, ) - from .chatcompletionfinishreason import ChatCompletionFinishReason - from .chatgenerationparams import ( - ChatGenerationParams, - ChatGenerationParamsBy, - ChatGenerationParamsIDAutoRouter, - ChatGenerationParamsIDFileParser, - ChatGenerationParamsIDModeration, - ChatGenerationParamsIDResponseHealing, - ChatGenerationParamsIDWeb, - ChatGenerationParamsIgnore, - ChatGenerationParamsIgnoreTypedDict, - ChatGenerationParamsImageConfig, - ChatGenerationParamsImageConfigTypedDict, - ChatGenerationParamsMaxPrice, - ChatGenerationParamsMaxPriceTypedDict, - ChatGenerationParamsOnly, - ChatGenerationParamsOnlyTypedDict, - ChatGenerationParamsOrder, - ChatGenerationParamsOrderTypedDict, - ChatGenerationParamsPartition, - ChatGenerationParamsPluginAutoRouter, - ChatGenerationParamsPluginAutoRouterTypedDict, - ChatGenerationParamsPluginFileParser, - ChatGenerationParamsPluginFileParserTypedDict, - ChatGenerationParamsPluginModeration, - ChatGenerationParamsPluginModerationTypedDict, - ChatGenerationParamsPluginResponseHealing, - ChatGenerationParamsPluginResponseHealingTypedDict, - ChatGenerationParamsPluginUnion, - ChatGenerationParamsPluginUnionTypedDict, - ChatGenerationParamsPluginWeb, - ChatGenerationParamsPluginWebTypedDict, - ChatGenerationParamsProvider, - ChatGenerationParamsProviderSort, - ChatGenerationParamsProviderSortConfig, - ChatGenerationParamsProviderSortConfigEnum, - ChatGenerationParamsProviderSortConfigTypedDict, - ChatGenerationParamsProviderSortConfigUnion, - ChatGenerationParamsProviderSortConfigUnionTypedDict, - ChatGenerationParamsProviderTypedDict, - ChatGenerationParamsSortEnum, - ChatGenerationParamsSortUnion, - ChatGenerationParamsSortUnionTypedDict, - ChatGenerationParamsTrace, - ChatGenerationParamsTraceTypedDict, - ChatGenerationParamsTypedDict, + from .baseinputs_union import ( + BaseInputsContent1, + BaseInputsContent1TypedDict, + BaseInputsContent2, + BaseInputsContent2TypedDict, + BaseInputsContent3, + BaseInputsContent3TypedDict, + BaseInputsFunctionCall, + BaseInputsFunctionCallOutput, + BaseInputsFunctionCallOutputTypedDict, + BaseInputsFunctionCallTypedDict, + BaseInputsMessage1, + BaseInputsMessage1TypedDict, + BaseInputsMessage2, + BaseInputsMessage2TypedDict, + BaseInputsOutput1, + BaseInputsOutput1TypedDict, + BaseInputsOutput2, + BaseInputsOutput2TypedDict, + BaseInputsPhaseCommentary, + BaseInputsPhaseFinalAnswer, + BaseInputsPhaseUnion, + BaseInputsPhaseUnionTypedDict, + BaseInputsRoleAssistant, + BaseInputsRoleDeveloper1, + BaseInputsRoleDeveloper2, + BaseInputsRoleSystem1, + BaseInputsRoleSystem2, + BaseInputsRoleUnion1, + BaseInputsRoleUnion1TypedDict, + BaseInputsRoleUnion2, + BaseInputsRoleUnion2TypedDict, + BaseInputsRoleUser1, + BaseInputsRoleUser2, + BaseInputsTypeFunctionCall, + BaseInputsTypeFunctionCallOutput, + BaseInputsTypeMessage1, + BaseInputsTypeMessage2, + BaseInputsUnion, + BaseInputsUnion1, + BaseInputsUnion1TypedDict, + BaseInputsUnionTypedDict, + ) + from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict + from .chatassistantimages import ( + ChatAssistantImages, + ChatAssistantImagesImageURL, + ChatAssistantImagesImageURLTypedDict, + ChatAssistantImagesTypedDict, + ) + from .chatassistantmessage import ( + ChatAssistantMessage, + ChatAssistantMessageContent, + ChatAssistantMessageContentTypedDict, + ChatAssistantMessageRole, + ChatAssistantMessageTypedDict, + ) + from .chataudiooutput import ChatAudioOutput, ChatAudioOutputTypedDict + from .chatchoice import ChatChoice, ChatChoiceTypedDict + from .chatcontentaudio import ( + ChatContentAudio, + ChatContentAudioInputAudio, + ChatContentAudioInputAudioTypedDict, + ChatContentAudioType, + ChatContentAudioTypedDict, + ) + from .chatcontentcachecontrol import ( + ChatContentCacheControl, + ChatContentCacheControlTTL, + ChatContentCacheControlType, + ChatContentCacheControlTypedDict, + ) + from .chatcontentfile import ( + ChatContentFile, + ChatContentFileType, + ChatContentFileTypedDict, + File, + FileTypedDict, + ) + from .chatcontentimage import ( + ChatContentImage, + ChatContentImageDetail, + ChatContentImageImageURL, + ChatContentImageImageURLTypedDict, + ChatContentImageType, + ChatContentImageTypedDict, + ) + from .chatcontentitems import ( + ChatContentItems, + ChatContentItems1, + ChatContentItems1TypedDict, + ChatContentItemsTypedDict, + ) + from .chatcontenttext import ( + ChatContentText, + ChatContentTextType, + ChatContentTextTypedDict, + ) + from .chatcontentvideo import ( + ChatContentVideo, + ChatContentVideoType, + ChatContentVideoTypedDict, + ) + from .chatcontentvideoinput import ( + ChatContentVideoInput, + ChatContentVideoInputTypedDict, + ) + from .chatdebugoptions import ChatDebugOptions, ChatDebugOptionsTypedDict + from .chatdevelopermessage import ( + ChatDeveloperMessage, + ChatDeveloperMessageContent, + ChatDeveloperMessageContentTypedDict, + ChatDeveloperMessageRole, + ChatDeveloperMessageTypedDict, + ) + from .chatfinishreasonenum import ChatFinishReasonEnum + from .chatformatgrammarconfig import ( + ChatFormatGrammarConfig, + ChatFormatGrammarConfigType, + ChatFormatGrammarConfigTypedDict, + ) + from .chatformatjsonschemaconfig import ( + ChatFormatJSONSchemaConfig, + ChatFormatJSONSchemaConfigType, + ChatFormatJSONSchemaConfigTypedDict, + ) + from .chatformatpythonconfig import ( + ChatFormatPythonConfig, + ChatFormatPythonConfigType, + ChatFormatPythonConfigTypedDict, + ) + from .chatformattextconfig import ( + ChatFormatTextConfig, + ChatFormatTextConfigType, + ChatFormatTextConfigTypedDict, + ) + from .chatfunctiontool import ( + ChatFunctionTool, + ChatFunctionToolFunction, + ChatFunctionToolFunctionFunction, + ChatFunctionToolFunctionFunctionTypedDict, + ChatFunctionToolFunctionTypedDict, + ChatFunctionToolType, + ChatFunctionToolTypedDict, + ) + from .chatjsonschemaconfig import ( + ChatJSONSchemaConfig, + ChatJSONSchemaConfigTypedDict, + ) + from .chatmessages import ChatMessages, ChatMessagesTypedDict + from .chatnamedtoolchoice import ( + ChatNamedToolChoice, + ChatNamedToolChoiceFunction, + ChatNamedToolChoiceFunctionTypedDict, + ChatNamedToolChoiceType, + ChatNamedToolChoiceTypedDict, + ) + from .chatreasoningsummaryverbosityenum import ChatReasoningSummaryVerbosityEnum + from .chatrequest import ( + CacheControl, + CacheControlTypedDict, + ChatRequest, + ChatRequestBy, + ChatRequestIDAutoRouter, + ChatRequestIDContextCompression, + ChatRequestIDFileParser, + ChatRequestIDModeration, + ChatRequestIDResponseHealing, + ChatRequestIDWeb, + ChatRequestIgnore, + ChatRequestIgnoreTypedDict, + ChatRequestImageConfig, + ChatRequestImageConfigTypedDict, + ChatRequestMaxPrice, + ChatRequestMaxPriceTypedDict, + ChatRequestOnly, + ChatRequestOnlyTypedDict, + ChatRequestOrder, + ChatRequestOrderTypedDict, + ChatRequestPartition, + ChatRequestPluginAutoRouter, + ChatRequestPluginAutoRouterTypedDict, + ChatRequestPluginContextCompression, + ChatRequestPluginContextCompressionTypedDict, + ChatRequestPluginFileParser, + ChatRequestPluginFileParserTypedDict, + ChatRequestPluginModeration, + ChatRequestPluginModerationTypedDict, + ChatRequestPluginResponseHealing, + ChatRequestPluginResponseHealingTypedDict, + ChatRequestPluginUnion, + ChatRequestPluginUnionTypedDict, + ChatRequestPluginWeb, + ChatRequestPluginWebTypedDict, + ChatRequestProvider, + ChatRequestProviderSort, + ChatRequestProviderSortConfig, + ChatRequestProviderSortConfigEnum, + ChatRequestProviderSortConfigTypedDict, + ChatRequestProviderSortConfigUnion, + ChatRequestProviderSortConfigUnionTypedDict, + ChatRequestProviderTypedDict, + ChatRequestServiceTier, + ChatRequestSortEnum, + ChatRequestSortUnion, + ChatRequestSortUnionTypedDict, + ChatRequestTTL, + ChatRequestTrace, + ChatRequestTraceTypedDict, + ChatRequestType, + ChatRequestTypedDict, Effort, Modality, Reasoning, @@ -83,130 +245,397 @@ if TYPE_CHECKING: Stop, StopTypedDict, ) - from .chatgenerationtokenusage import ( - ChatGenerationTokenUsage, - ChatGenerationTokenUsageTypedDict, + from .chatresult import ChatResult, ChatResultObject, ChatResultTypedDict + from .chatstreamchoice import ChatStreamChoice, ChatStreamChoiceTypedDict + from .chatstreamchunk import ( + ChatStreamChunk, + ChatStreamChunkObject, + ChatStreamChunkTypedDict, + Error, + ErrorTypedDict, + ) + from .chatstreamdelta import ( + ChatStreamDelta, + ChatStreamDeltaRole, + ChatStreamDeltaTypedDict, + ) + from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict + from .chatstreamtoolcall import ( + ChatStreamToolCall, + ChatStreamToolCallFunction, + ChatStreamToolCallFunctionTypedDict, + ChatStreamToolCallType, + ChatStreamToolCallTypedDict, + ) + from .chatsystemmessage import ( + ChatSystemMessage, + ChatSystemMessageContent, + ChatSystemMessageContentTypedDict, + ChatSystemMessageRole, + ChatSystemMessageTypedDict, + ) + from .chattokenlogprob import ( + ChatTokenLogprob, + ChatTokenLogprobTopLogprob, + ChatTokenLogprobTopLogprobTypedDict, + ChatTokenLogprobTypedDict, + ) + from .chattokenlogprobs import ChatTokenLogprobs, ChatTokenLogprobsTypedDict + from .chattoolcall import ( + ChatToolCall, + ChatToolCallFunction, + ChatToolCallFunctionTypedDict, + ChatToolCallType, + ChatToolCallTypedDict, + ) + from .chattoolchoice import ( + ChatToolChoice, + ChatToolChoiceAuto, + ChatToolChoiceNone, + ChatToolChoiceRequired, + ChatToolChoiceTypedDict, + ) + from .chattoolmessage import ( + ChatToolMessage, + ChatToolMessageContent, + ChatToolMessageContentTypedDict, + ChatToolMessageRole, + ChatToolMessageTypedDict, + ) + from .chatusage import ( + ChatUsage, + ChatUsageTypedDict, CompletionTokensDetails, CompletionTokensDetailsTypedDict, PromptTokensDetails, PromptTokensDetailsTypedDict, ) - from .chatmessagecontentitem import ( - ChatMessageContentItem, - ChatMessageContentItem1, - ChatMessageContentItem1TypedDict, - ChatMessageContentItemTypedDict, + from .chatusermessage import ( + ChatUserMessage, + ChatUserMessageContent, + ChatUserMessageContentTypedDict, + ChatUserMessageRole, + ChatUserMessageTypedDict, ) - from .chatmessagecontentitemaudio import ( - ChatMessageContentItemAudio, - ChatMessageContentItemAudioInputAudio, - ChatMessageContentItemAudioInputAudioTypedDict, - ChatMessageContentItemAudioType, - ChatMessageContentItemAudioTypedDict, + from .chatwebsearchservertool import ( + ChatWebSearchServerTool, + ChatWebSearchServerToolEngine, + ChatWebSearchServerToolParameters, + ChatWebSearchServerToolParametersType, + ChatWebSearchServerToolParametersTypedDict, + ChatWebSearchServerToolSearchContextSize, + ChatWebSearchServerToolTypeOpenrouterWebSearch, + ChatWebSearchServerToolTypedDict, + ChatWebSearchServerToolUserLocation, + ChatWebSearchServerToolUserLocationTypedDict, ) - from .chatmessagecontentitemcachecontrol import ( - ChatMessageContentItemCacheControl, - ChatMessageContentItemCacheControlType, - ChatMessageContentItemCacheControlTypedDict, - TTL, + from .chatwebsearchshorthand import ( + ChatWebSearchShorthand, + ChatWebSearchShorthandEngine, + ChatWebSearchShorthandParameters, + ChatWebSearchShorthandParametersEngine, + ChatWebSearchShorthandParametersSearchContextSize, + ChatWebSearchShorthandParametersType, + ChatWebSearchShorthandParametersTypedDict, + ChatWebSearchShorthandParametersUserLocation, + ChatWebSearchShorthandParametersUserLocationTypedDict, + ChatWebSearchShorthandSearchContextSize, + ChatWebSearchShorthandType, + ChatWebSearchShorthandTypeApproximate, + ChatWebSearchShorthandTypedDict, + ChatWebSearchShorthandUserLocation, + ChatWebSearchShorthandUserLocationTypedDict, ) - from .chatmessagecontentitemimage import ( - ChatMessageContentItemImage, - ChatMessageContentItemImageDetail, - ChatMessageContentItemImageImageURL, - ChatMessageContentItemImageImageURLTypedDict, - ChatMessageContentItemImageType, - ChatMessageContentItemImageTypedDict, + from .codeinterpreterservertool import ( + CodeInterpreterServerTool, + CodeInterpreterServerToolTypedDict, + Container, + ContainerAuto, + ContainerAutoTypedDict, + ContainerType, + ContainerTypedDict, + MemoryLimit, + TypeCodeInterpreter, ) - from .chatmessagecontentitemtext import ( - ChatMessageContentItemText, - ChatMessageContentItemTextType, - ChatMessageContentItemTextTypedDict, + from .codexlocalshelltool import ( + CodexLocalShellTool, + CodexLocalShellToolType, + CodexLocalShellToolTypedDict, ) - from .chatmessagecontentitemvideo import ( - ChatMessageContentItemVideo, - ChatMessageContentItemVideoType, - ChatMessageContentItemVideoTypedDict, + from .compoundfilter import ( + CompoundFilter, + CompoundFilterType, + CompoundFilterTypedDict, ) - from .chatmessagecontentitemvideolegacy import ( - ChatMessageContentItemVideoLegacy, - ChatMessageContentItemVideoLegacyType, - ChatMessageContentItemVideoLegacyTypedDict, + from .computeruseservertool import ( + ComputerUseServerTool, + ComputerUseServerToolType, + ComputerUseServerToolTypedDict, + Environment, ) - from .chatmessagetokenlogprob import ( - ChatMessageTokenLogprob, - ChatMessageTokenLogprobTopLogprob, - ChatMessageTokenLogprobTopLogprobTypedDict, - ChatMessageTokenLogprobTypedDict, + from .conflictresponseerrordata import ( + ConflictResponseErrorData, + ConflictResponseErrorDataTypedDict, ) - from .chatmessagetokenlogprobs import ( - ChatMessageTokenLogprobs, - ChatMessageTokenLogprobsTypedDict, + from .contentpartaddedevent import ( + ContentPartAddedEvent, + ContentPartAddedEventPart, + ContentPartAddedEventPartTypedDict, + ContentPartAddedEventType, + ContentPartAddedEventTypedDict, ) - from .chatmessagetoolcall import ( - ChatMessageToolCall, - ChatMessageToolCallFunction, - ChatMessageToolCallFunctionTypedDict, - ChatMessageToolCallType, - ChatMessageToolCallTypedDict, + from .contentpartdoneevent import ( + ContentPartDoneEvent, + ContentPartDoneEventPart, + ContentPartDoneEventPartTypedDict, + ContentPartDoneEventType, + ContentPartDoneEventTypedDict, ) - from .chatresponse import ChatResponse, ChatResponseObject, ChatResponseTypedDict - from .chatresponsechoice import ChatResponseChoice, ChatResponseChoiceTypedDict - from .chatstreamingchoice import ChatStreamingChoice, ChatStreamingChoiceTypedDict - from .chatstreamingmessagechunk import ( - ChatStreamingMessageChunk, - ChatStreamingMessageChunkRole, - ChatStreamingMessageChunkTypedDict, - ) - from .chatstreamingmessagetoolcall import ( - ChatStreamingMessageToolCall, - ChatStreamingMessageToolCallFunction, - ChatStreamingMessageToolCallFunctionTypedDict, - ChatStreamingMessageToolCallType, - ChatStreamingMessageToolCallTypedDict, - ) - from .chatstreamingresponsechunk import ( - ChatStreamingResponseChunk, - ChatStreamingResponseChunkObject, - ChatStreamingResponseChunkTypedDict, - Error, - ErrorTypedDict, - ) - from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict + from .contextcompressionengine import ContextCompressionEngine from .createchargerequest import ( ChainID, CreateChargeRequest, CreateChargeRequestTypedDict, ) + from .customtool import ( + CustomTool, + CustomToolTypedDict, + Format, + FormatGrammar, + FormatGrammarTypedDict, + FormatText, + FormatTextTypedDict, + FormatTypeGrammar, + FormatTypeText, + FormatTypedDict, + Syntax, + TypeCustom, + ) from .datacollection import DataCollection - from .debugoptions import DebugOptions, DebugOptionsTypedDict + from .datetimeservertool import ( + DatetimeServerTool, + DatetimeServerToolParameters, + DatetimeServerToolParametersTypedDict, + DatetimeServerToolType, + DatetimeServerToolTypedDict, + ) from .defaultparameters import DefaultParameters, DefaultParametersTypedDict - from .developermessage import ( - DeveloperMessage, - DeveloperMessageContent, - DeveloperMessageContentTypedDict, - DeveloperMessageRole, - DeveloperMessageTypedDict, + from .easyinputmessage import ( + EasyInputMessage, + EasyInputMessageContentInputImage, + EasyInputMessageContentInputImageTypedDict, + EasyInputMessageContentType, + EasyInputMessageContentUnion1, + EasyInputMessageContentUnion1TypedDict, + EasyInputMessageContentUnion2, + EasyInputMessageContentUnion2TypedDict, + EasyInputMessageDetail, + EasyInputMessagePhaseCommentary, + EasyInputMessagePhaseFinalAnswer, + EasyInputMessagePhaseUnion, + EasyInputMessagePhaseUnionTypedDict, + EasyInputMessageRoleAssistant, + EasyInputMessageRoleDeveloper, + EasyInputMessageRoleSystem, + EasyInputMessageRoleUnion, + EasyInputMessageRoleUnionTypedDict, + EasyInputMessageRoleUser, + EasyInputMessageTypeMessage, + EasyInputMessageTypedDict, ) from .edgenetworktimeoutresponseerrordata import ( EdgeNetworkTimeoutResponseErrorData, EdgeNetworkTimeoutResponseErrorDataTypedDict, ) from .endpointstatus import EndpointStatus + from .errorevent import ErrorEvent, ErrorEventType, ErrorEventTypedDict from .filecitation import FileCitation, FileCitationType, FileCitationTypedDict from .filepath import FilePath, FilePathType, FilePathTypedDict + from .filesearchservertool import ( + FileSearchServerTool, + FileSearchServerToolFilters, + FileSearchServerToolFiltersTypedDict, + FileSearchServerToolTypedDict, + Filters, + FiltersType, + FiltersTypedDict, + Ranker, + RankingOptions, + RankingOptionsTypedDict, + TypeFileSearch, + Value1, + Value1TypedDict, + Value2, + Value2TypedDict, + ) from .forbiddenresponseerrordata import ( ForbiddenResponseErrorData, ForbiddenResponseErrorDataTypedDict, ) + from .formatjsonobjectconfig import ( + FormatJSONObjectConfig, + FormatJSONObjectConfigType, + FormatJSONObjectConfigTypedDict, + ) + from .formatjsonschemaconfig import ( + FormatJSONSchemaConfig, + FormatJSONSchemaConfigType, + FormatJSONSchemaConfigTypedDict, + ) + from .formats import Formats, FormatsTypedDict + from .formattextconfig import ( + FormatTextConfig, + FormatTextConfigType, + FormatTextConfigTypedDict, + ) + from .functioncallargsdeltaevent import ( + FunctionCallArgsDeltaEvent, + FunctionCallArgsDeltaEventType, + FunctionCallArgsDeltaEventTypedDict, + ) + from .functioncallargsdoneevent import ( + FunctionCallArgsDoneEvent, + FunctionCallArgsDoneEventType, + FunctionCallArgsDoneEventTypedDict, + ) + from .functioncallitem import ( + FunctionCallItem, + FunctionCallItemType, + FunctionCallItemTypedDict, + ) + from .functioncalloutputitem import ( + FunctionCallOutputItem, + FunctionCallOutputItemDetail, + FunctionCallOutputItemOutputUnion1, + FunctionCallOutputItemOutputUnion1TypedDict, + FunctionCallOutputItemOutputUnion2, + FunctionCallOutputItemOutputUnion2TypedDict, + FunctionCallOutputItemTypeFunctionCallOutput, + FunctionCallOutputItemTypedDict, + OutputInputImage, + OutputInputImageTypedDict, + OutputType, + ) + from .imagegencallcompletedevent import ( + ImageGenCallCompletedEvent, + ImageGenCallCompletedEventType, + ImageGenCallCompletedEventTypedDict, + ) + from .imagegencallgeneratingevent import ( + ImageGenCallGeneratingEvent, + ImageGenCallGeneratingEventType, + ImageGenCallGeneratingEventTypedDict, + ) + from .imagegencallinprogressevent import ( + ImageGenCallInProgressEvent, + ImageGenCallInProgressEventType, + ImageGenCallInProgressEventTypedDict, + ) + from .imagegencallpartialimageevent import ( + ImageGenCallPartialImageEvent, + ImageGenCallPartialImageEventType, + ImageGenCallPartialImageEventTypedDict, + ) + from .imagegenerationservertool import ( + Background, + ImageGenerationServerTool, + ImageGenerationServerToolType, + ImageGenerationServerToolTypedDict, + InputFidelity, + InputImageMask, + InputImageMaskTypedDict, + ModelEnum, + Moderation, + OutputFormat, + Quality, + Size, + ) from .imagegenerationstatus import ImageGenerationStatus + from .incompletedetails import IncompleteDetails, IncompleteDetailsTypedDict, Reason + from .inputaudio import ( + InputAudio, + InputAudioFormat, + InputAudioInputAudio, + InputAudioInputAudioTypedDict, + InputAudioType, + InputAudioTypedDict, + ) + from .inputfile import InputFile, InputFileType, InputFileTypedDict + from .inputimage import ( + InputImage, + InputImageDetail, + InputImageType, + InputImageTypedDict, + ) + from .inputmessageitem import ( + InputMessageItem, + InputMessageItemContentInputImage, + InputMessageItemContentInputImageTypedDict, + InputMessageItemContentType, + InputMessageItemContentUnion, + InputMessageItemContentUnionTypedDict, + InputMessageItemDetail, + InputMessageItemRoleDeveloper, + InputMessageItemRoleSystem, + InputMessageItemRoleUnion, + InputMessageItemRoleUnionTypedDict, + InputMessageItemRoleUser, + InputMessageItemTypeMessage, + InputMessageItemTypedDict, + ) from .inputmodality import InputModality + from .inputs_union import ( + InputsContent1, + InputsContent1TypedDict, + InputsContent2, + InputsContent2TypedDict, + InputsFormat, + InputsMessage, + InputsMessageTypedDict, + InputsPhaseCommentary, + InputsPhaseFinalAnswer, + InputsPhaseUnion, + InputsPhaseUnionTypedDict, + InputsReasoning, + InputsReasoningTypedDict, + InputsRole, + InputsStatusCompleted1, + InputsStatusCompleted2, + InputsStatusInProgress1, + InputsStatusInProgress2, + InputsStatusIncomplete1, + InputsStatusIncomplete2, + InputsStatusUnion1, + InputsStatusUnion1TypedDict, + InputsStatusUnion2, + InputsStatusUnion2TypedDict, + InputsTypeMessage, + InputsTypeReasoning, + InputsUnion, + InputsUnion1, + InputsUnion1TypedDict, + InputsUnionTypedDict, + ) + from .inputtext import InputText, InputTextType, InputTextTypedDict + from .inputvideo import InputVideo, InputVideoType, InputVideoTypedDict from .instructtype import InstructType from .internalserverresponseerrordata import ( InternalServerResponseErrorData, InternalServerResponseErrorDataTypedDict, ) - from .jsonschemaconfig import JSONSchemaConfig, JSONSchemaConfigTypedDict + from .legacy_chatcontentvideo import ( + LegacyChatContentVideo, + LegacyChatContentVideoType, + LegacyChatContentVideoTypedDict, + ) + from .legacy_websearchservertool import ( + LegacyWebSearchServerTool, + LegacyWebSearchServerToolEngine, + LegacyWebSearchServerToolFilters, + LegacyWebSearchServerToolFiltersTypedDict, + LegacyWebSearchServerToolType, + LegacyWebSearchServerToolTypedDict, + ) from .listendpointsresponse import ( Architecture, ArchitectureTypedDict, @@ -214,7 +643,22 @@ if TYPE_CHECKING: ListEndpointsResponseTypedDict, Tokenizer, ) - from .message import Message, MessageTypedDict + from .mcpservertool import ( + AllowedTools, + AllowedToolsTypedDict, + Always, + AlwaysTypedDict, + ConnectorID, + McpServerTool, + McpServerToolType, + McpServerToolTypedDict, + Never, + NeverTypedDict, + RequireApproval, + RequireApprovalAlways, + RequireApprovalNever, + RequireApprovalTypedDict, + ) from .model import Model, ModelTypedDict from .modelarchitecture import ( ModelArchitecture, @@ -229,13 +673,6 @@ if TYPE_CHECKING: ModelsCountResponseTypedDict, ) from .modelslistresponse import ModelsListResponse, ModelsListResponseTypedDict - from .namedtoolchoice import ( - NamedToolChoice, - NamedToolChoiceFunction, - NamedToolChoiceFunctionTypedDict, - NamedToolChoiceType, - NamedToolChoiceTypedDict, - ) from .notfoundresponseerrordata import ( NotFoundResponseErrorData, NotFoundResponseErrorDataTypedDict, @@ -244,65 +681,12 @@ if TYPE_CHECKING: OpenAIResponsesAnnotation, OpenAIResponsesAnnotationTypedDict, ) - from .openairesponsesincludable import OpenAIResponsesIncludable - from .openairesponsesincompletedetails import ( - OpenAIResponsesIncompleteDetails, - OpenAIResponsesIncompleteDetailsTypedDict, - Reason, - ) - from .openairesponsesinput_union import ( - OpenAIResponsesInputContent1, - OpenAIResponsesInputContent1TypedDict, - OpenAIResponsesInputContent2, - OpenAIResponsesInputContent2TypedDict, - OpenAIResponsesInputContent3, - OpenAIResponsesInputContent3TypedDict, - OpenAIResponsesInputFunctionCall, - OpenAIResponsesInputFunctionCallOutput, - OpenAIResponsesInputFunctionCallOutputTypedDict, - OpenAIResponsesInputFunctionCallTypedDict, - OpenAIResponsesInputMessage1, - OpenAIResponsesInputMessage1TypedDict, - OpenAIResponsesInputMessage2, - OpenAIResponsesInputMessage2TypedDict, - OpenAIResponsesInputRoleAssistant, - OpenAIResponsesInputRoleDeveloper1, - OpenAIResponsesInputRoleDeveloper2, - OpenAIResponsesInputRoleSystem1, - OpenAIResponsesInputRoleSystem2, - OpenAIResponsesInputRoleUnion1, - OpenAIResponsesInputRoleUnion1TypedDict, - OpenAIResponsesInputRoleUnion2, - OpenAIResponsesInputRoleUnion2TypedDict, - OpenAIResponsesInputRoleUser1, - OpenAIResponsesInputRoleUser2, - OpenAIResponsesInputTypeFunctionCall, - OpenAIResponsesInputTypeFunctionCallOutput, - OpenAIResponsesInputTypeMessage1, - OpenAIResponsesInputTypeMessage2, - OpenAIResponsesInputUnion, - OpenAIResponsesInputUnion1, - OpenAIResponsesInputUnion1TypedDict, - OpenAIResponsesInputUnionTypedDict, - ) - from .openairesponsesprompt import ( - OpenAIResponsesPrompt, - OpenAIResponsesPromptTypedDict, - Variables, - VariablesTypedDict, - ) - from .openairesponsesreasoningconfig import ( - OpenAIResponsesReasoningConfig, - OpenAIResponsesReasoningConfigTypedDict, - ) - from .openairesponsesreasoningeffort import OpenAIResponsesReasoningEffort from .openairesponsesrefusalcontent import ( OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContentType, OpenAIResponsesRefusalContentTypedDict, ) from .openairesponsesresponsestatus import OpenAIResponsesResponseStatus - from .openairesponsesservicetier import OpenAIResponsesServiceTier from .openairesponsestoolchoice_union import ( OpenAIResponsesToolChoice, OpenAIResponsesToolChoiceAuto, @@ -320,291 +704,56 @@ if TYPE_CHECKING: TypeTypedDict, ) from .openairesponsestruncation import OpenAIResponsesTruncation - from .openresponseseasyinputmessage import ( - OpenResponsesEasyInputMessage, - OpenResponsesEasyInputMessageContentInputImage, - OpenResponsesEasyInputMessageContentInputImageTypedDict, - OpenResponsesEasyInputMessageContentType, - OpenResponsesEasyInputMessageContentUnion1, - OpenResponsesEasyInputMessageContentUnion1TypedDict, - OpenResponsesEasyInputMessageContentUnion2, - OpenResponsesEasyInputMessageContentUnion2TypedDict, - OpenResponsesEasyInputMessageDetail, - OpenResponsesEasyInputMessageRoleAssistant, - OpenResponsesEasyInputMessageRoleDeveloper, - OpenResponsesEasyInputMessageRoleSystem, - OpenResponsesEasyInputMessageRoleUnion, - OpenResponsesEasyInputMessageRoleUnionTypedDict, - OpenResponsesEasyInputMessageRoleUser, - OpenResponsesEasyInputMessageTypeMessage, - OpenResponsesEasyInputMessageTypedDict, + from .openresponsesresult import ( + OpenResponsesResult, + OpenResponsesResultObject, + OpenResponsesResultToolFunction, + OpenResponsesResultToolFunctionTypedDict, + OpenResponsesResultToolUnion, + OpenResponsesResultToolUnionTypedDict, + OpenResponsesResultType, + OpenResponsesResultTypedDict, ) - from .openresponseserrorevent import ( - OpenResponsesErrorEvent, - OpenResponsesErrorEventType, - OpenResponsesErrorEventTypedDict, + from .outputdatetimeitem import ( + OutputDatetimeItem, + OutputDatetimeItemStatus, + OutputDatetimeItemType, + OutputDatetimeItemTypedDict, ) - from .openresponsesfunctioncalloutput import ( - OpenResponsesFunctionCallOutput, - OpenResponsesFunctionCallOutputType, - OpenResponsesFunctionCallOutputTypedDict, + from .outputfilesearchcallitem import ( + OutputFileSearchCallItem, + OutputFileSearchCallItemType, + OutputFileSearchCallItemTypedDict, ) - from .openresponsesfunctiontoolcall import ( - OpenResponsesFunctionToolCall, - OpenResponsesFunctionToolCallType, - OpenResponsesFunctionToolCallTypedDict, + from .outputfunctioncallitem import ( + OutputFunctionCallItem, + OutputFunctionCallItemStatusCompleted, + OutputFunctionCallItemStatusInProgress, + OutputFunctionCallItemStatusIncomplete, + OutputFunctionCallItemStatusUnion, + OutputFunctionCallItemStatusUnionTypedDict, + OutputFunctionCallItemType, + OutputFunctionCallItemTypedDict, ) - from .openresponsesimagegencallcompleted import ( - OpenResponsesImageGenCallCompleted, - OpenResponsesImageGenCallCompletedType, - OpenResponsesImageGenCallCompletedTypedDict, - ) - from .openresponsesimagegencallgenerating import ( - OpenResponsesImageGenCallGenerating, - OpenResponsesImageGenCallGeneratingType, - OpenResponsesImageGenCallGeneratingTypedDict, - ) - from .openresponsesimagegencallinprogress import ( - OpenResponsesImageGenCallInProgress, - OpenResponsesImageGenCallInProgressType, - OpenResponsesImageGenCallInProgressTypedDict, - ) - from .openresponsesimagegencallpartialimage import ( - OpenResponsesImageGenCallPartialImage, - OpenResponsesImageGenCallPartialImageType, - OpenResponsesImageGenCallPartialImageTypedDict, - ) - from .openresponsesinput import ( - OpenResponsesInput, - OpenResponsesInput1, - OpenResponsesInput1TypedDict, - OpenResponsesInputTypedDict, - ) - from .openresponsesinputmessageitem import ( - OpenResponsesInputMessageItem, - OpenResponsesInputMessageItemContentInputImage, - OpenResponsesInputMessageItemContentInputImageTypedDict, - OpenResponsesInputMessageItemContentType, - OpenResponsesInputMessageItemContentUnion, - OpenResponsesInputMessageItemContentUnionTypedDict, - OpenResponsesInputMessageItemDetail, - OpenResponsesInputMessageItemRoleDeveloper, - OpenResponsesInputMessageItemRoleSystem, - OpenResponsesInputMessageItemRoleUnion, - OpenResponsesInputMessageItemRoleUnionTypedDict, - OpenResponsesInputMessageItemRoleUser, - OpenResponsesInputMessageItemTypeMessage, - OpenResponsesInputMessageItemTypedDict, - ) - from .openresponseslogprobs import ( - OpenResponsesLogProbs, - OpenResponsesLogProbsTypedDict, - ) - from .openresponsesnonstreamingresponse import ( - OpenResponsesNonStreamingResponse, - OpenResponsesNonStreamingResponseObject, - OpenResponsesNonStreamingResponseToolFunction, - OpenResponsesNonStreamingResponseToolFunctionTypedDict, - OpenResponsesNonStreamingResponseToolUnion, - OpenResponsesNonStreamingResponseToolUnionTypedDict, - OpenResponsesNonStreamingResponseType, - OpenResponsesNonStreamingResponseTypedDict, - ) - from .openresponsesreasoning import ( - OpenResponsesReasoning, - OpenResponsesReasoningFormat, - OpenResponsesReasoningStatusCompleted, - OpenResponsesReasoningStatusInProgress, - OpenResponsesReasoningStatusIncomplete, - OpenResponsesReasoningStatusUnion, - OpenResponsesReasoningStatusUnionTypedDict, - OpenResponsesReasoningType, - OpenResponsesReasoningTypedDict, - ) - from .openresponsesreasoningconfig import ( - OpenResponsesReasoningConfig, - OpenResponsesReasoningConfigTypedDict, - ) - from .openresponsesreasoningdeltaevent import ( - OpenResponsesReasoningDeltaEvent, - OpenResponsesReasoningDeltaEventType, - OpenResponsesReasoningDeltaEventTypedDict, - ) - from .openresponsesreasoningdoneevent import ( - OpenResponsesReasoningDoneEvent, - OpenResponsesReasoningDoneEventType, - OpenResponsesReasoningDoneEventTypedDict, - ) - from .openresponsesreasoningsummarypartaddedevent import ( - OpenResponsesReasoningSummaryPartAddedEvent, - OpenResponsesReasoningSummaryPartAddedEventType, - OpenResponsesReasoningSummaryPartAddedEventTypedDict, - ) - from .openresponsesreasoningsummarytextdeltaevent import ( - OpenResponsesReasoningSummaryTextDeltaEvent, - OpenResponsesReasoningSummaryTextDeltaEventType, - OpenResponsesReasoningSummaryTextDeltaEventTypedDict, - ) - from .openresponsesreasoningsummarytextdoneevent import ( - OpenResponsesReasoningSummaryTextDoneEvent, - OpenResponsesReasoningSummaryTextDoneEventType, - OpenResponsesReasoningSummaryTextDoneEventTypedDict, - ) - from .openresponsesrequest import ( - OpenResponsesRequest, - OpenResponsesRequestIDAutoRouter, - OpenResponsesRequestIDFileParser, - OpenResponsesRequestIDModeration, - OpenResponsesRequestIDResponseHealing, - OpenResponsesRequestIDWeb, - OpenResponsesRequestIgnore, - OpenResponsesRequestIgnoreTypedDict, - OpenResponsesRequestImageConfig, - OpenResponsesRequestImageConfigTypedDict, - OpenResponsesRequestMaxPrice, - OpenResponsesRequestMaxPriceTypedDict, - OpenResponsesRequestOnly, - OpenResponsesRequestOnlyTypedDict, - OpenResponsesRequestOrder, - OpenResponsesRequestOrderTypedDict, - OpenResponsesRequestPluginAutoRouter, - OpenResponsesRequestPluginAutoRouterTypedDict, - OpenResponsesRequestPluginFileParser, - OpenResponsesRequestPluginFileParserTypedDict, - OpenResponsesRequestPluginModeration, - OpenResponsesRequestPluginModerationTypedDict, - OpenResponsesRequestPluginResponseHealing, - OpenResponsesRequestPluginResponseHealingTypedDict, - OpenResponsesRequestPluginUnion, - OpenResponsesRequestPluginUnionTypedDict, - OpenResponsesRequestPluginWeb, - OpenResponsesRequestPluginWebTypedDict, - OpenResponsesRequestProvider, - OpenResponsesRequestProviderTypedDict, - OpenResponsesRequestSort, - OpenResponsesRequestSortTypedDict, - OpenResponsesRequestToolFunction, - OpenResponsesRequestToolFunctionTypedDict, - OpenResponsesRequestToolUnion, - OpenResponsesRequestToolUnionTypedDict, - OpenResponsesRequestTrace, - OpenResponsesRequestTraceTypedDict, - OpenResponsesRequestType, - OpenResponsesRequestTypedDict, - ServiceTier, - Truncation, - ) - from .openresponsesresponsetext import ( - OpenResponsesResponseText, - OpenResponsesResponseTextTypedDict, - OpenResponsesResponseTextVerbosity, - ) - from .openresponsesstreamevent import ( - OpenResponsesStreamEvent, - OpenResponsesStreamEventResponseCompleted, - OpenResponsesStreamEventResponseCompletedTypedDict, - OpenResponsesStreamEventResponseContentPartAdded, - OpenResponsesStreamEventResponseContentPartAddedTypedDict, - OpenResponsesStreamEventResponseContentPartDone, - OpenResponsesStreamEventResponseContentPartDoneTypedDict, - OpenResponsesStreamEventResponseCreated, - OpenResponsesStreamEventResponseCreatedTypedDict, - OpenResponsesStreamEventResponseFailed, - OpenResponsesStreamEventResponseFailedTypedDict, - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta, - OpenResponsesStreamEventResponseFunctionCallArgumentsDeltaTypedDict, - OpenResponsesStreamEventResponseFunctionCallArgumentsDone, - OpenResponsesStreamEventResponseFunctionCallArgumentsDoneTypedDict, - OpenResponsesStreamEventResponseInProgress, - OpenResponsesStreamEventResponseInProgressTypedDict, - OpenResponsesStreamEventResponseIncomplete, - OpenResponsesStreamEventResponseIncompleteTypedDict, - OpenResponsesStreamEventResponseOutputItemAdded, - OpenResponsesStreamEventResponseOutputItemAddedTypedDict, - OpenResponsesStreamEventResponseOutputItemDone, - OpenResponsesStreamEventResponseOutputItemDoneTypedDict, - OpenResponsesStreamEventResponseOutputTextAnnotationAdded, - OpenResponsesStreamEventResponseOutputTextAnnotationAddedTypedDict, - OpenResponsesStreamEventResponseOutputTextDelta, - OpenResponsesStreamEventResponseOutputTextDeltaTypedDict, - OpenResponsesStreamEventResponseOutputTextDone, - OpenResponsesStreamEventResponseOutputTextDoneTypedDict, - OpenResponsesStreamEventResponseReasoningSummaryPartDone, - OpenResponsesStreamEventResponseReasoningSummaryPartDoneTypedDict, - OpenResponsesStreamEventResponseRefusalDelta, - OpenResponsesStreamEventResponseRefusalDeltaTypedDict, - OpenResponsesStreamEventResponseRefusalDone, - OpenResponsesStreamEventResponseRefusalDoneTypedDict, - OpenResponsesStreamEventTypedDict, - Part1, - Part1TypedDict, - Part2, - Part2TypedDict, - TypeResponseCompleted, - TypeResponseContentPartAdded, - TypeResponseContentPartDone, - TypeResponseCreated, - TypeResponseFailed, - TypeResponseFunctionCallArgumentsDelta, - TypeResponseFunctionCallArgumentsDone, - TypeResponseInProgress, - TypeResponseIncomplete, - TypeResponseOutputItemAdded, - TypeResponseOutputItemDone, - TypeResponseOutputTextAnnotationAdded, - TypeResponseOutputTextDelta, - TypeResponseOutputTextDone, - TypeResponseReasoningSummaryPartDone, - TypeResponseRefusalDelta, - TypeResponseRefusalDone, - ) - from .openresponsestoplogprobs import ( - OpenResponsesTopLogprobs, - OpenResponsesTopLogprobsTypedDict, - ) - from .openresponsesusage import ( - CostDetails, - CostDetailsTypedDict, - InputTokensDetails, - InputTokensDetailsTypedDict, - OpenResponsesUsage, - OpenResponsesUsageTypedDict, - OutputTokensDetails, - OutputTokensDetailsTypedDict, - ) - from .openresponseswebsearch20250826tool import ( - OpenResponsesWebSearch20250826Tool, - OpenResponsesWebSearch20250826ToolFilters, - OpenResponsesWebSearch20250826ToolFiltersTypedDict, - OpenResponsesWebSearch20250826ToolType, - OpenResponsesWebSearch20250826ToolTypedDict, - ) - from .openresponseswebsearchpreview20250311tool import ( - OpenResponsesWebSearchPreview20250311Tool, - OpenResponsesWebSearchPreview20250311ToolType, - OpenResponsesWebSearchPreview20250311ToolTypedDict, - ) - from .openresponseswebsearchpreviewtool import ( - OpenResponsesWebSearchPreviewTool, - OpenResponsesWebSearchPreviewToolType, - OpenResponsesWebSearchPreviewToolTypedDict, - ) - from .openresponseswebsearchtool import ( - OpenResponsesWebSearchTool, - OpenResponsesWebSearchToolFilters, - OpenResponsesWebSearchToolFiltersTypedDict, - OpenResponsesWebSearchToolType, - OpenResponsesWebSearchToolTypedDict, + from .outputimagegenerationcallitem import ( + OutputImageGenerationCallItem, + OutputImageGenerationCallItemType, + OutputImageGenerationCallItemTypedDict, ) from .outputitemimagegenerationcall import ( OutputItemImageGenerationCall, OutputItemImageGenerationCallType, OutputItemImageGenerationCallTypedDict, ) + from .outputitems import OutputItems, OutputItemsTypedDict from .outputmessage import ( OutputMessage, OutputMessageContent, OutputMessageContentTypedDict, + OutputMessagePhaseCommentary, + OutputMessagePhaseFinalAnswer, + OutputMessagePhaseUnion, + OutputMessagePhaseUnionTypedDict, OutputMessageRole, OutputMessageStatusCompleted, OutputMessageStatusInProgress, @@ -614,7 +763,60 @@ if TYPE_CHECKING: OutputMessageType, OutputMessageTypedDict, ) + from .outputmessageitem import ( + OutputMessageItem, + OutputMessageItemContent, + OutputMessageItemContentTypedDict, + OutputMessageItemPhaseCommentary, + OutputMessageItemPhaseFinalAnswer, + OutputMessageItemPhaseUnion, + OutputMessageItemPhaseUnionTypedDict, + OutputMessageItemRole, + OutputMessageItemStatusCompleted, + OutputMessageItemStatusInProgress, + OutputMessageItemStatusIncomplete, + OutputMessageItemStatusUnion, + OutputMessageItemStatusUnionTypedDict, + OutputMessageItemType, + OutputMessageItemTypedDict, + ) from .outputmodality import OutputModality + from .outputmodalityenum import OutputModalityEnum + from .outputreasoningitem import ( + OutputReasoningItem, + OutputReasoningItemFormat, + OutputReasoningItemStatusCompleted, + OutputReasoningItemStatusInProgress, + OutputReasoningItemStatusIncomplete, + OutputReasoningItemStatusUnion, + OutputReasoningItemStatusUnionTypedDict, + OutputReasoningItemType, + OutputReasoningItemTypedDict, + ) + from .outputservertoolitem import ( + OutputServerToolItem, + OutputServerToolItemStatus, + OutputServerToolItemTypedDict, + ) + from .outputwebsearchcallitem import ( + Action, + ActionFindInPage, + ActionFindInPageTypedDict, + ActionOpenPage, + ActionOpenPageTypedDict, + ActionSearch, + ActionSearchTypedDict, + ActionTypedDict, + OutputWebSearchCallItem, + OutputWebSearchCallItemTypedDict, + Source, + SourceTypedDict, + TypeFindInPage, + TypeOpenPage, + TypeSearch, + TypeURL, + TypeWebSearchCall, + ) from .parameter import Parameter from .payloadtoolargeresponseerrordata import ( PayloadTooLargeResponseErrorData, @@ -624,7 +826,12 @@ if TYPE_CHECKING: PaymentRequiredResponseErrorData, PaymentRequiredResponseErrorDataTypedDict, ) - from .pdfparserengine import PDFParserEngine + from .pdfparserengine import ( + PDFParserEngine, + PDFParserEngineEnum, + PDFParserEnginePDFText, + PDFParserEngineTypedDict, + ) from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict from .percentilelatencycutoffs import ( PercentileLatencyCutoffs, @@ -641,6 +848,27 @@ if TYPE_CHECKING: PreferredMinThroughput, PreferredMinThroughputTypedDict, ) + from .preview_20250311_websearchservertool import ( + Preview20250311WebSearchServerTool, + Preview20250311WebSearchServerToolEngine, + Preview20250311WebSearchServerToolFilters, + Preview20250311WebSearchServerToolFiltersTypedDict, + Preview20250311WebSearchServerToolType, + Preview20250311WebSearchServerToolTypedDict, + ) + from .preview_websearchservertool import ( + PreviewWebSearchServerTool, + PreviewWebSearchServerToolEngine, + PreviewWebSearchServerToolFilters, + PreviewWebSearchServerToolFiltersTypedDict, + PreviewWebSearchServerToolType, + PreviewWebSearchServerToolTypedDict, + ) + from .preview_websearchuserlocation import ( + PreviewWebSearchUserLocation, + PreviewWebSearchUserLocationType, + PreviewWebSearchUserLocationTypedDict, + ) from .providername import ProviderName from .provideroverloadedresponseerrordata import ( ProviderOverloadedResponseErrorData, @@ -685,6 +913,12 @@ if TYPE_CHECKING: ) from .publicpricing import PublicPricing, PublicPricingTypedDict from .quantization import Quantization + from .reasoningconfig import ReasoningConfig, ReasoningConfigTypedDict + from .reasoningdeltaevent import ( + ReasoningDeltaEvent, + ReasoningDeltaEventType, + ReasoningDeltaEventTypedDict, + ) from .reasoningdetailencrypted import ( ReasoningDetailEncrypted, ReasoningDetailEncryptedFormat, @@ -707,83 +941,73 @@ if TYPE_CHECKING: ReasoningDetailUnion, ReasoningDetailUnionTypedDict, ) + from .reasoningdoneevent import ( + ReasoningDoneEvent, + ReasoningDoneEventType, + ReasoningDoneEventTypedDict, + ) + from .reasoningeffortenum import ReasoningEffortEnum + from .reasoningitem import ( + ReasoningItem, + ReasoningItemFormat, + ReasoningItemStatusCompleted, + ReasoningItemStatusInProgress, + ReasoningItemStatusIncomplete, + ReasoningItemStatusUnion, + ReasoningItemStatusUnionTypedDict, + ReasoningItemType, + ReasoningItemTypedDict, + ) + from .reasoningsummarypartaddedevent import ( + ReasoningSummaryPartAddedEvent, + ReasoningSummaryPartAddedEventType, + ReasoningSummaryPartAddedEventTypedDict, + ) + from .reasoningsummarypartdoneevent import ( + ReasoningSummaryPartDoneEvent, + ReasoningSummaryPartDoneEventType, + ReasoningSummaryPartDoneEventTypedDict, + ) from .reasoningsummarytext import ( ReasoningSummaryText, ReasoningSummaryTextType, ReasoningSummaryTextTypedDict, ) - from .reasoningsummaryverbosity import ReasoningSummaryVerbosity + from .reasoningsummarytextdeltaevent import ( + ReasoningSummaryTextDeltaEvent, + ReasoningSummaryTextDeltaEventType, + ReasoningSummaryTextDeltaEventTypedDict, + ) + from .reasoningsummarytextdoneevent import ( + ReasoningSummaryTextDoneEvent, + ReasoningSummaryTextDoneEventType, + ReasoningSummaryTextDoneEventTypedDict, + ) + from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum from .reasoningtextcontent import ( ReasoningTextContent, ReasoningTextContentType, ReasoningTextContentTypedDict, ) + from .refusaldeltaevent import ( + RefusalDeltaEvent, + RefusalDeltaEventType, + RefusalDeltaEventTypedDict, + ) + from .refusaldoneevent import ( + RefusalDoneEvent, + RefusalDoneEventType, + RefusalDoneEventTypedDict, + ) from .requesttimeoutresponseerrordata import ( RequestTimeoutResponseErrorData, RequestTimeoutResponseErrorDataTypedDict, ) - from .responseformatjsonobject import ( - ResponseFormatJSONObject, - ResponseFormatJSONObjectType, - ResponseFormatJSONObjectTypedDict, - ) - from .responseformatjsonschema import ( - ResponseFormatJSONSchema, - ResponseFormatJSONSchemaType, - ResponseFormatJSONSchemaTypedDict, - ) - from .responseformattext import ( - ResponseFormatText, - ResponseFormatTextType, - ResponseFormatTextTypedDict, - ) - from .responseformattextconfig import ( - ResponseFormatTextConfig, - ResponseFormatTextConfigTypedDict, - ) - from .responseformattextgrammar import ( - ResponseFormatTextGrammar, - ResponseFormatTextGrammarType, - ResponseFormatTextGrammarTypedDict, - ) - from .responseformattextpython import ( - ResponseFormatTextPython, - ResponseFormatTextPythonType, - ResponseFormatTextPythonTypedDict, - ) - from .responseinputaudio import ( - ResponseInputAudio, - ResponseInputAudioFormat, - ResponseInputAudioInputAudio, - ResponseInputAudioInputAudioTypedDict, - ResponseInputAudioType, - ResponseInputAudioTypedDict, - ) - from .responseinputfile import ( - ResponseInputFile, - ResponseInputFileType, - ResponseInputFileTypedDict, - ) - from .responseinputimage import ( - ResponseInputImage, - ResponseInputImageDetail, - ResponseInputImageType, - ResponseInputImageTypedDict, - ) - from .responseinputtext import ( - ResponseInputText, - ResponseInputTextType, - ResponseInputTextTypedDict, - ) - from .responseinputvideo import ( - ResponseInputVideo, - ResponseInputVideoType, - ResponseInputVideoTypedDict, - ) + from .responseincludesenum import ResponseIncludesEnum from .responseoutputtext import ( - Logprob, - LogprobTypedDict, ResponseOutputText, + ResponseOutputTextLogprob, + ResponseOutputTextLogprobTypedDict, ResponseOutputTextTopLogprob, ResponseOutputTextTopLogprobTypedDict, ResponseOutputTextType, @@ -794,117 +1018,125 @@ if TYPE_CHECKING: ResponsesErrorField, ResponsesErrorFieldTypedDict, ) - from .responsesformattext import ( - ResponsesFormatText, - ResponsesFormatTextType, - ResponsesFormatTextTypedDict, - ) - from .responsesformattextjsonschemaconfig import ( - ResponsesFormatTextJSONSchemaConfig, - ResponsesFormatTextJSONSchemaConfigType, - ResponsesFormatTextJSONSchemaConfigTypedDict, - ) - from .responsesimagegenerationcall import ( - ResponsesImageGenerationCall, - ResponsesImageGenerationCallType, - ResponsesImageGenerationCallTypedDict, - ) - from .responsesoutputitem import ResponsesOutputItem, ResponsesOutputItemTypedDict - from .responsesoutputitemfilesearchcall import ( - ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCallType, - ResponsesOutputItemFileSearchCallTypedDict, - ) - from .responsesoutputitemfunctioncall import ( - ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCallStatusCompleted, - ResponsesOutputItemFunctionCallStatusInProgress, - ResponsesOutputItemFunctionCallStatusIncomplete, - ResponsesOutputItemFunctionCallStatusUnion, - ResponsesOutputItemFunctionCallStatusUnionTypedDict, - ResponsesOutputItemFunctionCallType, - ResponsesOutputItemFunctionCallTypedDict, - ) - from .responsesoutputitemreasoning import ( - ResponsesOutputItemReasoning, - ResponsesOutputItemReasoningFormat, - ResponsesOutputItemReasoningStatusCompleted, - ResponsesOutputItemReasoningStatusInProgress, - ResponsesOutputItemReasoningStatusIncomplete, - ResponsesOutputItemReasoningStatusUnion, - ResponsesOutputItemReasoningStatusUnionTypedDict, - ResponsesOutputItemReasoningType, - ResponsesOutputItemReasoningTypedDict, - ) - from .responsesoutputmessage import ( - ResponsesOutputMessage, - ResponsesOutputMessageContent, - ResponsesOutputMessageContentTypedDict, - ResponsesOutputMessageRole, - ResponsesOutputMessageStatusCompleted, - ResponsesOutputMessageStatusInProgress, - ResponsesOutputMessageStatusIncomplete, - ResponsesOutputMessageStatusUnion, - ResponsesOutputMessageStatusUnionTypedDict, - ResponsesOutputMessageType, - ResponsesOutputMessageTypedDict, - ) - from .responsesoutputmodality import ResponsesOutputModality - from .responsessearchcontextsize import ResponsesSearchContextSize - from .responseswebsearchcalloutput import ( - ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutputType, - ResponsesWebSearchCallOutputTypedDict, - ) - from .responseswebsearchuserlocation import ( - ResponsesWebSearchUserLocation, - ResponsesWebSearchUserLocationType, - ResponsesWebSearchUserLocationTypedDict, - ) - from .responsetextconfig import ( - ResponseTextConfig, - ResponseTextConfigTypedDict, - ResponseTextConfigVerbosity, + from .responsesrequest import ( + ResponsesRequest, + ResponsesRequestIDAutoRouter, + ResponsesRequestIDContextCompression, + ResponsesRequestIDFileParser, + ResponsesRequestIDModeration, + ResponsesRequestIDResponseHealing, + ResponsesRequestIDWeb, + ResponsesRequestIgnore, + ResponsesRequestIgnoreTypedDict, + ResponsesRequestImageConfig, + ResponsesRequestImageConfigTypedDict, + ResponsesRequestMaxPrice, + ResponsesRequestMaxPriceTypedDict, + ResponsesRequestOnly, + ResponsesRequestOnlyTypedDict, + ResponsesRequestOrder, + ResponsesRequestOrderTypedDict, + ResponsesRequestPluginAutoRouter, + ResponsesRequestPluginAutoRouterTypedDict, + ResponsesRequestPluginContextCompression, + ResponsesRequestPluginContextCompressionTypedDict, + ResponsesRequestPluginFileParser, + ResponsesRequestPluginFileParserTypedDict, + ResponsesRequestPluginModeration, + ResponsesRequestPluginModerationTypedDict, + ResponsesRequestPluginResponseHealing, + ResponsesRequestPluginResponseHealingTypedDict, + ResponsesRequestPluginUnion, + ResponsesRequestPluginUnionTypedDict, + ResponsesRequestPluginWeb, + ResponsesRequestPluginWebTypedDict, + ResponsesRequestProvider, + ResponsesRequestProviderTypedDict, + ResponsesRequestServiceTier, + ResponsesRequestSort, + ResponsesRequestSortTypedDict, + ResponsesRequestToolFunction, + ResponsesRequestToolFunctionTypedDict, + ResponsesRequestToolUnion, + ResponsesRequestToolUnionTypedDict, + ResponsesRequestTrace, + ResponsesRequestTraceTypedDict, + ResponsesRequestType, + ResponsesRequestTypedDict, ) + from .searchcontextsizeenum import SearchContextSizeEnum from .security import Security, SecurityTypedDict from .serviceunavailableresponseerrordata import ( ServiceUnavailableResponseErrorData, ServiceUnavailableResponseErrorDataTypedDict, ) - from .systemmessage import ( - SystemMessage, - SystemMessageContent, - SystemMessageContentTypedDict, - SystemMessageRole, - SystemMessageTypedDict, + from .shellservertool import ( + ShellServerTool, + ShellServerToolType, + ShellServerToolTypedDict, ) - from .toolcallstatus import ToolCallStatus - from .toolchoiceoption import ( - ToolChoiceOption, - ToolChoiceOptionAuto, - ToolChoiceOptionNone, - ToolChoiceOptionRequired, - ToolChoiceOptionTypedDict, + from .storedprompttemplate import ( + StoredPromptTemplate, + StoredPromptTemplateTypedDict, + Variables, + VariablesTypedDict, ) - from .tooldefinitionjson import ( - ToolDefinitionJSON, - ToolDefinitionJSONFunction, - ToolDefinitionJSONFunctionTypedDict, - ToolDefinitionJSONType, - ToolDefinitionJSONTypedDict, + from .streamevents import ( + StreamEvents, + StreamEventsResponseCompleted, + StreamEventsResponseCompletedTypedDict, + StreamEventsResponseCreated, + StreamEventsResponseCreatedTypedDict, + StreamEventsResponseFailed, + StreamEventsResponseFailedTypedDict, + StreamEventsResponseInProgress, + StreamEventsResponseInProgressTypedDict, + StreamEventsResponseIncomplete, + StreamEventsResponseIncompleteTypedDict, + StreamEventsResponseOutputItemAdded, + StreamEventsResponseOutputItemAddedTypedDict, + StreamEventsResponseOutputItemDone, + StreamEventsResponseOutputItemDoneTypedDict, + StreamEventsTypedDict, + TypeResponseCompleted, + TypeResponseCreated, + TypeResponseFailed, + TypeResponseInProgress, + TypeResponseIncomplete, + TypeResponseOutputItemAdded, + TypeResponseOutputItemDone, ) - from .toolresponsemessage import ( - ToolResponseMessage, - ToolResponseMessageContent, - ToolResponseMessageContentTypedDict, - ToolResponseMessageRole, - ToolResponseMessageTypedDict, + from .textconfig import TextConfig, TextConfigTypedDict, TextConfigVerbosity + from .textdeltaevent import ( + TextDeltaEvent, + TextDeltaEventLogprob, + TextDeltaEventLogprobTypedDict, + TextDeltaEventTopLogprob, + TextDeltaEventTopLogprobTypedDict, + TextDeltaEventType, + TextDeltaEventTypedDict, ) + from .textdoneevent import ( + TextDoneEvent, + TextDoneEventLogprob, + TextDoneEventLogprobTypedDict, + TextDoneEventTopLogprob, + TextDoneEventTopLogprobTypedDict, + TextDoneEventType, + TextDoneEventTypedDict, + ) + from .textextendedconfig import ( + TextExtendedConfig, + TextExtendedConfigTypedDict, + TextExtendedConfigVerbosity, + ) + from .toolcallstatusenum import ToolCallStatusEnum from .toomanyrequestsresponseerrordata import ( TooManyRequestsResponseErrorData, TooManyRequestsResponseErrorDataTypedDict, ) from .topproviderinfo import TopProviderInfo, TopProviderInfoTypedDict + from .truncationenum import TruncationEnum from .unauthorizedresponseerrordata import ( UnauthorizedResponseErrorData, UnauthorizedResponseErrorDataTypedDict, @@ -914,261 +1146,596 @@ if TYPE_CHECKING: UnprocessableEntityResponseErrorDataTypedDict, ) from .urlcitation import URLCitation, URLCitationType, URLCitationTypedDict - from .usermessage import ( - UserMessage, - UserMessageContent, - UserMessageContentTypedDict, - UserMessageRole, - UserMessageTypedDict, + from .usage import ( + CostDetails, + CostDetailsTypedDict, + InputTokensDetails, + InputTokensDetailsTypedDict, + OutputTokensDetails, + OutputTokensDetailsTypedDict, + Usage, + UsageTypedDict, + ) + from .websearchcallcompletedevent import ( + WebSearchCallCompletedEvent, + WebSearchCallCompletedEventType, + WebSearchCallCompletedEventTypedDict, + ) + from .websearchcallinprogressevent import ( + WebSearchCallInProgressEvent, + WebSearchCallInProgressEventType, + WebSearchCallInProgressEventTypedDict, + ) + from .websearchcallsearchingevent import ( + WebSearchCallSearchingEvent, + WebSearchCallSearchingEventType, + WebSearchCallSearchingEventTypedDict, ) - from .videoinput import VideoInput, VideoInputTypedDict from .websearchengine import WebSearchEngine - from .websearchpreviewtooluserlocation import ( - WebSearchPreviewToolUserLocation, - WebSearchPreviewToolUserLocationType, - WebSearchPreviewToolUserLocationTypedDict, + from .websearchservertool import ( + WebSearchServerTool, + WebSearchServerToolEngine, + WebSearchServerToolFilters, + WebSearchServerToolFiltersTypedDict, + WebSearchServerToolType, + WebSearchServerToolTypedDict, + ) + from .websearchservertool_openrouter import ( + WebSearchServerToolOpenRouter, + WebSearchServerToolOpenRouterParameters, + WebSearchServerToolOpenRouterParametersTypedDict, + WebSearchServerToolOpenRouterType, + WebSearchServerToolOpenRouterTypedDict, ) from .websearchstatus import WebSearchStatus + from .websearchuserlocation import ( + WebSearchUserLocation, + WebSearchUserLocationType, + WebSearchUserLocationTypedDict, + ) __all__ = [ + "Action", + "ActionFindInPage", + "ActionFindInPageTypedDict", + "ActionOpenPage", + "ActionOpenPageTypedDict", + "ActionSearch", + "ActionSearchTypedDict", + "ActionTypedDict", "ActivityItem", "ActivityItemTypedDict", + "AllowedTools", + "AllowedToolsTypedDict", + "Always", + "AlwaysTypedDict", + "AnnotationAddedEvent", + "AnnotationAddedEventType", + "AnnotationAddedEventTypedDict", + "ApplyPatchServerTool", + "ApplyPatchServerToolType", + "ApplyPatchServerToolTypedDict", "Architecture", "ArchitectureTypedDict", - "AssistantMessage", - "AssistantMessageContent", - "AssistantMessageContentTypedDict", - "AssistantMessageImages", - "AssistantMessageImagesImageURL", - "AssistantMessageImagesImageURLTypedDict", - "AssistantMessageImagesTypedDict", - "AssistantMessageRole", - "AssistantMessageTypedDict", + "Background", "BadGatewayResponseErrorData", "BadGatewayResponseErrorDataTypedDict", "BadRequestResponseErrorData", "BadRequestResponseErrorDataTypedDict", + "BaseInputsContent1", + "BaseInputsContent1TypedDict", + "BaseInputsContent2", + "BaseInputsContent2TypedDict", + "BaseInputsContent3", + "BaseInputsContent3TypedDict", + "BaseInputsFunctionCall", + "BaseInputsFunctionCallOutput", + "BaseInputsFunctionCallOutputTypedDict", + "BaseInputsFunctionCallTypedDict", + "BaseInputsMessage1", + "BaseInputsMessage1TypedDict", + "BaseInputsMessage2", + "BaseInputsMessage2TypedDict", + "BaseInputsOutput1", + "BaseInputsOutput1TypedDict", + "BaseInputsOutput2", + "BaseInputsOutput2TypedDict", + "BaseInputsPhaseCommentary", + "BaseInputsPhaseFinalAnswer", + "BaseInputsPhaseUnion", + "BaseInputsPhaseUnionTypedDict", + "BaseInputsRoleAssistant", + "BaseInputsRoleDeveloper1", + "BaseInputsRoleDeveloper2", + "BaseInputsRoleSystem1", + "BaseInputsRoleSystem2", + "BaseInputsRoleUnion1", + "BaseInputsRoleUnion1TypedDict", + "BaseInputsRoleUnion2", + "BaseInputsRoleUnion2TypedDict", + "BaseInputsRoleUser1", + "BaseInputsRoleUser2", + "BaseInputsTypeFunctionCall", + "BaseInputsTypeFunctionCallOutput", + "BaseInputsTypeMessage1", + "BaseInputsTypeMessage2", + "BaseInputsUnion", + "BaseInputsUnion1", + "BaseInputsUnion1TypedDict", + "BaseInputsUnionTypedDict", + "BaseReasoningConfig", + "BaseReasoningConfigTypedDict", "By", + "CacheControl", + "CacheControlTypedDict", "ChainID", - "ChatCompletionFinishReason", - "ChatGenerationParams", - "ChatGenerationParamsBy", - "ChatGenerationParamsIDAutoRouter", - "ChatGenerationParamsIDFileParser", - "ChatGenerationParamsIDModeration", - "ChatGenerationParamsIDResponseHealing", - "ChatGenerationParamsIDWeb", - "ChatGenerationParamsIgnore", - "ChatGenerationParamsIgnoreTypedDict", - "ChatGenerationParamsImageConfig", - "ChatGenerationParamsImageConfigTypedDict", - "ChatGenerationParamsMaxPrice", - "ChatGenerationParamsMaxPriceTypedDict", - "ChatGenerationParamsOnly", - "ChatGenerationParamsOnlyTypedDict", - "ChatGenerationParamsOrder", - "ChatGenerationParamsOrderTypedDict", - "ChatGenerationParamsPartition", - "ChatGenerationParamsPluginAutoRouter", - "ChatGenerationParamsPluginAutoRouterTypedDict", - "ChatGenerationParamsPluginFileParser", - "ChatGenerationParamsPluginFileParserTypedDict", - "ChatGenerationParamsPluginModeration", - "ChatGenerationParamsPluginModerationTypedDict", - "ChatGenerationParamsPluginResponseHealing", - "ChatGenerationParamsPluginResponseHealingTypedDict", - "ChatGenerationParamsPluginUnion", - "ChatGenerationParamsPluginUnionTypedDict", - "ChatGenerationParamsPluginWeb", - "ChatGenerationParamsPluginWebTypedDict", - "ChatGenerationParamsProvider", - "ChatGenerationParamsProviderSort", - "ChatGenerationParamsProviderSortConfig", - "ChatGenerationParamsProviderSortConfigEnum", - "ChatGenerationParamsProviderSortConfigTypedDict", - "ChatGenerationParamsProviderSortConfigUnion", - "ChatGenerationParamsProviderSortConfigUnionTypedDict", - "ChatGenerationParamsProviderTypedDict", - "ChatGenerationParamsSortEnum", - "ChatGenerationParamsSortUnion", - "ChatGenerationParamsSortUnionTypedDict", - "ChatGenerationParamsTrace", - "ChatGenerationParamsTraceTypedDict", - "ChatGenerationParamsTypedDict", - "ChatGenerationTokenUsage", - "ChatGenerationTokenUsageTypedDict", - "ChatMessageContentItem", - "ChatMessageContentItem1", - "ChatMessageContentItem1TypedDict", - "ChatMessageContentItemAudio", - "ChatMessageContentItemAudioInputAudio", - "ChatMessageContentItemAudioInputAudioTypedDict", - "ChatMessageContentItemAudioType", - "ChatMessageContentItemAudioTypedDict", - "ChatMessageContentItemCacheControl", - "ChatMessageContentItemCacheControlType", - "ChatMessageContentItemCacheControlTypedDict", - "ChatMessageContentItemImage", - "ChatMessageContentItemImageDetail", - "ChatMessageContentItemImageImageURL", - "ChatMessageContentItemImageImageURLTypedDict", - "ChatMessageContentItemImageType", - "ChatMessageContentItemImageTypedDict", - "ChatMessageContentItemText", - "ChatMessageContentItemTextType", - "ChatMessageContentItemTextTypedDict", - "ChatMessageContentItemTypedDict", - "ChatMessageContentItemVideo", - "ChatMessageContentItemVideoLegacy", - "ChatMessageContentItemVideoLegacyType", - "ChatMessageContentItemVideoLegacyTypedDict", - "ChatMessageContentItemVideoType", - "ChatMessageContentItemVideoTypedDict", - "ChatMessageTokenLogprob", - "ChatMessageTokenLogprobTopLogprob", - "ChatMessageTokenLogprobTopLogprobTypedDict", - "ChatMessageTokenLogprobTypedDict", - "ChatMessageTokenLogprobs", - "ChatMessageTokenLogprobsTypedDict", - "ChatMessageToolCall", - "ChatMessageToolCallFunction", - "ChatMessageToolCallFunctionTypedDict", - "ChatMessageToolCallType", - "ChatMessageToolCallTypedDict", - "ChatResponse", - "ChatResponseChoice", - "ChatResponseChoiceTypedDict", - "ChatResponseObject", - "ChatResponseTypedDict", + "ChatAssistantImages", + "ChatAssistantImagesImageURL", + "ChatAssistantImagesImageURLTypedDict", + "ChatAssistantImagesTypedDict", + "ChatAssistantMessage", + "ChatAssistantMessageContent", + "ChatAssistantMessageContentTypedDict", + "ChatAssistantMessageRole", + "ChatAssistantMessageTypedDict", + "ChatAudioOutput", + "ChatAudioOutputTypedDict", + "ChatChoice", + "ChatChoiceTypedDict", + "ChatContentAudio", + "ChatContentAudioInputAudio", + "ChatContentAudioInputAudioTypedDict", + "ChatContentAudioType", + "ChatContentAudioTypedDict", + "ChatContentCacheControl", + "ChatContentCacheControlTTL", + "ChatContentCacheControlType", + "ChatContentCacheControlTypedDict", + "ChatContentFile", + "ChatContentFileType", + "ChatContentFileTypedDict", + "ChatContentImage", + "ChatContentImageDetail", + "ChatContentImageImageURL", + "ChatContentImageImageURLTypedDict", + "ChatContentImageType", + "ChatContentImageTypedDict", + "ChatContentItems", + "ChatContentItems1", + "ChatContentItems1TypedDict", + "ChatContentItemsTypedDict", + "ChatContentText", + "ChatContentTextType", + "ChatContentTextTypedDict", + "ChatContentVideo", + "ChatContentVideoInput", + "ChatContentVideoInputTypedDict", + "ChatContentVideoType", + "ChatContentVideoTypedDict", + "ChatDebugOptions", + "ChatDebugOptionsTypedDict", + "ChatDeveloperMessage", + "ChatDeveloperMessageContent", + "ChatDeveloperMessageContentTypedDict", + "ChatDeveloperMessageRole", + "ChatDeveloperMessageTypedDict", + "ChatFinishReasonEnum", + "ChatFormatGrammarConfig", + "ChatFormatGrammarConfigType", + "ChatFormatGrammarConfigTypedDict", + "ChatFormatJSONSchemaConfig", + "ChatFormatJSONSchemaConfigType", + "ChatFormatJSONSchemaConfigTypedDict", + "ChatFormatPythonConfig", + "ChatFormatPythonConfigType", + "ChatFormatPythonConfigTypedDict", + "ChatFormatTextConfig", + "ChatFormatTextConfigType", + "ChatFormatTextConfigTypedDict", + "ChatFunctionTool", + "ChatFunctionToolFunction", + "ChatFunctionToolFunctionFunction", + "ChatFunctionToolFunctionFunctionTypedDict", + "ChatFunctionToolFunctionTypedDict", + "ChatFunctionToolType", + "ChatFunctionToolTypedDict", + "ChatJSONSchemaConfig", + "ChatJSONSchemaConfigTypedDict", + "ChatMessages", + "ChatMessagesTypedDict", + "ChatNamedToolChoice", + "ChatNamedToolChoiceFunction", + "ChatNamedToolChoiceFunctionTypedDict", + "ChatNamedToolChoiceType", + "ChatNamedToolChoiceTypedDict", + "ChatReasoningSummaryVerbosityEnum", + "ChatRequest", + "ChatRequestBy", + "ChatRequestIDAutoRouter", + "ChatRequestIDContextCompression", + "ChatRequestIDFileParser", + "ChatRequestIDModeration", + "ChatRequestIDResponseHealing", + "ChatRequestIDWeb", + "ChatRequestIgnore", + "ChatRequestIgnoreTypedDict", + "ChatRequestImageConfig", + "ChatRequestImageConfigTypedDict", + "ChatRequestMaxPrice", + "ChatRequestMaxPriceTypedDict", + "ChatRequestOnly", + "ChatRequestOnlyTypedDict", + "ChatRequestOrder", + "ChatRequestOrderTypedDict", + "ChatRequestPartition", + "ChatRequestPluginAutoRouter", + "ChatRequestPluginAutoRouterTypedDict", + "ChatRequestPluginContextCompression", + "ChatRequestPluginContextCompressionTypedDict", + "ChatRequestPluginFileParser", + "ChatRequestPluginFileParserTypedDict", + "ChatRequestPluginModeration", + "ChatRequestPluginModerationTypedDict", + "ChatRequestPluginResponseHealing", + "ChatRequestPluginResponseHealingTypedDict", + "ChatRequestPluginUnion", + "ChatRequestPluginUnionTypedDict", + "ChatRequestPluginWeb", + "ChatRequestPluginWebTypedDict", + "ChatRequestProvider", + "ChatRequestProviderSort", + "ChatRequestProviderSortConfig", + "ChatRequestProviderSortConfigEnum", + "ChatRequestProviderSortConfigTypedDict", + "ChatRequestProviderSortConfigUnion", + "ChatRequestProviderSortConfigUnionTypedDict", + "ChatRequestProviderTypedDict", + "ChatRequestServiceTier", + "ChatRequestSortEnum", + "ChatRequestSortUnion", + "ChatRequestSortUnionTypedDict", + "ChatRequestTTL", + "ChatRequestTrace", + "ChatRequestTraceTypedDict", + "ChatRequestType", + "ChatRequestTypedDict", + "ChatResult", + "ChatResultObject", + "ChatResultTypedDict", + "ChatStreamChoice", + "ChatStreamChoiceTypedDict", + "ChatStreamChunk", + "ChatStreamChunkObject", + "ChatStreamChunkTypedDict", + "ChatStreamDelta", + "ChatStreamDeltaRole", + "ChatStreamDeltaTypedDict", "ChatStreamOptions", "ChatStreamOptionsTypedDict", - "ChatStreamingChoice", - "ChatStreamingChoiceTypedDict", - "ChatStreamingMessageChunk", - "ChatStreamingMessageChunkRole", - "ChatStreamingMessageChunkTypedDict", - "ChatStreamingMessageToolCall", - "ChatStreamingMessageToolCallFunction", - "ChatStreamingMessageToolCallFunctionTypedDict", - "ChatStreamingMessageToolCallType", - "ChatStreamingMessageToolCallTypedDict", - "ChatStreamingResponseChunk", - "ChatStreamingResponseChunkObject", - "ChatStreamingResponseChunkTypedDict", + "ChatStreamToolCall", + "ChatStreamToolCallFunction", + "ChatStreamToolCallFunctionTypedDict", + "ChatStreamToolCallType", + "ChatStreamToolCallTypedDict", + "ChatSystemMessage", + "ChatSystemMessageContent", + "ChatSystemMessageContentTypedDict", + "ChatSystemMessageRole", + "ChatSystemMessageTypedDict", + "ChatTokenLogprob", + "ChatTokenLogprobTopLogprob", + "ChatTokenLogprobTopLogprobTypedDict", + "ChatTokenLogprobTypedDict", + "ChatTokenLogprobs", + "ChatTokenLogprobsTypedDict", + "ChatToolCall", + "ChatToolCallFunction", + "ChatToolCallFunctionTypedDict", + "ChatToolCallType", + "ChatToolCallTypedDict", + "ChatToolChoice", + "ChatToolChoiceAuto", + "ChatToolChoiceNone", + "ChatToolChoiceRequired", + "ChatToolChoiceTypedDict", + "ChatToolMessage", + "ChatToolMessageContent", + "ChatToolMessageContentTypedDict", + "ChatToolMessageRole", + "ChatToolMessageTypedDict", + "ChatUsage", + "ChatUsageTypedDict", + "ChatUserMessage", + "ChatUserMessageContent", + "ChatUserMessageContentTypedDict", + "ChatUserMessageRole", + "ChatUserMessageTypedDict", + "ChatWebSearchServerTool", + "ChatWebSearchServerToolEngine", + "ChatWebSearchServerToolParameters", + "ChatWebSearchServerToolParametersType", + "ChatWebSearchServerToolParametersTypedDict", + "ChatWebSearchServerToolSearchContextSize", + "ChatWebSearchServerToolTypeOpenrouterWebSearch", + "ChatWebSearchServerToolTypedDict", + "ChatWebSearchServerToolUserLocation", + "ChatWebSearchServerToolUserLocationTypedDict", + "ChatWebSearchShorthand", + "ChatWebSearchShorthandEngine", + "ChatWebSearchShorthandParameters", + "ChatWebSearchShorthandParametersEngine", + "ChatWebSearchShorthandParametersSearchContextSize", + "ChatWebSearchShorthandParametersType", + "ChatWebSearchShorthandParametersTypedDict", + "ChatWebSearchShorthandParametersUserLocation", + "ChatWebSearchShorthandParametersUserLocationTypedDict", + "ChatWebSearchShorthandSearchContextSize", + "ChatWebSearchShorthandType", + "ChatWebSearchShorthandTypeApproximate", + "ChatWebSearchShorthandTypedDict", + "ChatWebSearchShorthandUserLocation", + "ChatWebSearchShorthandUserLocationTypedDict", "Code", + "CodeInterpreterServerTool", + "CodeInterpreterServerToolTypedDict", + "CodexLocalShellTool", + "CodexLocalShellToolType", + "CodexLocalShellToolTypedDict", "CompletionTokensDetails", "CompletionTokensDetailsTypedDict", + "CompoundFilter", + "CompoundFilterType", + "CompoundFilterTypedDict", + "ComputerUseServerTool", + "ComputerUseServerToolType", + "ComputerUseServerToolTypedDict", + "ConflictResponseErrorData", + "ConflictResponseErrorDataTypedDict", + "ConnectorID", + "Container", + "ContainerAuto", + "ContainerAutoTypedDict", + "ContainerType", + "ContainerTypedDict", + "ContentPartAddedEvent", + "ContentPartAddedEventPart", + "ContentPartAddedEventPartTypedDict", + "ContentPartAddedEventType", + "ContentPartAddedEventTypedDict", + "ContentPartDoneEvent", + "ContentPartDoneEventPart", + "ContentPartDoneEventPartTypedDict", + "ContentPartDoneEventType", + "ContentPartDoneEventTypedDict", + "ContextCompressionEngine", "CostDetails", "CostDetailsTypedDict", "CreateChargeRequest", "CreateChargeRequestTypedDict", + "CustomTool", + "CustomToolTypedDict", "Data", "DataCollection", "DataTypedDict", - "DebugOptions", - "DebugOptionsTypedDict", + "DatetimeServerTool", + "DatetimeServerToolParameters", + "DatetimeServerToolParametersTypedDict", + "DatetimeServerToolType", + "DatetimeServerToolTypedDict", "DefaultParameters", "DefaultParametersTypedDict", - "DeveloperMessage", - "DeveloperMessageContent", - "DeveloperMessageContentTypedDict", - "DeveloperMessageRole", - "DeveloperMessageTypedDict", + "EasyInputMessage", + "EasyInputMessageContentInputImage", + "EasyInputMessageContentInputImageTypedDict", + "EasyInputMessageContentType", + "EasyInputMessageContentUnion1", + "EasyInputMessageContentUnion1TypedDict", + "EasyInputMessageContentUnion2", + "EasyInputMessageContentUnion2TypedDict", + "EasyInputMessageDetail", + "EasyInputMessagePhaseCommentary", + "EasyInputMessagePhaseFinalAnswer", + "EasyInputMessagePhaseUnion", + "EasyInputMessagePhaseUnionTypedDict", + "EasyInputMessageRoleAssistant", + "EasyInputMessageRoleDeveloper", + "EasyInputMessageRoleSystem", + "EasyInputMessageRoleUnion", + "EasyInputMessageRoleUnionTypedDict", + "EasyInputMessageRoleUser", + "EasyInputMessageTypeMessage", + "EasyInputMessageTypedDict", "EdgeNetworkTimeoutResponseErrorData", "EdgeNetworkTimeoutResponseErrorDataTypedDict", "Effort", "EndpointStatus", + "Environment", "Error", + "ErrorEvent", + "ErrorEventType", + "ErrorEventTypedDict", "ErrorTypedDict", + "File", "FileCitation", "FileCitationType", "FileCitationTypedDict", "FilePath", "FilePathType", "FilePathTypedDict", + "FileSearchServerTool", + "FileSearchServerToolFilters", + "FileSearchServerToolFiltersTypedDict", + "FileSearchServerToolTypedDict", + "FileTypedDict", + "Filters", + "FiltersType", + "FiltersTypedDict", "ForbiddenResponseErrorData", "ForbiddenResponseErrorDataTypedDict", + "Format", + "FormatGrammar", + "FormatGrammarTypedDict", + "FormatJSONObjectConfig", + "FormatJSONObjectConfigType", + "FormatJSONObjectConfigTypedDict", + "FormatJSONSchemaConfig", + "FormatJSONSchemaConfigType", + "FormatJSONSchemaConfigTypedDict", + "FormatText", + "FormatTextConfig", + "FormatTextConfigType", + "FormatTextConfigTypedDict", + "FormatTextTypedDict", + "FormatTypeGrammar", + "FormatTypeText", + "FormatTypedDict", + "Formats", + "FormatsTypedDict", + "FunctionCallArgsDeltaEvent", + "FunctionCallArgsDeltaEventType", + "FunctionCallArgsDeltaEventTypedDict", + "FunctionCallArgsDoneEvent", + "FunctionCallArgsDoneEventType", + "FunctionCallArgsDoneEventTypedDict", + "FunctionCallItem", + "FunctionCallItemType", + "FunctionCallItemTypedDict", + "FunctionCallOutputItem", + "FunctionCallOutputItemDetail", + "FunctionCallOutputItemOutputUnion1", + "FunctionCallOutputItemOutputUnion1TypedDict", + "FunctionCallOutputItemOutputUnion2", + "FunctionCallOutputItemOutputUnion2TypedDict", + "FunctionCallOutputItemTypeFunctionCallOutput", + "FunctionCallOutputItemTypedDict", + "ImageGenCallCompletedEvent", + "ImageGenCallCompletedEventType", + "ImageGenCallCompletedEventTypedDict", + "ImageGenCallGeneratingEvent", + "ImageGenCallGeneratingEventType", + "ImageGenCallGeneratingEventTypedDict", + "ImageGenCallInProgressEvent", + "ImageGenCallInProgressEventType", + "ImageGenCallInProgressEventTypedDict", + "ImageGenCallPartialImageEvent", + "ImageGenCallPartialImageEventType", + "ImageGenCallPartialImageEventTypedDict", + "ImageGenerationServerTool", + "ImageGenerationServerToolType", + "ImageGenerationServerToolTypedDict", "ImageGenerationStatus", + "IncompleteDetails", + "IncompleteDetailsTypedDict", + "InputAudio", + "InputAudioFormat", + "InputAudioInputAudio", + "InputAudioInputAudioTypedDict", + "InputAudioType", + "InputAudioTypedDict", + "InputFidelity", + "InputFile", + "InputFileType", + "InputFileTypedDict", + "InputImage", + "InputImageDetail", + "InputImageMask", + "InputImageMaskTypedDict", + "InputImageType", + "InputImageTypedDict", + "InputMessageItem", + "InputMessageItemContentInputImage", + "InputMessageItemContentInputImageTypedDict", + "InputMessageItemContentType", + "InputMessageItemContentUnion", + "InputMessageItemContentUnionTypedDict", + "InputMessageItemDetail", + "InputMessageItemRoleDeveloper", + "InputMessageItemRoleSystem", + "InputMessageItemRoleUnion", + "InputMessageItemRoleUnionTypedDict", + "InputMessageItemRoleUser", + "InputMessageItemTypeMessage", + "InputMessageItemTypedDict", "InputModality", + "InputText", + "InputTextType", + "InputTextTypedDict", "InputTokensDetails", "InputTokensDetailsTypedDict", + "InputVideo", + "InputVideoType", + "InputVideoTypedDict", + "InputsContent1", + "InputsContent1TypedDict", + "InputsContent2", + "InputsContent2TypedDict", + "InputsFormat", + "InputsMessage", + "InputsMessageTypedDict", + "InputsPhaseCommentary", + "InputsPhaseFinalAnswer", + "InputsPhaseUnion", + "InputsPhaseUnionTypedDict", + "InputsReasoning", + "InputsReasoningTypedDict", + "InputsRole", + "InputsStatusCompleted1", + "InputsStatusCompleted2", + "InputsStatusInProgress1", + "InputsStatusInProgress2", + "InputsStatusIncomplete1", + "InputsStatusIncomplete2", + "InputsStatusUnion1", + "InputsStatusUnion1TypedDict", + "InputsStatusUnion2", + "InputsStatusUnion2TypedDict", + "InputsTypeMessage", + "InputsTypeReasoning", + "InputsUnion", + "InputsUnion1", + "InputsUnion1TypedDict", + "InputsUnionTypedDict", "InstructType", "InternalServerResponseErrorData", "InternalServerResponseErrorDataTypedDict", - "JSONSchemaConfig", - "JSONSchemaConfigTypedDict", + "LegacyChatContentVideo", + "LegacyChatContentVideoType", + "LegacyChatContentVideoTypedDict", + "LegacyWebSearchServerTool", + "LegacyWebSearchServerToolEngine", + "LegacyWebSearchServerToolFilters", + "LegacyWebSearchServerToolFiltersTypedDict", + "LegacyWebSearchServerToolType", + "LegacyWebSearchServerToolTypedDict", "ListEndpointsResponse", "ListEndpointsResponseTypedDict", - "Logprob", - "LogprobTypedDict", - "Message", - "MessageTypedDict", + "McpServerTool", + "McpServerToolType", + "McpServerToolTypedDict", + "MemoryLimit", "Modality", "Model", "ModelArchitecture", "ModelArchitectureInstructType", "ModelArchitectureTypedDict", + "ModelEnum", "ModelGroup", "ModelTypedDict", "ModelsCountResponse", "ModelsCountResponseTypedDict", "ModelsListResponse", "ModelsListResponseTypedDict", - "NamedToolChoice", - "NamedToolChoiceFunction", - "NamedToolChoiceFunctionTypedDict", - "NamedToolChoiceType", - "NamedToolChoiceTypedDict", + "Moderation", + "Never", + "NeverTypedDict", "NotFoundResponseErrorData", "NotFoundResponseErrorDataTypedDict", "OpenAIResponsesAnnotation", "OpenAIResponsesAnnotationTypedDict", - "OpenAIResponsesIncludable", - "OpenAIResponsesIncompleteDetails", - "OpenAIResponsesIncompleteDetailsTypedDict", - "OpenAIResponsesInputContent1", - "OpenAIResponsesInputContent1TypedDict", - "OpenAIResponsesInputContent2", - "OpenAIResponsesInputContent2TypedDict", - "OpenAIResponsesInputContent3", - "OpenAIResponsesInputContent3TypedDict", - "OpenAIResponsesInputFunctionCall", - "OpenAIResponsesInputFunctionCallOutput", - "OpenAIResponsesInputFunctionCallOutputTypedDict", - "OpenAIResponsesInputFunctionCallTypedDict", - "OpenAIResponsesInputMessage1", - "OpenAIResponsesInputMessage1TypedDict", - "OpenAIResponsesInputMessage2", - "OpenAIResponsesInputMessage2TypedDict", - "OpenAIResponsesInputRoleAssistant", - "OpenAIResponsesInputRoleDeveloper1", - "OpenAIResponsesInputRoleDeveloper2", - "OpenAIResponsesInputRoleSystem1", - "OpenAIResponsesInputRoleSystem2", - "OpenAIResponsesInputRoleUnion1", - "OpenAIResponsesInputRoleUnion1TypedDict", - "OpenAIResponsesInputRoleUnion2", - "OpenAIResponsesInputRoleUnion2TypedDict", - "OpenAIResponsesInputRoleUser1", - "OpenAIResponsesInputRoleUser2", - "OpenAIResponsesInputTypeFunctionCall", - "OpenAIResponsesInputTypeFunctionCallOutput", - "OpenAIResponsesInputTypeMessage1", - "OpenAIResponsesInputTypeMessage2", - "OpenAIResponsesInputUnion", - "OpenAIResponsesInputUnion1", - "OpenAIResponsesInputUnion1TypedDict", - "OpenAIResponsesInputUnionTypedDict", - "OpenAIResponsesPrompt", - "OpenAIResponsesPromptTypedDict", - "OpenAIResponsesReasoningConfig", - "OpenAIResponsesReasoningConfigTypedDict", - "OpenAIResponsesReasoningEffort", "OpenAIResponsesRefusalContent", "OpenAIResponsesRefusalContentType", "OpenAIResponsesRefusalContentTypedDict", "OpenAIResponsesResponseStatus", - "OpenAIResponsesServiceTier", "OpenAIResponsesToolChoice", "OpenAIResponsesToolChoiceAuto", "OpenAIResponsesToolChoiceFunction", @@ -1182,203 +1749,62 @@ __all__ = [ "OpenAIResponsesToolChoiceUnion", "OpenAIResponsesToolChoiceUnionTypedDict", "OpenAIResponsesTruncation", - "OpenResponsesEasyInputMessage", - "OpenResponsesEasyInputMessageContentInputImage", - "OpenResponsesEasyInputMessageContentInputImageTypedDict", - "OpenResponsesEasyInputMessageContentType", - "OpenResponsesEasyInputMessageContentUnion1", - "OpenResponsesEasyInputMessageContentUnion1TypedDict", - "OpenResponsesEasyInputMessageContentUnion2", - "OpenResponsesEasyInputMessageContentUnion2TypedDict", - "OpenResponsesEasyInputMessageDetail", - "OpenResponsesEasyInputMessageRoleAssistant", - "OpenResponsesEasyInputMessageRoleDeveloper", - "OpenResponsesEasyInputMessageRoleSystem", - "OpenResponsesEasyInputMessageRoleUnion", - "OpenResponsesEasyInputMessageRoleUnionTypedDict", - "OpenResponsesEasyInputMessageRoleUser", - "OpenResponsesEasyInputMessageTypeMessage", - "OpenResponsesEasyInputMessageTypedDict", - "OpenResponsesErrorEvent", - "OpenResponsesErrorEventType", - "OpenResponsesErrorEventTypedDict", - "OpenResponsesFunctionCallOutput", - "OpenResponsesFunctionCallOutputType", - "OpenResponsesFunctionCallOutputTypedDict", - "OpenResponsesFunctionToolCall", - "OpenResponsesFunctionToolCallType", - "OpenResponsesFunctionToolCallTypedDict", - "OpenResponsesImageGenCallCompleted", - "OpenResponsesImageGenCallCompletedType", - "OpenResponsesImageGenCallCompletedTypedDict", - "OpenResponsesImageGenCallGenerating", - "OpenResponsesImageGenCallGeneratingType", - "OpenResponsesImageGenCallGeneratingTypedDict", - "OpenResponsesImageGenCallInProgress", - "OpenResponsesImageGenCallInProgressType", - "OpenResponsesImageGenCallInProgressTypedDict", - "OpenResponsesImageGenCallPartialImage", - "OpenResponsesImageGenCallPartialImageType", - "OpenResponsesImageGenCallPartialImageTypedDict", - "OpenResponsesInput", - "OpenResponsesInput1", - "OpenResponsesInput1TypedDict", - "OpenResponsesInputMessageItem", - "OpenResponsesInputMessageItemContentInputImage", - "OpenResponsesInputMessageItemContentInputImageTypedDict", - "OpenResponsesInputMessageItemContentType", - "OpenResponsesInputMessageItemContentUnion", - "OpenResponsesInputMessageItemContentUnionTypedDict", - "OpenResponsesInputMessageItemDetail", - "OpenResponsesInputMessageItemRoleDeveloper", - "OpenResponsesInputMessageItemRoleSystem", - "OpenResponsesInputMessageItemRoleUnion", - "OpenResponsesInputMessageItemRoleUnionTypedDict", - "OpenResponsesInputMessageItemRoleUser", - "OpenResponsesInputMessageItemTypeMessage", - "OpenResponsesInputMessageItemTypedDict", - "OpenResponsesInputTypedDict", - "OpenResponsesLogProbs", - "OpenResponsesLogProbsTypedDict", - "OpenResponsesNonStreamingResponse", - "OpenResponsesNonStreamingResponseObject", - "OpenResponsesNonStreamingResponseToolFunction", - "OpenResponsesNonStreamingResponseToolFunctionTypedDict", - "OpenResponsesNonStreamingResponseToolUnion", - "OpenResponsesNonStreamingResponseToolUnionTypedDict", - "OpenResponsesNonStreamingResponseType", - "OpenResponsesNonStreamingResponseTypedDict", - "OpenResponsesReasoning", - "OpenResponsesReasoningConfig", - "OpenResponsesReasoningConfigTypedDict", - "OpenResponsesReasoningDeltaEvent", - "OpenResponsesReasoningDeltaEventType", - "OpenResponsesReasoningDeltaEventTypedDict", - "OpenResponsesReasoningDoneEvent", - "OpenResponsesReasoningDoneEventType", - "OpenResponsesReasoningDoneEventTypedDict", - "OpenResponsesReasoningFormat", - "OpenResponsesReasoningStatusCompleted", - "OpenResponsesReasoningStatusInProgress", - "OpenResponsesReasoningStatusIncomplete", - "OpenResponsesReasoningStatusUnion", - "OpenResponsesReasoningStatusUnionTypedDict", - "OpenResponsesReasoningSummaryPartAddedEvent", - "OpenResponsesReasoningSummaryPartAddedEventType", - "OpenResponsesReasoningSummaryPartAddedEventTypedDict", - "OpenResponsesReasoningSummaryTextDeltaEvent", - "OpenResponsesReasoningSummaryTextDeltaEventType", - "OpenResponsesReasoningSummaryTextDeltaEventTypedDict", - "OpenResponsesReasoningSummaryTextDoneEvent", - "OpenResponsesReasoningSummaryTextDoneEventType", - "OpenResponsesReasoningSummaryTextDoneEventTypedDict", - "OpenResponsesReasoningType", - "OpenResponsesReasoningTypedDict", - "OpenResponsesRequest", - "OpenResponsesRequestIDAutoRouter", - "OpenResponsesRequestIDFileParser", - "OpenResponsesRequestIDModeration", - "OpenResponsesRequestIDResponseHealing", - "OpenResponsesRequestIDWeb", - "OpenResponsesRequestIgnore", - "OpenResponsesRequestIgnoreTypedDict", - "OpenResponsesRequestImageConfig", - "OpenResponsesRequestImageConfigTypedDict", - "OpenResponsesRequestMaxPrice", - "OpenResponsesRequestMaxPriceTypedDict", - "OpenResponsesRequestOnly", - "OpenResponsesRequestOnlyTypedDict", - "OpenResponsesRequestOrder", - "OpenResponsesRequestOrderTypedDict", - "OpenResponsesRequestPluginAutoRouter", - "OpenResponsesRequestPluginAutoRouterTypedDict", - "OpenResponsesRequestPluginFileParser", - "OpenResponsesRequestPluginFileParserTypedDict", - "OpenResponsesRequestPluginModeration", - "OpenResponsesRequestPluginModerationTypedDict", - "OpenResponsesRequestPluginResponseHealing", - "OpenResponsesRequestPluginResponseHealingTypedDict", - "OpenResponsesRequestPluginUnion", - "OpenResponsesRequestPluginUnionTypedDict", - "OpenResponsesRequestPluginWeb", - "OpenResponsesRequestPluginWebTypedDict", - "OpenResponsesRequestProvider", - "OpenResponsesRequestProviderTypedDict", - "OpenResponsesRequestSort", - "OpenResponsesRequestSortTypedDict", - "OpenResponsesRequestToolFunction", - "OpenResponsesRequestToolFunctionTypedDict", - "OpenResponsesRequestToolUnion", - "OpenResponsesRequestToolUnionTypedDict", - "OpenResponsesRequestTrace", - "OpenResponsesRequestTraceTypedDict", - "OpenResponsesRequestType", - "OpenResponsesRequestTypedDict", - "OpenResponsesResponseText", - "OpenResponsesResponseTextTypedDict", - "OpenResponsesResponseTextVerbosity", - "OpenResponsesStreamEvent", - "OpenResponsesStreamEventResponseCompleted", - "OpenResponsesStreamEventResponseCompletedTypedDict", - "OpenResponsesStreamEventResponseContentPartAdded", - "OpenResponsesStreamEventResponseContentPartAddedTypedDict", - "OpenResponsesStreamEventResponseContentPartDone", - "OpenResponsesStreamEventResponseContentPartDoneTypedDict", - "OpenResponsesStreamEventResponseCreated", - "OpenResponsesStreamEventResponseCreatedTypedDict", - "OpenResponsesStreamEventResponseFailed", - "OpenResponsesStreamEventResponseFailedTypedDict", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDelta", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDeltaTypedDict", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDone", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDoneTypedDict", - "OpenResponsesStreamEventResponseInProgress", - "OpenResponsesStreamEventResponseInProgressTypedDict", - "OpenResponsesStreamEventResponseIncomplete", - "OpenResponsesStreamEventResponseIncompleteTypedDict", - "OpenResponsesStreamEventResponseOutputItemAdded", - "OpenResponsesStreamEventResponseOutputItemAddedTypedDict", - "OpenResponsesStreamEventResponseOutputItemDone", - "OpenResponsesStreamEventResponseOutputItemDoneTypedDict", - "OpenResponsesStreamEventResponseOutputTextAnnotationAdded", - "OpenResponsesStreamEventResponseOutputTextAnnotationAddedTypedDict", - "OpenResponsesStreamEventResponseOutputTextDelta", - "OpenResponsesStreamEventResponseOutputTextDeltaTypedDict", - "OpenResponsesStreamEventResponseOutputTextDone", - "OpenResponsesStreamEventResponseOutputTextDoneTypedDict", - "OpenResponsesStreamEventResponseReasoningSummaryPartDone", - "OpenResponsesStreamEventResponseReasoningSummaryPartDoneTypedDict", - "OpenResponsesStreamEventResponseRefusalDelta", - "OpenResponsesStreamEventResponseRefusalDeltaTypedDict", - "OpenResponsesStreamEventResponseRefusalDone", - "OpenResponsesStreamEventResponseRefusalDoneTypedDict", - "OpenResponsesStreamEventTypedDict", - "OpenResponsesTopLogprobs", - "OpenResponsesTopLogprobsTypedDict", - "OpenResponsesUsage", - "OpenResponsesUsageTypedDict", - "OpenResponsesWebSearch20250826Tool", - "OpenResponsesWebSearch20250826ToolFilters", - "OpenResponsesWebSearch20250826ToolFiltersTypedDict", - "OpenResponsesWebSearch20250826ToolType", - "OpenResponsesWebSearch20250826ToolTypedDict", - "OpenResponsesWebSearchPreview20250311Tool", - "OpenResponsesWebSearchPreview20250311ToolType", - "OpenResponsesWebSearchPreview20250311ToolTypedDict", - "OpenResponsesWebSearchPreviewTool", - "OpenResponsesWebSearchPreviewToolType", - "OpenResponsesWebSearchPreviewToolTypedDict", - "OpenResponsesWebSearchTool", - "OpenResponsesWebSearchToolFilters", - "OpenResponsesWebSearchToolFiltersTypedDict", - "OpenResponsesWebSearchToolType", - "OpenResponsesWebSearchToolTypedDict", + "OpenResponsesResult", + "OpenResponsesResultObject", + "OpenResponsesResultToolFunction", + "OpenResponsesResultToolFunctionTypedDict", + "OpenResponsesResultToolUnion", + "OpenResponsesResultToolUnionTypedDict", + "OpenResponsesResultType", + "OpenResponsesResultTypedDict", + "OutputDatetimeItem", + "OutputDatetimeItemStatus", + "OutputDatetimeItemType", + "OutputDatetimeItemTypedDict", + "OutputFileSearchCallItem", + "OutputFileSearchCallItemType", + "OutputFileSearchCallItemTypedDict", + "OutputFormat", + "OutputFunctionCallItem", + "OutputFunctionCallItemStatusCompleted", + "OutputFunctionCallItemStatusInProgress", + "OutputFunctionCallItemStatusIncomplete", + "OutputFunctionCallItemStatusUnion", + "OutputFunctionCallItemStatusUnionTypedDict", + "OutputFunctionCallItemType", + "OutputFunctionCallItemTypedDict", + "OutputImageGenerationCallItem", + "OutputImageGenerationCallItemType", + "OutputImageGenerationCallItemTypedDict", + "OutputInputImage", + "OutputInputImageTypedDict", "OutputItemImageGenerationCall", "OutputItemImageGenerationCallType", "OutputItemImageGenerationCallTypedDict", + "OutputItems", + "OutputItemsTypedDict", "OutputMessage", "OutputMessageContent", "OutputMessageContentTypedDict", + "OutputMessageItem", + "OutputMessageItemContent", + "OutputMessageItemContentTypedDict", + "OutputMessageItemPhaseCommentary", + "OutputMessageItemPhaseFinalAnswer", + "OutputMessageItemPhaseUnion", + "OutputMessageItemPhaseUnionTypedDict", + "OutputMessageItemRole", + "OutputMessageItemStatusCompleted", + "OutputMessageItemStatusInProgress", + "OutputMessageItemStatusIncomplete", + "OutputMessageItemStatusUnion", + "OutputMessageItemStatusUnionTypedDict", + "OutputMessageItemType", + "OutputMessageItemTypedDict", + "OutputMessagePhaseCommentary", + "OutputMessagePhaseFinalAnswer", + "OutputMessagePhaseUnion", + "OutputMessagePhaseUnionTypedDict", "OutputMessageRole", "OutputMessageStatusCompleted", "OutputMessageStatusInProgress", @@ -1388,16 +1814,31 @@ __all__ = [ "OutputMessageType", "OutputMessageTypedDict", "OutputModality", + "OutputModalityEnum", + "OutputReasoningItem", + "OutputReasoningItemFormat", + "OutputReasoningItemStatusCompleted", + "OutputReasoningItemStatusInProgress", + "OutputReasoningItemStatusIncomplete", + "OutputReasoningItemStatusUnion", + "OutputReasoningItemStatusUnionTypedDict", + "OutputReasoningItemType", + "OutputReasoningItemTypedDict", + "OutputServerToolItem", + "OutputServerToolItemStatus", + "OutputServerToolItemTypedDict", "OutputTokensDetails", "OutputTokensDetailsTypedDict", + "OutputType", + "OutputWebSearchCallItem", + "OutputWebSearchCallItemTypedDict", "PDFParserEngine", + "PDFParserEngineEnum", + "PDFParserEnginePDFText", + "PDFParserEngineTypedDict", "PDFParserOptions", "PDFParserOptionsTypedDict", "Parameter", - "Part1", - "Part1TypedDict", - "Part2", - "Part2TypedDict", "Partition", "PayloadTooLargeResponseErrorData", "PayloadTooLargeResponseErrorDataTypedDict", @@ -1415,6 +1856,21 @@ __all__ = [ "PreferredMaxLatencyTypedDict", "PreferredMinThroughput", "PreferredMinThroughputTypedDict", + "Preview20250311WebSearchServerTool", + "Preview20250311WebSearchServerToolEngine", + "Preview20250311WebSearchServerToolFilters", + "Preview20250311WebSearchServerToolFiltersTypedDict", + "Preview20250311WebSearchServerToolType", + "Preview20250311WebSearchServerToolTypedDict", + "PreviewWebSearchServerTool", + "PreviewWebSearchServerToolEngine", + "PreviewWebSearchServerToolFilters", + "PreviewWebSearchServerToolFiltersTypedDict", + "PreviewWebSearchServerToolType", + "PreviewWebSearchServerToolTypedDict", + "PreviewWebSearchUserLocation", + "PreviewWebSearchUserLocationType", + "PreviewWebSearchUserLocationTypedDict", "Pricing", "PricingTypedDict", "PromptTokensDetails", @@ -1451,9 +1907,18 @@ __all__ = [ "PublicEndpointTypedDict", "PublicPricing", "PublicPricingTypedDict", + "Quality", "Quantization", + "Ranker", + "RankingOptions", + "RankingOptionsTypedDict", "Reason", "Reasoning", + "ReasoningConfig", + "ReasoningConfigTypedDict", + "ReasoningDeltaEvent", + "ReasoningDeltaEventType", + "ReasoningDeltaEventTypedDict", "ReasoningDetailEncrypted", "ReasoningDetailEncryptedFormat", "ReasoningDetailEncryptedType", @@ -1468,168 +1933,183 @@ __all__ = [ "ReasoningDetailTextTypedDict", "ReasoningDetailUnion", "ReasoningDetailUnionTypedDict", + "ReasoningDoneEvent", + "ReasoningDoneEventType", + "ReasoningDoneEventTypedDict", + "ReasoningEffortEnum", + "ReasoningItem", + "ReasoningItemFormat", + "ReasoningItemStatusCompleted", + "ReasoningItemStatusInProgress", + "ReasoningItemStatusIncomplete", + "ReasoningItemStatusUnion", + "ReasoningItemStatusUnionTypedDict", + "ReasoningItemType", + "ReasoningItemTypedDict", + "ReasoningSummaryPartAddedEvent", + "ReasoningSummaryPartAddedEventType", + "ReasoningSummaryPartAddedEventTypedDict", + "ReasoningSummaryPartDoneEvent", + "ReasoningSummaryPartDoneEventType", + "ReasoningSummaryPartDoneEventTypedDict", "ReasoningSummaryText", + "ReasoningSummaryTextDeltaEvent", + "ReasoningSummaryTextDeltaEventType", + "ReasoningSummaryTextDeltaEventTypedDict", + "ReasoningSummaryTextDoneEvent", + "ReasoningSummaryTextDoneEventType", + "ReasoningSummaryTextDoneEventTypedDict", "ReasoningSummaryTextType", "ReasoningSummaryTextTypedDict", - "ReasoningSummaryVerbosity", + "ReasoningSummaryVerbosityEnum", "ReasoningTextContent", "ReasoningTextContentType", "ReasoningTextContentTypedDict", "ReasoningTypedDict", + "RefusalDeltaEvent", + "RefusalDeltaEventType", + "RefusalDeltaEventTypedDict", + "RefusalDoneEvent", + "RefusalDoneEventType", + "RefusalDoneEventTypedDict", "RequestTimeoutResponseErrorData", "RequestTimeoutResponseErrorDataTypedDict", + "RequireApproval", + "RequireApprovalAlways", + "RequireApprovalNever", + "RequireApprovalTypedDict", "ResponseFormat", - "ResponseFormatJSONObject", - "ResponseFormatJSONObjectType", - "ResponseFormatJSONObjectTypedDict", - "ResponseFormatJSONSchema", - "ResponseFormatJSONSchemaType", - "ResponseFormatJSONSchemaTypedDict", - "ResponseFormatText", - "ResponseFormatTextConfig", - "ResponseFormatTextConfigTypedDict", - "ResponseFormatTextGrammar", - "ResponseFormatTextGrammarType", - "ResponseFormatTextGrammarTypedDict", - "ResponseFormatTextPython", - "ResponseFormatTextPythonType", - "ResponseFormatTextPythonTypedDict", - "ResponseFormatTextType", - "ResponseFormatTextTypedDict", "ResponseFormatTypedDict", - "ResponseInputAudio", - "ResponseInputAudioFormat", - "ResponseInputAudioInputAudio", - "ResponseInputAudioInputAudioTypedDict", - "ResponseInputAudioType", - "ResponseInputAudioTypedDict", - "ResponseInputFile", - "ResponseInputFileType", - "ResponseInputFileTypedDict", - "ResponseInputImage", - "ResponseInputImageDetail", - "ResponseInputImageType", - "ResponseInputImageTypedDict", - "ResponseInputText", - "ResponseInputTextType", - "ResponseInputTextTypedDict", - "ResponseInputVideo", - "ResponseInputVideoType", - "ResponseInputVideoTypedDict", + "ResponseIncludesEnum", "ResponseOutputText", + "ResponseOutputTextLogprob", + "ResponseOutputTextLogprobTypedDict", "ResponseOutputTextTopLogprob", "ResponseOutputTextTopLogprobTypedDict", "ResponseOutputTextType", "ResponseOutputTextTypedDict", - "ResponseTextConfig", - "ResponseTextConfigTypedDict", - "ResponseTextConfigVerbosity", "ResponsesErrorField", "ResponsesErrorFieldTypedDict", - "ResponsesFormatText", - "ResponsesFormatTextJSONSchemaConfig", - "ResponsesFormatTextJSONSchemaConfigType", - "ResponsesFormatTextJSONSchemaConfigTypedDict", - "ResponsesFormatTextType", - "ResponsesFormatTextTypedDict", - "ResponsesImageGenerationCall", - "ResponsesImageGenerationCallType", - "ResponsesImageGenerationCallTypedDict", - "ResponsesOutputItem", - "ResponsesOutputItemFileSearchCall", - "ResponsesOutputItemFileSearchCallType", - "ResponsesOutputItemFileSearchCallTypedDict", - "ResponsesOutputItemFunctionCall", - "ResponsesOutputItemFunctionCallStatusCompleted", - "ResponsesOutputItemFunctionCallStatusInProgress", - "ResponsesOutputItemFunctionCallStatusIncomplete", - "ResponsesOutputItemFunctionCallStatusUnion", - "ResponsesOutputItemFunctionCallStatusUnionTypedDict", - "ResponsesOutputItemFunctionCallType", - "ResponsesOutputItemFunctionCallTypedDict", - "ResponsesOutputItemReasoning", - "ResponsesOutputItemReasoningFormat", - "ResponsesOutputItemReasoningStatusCompleted", - "ResponsesOutputItemReasoningStatusInProgress", - "ResponsesOutputItemReasoningStatusIncomplete", - "ResponsesOutputItemReasoningStatusUnion", - "ResponsesOutputItemReasoningStatusUnionTypedDict", - "ResponsesOutputItemReasoningType", - "ResponsesOutputItemReasoningTypedDict", - "ResponsesOutputItemTypedDict", - "ResponsesOutputMessage", - "ResponsesOutputMessageContent", - "ResponsesOutputMessageContentTypedDict", - "ResponsesOutputMessageRole", - "ResponsesOutputMessageStatusCompleted", - "ResponsesOutputMessageStatusInProgress", - "ResponsesOutputMessageStatusIncomplete", - "ResponsesOutputMessageStatusUnion", - "ResponsesOutputMessageStatusUnionTypedDict", - "ResponsesOutputMessageType", - "ResponsesOutputMessageTypedDict", - "ResponsesOutputModality", - "ResponsesSearchContextSize", - "ResponsesWebSearchCallOutput", - "ResponsesWebSearchCallOutputType", - "ResponsesWebSearchCallOutputTypedDict", - "ResponsesWebSearchUserLocation", - "ResponsesWebSearchUserLocationType", - "ResponsesWebSearchUserLocationTypedDict", + "ResponsesRequest", + "ResponsesRequestIDAutoRouter", + "ResponsesRequestIDContextCompression", + "ResponsesRequestIDFileParser", + "ResponsesRequestIDModeration", + "ResponsesRequestIDResponseHealing", + "ResponsesRequestIDWeb", + "ResponsesRequestIgnore", + "ResponsesRequestIgnoreTypedDict", + "ResponsesRequestImageConfig", + "ResponsesRequestImageConfigTypedDict", + "ResponsesRequestMaxPrice", + "ResponsesRequestMaxPriceTypedDict", + "ResponsesRequestOnly", + "ResponsesRequestOnlyTypedDict", + "ResponsesRequestOrder", + "ResponsesRequestOrderTypedDict", + "ResponsesRequestPluginAutoRouter", + "ResponsesRequestPluginAutoRouterTypedDict", + "ResponsesRequestPluginContextCompression", + "ResponsesRequestPluginContextCompressionTypedDict", + "ResponsesRequestPluginFileParser", + "ResponsesRequestPluginFileParserTypedDict", + "ResponsesRequestPluginModeration", + "ResponsesRequestPluginModerationTypedDict", + "ResponsesRequestPluginResponseHealing", + "ResponsesRequestPluginResponseHealingTypedDict", + "ResponsesRequestPluginUnion", + "ResponsesRequestPluginUnionTypedDict", + "ResponsesRequestPluginWeb", + "ResponsesRequestPluginWebTypedDict", + "ResponsesRequestProvider", + "ResponsesRequestProviderTypedDict", + "ResponsesRequestServiceTier", + "ResponsesRequestSort", + "ResponsesRequestSortTypedDict", + "ResponsesRequestToolFunction", + "ResponsesRequestToolFunctionTypedDict", + "ResponsesRequestToolUnion", + "ResponsesRequestToolUnionTypedDict", + "ResponsesRequestTrace", + "ResponsesRequestTraceTypedDict", + "ResponsesRequestType", + "ResponsesRequestTypedDict", + "SearchContextSizeEnum", "Security", "SecurityTypedDict", - "ServiceTier", "ServiceUnavailableResponseErrorData", "ServiceUnavailableResponseErrorDataTypedDict", + "ShellServerTool", + "ShellServerToolType", + "ShellServerToolTypedDict", + "Size", + "Source", + "SourceTypedDict", "Stop", "StopTypedDict", - "SystemMessage", - "SystemMessageContent", - "SystemMessageContentTypedDict", - "SystemMessageRole", - "SystemMessageTypedDict", - "TTL", + "StoredPromptTemplate", + "StoredPromptTemplateTypedDict", + "StreamEvents", + "StreamEventsResponseCompleted", + "StreamEventsResponseCompletedTypedDict", + "StreamEventsResponseCreated", + "StreamEventsResponseCreatedTypedDict", + "StreamEventsResponseFailed", + "StreamEventsResponseFailedTypedDict", + "StreamEventsResponseInProgress", + "StreamEventsResponseInProgressTypedDict", + "StreamEventsResponseIncomplete", + "StreamEventsResponseIncompleteTypedDict", + "StreamEventsResponseOutputItemAdded", + "StreamEventsResponseOutputItemAddedTypedDict", + "StreamEventsResponseOutputItemDone", + "StreamEventsResponseOutputItemDoneTypedDict", + "StreamEventsTypedDict", + "Syntax", + "TextConfig", + "TextConfigTypedDict", + "TextConfigVerbosity", + "TextDeltaEvent", + "TextDeltaEventLogprob", + "TextDeltaEventLogprobTypedDict", + "TextDeltaEventTopLogprob", + "TextDeltaEventTopLogprobTypedDict", + "TextDeltaEventType", + "TextDeltaEventTypedDict", + "TextDoneEvent", + "TextDoneEventLogprob", + "TextDoneEventLogprobTypedDict", + "TextDoneEventTopLogprob", + "TextDoneEventTopLogprobTypedDict", + "TextDoneEventType", + "TextDoneEventTypedDict", + "TextExtendedConfig", + "TextExtendedConfigTypedDict", + "TextExtendedConfigVerbosity", "Tokenizer", "TooManyRequestsResponseErrorData", "TooManyRequestsResponseErrorDataTypedDict", - "ToolCallStatus", - "ToolChoiceOption", - "ToolChoiceOptionAuto", - "ToolChoiceOptionNone", - "ToolChoiceOptionRequired", - "ToolChoiceOptionTypedDict", - "ToolDefinitionJSON", - "ToolDefinitionJSONFunction", - "ToolDefinitionJSONFunctionTypedDict", - "ToolDefinitionJSONType", - "ToolDefinitionJSONTypedDict", - "ToolResponseMessage", - "ToolResponseMessageContent", - "ToolResponseMessageContentTypedDict", - "ToolResponseMessageRole", - "ToolResponseMessageTypedDict", + "ToolCallStatusEnum", "TopProviderInfo", "TopProviderInfoTypedDict", - "Truncation", + "TruncationEnum", "Type", + "TypeCodeInterpreter", + "TypeCustom", + "TypeFileSearch", + "TypeFindInPage", + "TypeOpenPage", "TypeResponseCompleted", - "TypeResponseContentPartAdded", - "TypeResponseContentPartDone", "TypeResponseCreated", "TypeResponseFailed", - "TypeResponseFunctionCallArgumentsDelta", - "TypeResponseFunctionCallArgumentsDone", "TypeResponseInProgress", "TypeResponseIncomplete", "TypeResponseOutputItemAdded", "TypeResponseOutputItemDone", - "TypeResponseOutputTextAnnotationAdded", - "TypeResponseOutputTextDelta", - "TypeResponseOutputTextDone", - "TypeResponseReasoningSummaryPartDone", - "TypeResponseRefusalDelta", - "TypeResponseRefusalDone", + "TypeSearch", "TypeTypedDict", + "TypeURL", + "TypeWebSearchCall", "URLCitation", "URLCitationType", "URLCitationTypedDict", @@ -1637,196 +2117,580 @@ __all__ = [ "UnauthorizedResponseErrorDataTypedDict", "UnprocessableEntityResponseErrorData", "UnprocessableEntityResponseErrorDataTypedDict", - "UserMessage", - "UserMessageContent", - "UserMessageContentTypedDict", - "UserMessageRole", - "UserMessageTypedDict", + "Usage", + "UsageTypedDict", + "Value1", + "Value1TypedDict", + "Value2", + "Value2TypedDict", "Variables", "VariablesTypedDict", - "VideoInput", - "VideoInputTypedDict", + "WebSearchCallCompletedEvent", + "WebSearchCallCompletedEventType", + "WebSearchCallCompletedEventTypedDict", + "WebSearchCallInProgressEvent", + "WebSearchCallInProgressEventType", + "WebSearchCallInProgressEventTypedDict", + "WebSearchCallSearchingEvent", + "WebSearchCallSearchingEventType", + "WebSearchCallSearchingEventTypedDict", "WebSearchEngine", - "WebSearchPreviewToolUserLocation", - "WebSearchPreviewToolUserLocationType", - "WebSearchPreviewToolUserLocationTypedDict", + "WebSearchServerTool", + "WebSearchServerToolEngine", + "WebSearchServerToolFilters", + "WebSearchServerToolFiltersTypedDict", + "WebSearchServerToolOpenRouter", + "WebSearchServerToolOpenRouterParameters", + "WebSearchServerToolOpenRouterParametersTypedDict", + "WebSearchServerToolOpenRouterType", + "WebSearchServerToolOpenRouterTypedDict", + "WebSearchServerToolType", + "WebSearchServerToolTypedDict", "WebSearchStatus", + "WebSearchUserLocation", + "WebSearchUserLocationType", + "WebSearchUserLocationTypedDict", ] _dynamic_imports: dict[str, str] = { "ActivityItem": ".activityitem", "ActivityItemTypedDict": ".activityitem", - "AssistantMessage": ".assistantmessage", - "AssistantMessageContent": ".assistantmessage", - "AssistantMessageContentTypedDict": ".assistantmessage", - "AssistantMessageRole": ".assistantmessage", - "AssistantMessageTypedDict": ".assistantmessage", - "AssistantMessageImages": ".assistantmessageimages", - "AssistantMessageImagesImageURL": ".assistantmessageimages", - "AssistantMessageImagesImageURLTypedDict": ".assistantmessageimages", - "AssistantMessageImagesTypedDict": ".assistantmessageimages", + "AnnotationAddedEvent": ".annotationaddedevent", + "AnnotationAddedEventType": ".annotationaddedevent", + "AnnotationAddedEventTypedDict": ".annotationaddedevent", + "ApplyPatchServerTool": ".applypatchservertool", + "ApplyPatchServerToolType": ".applypatchservertool", + "ApplyPatchServerToolTypedDict": ".applypatchservertool", "BadGatewayResponseErrorData": ".badgatewayresponseerrordata", "BadGatewayResponseErrorDataTypedDict": ".badgatewayresponseerrordata", "BadRequestResponseErrorData": ".badrequestresponseerrordata", "BadRequestResponseErrorDataTypedDict": ".badrequestresponseerrordata", - "ChatCompletionFinishReason": ".chatcompletionfinishreason", - "ChatGenerationParams": ".chatgenerationparams", - "ChatGenerationParamsBy": ".chatgenerationparams", - "ChatGenerationParamsIDAutoRouter": ".chatgenerationparams", - "ChatGenerationParamsIDFileParser": ".chatgenerationparams", - "ChatGenerationParamsIDModeration": ".chatgenerationparams", - "ChatGenerationParamsIDResponseHealing": ".chatgenerationparams", - "ChatGenerationParamsIDWeb": ".chatgenerationparams", - "ChatGenerationParamsIgnore": ".chatgenerationparams", - "ChatGenerationParamsIgnoreTypedDict": ".chatgenerationparams", - "ChatGenerationParamsImageConfig": ".chatgenerationparams", - "ChatGenerationParamsImageConfigTypedDict": ".chatgenerationparams", - "ChatGenerationParamsMaxPrice": ".chatgenerationparams", - "ChatGenerationParamsMaxPriceTypedDict": ".chatgenerationparams", - "ChatGenerationParamsOnly": ".chatgenerationparams", - "ChatGenerationParamsOnlyTypedDict": ".chatgenerationparams", - "ChatGenerationParamsOrder": ".chatgenerationparams", - "ChatGenerationParamsOrderTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPartition": ".chatgenerationparams", - "ChatGenerationParamsPluginAutoRouter": ".chatgenerationparams", - "ChatGenerationParamsPluginAutoRouterTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPluginFileParser": ".chatgenerationparams", - "ChatGenerationParamsPluginFileParserTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPluginModeration": ".chatgenerationparams", - "ChatGenerationParamsPluginModerationTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPluginResponseHealing": ".chatgenerationparams", - "ChatGenerationParamsPluginResponseHealingTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPluginUnion": ".chatgenerationparams", - "ChatGenerationParamsPluginUnionTypedDict": ".chatgenerationparams", - "ChatGenerationParamsPluginWeb": ".chatgenerationparams", - "ChatGenerationParamsPluginWebTypedDict": ".chatgenerationparams", - "ChatGenerationParamsProvider": ".chatgenerationparams", - "ChatGenerationParamsProviderSort": ".chatgenerationparams", - "ChatGenerationParamsProviderSortConfig": ".chatgenerationparams", - "ChatGenerationParamsProviderSortConfigEnum": ".chatgenerationparams", - "ChatGenerationParamsProviderSortConfigTypedDict": ".chatgenerationparams", - "ChatGenerationParamsProviderSortConfigUnion": ".chatgenerationparams", - "ChatGenerationParamsProviderSortConfigUnionTypedDict": ".chatgenerationparams", - "ChatGenerationParamsProviderTypedDict": ".chatgenerationparams", - "ChatGenerationParamsSortEnum": ".chatgenerationparams", - "ChatGenerationParamsSortUnion": ".chatgenerationparams", - "ChatGenerationParamsSortUnionTypedDict": ".chatgenerationparams", - "ChatGenerationParamsTrace": ".chatgenerationparams", - "ChatGenerationParamsTraceTypedDict": ".chatgenerationparams", - "ChatGenerationParamsTypedDict": ".chatgenerationparams", - "Effort": ".chatgenerationparams", - "Modality": ".chatgenerationparams", - "Reasoning": ".chatgenerationparams", - "ReasoningTypedDict": ".chatgenerationparams", - "ResponseFormat": ".chatgenerationparams", - "ResponseFormatTypedDict": ".chatgenerationparams", - "Stop": ".chatgenerationparams", - "StopTypedDict": ".chatgenerationparams", - "ChatGenerationTokenUsage": ".chatgenerationtokenusage", - "ChatGenerationTokenUsageTypedDict": ".chatgenerationtokenusage", - "CompletionTokensDetails": ".chatgenerationtokenusage", - "CompletionTokensDetailsTypedDict": ".chatgenerationtokenusage", - "PromptTokensDetails": ".chatgenerationtokenusage", - "PromptTokensDetailsTypedDict": ".chatgenerationtokenusage", - "ChatMessageContentItem": ".chatmessagecontentitem", - "ChatMessageContentItem1": ".chatmessagecontentitem", - "ChatMessageContentItem1TypedDict": ".chatmessagecontentitem", - "ChatMessageContentItemTypedDict": ".chatmessagecontentitem", - "ChatMessageContentItemAudio": ".chatmessagecontentitemaudio", - "ChatMessageContentItemAudioInputAudio": ".chatmessagecontentitemaudio", - "ChatMessageContentItemAudioInputAudioTypedDict": ".chatmessagecontentitemaudio", - "ChatMessageContentItemAudioType": ".chatmessagecontentitemaudio", - "ChatMessageContentItemAudioTypedDict": ".chatmessagecontentitemaudio", - "ChatMessageContentItemCacheControl": ".chatmessagecontentitemcachecontrol", - "ChatMessageContentItemCacheControlType": ".chatmessagecontentitemcachecontrol", - "ChatMessageContentItemCacheControlTypedDict": ".chatmessagecontentitemcachecontrol", - "TTL": ".chatmessagecontentitemcachecontrol", - "ChatMessageContentItemImage": ".chatmessagecontentitemimage", - "ChatMessageContentItemImageDetail": ".chatmessagecontentitemimage", - "ChatMessageContentItemImageImageURL": ".chatmessagecontentitemimage", - "ChatMessageContentItemImageImageURLTypedDict": ".chatmessagecontentitemimage", - "ChatMessageContentItemImageType": ".chatmessagecontentitemimage", - "ChatMessageContentItemImageTypedDict": ".chatmessagecontentitemimage", - "ChatMessageContentItemText": ".chatmessagecontentitemtext", - "ChatMessageContentItemTextType": ".chatmessagecontentitemtext", - "ChatMessageContentItemTextTypedDict": ".chatmessagecontentitemtext", - "ChatMessageContentItemVideo": ".chatmessagecontentitemvideo", - "ChatMessageContentItemVideoType": ".chatmessagecontentitemvideo", - "ChatMessageContentItemVideoTypedDict": ".chatmessagecontentitemvideo", - "ChatMessageContentItemVideoLegacy": ".chatmessagecontentitemvideolegacy", - "ChatMessageContentItemVideoLegacyType": ".chatmessagecontentitemvideolegacy", - "ChatMessageContentItemVideoLegacyTypedDict": ".chatmessagecontentitemvideolegacy", - "ChatMessageTokenLogprob": ".chatmessagetokenlogprob", - "ChatMessageTokenLogprobTopLogprob": ".chatmessagetokenlogprob", - "ChatMessageTokenLogprobTopLogprobTypedDict": ".chatmessagetokenlogprob", - "ChatMessageTokenLogprobTypedDict": ".chatmessagetokenlogprob", - "ChatMessageTokenLogprobs": ".chatmessagetokenlogprobs", - "ChatMessageTokenLogprobsTypedDict": ".chatmessagetokenlogprobs", - "ChatMessageToolCall": ".chatmessagetoolcall", - "ChatMessageToolCallFunction": ".chatmessagetoolcall", - "ChatMessageToolCallFunctionTypedDict": ".chatmessagetoolcall", - "ChatMessageToolCallType": ".chatmessagetoolcall", - "ChatMessageToolCallTypedDict": ".chatmessagetoolcall", - "ChatResponse": ".chatresponse", - "ChatResponseObject": ".chatresponse", - "ChatResponseTypedDict": ".chatresponse", - "ChatResponseChoice": ".chatresponsechoice", - "ChatResponseChoiceTypedDict": ".chatresponsechoice", - "ChatStreamingChoice": ".chatstreamingchoice", - "ChatStreamingChoiceTypedDict": ".chatstreamingchoice", - "ChatStreamingMessageChunk": ".chatstreamingmessagechunk", - "ChatStreamingMessageChunkRole": ".chatstreamingmessagechunk", - "ChatStreamingMessageChunkTypedDict": ".chatstreamingmessagechunk", - "ChatStreamingMessageToolCall": ".chatstreamingmessagetoolcall", - "ChatStreamingMessageToolCallFunction": ".chatstreamingmessagetoolcall", - "ChatStreamingMessageToolCallFunctionTypedDict": ".chatstreamingmessagetoolcall", - "ChatStreamingMessageToolCallType": ".chatstreamingmessagetoolcall", - "ChatStreamingMessageToolCallTypedDict": ".chatstreamingmessagetoolcall", - "ChatStreamingResponseChunk": ".chatstreamingresponsechunk", - "ChatStreamingResponseChunkObject": ".chatstreamingresponsechunk", - "ChatStreamingResponseChunkTypedDict": ".chatstreamingresponsechunk", - "Error": ".chatstreamingresponsechunk", - "ErrorTypedDict": ".chatstreamingresponsechunk", + "BaseInputsContent1": ".baseinputs_union", + "BaseInputsContent1TypedDict": ".baseinputs_union", + "BaseInputsContent2": ".baseinputs_union", + "BaseInputsContent2TypedDict": ".baseinputs_union", + "BaseInputsContent3": ".baseinputs_union", + "BaseInputsContent3TypedDict": ".baseinputs_union", + "BaseInputsFunctionCall": ".baseinputs_union", + "BaseInputsFunctionCallOutput": ".baseinputs_union", + "BaseInputsFunctionCallOutputTypedDict": ".baseinputs_union", + "BaseInputsFunctionCallTypedDict": ".baseinputs_union", + "BaseInputsMessage1": ".baseinputs_union", + "BaseInputsMessage1TypedDict": ".baseinputs_union", + "BaseInputsMessage2": ".baseinputs_union", + "BaseInputsMessage2TypedDict": ".baseinputs_union", + "BaseInputsOutput1": ".baseinputs_union", + "BaseInputsOutput1TypedDict": ".baseinputs_union", + "BaseInputsOutput2": ".baseinputs_union", + "BaseInputsOutput2TypedDict": ".baseinputs_union", + "BaseInputsPhaseCommentary": ".baseinputs_union", + "BaseInputsPhaseFinalAnswer": ".baseinputs_union", + "BaseInputsPhaseUnion": ".baseinputs_union", + "BaseInputsPhaseUnionTypedDict": ".baseinputs_union", + "BaseInputsRoleAssistant": ".baseinputs_union", + "BaseInputsRoleDeveloper1": ".baseinputs_union", + "BaseInputsRoleDeveloper2": ".baseinputs_union", + "BaseInputsRoleSystem1": ".baseinputs_union", + "BaseInputsRoleSystem2": ".baseinputs_union", + "BaseInputsRoleUnion1": ".baseinputs_union", + "BaseInputsRoleUnion1TypedDict": ".baseinputs_union", + "BaseInputsRoleUnion2": ".baseinputs_union", + "BaseInputsRoleUnion2TypedDict": ".baseinputs_union", + "BaseInputsRoleUser1": ".baseinputs_union", + "BaseInputsRoleUser2": ".baseinputs_union", + "BaseInputsTypeFunctionCall": ".baseinputs_union", + "BaseInputsTypeFunctionCallOutput": ".baseinputs_union", + "BaseInputsTypeMessage1": ".baseinputs_union", + "BaseInputsTypeMessage2": ".baseinputs_union", + "BaseInputsUnion": ".baseinputs_union", + "BaseInputsUnion1": ".baseinputs_union", + "BaseInputsUnion1TypedDict": ".baseinputs_union", + "BaseInputsUnionTypedDict": ".baseinputs_union", + "BaseReasoningConfig": ".basereasoningconfig", + "BaseReasoningConfigTypedDict": ".basereasoningconfig", + "ChatAssistantImages": ".chatassistantimages", + "ChatAssistantImagesImageURL": ".chatassistantimages", + "ChatAssistantImagesImageURLTypedDict": ".chatassistantimages", + "ChatAssistantImagesTypedDict": ".chatassistantimages", + "ChatAssistantMessage": ".chatassistantmessage", + "ChatAssistantMessageContent": ".chatassistantmessage", + "ChatAssistantMessageContentTypedDict": ".chatassistantmessage", + "ChatAssistantMessageRole": ".chatassistantmessage", + "ChatAssistantMessageTypedDict": ".chatassistantmessage", + "ChatAudioOutput": ".chataudiooutput", + "ChatAudioOutputTypedDict": ".chataudiooutput", + "ChatChoice": ".chatchoice", + "ChatChoiceTypedDict": ".chatchoice", + "ChatContentAudio": ".chatcontentaudio", + "ChatContentAudioInputAudio": ".chatcontentaudio", + "ChatContentAudioInputAudioTypedDict": ".chatcontentaudio", + "ChatContentAudioType": ".chatcontentaudio", + "ChatContentAudioTypedDict": ".chatcontentaudio", + "ChatContentCacheControl": ".chatcontentcachecontrol", + "ChatContentCacheControlTTL": ".chatcontentcachecontrol", + "ChatContentCacheControlType": ".chatcontentcachecontrol", + "ChatContentCacheControlTypedDict": ".chatcontentcachecontrol", + "ChatContentFile": ".chatcontentfile", + "ChatContentFileType": ".chatcontentfile", + "ChatContentFileTypedDict": ".chatcontentfile", + "File": ".chatcontentfile", + "FileTypedDict": ".chatcontentfile", + "ChatContentImage": ".chatcontentimage", + "ChatContentImageDetail": ".chatcontentimage", + "ChatContentImageImageURL": ".chatcontentimage", + "ChatContentImageImageURLTypedDict": ".chatcontentimage", + "ChatContentImageType": ".chatcontentimage", + "ChatContentImageTypedDict": ".chatcontentimage", + "ChatContentItems": ".chatcontentitems", + "ChatContentItems1": ".chatcontentitems", + "ChatContentItems1TypedDict": ".chatcontentitems", + "ChatContentItemsTypedDict": ".chatcontentitems", + "ChatContentText": ".chatcontenttext", + "ChatContentTextType": ".chatcontenttext", + "ChatContentTextTypedDict": ".chatcontenttext", + "ChatContentVideo": ".chatcontentvideo", + "ChatContentVideoType": ".chatcontentvideo", + "ChatContentVideoTypedDict": ".chatcontentvideo", + "ChatContentVideoInput": ".chatcontentvideoinput", + "ChatContentVideoInputTypedDict": ".chatcontentvideoinput", + "ChatDebugOptions": ".chatdebugoptions", + "ChatDebugOptionsTypedDict": ".chatdebugoptions", + "ChatDeveloperMessage": ".chatdevelopermessage", + "ChatDeveloperMessageContent": ".chatdevelopermessage", + "ChatDeveloperMessageContentTypedDict": ".chatdevelopermessage", + "ChatDeveloperMessageRole": ".chatdevelopermessage", + "ChatDeveloperMessageTypedDict": ".chatdevelopermessage", + "ChatFinishReasonEnum": ".chatfinishreasonenum", + "ChatFormatGrammarConfig": ".chatformatgrammarconfig", + "ChatFormatGrammarConfigType": ".chatformatgrammarconfig", + "ChatFormatGrammarConfigTypedDict": ".chatformatgrammarconfig", + "ChatFormatJSONSchemaConfig": ".chatformatjsonschemaconfig", + "ChatFormatJSONSchemaConfigType": ".chatformatjsonschemaconfig", + "ChatFormatJSONSchemaConfigTypedDict": ".chatformatjsonschemaconfig", + "ChatFormatPythonConfig": ".chatformatpythonconfig", + "ChatFormatPythonConfigType": ".chatformatpythonconfig", + "ChatFormatPythonConfigTypedDict": ".chatformatpythonconfig", + "ChatFormatTextConfig": ".chatformattextconfig", + "ChatFormatTextConfigType": ".chatformattextconfig", + "ChatFormatTextConfigTypedDict": ".chatformattextconfig", + "ChatFunctionTool": ".chatfunctiontool", + "ChatFunctionToolFunction": ".chatfunctiontool", + "ChatFunctionToolFunctionFunction": ".chatfunctiontool", + "ChatFunctionToolFunctionFunctionTypedDict": ".chatfunctiontool", + "ChatFunctionToolFunctionTypedDict": ".chatfunctiontool", + "ChatFunctionToolType": ".chatfunctiontool", + "ChatFunctionToolTypedDict": ".chatfunctiontool", + "ChatJSONSchemaConfig": ".chatjsonschemaconfig", + "ChatJSONSchemaConfigTypedDict": ".chatjsonschemaconfig", + "ChatMessages": ".chatmessages", + "ChatMessagesTypedDict": ".chatmessages", + "ChatNamedToolChoice": ".chatnamedtoolchoice", + "ChatNamedToolChoiceFunction": ".chatnamedtoolchoice", + "ChatNamedToolChoiceFunctionTypedDict": ".chatnamedtoolchoice", + "ChatNamedToolChoiceType": ".chatnamedtoolchoice", + "ChatNamedToolChoiceTypedDict": ".chatnamedtoolchoice", + "ChatReasoningSummaryVerbosityEnum": ".chatreasoningsummaryverbosityenum", + "CacheControl": ".chatrequest", + "CacheControlTypedDict": ".chatrequest", + "ChatRequest": ".chatrequest", + "ChatRequestBy": ".chatrequest", + "ChatRequestIDAutoRouter": ".chatrequest", + "ChatRequestIDContextCompression": ".chatrequest", + "ChatRequestIDFileParser": ".chatrequest", + "ChatRequestIDModeration": ".chatrequest", + "ChatRequestIDResponseHealing": ".chatrequest", + "ChatRequestIDWeb": ".chatrequest", + "ChatRequestIgnore": ".chatrequest", + "ChatRequestIgnoreTypedDict": ".chatrequest", + "ChatRequestImageConfig": ".chatrequest", + "ChatRequestImageConfigTypedDict": ".chatrequest", + "ChatRequestMaxPrice": ".chatrequest", + "ChatRequestMaxPriceTypedDict": ".chatrequest", + "ChatRequestOnly": ".chatrequest", + "ChatRequestOnlyTypedDict": ".chatrequest", + "ChatRequestOrder": ".chatrequest", + "ChatRequestOrderTypedDict": ".chatrequest", + "ChatRequestPartition": ".chatrequest", + "ChatRequestPluginAutoRouter": ".chatrequest", + "ChatRequestPluginAutoRouterTypedDict": ".chatrequest", + "ChatRequestPluginContextCompression": ".chatrequest", + "ChatRequestPluginContextCompressionTypedDict": ".chatrequest", + "ChatRequestPluginFileParser": ".chatrequest", + "ChatRequestPluginFileParserTypedDict": ".chatrequest", + "ChatRequestPluginModeration": ".chatrequest", + "ChatRequestPluginModerationTypedDict": ".chatrequest", + "ChatRequestPluginResponseHealing": ".chatrequest", + "ChatRequestPluginResponseHealingTypedDict": ".chatrequest", + "ChatRequestPluginUnion": ".chatrequest", + "ChatRequestPluginUnionTypedDict": ".chatrequest", + "ChatRequestPluginWeb": ".chatrequest", + "ChatRequestPluginWebTypedDict": ".chatrequest", + "ChatRequestProvider": ".chatrequest", + "ChatRequestProviderSort": ".chatrequest", + "ChatRequestProviderSortConfig": ".chatrequest", + "ChatRequestProviderSortConfigEnum": ".chatrequest", + "ChatRequestProviderSortConfigTypedDict": ".chatrequest", + "ChatRequestProviderSortConfigUnion": ".chatrequest", + "ChatRequestProviderSortConfigUnionTypedDict": ".chatrequest", + "ChatRequestProviderTypedDict": ".chatrequest", + "ChatRequestServiceTier": ".chatrequest", + "ChatRequestSortEnum": ".chatrequest", + "ChatRequestSortUnion": ".chatrequest", + "ChatRequestSortUnionTypedDict": ".chatrequest", + "ChatRequestTTL": ".chatrequest", + "ChatRequestTrace": ".chatrequest", + "ChatRequestTraceTypedDict": ".chatrequest", + "ChatRequestType": ".chatrequest", + "ChatRequestTypedDict": ".chatrequest", + "Effort": ".chatrequest", + "Modality": ".chatrequest", + "Reasoning": ".chatrequest", + "ReasoningTypedDict": ".chatrequest", + "ResponseFormat": ".chatrequest", + "ResponseFormatTypedDict": ".chatrequest", + "Stop": ".chatrequest", + "StopTypedDict": ".chatrequest", + "ChatResult": ".chatresult", + "ChatResultObject": ".chatresult", + "ChatResultTypedDict": ".chatresult", + "ChatStreamChoice": ".chatstreamchoice", + "ChatStreamChoiceTypedDict": ".chatstreamchoice", + "ChatStreamChunk": ".chatstreamchunk", + "ChatStreamChunkObject": ".chatstreamchunk", + "ChatStreamChunkTypedDict": ".chatstreamchunk", + "Error": ".chatstreamchunk", + "ErrorTypedDict": ".chatstreamchunk", + "ChatStreamDelta": ".chatstreamdelta", + "ChatStreamDeltaRole": ".chatstreamdelta", + "ChatStreamDeltaTypedDict": ".chatstreamdelta", "ChatStreamOptions": ".chatstreamoptions", "ChatStreamOptionsTypedDict": ".chatstreamoptions", + "ChatStreamToolCall": ".chatstreamtoolcall", + "ChatStreamToolCallFunction": ".chatstreamtoolcall", + "ChatStreamToolCallFunctionTypedDict": ".chatstreamtoolcall", + "ChatStreamToolCallType": ".chatstreamtoolcall", + "ChatStreamToolCallTypedDict": ".chatstreamtoolcall", + "ChatSystemMessage": ".chatsystemmessage", + "ChatSystemMessageContent": ".chatsystemmessage", + "ChatSystemMessageContentTypedDict": ".chatsystemmessage", + "ChatSystemMessageRole": ".chatsystemmessage", + "ChatSystemMessageTypedDict": ".chatsystemmessage", + "ChatTokenLogprob": ".chattokenlogprob", + "ChatTokenLogprobTopLogprob": ".chattokenlogprob", + "ChatTokenLogprobTopLogprobTypedDict": ".chattokenlogprob", + "ChatTokenLogprobTypedDict": ".chattokenlogprob", + "ChatTokenLogprobs": ".chattokenlogprobs", + "ChatTokenLogprobsTypedDict": ".chattokenlogprobs", + "ChatToolCall": ".chattoolcall", + "ChatToolCallFunction": ".chattoolcall", + "ChatToolCallFunctionTypedDict": ".chattoolcall", + "ChatToolCallType": ".chattoolcall", + "ChatToolCallTypedDict": ".chattoolcall", + "ChatToolChoice": ".chattoolchoice", + "ChatToolChoiceAuto": ".chattoolchoice", + "ChatToolChoiceNone": ".chattoolchoice", + "ChatToolChoiceRequired": ".chattoolchoice", + "ChatToolChoiceTypedDict": ".chattoolchoice", + "ChatToolMessage": ".chattoolmessage", + "ChatToolMessageContent": ".chattoolmessage", + "ChatToolMessageContentTypedDict": ".chattoolmessage", + "ChatToolMessageRole": ".chattoolmessage", + "ChatToolMessageTypedDict": ".chattoolmessage", + "ChatUsage": ".chatusage", + "ChatUsageTypedDict": ".chatusage", + "CompletionTokensDetails": ".chatusage", + "CompletionTokensDetailsTypedDict": ".chatusage", + "PromptTokensDetails": ".chatusage", + "PromptTokensDetailsTypedDict": ".chatusage", + "ChatUserMessage": ".chatusermessage", + "ChatUserMessageContent": ".chatusermessage", + "ChatUserMessageContentTypedDict": ".chatusermessage", + "ChatUserMessageRole": ".chatusermessage", + "ChatUserMessageTypedDict": ".chatusermessage", + "ChatWebSearchServerTool": ".chatwebsearchservertool", + "ChatWebSearchServerToolEngine": ".chatwebsearchservertool", + "ChatWebSearchServerToolParameters": ".chatwebsearchservertool", + "ChatWebSearchServerToolParametersType": ".chatwebsearchservertool", + "ChatWebSearchServerToolParametersTypedDict": ".chatwebsearchservertool", + "ChatWebSearchServerToolSearchContextSize": ".chatwebsearchservertool", + "ChatWebSearchServerToolTypeOpenrouterWebSearch": ".chatwebsearchservertool", + "ChatWebSearchServerToolTypedDict": ".chatwebsearchservertool", + "ChatWebSearchServerToolUserLocation": ".chatwebsearchservertool", + "ChatWebSearchServerToolUserLocationTypedDict": ".chatwebsearchservertool", + "ChatWebSearchShorthand": ".chatwebsearchshorthand", + "ChatWebSearchShorthandEngine": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParameters": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersEngine": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersSearchContextSize": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersType": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersTypedDict": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersUserLocation": ".chatwebsearchshorthand", + "ChatWebSearchShorthandParametersUserLocationTypedDict": ".chatwebsearchshorthand", + "ChatWebSearchShorthandSearchContextSize": ".chatwebsearchshorthand", + "ChatWebSearchShorthandType": ".chatwebsearchshorthand", + "ChatWebSearchShorthandTypeApproximate": ".chatwebsearchshorthand", + "ChatWebSearchShorthandTypedDict": ".chatwebsearchshorthand", + "ChatWebSearchShorthandUserLocation": ".chatwebsearchshorthand", + "ChatWebSearchShorthandUserLocationTypedDict": ".chatwebsearchshorthand", + "CodeInterpreterServerTool": ".codeinterpreterservertool", + "CodeInterpreterServerToolTypedDict": ".codeinterpreterservertool", + "Container": ".codeinterpreterservertool", + "ContainerAuto": ".codeinterpreterservertool", + "ContainerAutoTypedDict": ".codeinterpreterservertool", + "ContainerType": ".codeinterpreterservertool", + "ContainerTypedDict": ".codeinterpreterservertool", + "MemoryLimit": ".codeinterpreterservertool", + "TypeCodeInterpreter": ".codeinterpreterservertool", + "CodexLocalShellTool": ".codexlocalshelltool", + "CodexLocalShellToolType": ".codexlocalshelltool", + "CodexLocalShellToolTypedDict": ".codexlocalshelltool", + "CompoundFilter": ".compoundfilter", + "CompoundFilterType": ".compoundfilter", + "CompoundFilterTypedDict": ".compoundfilter", + "ComputerUseServerTool": ".computeruseservertool", + "ComputerUseServerToolType": ".computeruseservertool", + "ComputerUseServerToolTypedDict": ".computeruseservertool", + "Environment": ".computeruseservertool", + "ConflictResponseErrorData": ".conflictresponseerrordata", + "ConflictResponseErrorDataTypedDict": ".conflictresponseerrordata", + "ContentPartAddedEvent": ".contentpartaddedevent", + "ContentPartAddedEventPart": ".contentpartaddedevent", + "ContentPartAddedEventPartTypedDict": ".contentpartaddedevent", + "ContentPartAddedEventType": ".contentpartaddedevent", + "ContentPartAddedEventTypedDict": ".contentpartaddedevent", + "ContentPartDoneEvent": ".contentpartdoneevent", + "ContentPartDoneEventPart": ".contentpartdoneevent", + "ContentPartDoneEventPartTypedDict": ".contentpartdoneevent", + "ContentPartDoneEventType": ".contentpartdoneevent", + "ContentPartDoneEventTypedDict": ".contentpartdoneevent", + "ContextCompressionEngine": ".contextcompressionengine", "ChainID": ".createchargerequest", "CreateChargeRequest": ".createchargerequest", "CreateChargeRequestTypedDict": ".createchargerequest", + "CustomTool": ".customtool", + "CustomToolTypedDict": ".customtool", + "Format": ".customtool", + "FormatGrammar": ".customtool", + "FormatGrammarTypedDict": ".customtool", + "FormatText": ".customtool", + "FormatTextTypedDict": ".customtool", + "FormatTypeGrammar": ".customtool", + "FormatTypeText": ".customtool", + "FormatTypedDict": ".customtool", + "Syntax": ".customtool", + "TypeCustom": ".customtool", "DataCollection": ".datacollection", - "DebugOptions": ".debugoptions", - "DebugOptionsTypedDict": ".debugoptions", + "DatetimeServerTool": ".datetimeservertool", + "DatetimeServerToolParameters": ".datetimeservertool", + "DatetimeServerToolParametersTypedDict": ".datetimeservertool", + "DatetimeServerToolType": ".datetimeservertool", + "DatetimeServerToolTypedDict": ".datetimeservertool", "DefaultParameters": ".defaultparameters", "DefaultParametersTypedDict": ".defaultparameters", - "DeveloperMessage": ".developermessage", - "DeveloperMessageContent": ".developermessage", - "DeveloperMessageContentTypedDict": ".developermessage", - "DeveloperMessageRole": ".developermessage", - "DeveloperMessageTypedDict": ".developermessage", + "EasyInputMessage": ".easyinputmessage", + "EasyInputMessageContentInputImage": ".easyinputmessage", + "EasyInputMessageContentInputImageTypedDict": ".easyinputmessage", + "EasyInputMessageContentType": ".easyinputmessage", + "EasyInputMessageContentUnion1": ".easyinputmessage", + "EasyInputMessageContentUnion1TypedDict": ".easyinputmessage", + "EasyInputMessageContentUnion2": ".easyinputmessage", + "EasyInputMessageContentUnion2TypedDict": ".easyinputmessage", + "EasyInputMessageDetail": ".easyinputmessage", + "EasyInputMessagePhaseCommentary": ".easyinputmessage", + "EasyInputMessagePhaseFinalAnswer": ".easyinputmessage", + "EasyInputMessagePhaseUnion": ".easyinputmessage", + "EasyInputMessagePhaseUnionTypedDict": ".easyinputmessage", + "EasyInputMessageRoleAssistant": ".easyinputmessage", + "EasyInputMessageRoleDeveloper": ".easyinputmessage", + "EasyInputMessageRoleSystem": ".easyinputmessage", + "EasyInputMessageRoleUnion": ".easyinputmessage", + "EasyInputMessageRoleUnionTypedDict": ".easyinputmessage", + "EasyInputMessageRoleUser": ".easyinputmessage", + "EasyInputMessageTypeMessage": ".easyinputmessage", + "EasyInputMessageTypedDict": ".easyinputmessage", "EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponseerrordata", "EdgeNetworkTimeoutResponseErrorDataTypedDict": ".edgenetworktimeoutresponseerrordata", "EndpointStatus": ".endpointstatus", + "ErrorEvent": ".errorevent", + "ErrorEventType": ".errorevent", + "ErrorEventTypedDict": ".errorevent", "FileCitation": ".filecitation", "FileCitationType": ".filecitation", "FileCitationTypedDict": ".filecitation", "FilePath": ".filepath", "FilePathType": ".filepath", "FilePathTypedDict": ".filepath", + "FileSearchServerTool": ".filesearchservertool", + "FileSearchServerToolFilters": ".filesearchservertool", + "FileSearchServerToolFiltersTypedDict": ".filesearchservertool", + "FileSearchServerToolTypedDict": ".filesearchservertool", + "Filters": ".filesearchservertool", + "FiltersType": ".filesearchservertool", + "FiltersTypedDict": ".filesearchservertool", + "Ranker": ".filesearchservertool", + "RankingOptions": ".filesearchservertool", + "RankingOptionsTypedDict": ".filesearchservertool", + "TypeFileSearch": ".filesearchservertool", + "Value1": ".filesearchservertool", + "Value1TypedDict": ".filesearchservertool", + "Value2": ".filesearchservertool", + "Value2TypedDict": ".filesearchservertool", "ForbiddenResponseErrorData": ".forbiddenresponseerrordata", "ForbiddenResponseErrorDataTypedDict": ".forbiddenresponseerrordata", + "FormatJSONObjectConfig": ".formatjsonobjectconfig", + "FormatJSONObjectConfigType": ".formatjsonobjectconfig", + "FormatJSONObjectConfigTypedDict": ".formatjsonobjectconfig", + "FormatJSONSchemaConfig": ".formatjsonschemaconfig", + "FormatJSONSchemaConfigType": ".formatjsonschemaconfig", + "FormatJSONSchemaConfigTypedDict": ".formatjsonschemaconfig", + "Formats": ".formats", + "FormatsTypedDict": ".formats", + "FormatTextConfig": ".formattextconfig", + "FormatTextConfigType": ".formattextconfig", + "FormatTextConfigTypedDict": ".formattextconfig", + "FunctionCallArgsDeltaEvent": ".functioncallargsdeltaevent", + "FunctionCallArgsDeltaEventType": ".functioncallargsdeltaevent", + "FunctionCallArgsDeltaEventTypedDict": ".functioncallargsdeltaevent", + "FunctionCallArgsDoneEvent": ".functioncallargsdoneevent", + "FunctionCallArgsDoneEventType": ".functioncallargsdoneevent", + "FunctionCallArgsDoneEventTypedDict": ".functioncallargsdoneevent", + "FunctionCallItem": ".functioncallitem", + "FunctionCallItemType": ".functioncallitem", + "FunctionCallItemTypedDict": ".functioncallitem", + "FunctionCallOutputItem": ".functioncalloutputitem", + "FunctionCallOutputItemDetail": ".functioncalloutputitem", + "FunctionCallOutputItemOutputUnion1": ".functioncalloutputitem", + "FunctionCallOutputItemOutputUnion1TypedDict": ".functioncalloutputitem", + "FunctionCallOutputItemOutputUnion2": ".functioncalloutputitem", + "FunctionCallOutputItemOutputUnion2TypedDict": ".functioncalloutputitem", + "FunctionCallOutputItemTypeFunctionCallOutput": ".functioncalloutputitem", + "FunctionCallOutputItemTypedDict": ".functioncalloutputitem", + "OutputInputImage": ".functioncalloutputitem", + "OutputInputImageTypedDict": ".functioncalloutputitem", + "OutputType": ".functioncalloutputitem", + "ImageGenCallCompletedEvent": ".imagegencallcompletedevent", + "ImageGenCallCompletedEventType": ".imagegencallcompletedevent", + "ImageGenCallCompletedEventTypedDict": ".imagegencallcompletedevent", + "ImageGenCallGeneratingEvent": ".imagegencallgeneratingevent", + "ImageGenCallGeneratingEventType": ".imagegencallgeneratingevent", + "ImageGenCallGeneratingEventTypedDict": ".imagegencallgeneratingevent", + "ImageGenCallInProgressEvent": ".imagegencallinprogressevent", + "ImageGenCallInProgressEventType": ".imagegencallinprogressevent", + "ImageGenCallInProgressEventTypedDict": ".imagegencallinprogressevent", + "ImageGenCallPartialImageEvent": ".imagegencallpartialimageevent", + "ImageGenCallPartialImageEventType": ".imagegencallpartialimageevent", + "ImageGenCallPartialImageEventTypedDict": ".imagegencallpartialimageevent", + "Background": ".imagegenerationservertool", + "ImageGenerationServerTool": ".imagegenerationservertool", + "ImageGenerationServerToolType": ".imagegenerationservertool", + "ImageGenerationServerToolTypedDict": ".imagegenerationservertool", + "InputFidelity": ".imagegenerationservertool", + "InputImageMask": ".imagegenerationservertool", + "InputImageMaskTypedDict": ".imagegenerationservertool", + "ModelEnum": ".imagegenerationservertool", + "Moderation": ".imagegenerationservertool", + "OutputFormat": ".imagegenerationservertool", + "Quality": ".imagegenerationservertool", + "Size": ".imagegenerationservertool", "ImageGenerationStatus": ".imagegenerationstatus", + "IncompleteDetails": ".incompletedetails", + "IncompleteDetailsTypedDict": ".incompletedetails", + "Reason": ".incompletedetails", + "InputAudio": ".inputaudio", + "InputAudioFormat": ".inputaudio", + "InputAudioInputAudio": ".inputaudio", + "InputAudioInputAudioTypedDict": ".inputaudio", + "InputAudioType": ".inputaudio", + "InputAudioTypedDict": ".inputaudio", + "InputFile": ".inputfile", + "InputFileType": ".inputfile", + "InputFileTypedDict": ".inputfile", + "InputImage": ".inputimage", + "InputImageDetail": ".inputimage", + "InputImageType": ".inputimage", + "InputImageTypedDict": ".inputimage", + "InputMessageItem": ".inputmessageitem", + "InputMessageItemContentInputImage": ".inputmessageitem", + "InputMessageItemContentInputImageTypedDict": ".inputmessageitem", + "InputMessageItemContentType": ".inputmessageitem", + "InputMessageItemContentUnion": ".inputmessageitem", + "InputMessageItemContentUnionTypedDict": ".inputmessageitem", + "InputMessageItemDetail": ".inputmessageitem", + "InputMessageItemRoleDeveloper": ".inputmessageitem", + "InputMessageItemRoleSystem": ".inputmessageitem", + "InputMessageItemRoleUnion": ".inputmessageitem", + "InputMessageItemRoleUnionTypedDict": ".inputmessageitem", + "InputMessageItemRoleUser": ".inputmessageitem", + "InputMessageItemTypeMessage": ".inputmessageitem", + "InputMessageItemTypedDict": ".inputmessageitem", "InputModality": ".inputmodality", + "InputsContent1": ".inputs_union", + "InputsContent1TypedDict": ".inputs_union", + "InputsContent2": ".inputs_union", + "InputsContent2TypedDict": ".inputs_union", + "InputsFormat": ".inputs_union", + "InputsMessage": ".inputs_union", + "InputsMessageTypedDict": ".inputs_union", + "InputsPhaseCommentary": ".inputs_union", + "InputsPhaseFinalAnswer": ".inputs_union", + "InputsPhaseUnion": ".inputs_union", + "InputsPhaseUnionTypedDict": ".inputs_union", + "InputsReasoning": ".inputs_union", + "InputsReasoningTypedDict": ".inputs_union", + "InputsRole": ".inputs_union", + "InputsStatusCompleted1": ".inputs_union", + "InputsStatusCompleted2": ".inputs_union", + "InputsStatusInProgress1": ".inputs_union", + "InputsStatusInProgress2": ".inputs_union", + "InputsStatusIncomplete1": ".inputs_union", + "InputsStatusIncomplete2": ".inputs_union", + "InputsStatusUnion1": ".inputs_union", + "InputsStatusUnion1TypedDict": ".inputs_union", + "InputsStatusUnion2": ".inputs_union", + "InputsStatusUnion2TypedDict": ".inputs_union", + "InputsTypeMessage": ".inputs_union", + "InputsTypeReasoning": ".inputs_union", + "InputsUnion": ".inputs_union", + "InputsUnion1": ".inputs_union", + "InputsUnion1TypedDict": ".inputs_union", + "InputsUnionTypedDict": ".inputs_union", + "InputText": ".inputtext", + "InputTextType": ".inputtext", + "InputTextTypedDict": ".inputtext", + "InputVideo": ".inputvideo", + "InputVideoType": ".inputvideo", + "InputVideoTypedDict": ".inputvideo", "InstructType": ".instructtype", "InternalServerResponseErrorData": ".internalserverresponseerrordata", "InternalServerResponseErrorDataTypedDict": ".internalserverresponseerrordata", - "JSONSchemaConfig": ".jsonschemaconfig", - "JSONSchemaConfigTypedDict": ".jsonschemaconfig", + "LegacyChatContentVideo": ".legacy_chatcontentvideo", + "LegacyChatContentVideoType": ".legacy_chatcontentvideo", + "LegacyChatContentVideoTypedDict": ".legacy_chatcontentvideo", + "LegacyWebSearchServerTool": ".legacy_websearchservertool", + "LegacyWebSearchServerToolEngine": ".legacy_websearchservertool", + "LegacyWebSearchServerToolFilters": ".legacy_websearchservertool", + "LegacyWebSearchServerToolFiltersTypedDict": ".legacy_websearchservertool", + "LegacyWebSearchServerToolType": ".legacy_websearchservertool", + "LegacyWebSearchServerToolTypedDict": ".legacy_websearchservertool", "Architecture": ".listendpointsresponse", "ArchitectureTypedDict": ".listendpointsresponse", "ListEndpointsResponse": ".listendpointsresponse", "ListEndpointsResponseTypedDict": ".listendpointsresponse", "Tokenizer": ".listendpointsresponse", - "Message": ".message", - "MessageTypedDict": ".message", + "AllowedTools": ".mcpservertool", + "AllowedToolsTypedDict": ".mcpservertool", + "Always": ".mcpservertool", + "AlwaysTypedDict": ".mcpservertool", + "ConnectorID": ".mcpservertool", + "McpServerTool": ".mcpservertool", + "McpServerToolType": ".mcpservertool", + "McpServerToolTypedDict": ".mcpservertool", + "Never": ".mcpservertool", + "NeverTypedDict": ".mcpservertool", + "RequireApproval": ".mcpservertool", + "RequireApprovalAlways": ".mcpservertool", + "RequireApprovalNever": ".mcpservertool", + "RequireApprovalTypedDict": ".mcpservertool", "Model": ".model", "ModelTypedDict": ".model", "ModelArchitecture": ".modelarchitecture", @@ -1839,64 +2703,14 @@ _dynamic_imports: dict[str, str] = { "ModelsCountResponseTypedDict": ".modelscountresponse", "ModelsListResponse": ".modelslistresponse", "ModelsListResponseTypedDict": ".modelslistresponse", - "NamedToolChoice": ".namedtoolchoice", - "NamedToolChoiceFunction": ".namedtoolchoice", - "NamedToolChoiceFunctionTypedDict": ".namedtoolchoice", - "NamedToolChoiceType": ".namedtoolchoice", - "NamedToolChoiceTypedDict": ".namedtoolchoice", "NotFoundResponseErrorData": ".notfoundresponseerrordata", "NotFoundResponseErrorDataTypedDict": ".notfoundresponseerrordata", "OpenAIResponsesAnnotation": ".openairesponsesannotation", "OpenAIResponsesAnnotationTypedDict": ".openairesponsesannotation", - "OpenAIResponsesIncludable": ".openairesponsesincludable", - "OpenAIResponsesIncompleteDetails": ".openairesponsesincompletedetails", - "OpenAIResponsesIncompleteDetailsTypedDict": ".openairesponsesincompletedetails", - "Reason": ".openairesponsesincompletedetails", - "OpenAIResponsesInputContent1": ".openairesponsesinput_union", - "OpenAIResponsesInputContent1TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputContent2": ".openairesponsesinput_union", - "OpenAIResponsesInputContent2TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputContent3": ".openairesponsesinput_union", - "OpenAIResponsesInputContent3TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputFunctionCall": ".openairesponsesinput_union", - "OpenAIResponsesInputFunctionCallOutput": ".openairesponsesinput_union", - "OpenAIResponsesInputFunctionCallOutputTypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputFunctionCallTypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputMessage1": ".openairesponsesinput_union", - "OpenAIResponsesInputMessage1TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputMessage2": ".openairesponsesinput_union", - "OpenAIResponsesInputMessage2TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleAssistant": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleDeveloper1": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleDeveloper2": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleSystem1": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleSystem2": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUnion1": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUnion1TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUnion2": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUnion2TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUser1": ".openairesponsesinput_union", - "OpenAIResponsesInputRoleUser2": ".openairesponsesinput_union", - "OpenAIResponsesInputTypeFunctionCall": ".openairesponsesinput_union", - "OpenAIResponsesInputTypeFunctionCallOutput": ".openairesponsesinput_union", - "OpenAIResponsesInputTypeMessage1": ".openairesponsesinput_union", - "OpenAIResponsesInputTypeMessage2": ".openairesponsesinput_union", - "OpenAIResponsesInputUnion": ".openairesponsesinput_union", - "OpenAIResponsesInputUnion1": ".openairesponsesinput_union", - "OpenAIResponsesInputUnion1TypedDict": ".openairesponsesinput_union", - "OpenAIResponsesInputUnionTypedDict": ".openairesponsesinput_union", - "OpenAIResponsesPrompt": ".openairesponsesprompt", - "OpenAIResponsesPromptTypedDict": ".openairesponsesprompt", - "Variables": ".openairesponsesprompt", - "VariablesTypedDict": ".openairesponsesprompt", - "OpenAIResponsesReasoningConfig": ".openairesponsesreasoningconfig", - "OpenAIResponsesReasoningConfigTypedDict": ".openairesponsesreasoningconfig", - "OpenAIResponsesReasoningEffort": ".openairesponsesreasoningeffort", "OpenAIResponsesRefusalContent": ".openairesponsesrefusalcontent", "OpenAIResponsesRefusalContentType": ".openairesponsesrefusalcontent", "OpenAIResponsesRefusalContentTypedDict": ".openairesponsesrefusalcontent", "OpenAIResponsesResponseStatus": ".openairesponsesresponsestatus", - "OpenAIResponsesServiceTier": ".openairesponsesservicetier", "OpenAIResponsesToolChoice": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceAuto": ".openairesponsestoolchoice_union", "OpenAIResponsesToolChoiceFunction": ".openairesponsestoolchoice_union", @@ -1912,232 +2726,44 @@ _dynamic_imports: dict[str, str] = { "Type": ".openairesponsestoolchoice_union", "TypeTypedDict": ".openairesponsestoolchoice_union", "OpenAIResponsesTruncation": ".openairesponsestruncation", - "OpenResponsesEasyInputMessage": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentInputImage": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentInputImageTypedDict": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentType": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentUnion1": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentUnion1TypedDict": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentUnion2": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageContentUnion2TypedDict": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageDetail": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleAssistant": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleDeveloper": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleSystem": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleUnion": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleUnionTypedDict": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageRoleUser": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageTypeMessage": ".openresponseseasyinputmessage", - "OpenResponsesEasyInputMessageTypedDict": ".openresponseseasyinputmessage", - "OpenResponsesErrorEvent": ".openresponseserrorevent", - "OpenResponsesErrorEventType": ".openresponseserrorevent", - "OpenResponsesErrorEventTypedDict": ".openresponseserrorevent", - "OpenResponsesFunctionCallOutput": ".openresponsesfunctioncalloutput", - "OpenResponsesFunctionCallOutputType": ".openresponsesfunctioncalloutput", - "OpenResponsesFunctionCallOutputTypedDict": ".openresponsesfunctioncalloutput", - "OpenResponsesFunctionToolCall": ".openresponsesfunctiontoolcall", - "OpenResponsesFunctionToolCallType": ".openresponsesfunctiontoolcall", - "OpenResponsesFunctionToolCallTypedDict": ".openresponsesfunctiontoolcall", - "OpenResponsesImageGenCallCompleted": ".openresponsesimagegencallcompleted", - "OpenResponsesImageGenCallCompletedType": ".openresponsesimagegencallcompleted", - "OpenResponsesImageGenCallCompletedTypedDict": ".openresponsesimagegencallcompleted", - "OpenResponsesImageGenCallGenerating": ".openresponsesimagegencallgenerating", - "OpenResponsesImageGenCallGeneratingType": ".openresponsesimagegencallgenerating", - "OpenResponsesImageGenCallGeneratingTypedDict": ".openresponsesimagegencallgenerating", - "OpenResponsesImageGenCallInProgress": ".openresponsesimagegencallinprogress", - "OpenResponsesImageGenCallInProgressType": ".openresponsesimagegencallinprogress", - "OpenResponsesImageGenCallInProgressTypedDict": ".openresponsesimagegencallinprogress", - "OpenResponsesImageGenCallPartialImage": ".openresponsesimagegencallpartialimage", - "OpenResponsesImageGenCallPartialImageType": ".openresponsesimagegencallpartialimage", - "OpenResponsesImageGenCallPartialImageTypedDict": ".openresponsesimagegencallpartialimage", - "OpenResponsesInput": ".openresponsesinput", - "OpenResponsesInput1": ".openresponsesinput", - "OpenResponsesInput1TypedDict": ".openresponsesinput", - "OpenResponsesInputTypedDict": ".openresponsesinput", - "OpenResponsesInputMessageItem": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemContentInputImage": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemContentInputImageTypedDict": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemContentType": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemContentUnion": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemContentUnionTypedDict": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemDetail": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemRoleDeveloper": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemRoleSystem": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemRoleUnion": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemRoleUnionTypedDict": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemRoleUser": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemTypeMessage": ".openresponsesinputmessageitem", - "OpenResponsesInputMessageItemTypedDict": ".openresponsesinputmessageitem", - "OpenResponsesLogProbs": ".openresponseslogprobs", - "OpenResponsesLogProbsTypedDict": ".openresponseslogprobs", - "OpenResponsesNonStreamingResponse": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseObject": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseToolFunction": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseToolFunctionTypedDict": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseToolUnion": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseToolUnionTypedDict": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseType": ".openresponsesnonstreamingresponse", - "OpenResponsesNonStreamingResponseTypedDict": ".openresponsesnonstreamingresponse", - "OpenResponsesReasoning": ".openresponsesreasoning", - "OpenResponsesReasoningFormat": ".openresponsesreasoning", - "OpenResponsesReasoningStatusCompleted": ".openresponsesreasoning", - "OpenResponsesReasoningStatusInProgress": ".openresponsesreasoning", - "OpenResponsesReasoningStatusIncomplete": ".openresponsesreasoning", - "OpenResponsesReasoningStatusUnion": ".openresponsesreasoning", - "OpenResponsesReasoningStatusUnionTypedDict": ".openresponsesreasoning", - "OpenResponsesReasoningType": ".openresponsesreasoning", - "OpenResponsesReasoningTypedDict": ".openresponsesreasoning", - "OpenResponsesReasoningConfig": ".openresponsesreasoningconfig", - "OpenResponsesReasoningConfigTypedDict": ".openresponsesreasoningconfig", - "OpenResponsesReasoningDeltaEvent": ".openresponsesreasoningdeltaevent", - "OpenResponsesReasoningDeltaEventType": ".openresponsesreasoningdeltaevent", - "OpenResponsesReasoningDeltaEventTypedDict": ".openresponsesreasoningdeltaevent", - "OpenResponsesReasoningDoneEvent": ".openresponsesreasoningdoneevent", - "OpenResponsesReasoningDoneEventType": ".openresponsesreasoningdoneevent", - "OpenResponsesReasoningDoneEventTypedDict": ".openresponsesreasoningdoneevent", - "OpenResponsesReasoningSummaryPartAddedEvent": ".openresponsesreasoningsummarypartaddedevent", - "OpenResponsesReasoningSummaryPartAddedEventType": ".openresponsesreasoningsummarypartaddedevent", - "OpenResponsesReasoningSummaryPartAddedEventTypedDict": ".openresponsesreasoningsummarypartaddedevent", - "OpenResponsesReasoningSummaryTextDeltaEvent": ".openresponsesreasoningsummarytextdeltaevent", - "OpenResponsesReasoningSummaryTextDeltaEventType": ".openresponsesreasoningsummarytextdeltaevent", - "OpenResponsesReasoningSummaryTextDeltaEventTypedDict": ".openresponsesreasoningsummarytextdeltaevent", - "OpenResponsesReasoningSummaryTextDoneEvent": ".openresponsesreasoningsummarytextdoneevent", - "OpenResponsesReasoningSummaryTextDoneEventType": ".openresponsesreasoningsummarytextdoneevent", - "OpenResponsesReasoningSummaryTextDoneEventTypedDict": ".openresponsesreasoningsummarytextdoneevent", - "OpenResponsesRequest": ".openresponsesrequest", - "OpenResponsesRequestIDAutoRouter": ".openresponsesrequest", - "OpenResponsesRequestIDFileParser": ".openresponsesrequest", - "OpenResponsesRequestIDModeration": ".openresponsesrequest", - "OpenResponsesRequestIDResponseHealing": ".openresponsesrequest", - "OpenResponsesRequestIDWeb": ".openresponsesrequest", - "OpenResponsesRequestIgnore": ".openresponsesrequest", - "OpenResponsesRequestIgnoreTypedDict": ".openresponsesrequest", - "OpenResponsesRequestImageConfig": ".openresponsesrequest", - "OpenResponsesRequestImageConfigTypedDict": ".openresponsesrequest", - "OpenResponsesRequestMaxPrice": ".openresponsesrequest", - "OpenResponsesRequestMaxPriceTypedDict": ".openresponsesrequest", - "OpenResponsesRequestOnly": ".openresponsesrequest", - "OpenResponsesRequestOnlyTypedDict": ".openresponsesrequest", - "OpenResponsesRequestOrder": ".openresponsesrequest", - "OpenResponsesRequestOrderTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginAutoRouter": ".openresponsesrequest", - "OpenResponsesRequestPluginAutoRouterTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginFileParser": ".openresponsesrequest", - "OpenResponsesRequestPluginFileParserTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginModeration": ".openresponsesrequest", - "OpenResponsesRequestPluginModerationTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginResponseHealing": ".openresponsesrequest", - "OpenResponsesRequestPluginResponseHealingTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginUnion": ".openresponsesrequest", - "OpenResponsesRequestPluginUnionTypedDict": ".openresponsesrequest", - "OpenResponsesRequestPluginWeb": ".openresponsesrequest", - "OpenResponsesRequestPluginWebTypedDict": ".openresponsesrequest", - "OpenResponsesRequestProvider": ".openresponsesrequest", - "OpenResponsesRequestProviderTypedDict": ".openresponsesrequest", - "OpenResponsesRequestSort": ".openresponsesrequest", - "OpenResponsesRequestSortTypedDict": ".openresponsesrequest", - "OpenResponsesRequestToolFunction": ".openresponsesrequest", - "OpenResponsesRequestToolFunctionTypedDict": ".openresponsesrequest", - "OpenResponsesRequestToolUnion": ".openresponsesrequest", - "OpenResponsesRequestToolUnionTypedDict": ".openresponsesrequest", - "OpenResponsesRequestTrace": ".openresponsesrequest", - "OpenResponsesRequestTraceTypedDict": ".openresponsesrequest", - "OpenResponsesRequestType": ".openresponsesrequest", - "OpenResponsesRequestTypedDict": ".openresponsesrequest", - "ServiceTier": ".openresponsesrequest", - "Truncation": ".openresponsesrequest", - "OpenResponsesResponseText": ".openresponsesresponsetext", - "OpenResponsesResponseTextTypedDict": ".openresponsesresponsetext", - "OpenResponsesResponseTextVerbosity": ".openresponsesresponsetext", - "OpenResponsesStreamEvent": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseCompleted": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseCompletedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseContentPartAdded": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseContentPartAddedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseContentPartDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseContentPartDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseCreated": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseCreatedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFailed": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFailedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDelta": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDeltaTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseFunctionCallArgumentsDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseInProgress": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseInProgressTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseIncomplete": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseIncompleteTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputItemAdded": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputItemAddedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputItemDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputItemDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextAnnotationAdded": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextAnnotationAddedTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextDelta": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextDeltaTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseOutputTextDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseReasoningSummaryPartDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseReasoningSummaryPartDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseRefusalDelta": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseRefusalDeltaTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseRefusalDone": ".openresponsesstreamevent", - "OpenResponsesStreamEventResponseRefusalDoneTypedDict": ".openresponsesstreamevent", - "OpenResponsesStreamEventTypedDict": ".openresponsesstreamevent", - "Part1": ".openresponsesstreamevent", - "Part1TypedDict": ".openresponsesstreamevent", - "Part2": ".openresponsesstreamevent", - "Part2TypedDict": ".openresponsesstreamevent", - "TypeResponseCompleted": ".openresponsesstreamevent", - "TypeResponseContentPartAdded": ".openresponsesstreamevent", - "TypeResponseContentPartDone": ".openresponsesstreamevent", - "TypeResponseCreated": ".openresponsesstreamevent", - "TypeResponseFailed": ".openresponsesstreamevent", - "TypeResponseFunctionCallArgumentsDelta": ".openresponsesstreamevent", - "TypeResponseFunctionCallArgumentsDone": ".openresponsesstreamevent", - "TypeResponseInProgress": ".openresponsesstreamevent", - "TypeResponseIncomplete": ".openresponsesstreamevent", - "TypeResponseOutputItemAdded": ".openresponsesstreamevent", - "TypeResponseOutputItemDone": ".openresponsesstreamevent", - "TypeResponseOutputTextAnnotationAdded": ".openresponsesstreamevent", - "TypeResponseOutputTextDelta": ".openresponsesstreamevent", - "TypeResponseOutputTextDone": ".openresponsesstreamevent", - "TypeResponseReasoningSummaryPartDone": ".openresponsesstreamevent", - "TypeResponseRefusalDelta": ".openresponsesstreamevent", - "TypeResponseRefusalDone": ".openresponsesstreamevent", - "OpenResponsesTopLogprobs": ".openresponsestoplogprobs", - "OpenResponsesTopLogprobsTypedDict": ".openresponsestoplogprobs", - "CostDetails": ".openresponsesusage", - "CostDetailsTypedDict": ".openresponsesusage", - "InputTokensDetails": ".openresponsesusage", - "InputTokensDetailsTypedDict": ".openresponsesusage", - "OpenResponsesUsage": ".openresponsesusage", - "OpenResponsesUsageTypedDict": ".openresponsesusage", - "OutputTokensDetails": ".openresponsesusage", - "OutputTokensDetailsTypedDict": ".openresponsesusage", - "OpenResponsesWebSearch20250826Tool": ".openresponseswebsearch20250826tool", - "OpenResponsesWebSearch20250826ToolFilters": ".openresponseswebsearch20250826tool", - "OpenResponsesWebSearch20250826ToolFiltersTypedDict": ".openresponseswebsearch20250826tool", - "OpenResponsesWebSearch20250826ToolType": ".openresponseswebsearch20250826tool", - "OpenResponsesWebSearch20250826ToolTypedDict": ".openresponseswebsearch20250826tool", - "OpenResponsesWebSearchPreview20250311Tool": ".openresponseswebsearchpreview20250311tool", - "OpenResponsesWebSearchPreview20250311ToolType": ".openresponseswebsearchpreview20250311tool", - "OpenResponsesWebSearchPreview20250311ToolTypedDict": ".openresponseswebsearchpreview20250311tool", - "OpenResponsesWebSearchPreviewTool": ".openresponseswebsearchpreviewtool", - "OpenResponsesWebSearchPreviewToolType": ".openresponseswebsearchpreviewtool", - "OpenResponsesWebSearchPreviewToolTypedDict": ".openresponseswebsearchpreviewtool", - "OpenResponsesWebSearchTool": ".openresponseswebsearchtool", - "OpenResponsesWebSearchToolFilters": ".openresponseswebsearchtool", - "OpenResponsesWebSearchToolFiltersTypedDict": ".openresponseswebsearchtool", - "OpenResponsesWebSearchToolType": ".openresponseswebsearchtool", - "OpenResponsesWebSearchToolTypedDict": ".openresponseswebsearchtool", + "OpenResponsesResult": ".openresponsesresult", + "OpenResponsesResultObject": ".openresponsesresult", + "OpenResponsesResultToolFunction": ".openresponsesresult", + "OpenResponsesResultToolFunctionTypedDict": ".openresponsesresult", + "OpenResponsesResultToolUnion": ".openresponsesresult", + "OpenResponsesResultToolUnionTypedDict": ".openresponsesresult", + "OpenResponsesResultType": ".openresponsesresult", + "OpenResponsesResultTypedDict": ".openresponsesresult", + "OutputDatetimeItem": ".outputdatetimeitem", + "OutputDatetimeItemStatus": ".outputdatetimeitem", + "OutputDatetimeItemType": ".outputdatetimeitem", + "OutputDatetimeItemTypedDict": ".outputdatetimeitem", + "OutputFileSearchCallItem": ".outputfilesearchcallitem", + "OutputFileSearchCallItemType": ".outputfilesearchcallitem", + "OutputFileSearchCallItemTypedDict": ".outputfilesearchcallitem", + "OutputFunctionCallItem": ".outputfunctioncallitem", + "OutputFunctionCallItemStatusCompleted": ".outputfunctioncallitem", + "OutputFunctionCallItemStatusInProgress": ".outputfunctioncallitem", + "OutputFunctionCallItemStatusIncomplete": ".outputfunctioncallitem", + "OutputFunctionCallItemStatusUnion": ".outputfunctioncallitem", + "OutputFunctionCallItemStatusUnionTypedDict": ".outputfunctioncallitem", + "OutputFunctionCallItemType": ".outputfunctioncallitem", + "OutputFunctionCallItemTypedDict": ".outputfunctioncallitem", + "OutputImageGenerationCallItem": ".outputimagegenerationcallitem", + "OutputImageGenerationCallItemType": ".outputimagegenerationcallitem", + "OutputImageGenerationCallItemTypedDict": ".outputimagegenerationcallitem", "OutputItemImageGenerationCall": ".outputitemimagegenerationcall", "OutputItemImageGenerationCallType": ".outputitemimagegenerationcall", "OutputItemImageGenerationCallTypedDict": ".outputitemimagegenerationcall", + "OutputItems": ".outputitems", + "OutputItemsTypedDict": ".outputitems", "OutputMessage": ".outputmessage", "OutputMessageContent": ".outputmessage", "OutputMessageContentTypedDict": ".outputmessage", + "OutputMessagePhaseCommentary": ".outputmessage", + "OutputMessagePhaseFinalAnswer": ".outputmessage", + "OutputMessagePhaseUnion": ".outputmessage", + "OutputMessagePhaseUnionTypedDict": ".outputmessage", "OutputMessageRole": ".outputmessage", "OutputMessageStatusCompleted": ".outputmessage", "OutputMessageStatusInProgress": ".outputmessage", @@ -2146,13 +2772,61 @@ _dynamic_imports: dict[str, str] = { "OutputMessageStatusUnionTypedDict": ".outputmessage", "OutputMessageType": ".outputmessage", "OutputMessageTypedDict": ".outputmessage", + "OutputMessageItem": ".outputmessageitem", + "OutputMessageItemContent": ".outputmessageitem", + "OutputMessageItemContentTypedDict": ".outputmessageitem", + "OutputMessageItemPhaseCommentary": ".outputmessageitem", + "OutputMessageItemPhaseFinalAnswer": ".outputmessageitem", + "OutputMessageItemPhaseUnion": ".outputmessageitem", + "OutputMessageItemPhaseUnionTypedDict": ".outputmessageitem", + "OutputMessageItemRole": ".outputmessageitem", + "OutputMessageItemStatusCompleted": ".outputmessageitem", + "OutputMessageItemStatusInProgress": ".outputmessageitem", + "OutputMessageItemStatusIncomplete": ".outputmessageitem", + "OutputMessageItemStatusUnion": ".outputmessageitem", + "OutputMessageItemStatusUnionTypedDict": ".outputmessageitem", + "OutputMessageItemType": ".outputmessageitem", + "OutputMessageItemTypedDict": ".outputmessageitem", "OutputModality": ".outputmodality", + "OutputModalityEnum": ".outputmodalityenum", + "OutputReasoningItem": ".outputreasoningitem", + "OutputReasoningItemFormat": ".outputreasoningitem", + "OutputReasoningItemStatusCompleted": ".outputreasoningitem", + "OutputReasoningItemStatusInProgress": ".outputreasoningitem", + "OutputReasoningItemStatusIncomplete": ".outputreasoningitem", + "OutputReasoningItemStatusUnion": ".outputreasoningitem", + "OutputReasoningItemStatusUnionTypedDict": ".outputreasoningitem", + "OutputReasoningItemType": ".outputreasoningitem", + "OutputReasoningItemTypedDict": ".outputreasoningitem", + "OutputServerToolItem": ".outputservertoolitem", + "OutputServerToolItemStatus": ".outputservertoolitem", + "OutputServerToolItemTypedDict": ".outputservertoolitem", + "Action": ".outputwebsearchcallitem", + "ActionFindInPage": ".outputwebsearchcallitem", + "ActionFindInPageTypedDict": ".outputwebsearchcallitem", + "ActionOpenPage": ".outputwebsearchcallitem", + "ActionOpenPageTypedDict": ".outputwebsearchcallitem", + "ActionSearch": ".outputwebsearchcallitem", + "ActionSearchTypedDict": ".outputwebsearchcallitem", + "ActionTypedDict": ".outputwebsearchcallitem", + "OutputWebSearchCallItem": ".outputwebsearchcallitem", + "OutputWebSearchCallItemTypedDict": ".outputwebsearchcallitem", + "Source": ".outputwebsearchcallitem", + "SourceTypedDict": ".outputwebsearchcallitem", + "TypeFindInPage": ".outputwebsearchcallitem", + "TypeOpenPage": ".outputwebsearchcallitem", + "TypeSearch": ".outputwebsearchcallitem", + "TypeURL": ".outputwebsearchcallitem", + "TypeWebSearchCall": ".outputwebsearchcallitem", "Parameter": ".parameter", "PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata", "PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata", "PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata", "PaymentRequiredResponseErrorDataTypedDict": ".paymentrequiredresponseerrordata", "PDFParserEngine": ".pdfparserengine", + "PDFParserEngineEnum": ".pdfparserengine", + "PDFParserEnginePDFText": ".pdfparserengine", + "PDFParserEngineTypedDict": ".pdfparserengine", "PDFParserOptions": ".pdfparseroptions", "PDFParserOptionsTypedDict": ".pdfparseroptions", "PercentileLatencyCutoffs": ".percentilelatencycutoffs", @@ -2167,6 +2841,21 @@ _dynamic_imports: dict[str, str] = { "PreferredMaxLatencyTypedDict": ".preferredmaxlatency", "PreferredMinThroughput": ".preferredminthroughput", "PreferredMinThroughputTypedDict": ".preferredminthroughput", + "Preview20250311WebSearchServerTool": ".preview_20250311_websearchservertool", + "Preview20250311WebSearchServerToolEngine": ".preview_20250311_websearchservertool", + "Preview20250311WebSearchServerToolFilters": ".preview_20250311_websearchservertool", + "Preview20250311WebSearchServerToolFiltersTypedDict": ".preview_20250311_websearchservertool", + "Preview20250311WebSearchServerToolType": ".preview_20250311_websearchservertool", + "Preview20250311WebSearchServerToolTypedDict": ".preview_20250311_websearchservertool", + "PreviewWebSearchServerTool": ".preview_websearchservertool", + "PreviewWebSearchServerToolEngine": ".preview_websearchservertool", + "PreviewWebSearchServerToolFilters": ".preview_websearchservertool", + "PreviewWebSearchServerToolFiltersTypedDict": ".preview_websearchservertool", + "PreviewWebSearchServerToolType": ".preview_websearchservertool", + "PreviewWebSearchServerToolTypedDict": ".preview_websearchservertool", + "PreviewWebSearchUserLocation": ".preview_websearchuserlocation", + "PreviewWebSearchUserLocationType": ".preview_websearchuserlocation", + "PreviewWebSearchUserLocationTypedDict": ".preview_websearchuserlocation", "ProviderName": ".providername", "ProviderOverloadedResponseErrorData": ".provideroverloadedresponseerrordata", "ProviderOverloadedResponseErrorDataTypedDict": ".provideroverloadedresponseerrordata", @@ -2204,6 +2893,11 @@ _dynamic_imports: dict[str, str] = { "PublicPricing": ".publicpricing", "PublicPricingTypedDict": ".publicpricing", "Quantization": ".quantization", + "ReasoningConfig": ".reasoningconfig", + "ReasoningConfigTypedDict": ".reasoningconfig", + "ReasoningDeltaEvent": ".reasoningdeltaevent", + "ReasoningDeltaEventType": ".reasoningdeltaevent", + "ReasoningDeltaEventTypedDict": ".reasoningdeltaevent", "ReasoningDetailEncrypted": ".reasoningdetailencrypted", "ReasoningDetailEncryptedFormat": ".reasoningdetailencrypted", "ReasoningDetailEncryptedType": ".reasoningdetailencrypted", @@ -2218,54 +2912,50 @@ _dynamic_imports: dict[str, str] = { "ReasoningDetailTextTypedDict": ".reasoningdetailtext", "ReasoningDetailUnion": ".reasoningdetailunion", "ReasoningDetailUnionTypedDict": ".reasoningdetailunion", + "ReasoningDoneEvent": ".reasoningdoneevent", + "ReasoningDoneEventType": ".reasoningdoneevent", + "ReasoningDoneEventTypedDict": ".reasoningdoneevent", + "ReasoningEffortEnum": ".reasoningeffortenum", + "ReasoningItem": ".reasoningitem", + "ReasoningItemFormat": ".reasoningitem", + "ReasoningItemStatusCompleted": ".reasoningitem", + "ReasoningItemStatusInProgress": ".reasoningitem", + "ReasoningItemStatusIncomplete": ".reasoningitem", + "ReasoningItemStatusUnion": ".reasoningitem", + "ReasoningItemStatusUnionTypedDict": ".reasoningitem", + "ReasoningItemType": ".reasoningitem", + "ReasoningItemTypedDict": ".reasoningitem", + "ReasoningSummaryPartAddedEvent": ".reasoningsummarypartaddedevent", + "ReasoningSummaryPartAddedEventType": ".reasoningsummarypartaddedevent", + "ReasoningSummaryPartAddedEventTypedDict": ".reasoningsummarypartaddedevent", + "ReasoningSummaryPartDoneEvent": ".reasoningsummarypartdoneevent", + "ReasoningSummaryPartDoneEventType": ".reasoningsummarypartdoneevent", + "ReasoningSummaryPartDoneEventTypedDict": ".reasoningsummarypartdoneevent", "ReasoningSummaryText": ".reasoningsummarytext", "ReasoningSummaryTextType": ".reasoningsummarytext", "ReasoningSummaryTextTypedDict": ".reasoningsummarytext", - "ReasoningSummaryVerbosity": ".reasoningsummaryverbosity", + "ReasoningSummaryTextDeltaEvent": ".reasoningsummarytextdeltaevent", + "ReasoningSummaryTextDeltaEventType": ".reasoningsummarytextdeltaevent", + "ReasoningSummaryTextDeltaEventTypedDict": ".reasoningsummarytextdeltaevent", + "ReasoningSummaryTextDoneEvent": ".reasoningsummarytextdoneevent", + "ReasoningSummaryTextDoneEventType": ".reasoningsummarytextdoneevent", + "ReasoningSummaryTextDoneEventTypedDict": ".reasoningsummarytextdoneevent", + "ReasoningSummaryVerbosityEnum": ".reasoningsummaryverbosityenum", "ReasoningTextContent": ".reasoningtextcontent", "ReasoningTextContentType": ".reasoningtextcontent", "ReasoningTextContentTypedDict": ".reasoningtextcontent", + "RefusalDeltaEvent": ".refusaldeltaevent", + "RefusalDeltaEventType": ".refusaldeltaevent", + "RefusalDeltaEventTypedDict": ".refusaldeltaevent", + "RefusalDoneEvent": ".refusaldoneevent", + "RefusalDoneEventType": ".refusaldoneevent", + "RefusalDoneEventTypedDict": ".refusaldoneevent", "RequestTimeoutResponseErrorData": ".requesttimeoutresponseerrordata", "RequestTimeoutResponseErrorDataTypedDict": ".requesttimeoutresponseerrordata", - "ResponseFormatJSONObject": ".responseformatjsonobject", - "ResponseFormatJSONObjectType": ".responseformatjsonobject", - "ResponseFormatJSONObjectTypedDict": ".responseformatjsonobject", - "ResponseFormatJSONSchema": ".responseformatjsonschema", - "ResponseFormatJSONSchemaType": ".responseformatjsonschema", - "ResponseFormatJSONSchemaTypedDict": ".responseformatjsonschema", - "ResponseFormatText": ".responseformattext", - "ResponseFormatTextType": ".responseformattext", - "ResponseFormatTextTypedDict": ".responseformattext", - "ResponseFormatTextConfig": ".responseformattextconfig", - "ResponseFormatTextConfigTypedDict": ".responseformattextconfig", - "ResponseFormatTextGrammar": ".responseformattextgrammar", - "ResponseFormatTextGrammarType": ".responseformattextgrammar", - "ResponseFormatTextGrammarTypedDict": ".responseformattextgrammar", - "ResponseFormatTextPython": ".responseformattextpython", - "ResponseFormatTextPythonType": ".responseformattextpython", - "ResponseFormatTextPythonTypedDict": ".responseformattextpython", - "ResponseInputAudio": ".responseinputaudio", - "ResponseInputAudioFormat": ".responseinputaudio", - "ResponseInputAudioInputAudio": ".responseinputaudio", - "ResponseInputAudioInputAudioTypedDict": ".responseinputaudio", - "ResponseInputAudioType": ".responseinputaudio", - "ResponseInputAudioTypedDict": ".responseinputaudio", - "ResponseInputFile": ".responseinputfile", - "ResponseInputFileType": ".responseinputfile", - "ResponseInputFileTypedDict": ".responseinputfile", - "ResponseInputImage": ".responseinputimage", - "ResponseInputImageDetail": ".responseinputimage", - "ResponseInputImageType": ".responseinputimage", - "ResponseInputImageTypedDict": ".responseinputimage", - "ResponseInputText": ".responseinputtext", - "ResponseInputTextType": ".responseinputtext", - "ResponseInputTextTypedDict": ".responseinputtext", - "ResponseInputVideo": ".responseinputvideo", - "ResponseInputVideoType": ".responseinputvideo", - "ResponseInputVideoTypedDict": ".responseinputvideo", - "Logprob": ".responseoutputtext", - "LogprobTypedDict": ".responseoutputtext", + "ResponseIncludesEnum": ".responseincludesenum", "ResponseOutputText": ".responseoutputtext", + "ResponseOutputTextLogprob": ".responseoutputtext", + "ResponseOutputTextLogprobTypedDict": ".responseoutputtext", "ResponseOutputTextTopLogprob": ".responseoutputtext", "ResponseOutputTextTopLogprobTypedDict": ".responseoutputtext", "ResponseOutputTextType": ".responseoutputtext", @@ -2273,88 +2963,111 @@ _dynamic_imports: dict[str, str] = { "Code": ".responseserrorfield", "ResponsesErrorField": ".responseserrorfield", "ResponsesErrorFieldTypedDict": ".responseserrorfield", - "ResponsesFormatText": ".responsesformattext", - "ResponsesFormatTextType": ".responsesformattext", - "ResponsesFormatTextTypedDict": ".responsesformattext", - "ResponsesFormatTextJSONSchemaConfig": ".responsesformattextjsonschemaconfig", - "ResponsesFormatTextJSONSchemaConfigType": ".responsesformattextjsonschemaconfig", - "ResponsesFormatTextJSONSchemaConfigTypedDict": ".responsesformattextjsonschemaconfig", - "ResponsesImageGenerationCall": ".responsesimagegenerationcall", - "ResponsesImageGenerationCallType": ".responsesimagegenerationcall", - "ResponsesImageGenerationCallTypedDict": ".responsesimagegenerationcall", - "ResponsesOutputItem": ".responsesoutputitem", - "ResponsesOutputItemTypedDict": ".responsesoutputitem", - "ResponsesOutputItemFileSearchCall": ".responsesoutputitemfilesearchcall", - "ResponsesOutputItemFileSearchCallType": ".responsesoutputitemfilesearchcall", - "ResponsesOutputItemFileSearchCallTypedDict": ".responsesoutputitemfilesearchcall", - "ResponsesOutputItemFunctionCall": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallStatusCompleted": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallStatusInProgress": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallStatusIncomplete": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallStatusUnion": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallStatusUnionTypedDict": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallType": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemFunctionCallTypedDict": ".responsesoutputitemfunctioncall", - "ResponsesOutputItemReasoning": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningFormat": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningStatusCompleted": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningStatusInProgress": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningStatusIncomplete": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningStatusUnion": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningStatusUnionTypedDict": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningType": ".responsesoutputitemreasoning", - "ResponsesOutputItemReasoningTypedDict": ".responsesoutputitemreasoning", - "ResponsesOutputMessage": ".responsesoutputmessage", - "ResponsesOutputMessageContent": ".responsesoutputmessage", - "ResponsesOutputMessageContentTypedDict": ".responsesoutputmessage", - "ResponsesOutputMessageRole": ".responsesoutputmessage", - "ResponsesOutputMessageStatusCompleted": ".responsesoutputmessage", - "ResponsesOutputMessageStatusInProgress": ".responsesoutputmessage", - "ResponsesOutputMessageStatusIncomplete": ".responsesoutputmessage", - "ResponsesOutputMessageStatusUnion": ".responsesoutputmessage", - "ResponsesOutputMessageStatusUnionTypedDict": ".responsesoutputmessage", - "ResponsesOutputMessageType": ".responsesoutputmessage", - "ResponsesOutputMessageTypedDict": ".responsesoutputmessage", - "ResponsesOutputModality": ".responsesoutputmodality", - "ResponsesSearchContextSize": ".responsessearchcontextsize", - "ResponsesWebSearchCallOutput": ".responseswebsearchcalloutput", - "ResponsesWebSearchCallOutputType": ".responseswebsearchcalloutput", - "ResponsesWebSearchCallOutputTypedDict": ".responseswebsearchcalloutput", - "ResponsesWebSearchUserLocation": ".responseswebsearchuserlocation", - "ResponsesWebSearchUserLocationType": ".responseswebsearchuserlocation", - "ResponsesWebSearchUserLocationTypedDict": ".responseswebsearchuserlocation", - "ResponseTextConfig": ".responsetextconfig", - "ResponseTextConfigTypedDict": ".responsetextconfig", - "ResponseTextConfigVerbosity": ".responsetextconfig", + "ResponsesRequest": ".responsesrequest", + "ResponsesRequestIDAutoRouter": ".responsesrequest", + "ResponsesRequestIDContextCompression": ".responsesrequest", + "ResponsesRequestIDFileParser": ".responsesrequest", + "ResponsesRequestIDModeration": ".responsesrequest", + "ResponsesRequestIDResponseHealing": ".responsesrequest", + "ResponsesRequestIDWeb": ".responsesrequest", + "ResponsesRequestIgnore": ".responsesrequest", + "ResponsesRequestIgnoreTypedDict": ".responsesrequest", + "ResponsesRequestImageConfig": ".responsesrequest", + "ResponsesRequestImageConfigTypedDict": ".responsesrequest", + "ResponsesRequestMaxPrice": ".responsesrequest", + "ResponsesRequestMaxPriceTypedDict": ".responsesrequest", + "ResponsesRequestOnly": ".responsesrequest", + "ResponsesRequestOnlyTypedDict": ".responsesrequest", + "ResponsesRequestOrder": ".responsesrequest", + "ResponsesRequestOrderTypedDict": ".responsesrequest", + "ResponsesRequestPluginAutoRouter": ".responsesrequest", + "ResponsesRequestPluginAutoRouterTypedDict": ".responsesrequest", + "ResponsesRequestPluginContextCompression": ".responsesrequest", + "ResponsesRequestPluginContextCompressionTypedDict": ".responsesrequest", + "ResponsesRequestPluginFileParser": ".responsesrequest", + "ResponsesRequestPluginFileParserTypedDict": ".responsesrequest", + "ResponsesRequestPluginModeration": ".responsesrequest", + "ResponsesRequestPluginModerationTypedDict": ".responsesrequest", + "ResponsesRequestPluginResponseHealing": ".responsesrequest", + "ResponsesRequestPluginResponseHealingTypedDict": ".responsesrequest", + "ResponsesRequestPluginUnion": ".responsesrequest", + "ResponsesRequestPluginUnionTypedDict": ".responsesrequest", + "ResponsesRequestPluginWeb": ".responsesrequest", + "ResponsesRequestPluginWebTypedDict": ".responsesrequest", + "ResponsesRequestProvider": ".responsesrequest", + "ResponsesRequestProviderTypedDict": ".responsesrequest", + "ResponsesRequestServiceTier": ".responsesrequest", + "ResponsesRequestSort": ".responsesrequest", + "ResponsesRequestSortTypedDict": ".responsesrequest", + "ResponsesRequestToolFunction": ".responsesrequest", + "ResponsesRequestToolFunctionTypedDict": ".responsesrequest", + "ResponsesRequestToolUnion": ".responsesrequest", + "ResponsesRequestToolUnionTypedDict": ".responsesrequest", + "ResponsesRequestTrace": ".responsesrequest", + "ResponsesRequestTraceTypedDict": ".responsesrequest", + "ResponsesRequestType": ".responsesrequest", + "ResponsesRequestTypedDict": ".responsesrequest", + "SearchContextSizeEnum": ".searchcontextsizeenum", "Security": ".security", "SecurityTypedDict": ".security", "ServiceUnavailableResponseErrorData": ".serviceunavailableresponseerrordata", "ServiceUnavailableResponseErrorDataTypedDict": ".serviceunavailableresponseerrordata", - "SystemMessage": ".systemmessage", - "SystemMessageContent": ".systemmessage", - "SystemMessageContentTypedDict": ".systemmessage", - "SystemMessageRole": ".systemmessage", - "SystemMessageTypedDict": ".systemmessage", - "ToolCallStatus": ".toolcallstatus", - "ToolChoiceOption": ".toolchoiceoption", - "ToolChoiceOptionAuto": ".toolchoiceoption", - "ToolChoiceOptionNone": ".toolchoiceoption", - "ToolChoiceOptionRequired": ".toolchoiceoption", - "ToolChoiceOptionTypedDict": ".toolchoiceoption", - "ToolDefinitionJSON": ".tooldefinitionjson", - "ToolDefinitionJSONFunction": ".tooldefinitionjson", - "ToolDefinitionJSONFunctionTypedDict": ".tooldefinitionjson", - "ToolDefinitionJSONType": ".tooldefinitionjson", - "ToolDefinitionJSONTypedDict": ".tooldefinitionjson", - "ToolResponseMessage": ".toolresponsemessage", - "ToolResponseMessageContent": ".toolresponsemessage", - "ToolResponseMessageContentTypedDict": ".toolresponsemessage", - "ToolResponseMessageRole": ".toolresponsemessage", - "ToolResponseMessageTypedDict": ".toolresponsemessage", + "ShellServerTool": ".shellservertool", + "ShellServerToolType": ".shellservertool", + "ShellServerToolTypedDict": ".shellservertool", + "StoredPromptTemplate": ".storedprompttemplate", + "StoredPromptTemplateTypedDict": ".storedprompttemplate", + "Variables": ".storedprompttemplate", + "VariablesTypedDict": ".storedprompttemplate", + "StreamEvents": ".streamevents", + "StreamEventsResponseCompleted": ".streamevents", + "StreamEventsResponseCompletedTypedDict": ".streamevents", + "StreamEventsResponseCreated": ".streamevents", + "StreamEventsResponseCreatedTypedDict": ".streamevents", + "StreamEventsResponseFailed": ".streamevents", + "StreamEventsResponseFailedTypedDict": ".streamevents", + "StreamEventsResponseInProgress": ".streamevents", + "StreamEventsResponseInProgressTypedDict": ".streamevents", + "StreamEventsResponseIncomplete": ".streamevents", + "StreamEventsResponseIncompleteTypedDict": ".streamevents", + "StreamEventsResponseOutputItemAdded": ".streamevents", + "StreamEventsResponseOutputItemAddedTypedDict": ".streamevents", + "StreamEventsResponseOutputItemDone": ".streamevents", + "StreamEventsResponseOutputItemDoneTypedDict": ".streamevents", + "StreamEventsTypedDict": ".streamevents", + "TypeResponseCompleted": ".streamevents", + "TypeResponseCreated": ".streamevents", + "TypeResponseFailed": ".streamevents", + "TypeResponseInProgress": ".streamevents", + "TypeResponseIncomplete": ".streamevents", + "TypeResponseOutputItemAdded": ".streamevents", + "TypeResponseOutputItemDone": ".streamevents", + "TextConfig": ".textconfig", + "TextConfigTypedDict": ".textconfig", + "TextConfigVerbosity": ".textconfig", + "TextDeltaEvent": ".textdeltaevent", + "TextDeltaEventLogprob": ".textdeltaevent", + "TextDeltaEventLogprobTypedDict": ".textdeltaevent", + "TextDeltaEventTopLogprob": ".textdeltaevent", + "TextDeltaEventTopLogprobTypedDict": ".textdeltaevent", + "TextDeltaEventType": ".textdeltaevent", + "TextDeltaEventTypedDict": ".textdeltaevent", + "TextDoneEvent": ".textdoneevent", + "TextDoneEventLogprob": ".textdoneevent", + "TextDoneEventLogprobTypedDict": ".textdoneevent", + "TextDoneEventTopLogprob": ".textdoneevent", + "TextDoneEventTopLogprobTypedDict": ".textdoneevent", + "TextDoneEventType": ".textdoneevent", + "TextDoneEventTypedDict": ".textdoneevent", + "TextExtendedConfig": ".textextendedconfig", + "TextExtendedConfigTypedDict": ".textextendedconfig", + "TextExtendedConfigVerbosity": ".textextendedconfig", + "ToolCallStatusEnum": ".toolcallstatusenum", "TooManyRequestsResponseErrorData": ".toomanyrequestsresponseerrordata", "TooManyRequestsResponseErrorDataTypedDict": ".toomanyrequestsresponseerrordata", "TopProviderInfo": ".topproviderinfo", "TopProviderInfoTypedDict": ".topproviderinfo", + "TruncationEnum": ".truncationenum", "UnauthorizedResponseErrorData": ".unauthorizedresponseerrordata", "UnauthorizedResponseErrorDataTypedDict": ".unauthorizedresponseerrordata", "UnprocessableEntityResponseErrorData": ".unprocessableentityresponseerrordata", @@ -2362,18 +3075,39 @@ _dynamic_imports: dict[str, str] = { "URLCitation": ".urlcitation", "URLCitationType": ".urlcitation", "URLCitationTypedDict": ".urlcitation", - "UserMessage": ".usermessage", - "UserMessageContent": ".usermessage", - "UserMessageContentTypedDict": ".usermessage", - "UserMessageRole": ".usermessage", - "UserMessageTypedDict": ".usermessage", - "VideoInput": ".videoinput", - "VideoInputTypedDict": ".videoinput", + "CostDetails": ".usage", + "CostDetailsTypedDict": ".usage", + "InputTokensDetails": ".usage", + "InputTokensDetailsTypedDict": ".usage", + "OutputTokensDetails": ".usage", + "OutputTokensDetailsTypedDict": ".usage", + "Usage": ".usage", + "UsageTypedDict": ".usage", + "WebSearchCallCompletedEvent": ".websearchcallcompletedevent", + "WebSearchCallCompletedEventType": ".websearchcallcompletedevent", + "WebSearchCallCompletedEventTypedDict": ".websearchcallcompletedevent", + "WebSearchCallInProgressEvent": ".websearchcallinprogressevent", + "WebSearchCallInProgressEventType": ".websearchcallinprogressevent", + "WebSearchCallInProgressEventTypedDict": ".websearchcallinprogressevent", + "WebSearchCallSearchingEvent": ".websearchcallsearchingevent", + "WebSearchCallSearchingEventType": ".websearchcallsearchingevent", + "WebSearchCallSearchingEventTypedDict": ".websearchcallsearchingevent", "WebSearchEngine": ".websearchengine", - "WebSearchPreviewToolUserLocation": ".websearchpreviewtooluserlocation", - "WebSearchPreviewToolUserLocationType": ".websearchpreviewtooluserlocation", - "WebSearchPreviewToolUserLocationTypedDict": ".websearchpreviewtooluserlocation", + "WebSearchServerTool": ".websearchservertool", + "WebSearchServerToolEngine": ".websearchservertool", + "WebSearchServerToolFilters": ".websearchservertool", + "WebSearchServerToolFiltersTypedDict": ".websearchservertool", + "WebSearchServerToolType": ".websearchservertool", + "WebSearchServerToolTypedDict": ".websearchservertool", + "WebSearchServerToolOpenRouter": ".websearchservertool_openrouter", + "WebSearchServerToolOpenRouterParameters": ".websearchservertool_openrouter", + "WebSearchServerToolOpenRouterParametersTypedDict": ".websearchservertool_openrouter", + "WebSearchServerToolOpenRouterType": ".websearchservertool_openrouter", + "WebSearchServerToolOpenRouterTypedDict": ".websearchservertool_openrouter", "WebSearchStatus": ".websearchstatus", + "WebSearchUserLocation": ".websearchuserlocation", + "WebSearchUserLocationType": ".websearchuserlocation", + "WebSearchUserLocationTypedDict": ".websearchuserlocation", } diff --git a/src/openrouter/components/annotationaddedevent.py b/src/openrouter/components/annotationaddedevent.py new file mode 100644 index 0000000..361c244 --- /dev/null +++ b/src/openrouter/components/annotationaddedevent.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openairesponsesannotation import ( + OpenAIResponsesAnnotation, + OpenAIResponsesAnnotationTypedDict, +) +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +AnnotationAddedEventType = Literal["response.output_text.annotation.added",] + + +class AnnotationAddedEventTypedDict(TypedDict): + r"""Event emitted when a text annotation is added to output""" + + type: AnnotationAddedEventType + output_index: float + item_id: str + content_index: float + sequence_number: float + annotation_index: float + annotation: OpenAIResponsesAnnotationTypedDict + + +class AnnotationAddedEvent(BaseModel): + r"""Event emitted when a text annotation is added to output""" + + type: AnnotationAddedEventType + + output_index: float + + item_id: str + + content_index: float + + sequence_number: float + + annotation_index: float + + annotation: OpenAIResponsesAnnotation diff --git a/src/openrouter/components/applypatchservertool.py b/src/openrouter/components/applypatchservertool.py new file mode 100644 index 0000000..0be0749 --- /dev/null +++ b/src/openrouter/components/applypatchservertool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ApplyPatchServerToolType = Literal["apply_patch",] + + +class ApplyPatchServerToolTypedDict(TypedDict): + r"""Apply patch tool configuration""" + + type: ApplyPatchServerToolType + + +class ApplyPatchServerTool(BaseModel): + r"""Apply patch tool configuration""" + + type: ApplyPatchServerToolType diff --git a/src/openrouter/components/assistantmessage.py b/src/openrouter/components/assistantmessage.py index 53c5026..7666beb 100644 --- a/src/openrouter/components/assistantmessage.py +++ b/src/openrouter/components/assistantmessage.py @@ -5,6 +5,10 @@ from .assistantmessageimages import ( AssistantMessageImages, AssistantMessageImagesTypedDict, ) +from .chatcompletionaudiooutput import ( + ChatCompletionAudioOutput, + ChatCompletionAudioOutputTypedDict, +) from .chatmessagecontentitem import ( ChatMessageContentItem, ChatMessageContentItemTypedDict, @@ -57,6 +61,8 @@ class AssistantMessageTypedDict(TypedDict): r"""Reasoning details for extended thinking models""" images: NotRequired[List[AssistantMessageImagesTypedDict]] r"""Generated images from image generation models""" + audio: NotRequired[ChatCompletionAudioOutputTypedDict] + r"""Audio output data or reference""" class AssistantMessage(BaseModel): @@ -85,6 +91,9 @@ class AssistantMessage(BaseModel): images: Optional[List[AssistantMessageImages]] = None r"""Generated images from image generation models""" + audio: Optional[ChatCompletionAudioOutput] = None + r"""Audio output data or reference""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -95,6 +104,7 @@ class AssistantMessage(BaseModel): "reasoning", "reasoning_details", "images", + "audio", ] nullable_fields = ["content", "refusal", "reasoning"] null_default_fields = [] diff --git a/src/openrouter/components/baseinputs_union.py b/src/openrouter/components/baseinputs_union.py new file mode 100644 index 0000000..aac7cf9 --- /dev/null +++ b/src/openrouter/components/baseinputs_union.py @@ -0,0 +1,391 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputaudio import InputAudio, InputAudioTypedDict +from .inputfile import InputFile, InputFileTypedDict +from .inputimage import InputImage, InputImageTypedDict +from .inputtext import InputText, InputTextTypedDict +from .outputitemimagegenerationcall import ( + OutputItemImageGenerationCall, + OutputItemImageGenerationCallTypedDict, +) +from .outputmessage import OutputMessage, OutputMessageTypedDict +from .toolcallstatusenum import ToolCallStatusEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +BaseInputsTypeFunctionCall = Literal["function_call",] + + +class BaseInputsFunctionCallTypedDict(TypedDict): + type: BaseInputsTypeFunctionCall + call_id: str + name: str + arguments: str + id: NotRequired[str] + status: NotRequired[Nullable[ToolCallStatusEnum]] + + +class BaseInputsFunctionCall(BaseModel): + type: BaseInputsTypeFunctionCall + + call_id: str + + name: str + + arguments: str + + id: Optional[str] = None + + status: Annotated[ + OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "status"] + nullable_fields = ["status"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +BaseInputsTypeFunctionCallOutput = Literal["function_call_output",] + + +BaseInputsOutput1TypedDict = TypeAliasType( + "BaseInputsOutput1TypedDict", + Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict], +) + + +BaseInputsOutput1 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[InputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +BaseInputsOutput2TypedDict = TypeAliasType( + "BaseInputsOutput2TypedDict", Union[str, List[BaseInputsOutput1TypedDict]] +) + + +BaseInputsOutput2 = TypeAliasType( + "BaseInputsOutput2", Union[str, List[BaseInputsOutput1]] +) + + +class BaseInputsFunctionCallOutputTypedDict(TypedDict): + type: BaseInputsTypeFunctionCallOutput + call_id: str + output: BaseInputsOutput2TypedDict + id: NotRequired[Nullable[str]] + status: NotRequired[Nullable[ToolCallStatusEnum]] + + +class BaseInputsFunctionCallOutput(BaseModel): + type: BaseInputsTypeFunctionCallOutput + + call_id: str + + output: BaseInputsOutput2 + + id: OptionalNullable[str] = UNSET + + status: Annotated[ + OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "status"] + nullable_fields = ["id", "status"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +BaseInputsTypeMessage2 = Literal["message",] + + +BaseInputsRoleDeveloper2 = Literal["developer",] + + +BaseInputsRoleSystem2 = Literal["system",] + + +BaseInputsRoleUser2 = Literal["user",] + + +BaseInputsRoleUnion2TypedDict = TypeAliasType( + "BaseInputsRoleUnion2TypedDict", + Union[BaseInputsRoleUser2, BaseInputsRoleSystem2, BaseInputsRoleDeveloper2], +) + + +BaseInputsRoleUnion2 = TypeAliasType( + "BaseInputsRoleUnion2", + Union[BaseInputsRoleUser2, BaseInputsRoleSystem2, BaseInputsRoleDeveloper2], +) + + +BaseInputsContent3TypedDict = TypeAliasType( + "BaseInputsContent3TypedDict", + Union[ + InputTextTypedDict, InputAudioTypedDict, InputImageTypedDict, InputFileTypedDict + ], +) + + +BaseInputsContent3 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[InputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + Annotated[InputAudio, Tag("input_audio")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class BaseInputsMessage2TypedDict(TypedDict): + id: str + role: BaseInputsRoleUnion2TypedDict + content: List[BaseInputsContent3TypedDict] + type: NotRequired[BaseInputsTypeMessage2] + + +class BaseInputsMessage2(BaseModel): + id: str + + role: BaseInputsRoleUnion2 + + content: List[BaseInputsContent3] + + type: Optional[BaseInputsTypeMessage2] = None + + +BaseInputsTypeMessage1 = Literal["message",] + + +BaseInputsRoleDeveloper1 = Literal["developer",] + + +BaseInputsRoleAssistant = Literal["assistant",] + + +BaseInputsRoleSystem1 = Literal["system",] + + +BaseInputsRoleUser1 = Literal["user",] + + +BaseInputsRoleUnion1TypedDict = TypeAliasType( + "BaseInputsRoleUnion1TypedDict", + Union[ + BaseInputsRoleUser1, + BaseInputsRoleSystem1, + BaseInputsRoleAssistant, + BaseInputsRoleDeveloper1, + ], +) + + +BaseInputsRoleUnion1 = TypeAliasType( + "BaseInputsRoleUnion1", + Union[ + BaseInputsRoleUser1, + BaseInputsRoleSystem1, + BaseInputsRoleAssistant, + BaseInputsRoleDeveloper1, + ], +) + + +BaseInputsContent1TypedDict = TypeAliasType( + "BaseInputsContent1TypedDict", + Union[ + InputTextTypedDict, InputAudioTypedDict, InputImageTypedDict, InputFileTypedDict + ], +) + + +BaseInputsContent1 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[InputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + Annotated[InputAudio, Tag("input_audio")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +BaseInputsContent2TypedDict = TypeAliasType( + "BaseInputsContent2TypedDict", Union[List[BaseInputsContent1TypedDict], str] +) + + +BaseInputsContent2 = TypeAliasType( + "BaseInputsContent2", Union[List[BaseInputsContent1], str] +) + + +BaseInputsPhaseFinalAnswer = Literal["final_answer",] + + +BaseInputsPhaseCommentary = Literal["commentary",] + + +BaseInputsPhaseUnionTypedDict = TypeAliasType( + "BaseInputsPhaseUnionTypedDict", + Union[BaseInputsPhaseCommentary, BaseInputsPhaseFinalAnswer, Any], +) + + +BaseInputsPhaseUnion = TypeAliasType( + "BaseInputsPhaseUnion", + Union[BaseInputsPhaseCommentary, BaseInputsPhaseFinalAnswer, Any], +) + + +class BaseInputsMessage1TypedDict(TypedDict): + role: BaseInputsRoleUnion1TypedDict + content: BaseInputsContent2TypedDict + type: NotRequired[BaseInputsTypeMessage1] + phase: NotRequired[Nullable[BaseInputsPhaseUnionTypedDict]] + + +class BaseInputsMessage1(BaseModel): + role: BaseInputsRoleUnion1 + + content: BaseInputsContent2 + + type: Optional[BaseInputsTypeMessage1] = None + + phase: OptionalNullable[BaseInputsPhaseUnion] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["type", "phase"] + nullable_fields = ["phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +BaseInputsUnion1TypedDict = TypeAliasType( + "BaseInputsUnion1TypedDict", + Union[ + BaseInputsMessage1TypedDict, + BaseInputsMessage2TypedDict, + OutputItemImageGenerationCallTypedDict, + BaseInputsFunctionCallOutputTypedDict, + BaseInputsFunctionCallTypedDict, + OutputMessageTypedDict, + ], +) + + +BaseInputsUnion1 = TypeAliasType( + "BaseInputsUnion1", + Union[ + BaseInputsMessage1, + BaseInputsMessage2, + OutputItemImageGenerationCall, + BaseInputsFunctionCallOutput, + BaseInputsFunctionCall, + OutputMessage, + ], +) + + +BaseInputsUnionTypedDict = TypeAliasType( + "BaseInputsUnionTypedDict", Union[str, List[BaseInputsUnion1TypedDict], Any] +) + + +BaseInputsUnion = TypeAliasType( + "BaseInputsUnion", Union[str, List[BaseInputsUnion1], Any] +) diff --git a/src/openrouter/components/basereasoningconfig.py b/src/openrouter/components/basereasoningconfig.py new file mode 100644 index 0000000..7c9263e --- /dev/null +++ b/src/openrouter/components/basereasoningconfig.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningeffortenum import ReasoningEffortEnum +from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BaseReasoningConfigTypedDict(TypedDict): + effort: NotRequired[Nullable[ReasoningEffortEnum]] + summary: NotRequired[Nullable[ReasoningSummaryVerbosityEnum]] + + +class BaseReasoningConfig(BaseModel): + effort: Annotated[ + OptionalNullable[ReasoningEffortEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + summary: Annotated[ + OptionalNullable[ReasoningSummaryVerbosityEnum], + PlainValidator(validate_open_enum(False)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["effort", "summary"] + nullable_fields = ["effort", "summary"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatassistantimages.py b/src/openrouter/components/chatassistantimages.py new file mode 100644 index 0000000..c7866f6 --- /dev/null +++ b/src/openrouter/components/chatassistantimages.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class ChatAssistantImagesImageURLTypedDict(TypedDict): + url: str + r"""URL or base64-encoded data of the generated image""" + + +class ChatAssistantImagesImageURL(BaseModel): + url: str + r"""URL or base64-encoded data of the generated image""" + + +class ChatAssistantImagesTypedDict(TypedDict): + image_url: ChatAssistantImagesImageURLTypedDict + + +class ChatAssistantImages(BaseModel): + image_url: ChatAssistantImagesImageURL diff --git a/src/openrouter/components/chatassistantmessage.py b/src/openrouter/components/chatassistantmessage.py new file mode 100644 index 0000000..78199e8 --- /dev/null +++ b/src/openrouter/components/chatassistantmessage.py @@ -0,0 +1,125 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatassistantimages import ChatAssistantImages, ChatAssistantImagesTypedDict +from .chataudiooutput import ChatAudioOutput, ChatAudioOutputTypedDict +from .chatcontentitems import ChatContentItems, ChatContentItemsTypedDict +from .chattoolcall import ChatToolCall, ChatToolCallTypedDict +from .reasoningdetailunion import ReasoningDetailUnion, ReasoningDetailUnionTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ChatAssistantMessageRole = Literal["assistant",] + + +ChatAssistantMessageContentTypedDict = TypeAliasType( + "ChatAssistantMessageContentTypedDict", + Union[str, List[ChatContentItemsTypedDict], Any], +) +r"""Assistant message content""" + + +ChatAssistantMessageContent = TypeAliasType( + "ChatAssistantMessageContent", Union[str, List[ChatContentItems], Any] +) +r"""Assistant message content""" + + +class ChatAssistantMessageTypedDict(TypedDict): + r"""Assistant message for requests and responses""" + + role: ChatAssistantMessageRole + content: NotRequired[Nullable[ChatAssistantMessageContentTypedDict]] + r"""Assistant message content""" + name: NotRequired[str] + r"""Optional name for the assistant""" + tool_calls: NotRequired[List[ChatToolCallTypedDict]] + r"""Tool calls made by the assistant""" + refusal: NotRequired[Nullable[str]] + r"""Refusal message if content was refused""" + reasoning: NotRequired[Nullable[str]] + r"""Reasoning output""" + reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]] + r"""Reasoning details for extended thinking models""" + images: NotRequired[List[ChatAssistantImagesTypedDict]] + r"""Generated images from image generation models""" + audio: NotRequired[ChatAudioOutputTypedDict] + r"""Audio output data or reference""" + + +class ChatAssistantMessage(BaseModel): + r"""Assistant message for requests and responses""" + + role: ChatAssistantMessageRole + + content: OptionalNullable[ChatAssistantMessageContent] = UNSET + r"""Assistant message content""" + + name: Optional[str] = None + r"""Optional name for the assistant""" + + tool_calls: Optional[List[ChatToolCall]] = None + r"""Tool calls made by the assistant""" + + refusal: OptionalNullable[str] = UNSET + r"""Refusal message if content was refused""" + + reasoning: OptionalNullable[str] = UNSET + r"""Reasoning output""" + + reasoning_details: Optional[List[ReasoningDetailUnion]] = None + r"""Reasoning details for extended thinking models""" + + images: Optional[List[ChatAssistantImages]] = None + r"""Generated images from image generation models""" + + audio: Optional[ChatAudioOutput] = None + r"""Audio output data or reference""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "content", + "name", + "tool_calls", + "refusal", + "reasoning", + "reasoning_details", + "images", + "audio", + ] + nullable_fields = ["content", "refusal", "reasoning"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chataudiooutput.py b/src/openrouter/components/chataudiooutput.py new file mode 100644 index 0000000..19bb084 --- /dev/null +++ b/src/openrouter/components/chataudiooutput.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ChatAudioOutputTypedDict(TypedDict): + r"""Audio output data or reference""" + + id: NotRequired[str] + r"""Audio output identifier""" + expires_at: NotRequired[float] + r"""Audio expiration timestamp""" + data: NotRequired[str] + r"""Base64 encoded audio data""" + transcript: NotRequired[str] + r"""Audio transcript""" + + +class ChatAudioOutput(BaseModel): + r"""Audio output data or reference""" + + id: Optional[str] = None + r"""Audio output identifier""" + + expires_at: Optional[float] = None + r"""Audio expiration timestamp""" + + data: Optional[str] = None + r"""Base64 encoded audio data""" + + transcript: Optional[str] = None + r"""Audio transcript""" diff --git a/src/openrouter/components/chatchoice.py b/src/openrouter/components/chatchoice.py new file mode 100644 index 0000000..6cb0225 --- /dev/null +++ b/src/openrouter/components/chatchoice.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatassistantmessage import ChatAssistantMessage, ChatAssistantMessageTypedDict +from .chattokenlogprobs import ChatTokenLogprobs, ChatTokenLogprobsTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any +from typing_extensions import NotRequired, TypedDict + + +class ChatChoiceTypedDict(TypedDict): + r"""Chat completion choice""" + + finish_reason: Nullable[Any] + index: float + r"""Choice index""" + message: ChatAssistantMessageTypedDict + r"""Assistant message for requests and responses""" + logprobs: NotRequired[Nullable[ChatTokenLogprobsTypedDict]] + r"""Log probabilities for the completion""" + + +class ChatChoice(BaseModel): + r"""Chat completion choice""" + + finish_reason: Nullable[Any] + + index: float + r"""Choice index""" + + message: ChatAssistantMessage + r"""Assistant message for requests and responses""" + + logprobs: OptionalNullable[ChatTokenLogprobs] = UNSET + r"""Log probabilities for the completion""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["logprobs"] + nullable_fields = ["finish_reason", "logprobs"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatcompletionaudiooutput.py b/src/openrouter/components/chatcompletionaudiooutput.py new file mode 100644 index 0000000..b270993 --- /dev/null +++ b/src/openrouter/components/chatcompletionaudiooutput.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ChatCompletionAudioOutputTypedDict(TypedDict): + r"""Audio output data or reference""" + + id: NotRequired[str] + r"""Audio output identifier""" + expires_at: NotRequired[float] + r"""Audio expiration timestamp""" + data: NotRequired[str] + r"""Base64 encoded audio data""" + transcript: NotRequired[str] + r"""Audio transcript""" + + +class ChatCompletionAudioOutput(BaseModel): + r"""Audio output data or reference""" + + id: Optional[str] = None + r"""Audio output identifier""" + + expires_at: Optional[float] = None + r"""Audio expiration timestamp""" + + data: Optional[str] = None + r"""Base64 encoded audio data""" + + transcript: Optional[str] = None + r"""Audio transcript""" diff --git a/src/openrouter/components/chatcontentaudio.py b/src/openrouter/components/chatcontentaudio.py new file mode 100644 index 0000000..dc4293e --- /dev/null +++ b/src/openrouter/components/chatcontentaudio.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +import pydantic +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +ChatContentAudioType = Literal["input_audio",] + + +class ChatContentAudioInputAudioTypedDict(TypedDict): + data: str + r"""Base64 encoded audio data""" + format_: str + r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.""" + + +class ChatContentAudioInputAudio(BaseModel): + data: str + r"""Base64 encoded audio data""" + + format_: Annotated[str, pydantic.Field(alias="format")] + r"""Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider.""" + + +class ChatContentAudioTypedDict(TypedDict): + r"""Audio input content part. Supported audio formats vary by provider.""" + + type: ChatContentAudioType + input_audio: ChatContentAudioInputAudioTypedDict + + +class ChatContentAudio(BaseModel): + r"""Audio input content part. Supported audio formats vary by provider.""" + + type: ChatContentAudioType + + input_audio: ChatContentAudioInputAudio diff --git a/src/openrouter/components/chatcontentcachecontrol.py b/src/openrouter/components/chatcontentcachecontrol.py new file mode 100644 index 0000000..11a86bf --- /dev/null +++ b/src/openrouter/components/chatcontentcachecontrol.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +ChatContentCacheControlType = Literal["ephemeral",] + + +ChatContentCacheControlTTL = Union[ + Literal[ + "5m", + "1h", + ], + UnrecognizedStr, +] + + +class ChatContentCacheControlTypedDict(TypedDict): + r"""Cache control for the content part""" + + type: ChatContentCacheControlType + ttl: NotRequired[ChatContentCacheControlTTL] + + +class ChatContentCacheControl(BaseModel): + r"""Cache control for the content part""" + + type: ChatContentCacheControlType + + ttl: Annotated[ + Optional[ChatContentCacheControlTTL], PlainValidator(validate_open_enum(False)) + ] = None diff --git a/src/openrouter/components/chatcontentfile.py b/src/openrouter/components/chatcontentfile.py new file mode 100644 index 0000000..5101311 --- /dev/null +++ b/src/openrouter/components/chatcontentfile.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatContentFileType = Literal["file",] + + +class FileTypedDict(TypedDict): + file_data: NotRequired[str] + r"""File content as base64 data URL or URL""" + file_id: NotRequired[str] + r"""File ID for previously uploaded files""" + filename: NotRequired[str] + r"""Original filename""" + + +class File(BaseModel): + file_data: Optional[str] = None + r"""File content as base64 data URL or URL""" + + file_id: Optional[str] = None + r"""File ID for previously uploaded files""" + + filename: Optional[str] = None + r"""Original filename""" + + +class ChatContentFileTypedDict(TypedDict): + r"""File content part for document processing""" + + type: ChatContentFileType + file: FileTypedDict + + +class ChatContentFile(BaseModel): + r"""File content part for document processing""" + + type: ChatContentFileType + + file: File diff --git a/src/openrouter/components/chatcontentimage.py b/src/openrouter/components/chatcontentimage.py new file mode 100644 index 0000000..d7850d5 --- /dev/null +++ b/src/openrouter/components/chatcontentimage.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +ChatContentImageType = Literal["image_url",] + + +ChatContentImageDetail = Union[ + Literal[ + "auto", + "low", + "high", + ], + UnrecognizedStr, +] +r"""Image detail level for vision models""" + + +class ChatContentImageImageURLTypedDict(TypedDict): + url: str + r"""URL of the image (data: URLs supported)""" + detail: NotRequired[ChatContentImageDetail] + r"""Image detail level for vision models""" + + +class ChatContentImageImageURL(BaseModel): + url: str + r"""URL of the image (data: URLs supported)""" + + detail: Annotated[ + Optional[ChatContentImageDetail], PlainValidator(validate_open_enum(False)) + ] = None + r"""Image detail level for vision models""" + + +class ChatContentImageTypedDict(TypedDict): + r"""Image content part for vision models""" + + type: ChatContentImageType + image_url: ChatContentImageImageURLTypedDict + + +class ChatContentImage(BaseModel): + r"""Image content part for vision models""" + + type: ChatContentImageType + + image_url: ChatContentImageImageURL diff --git a/src/openrouter/components/chatcontentitems.py b/src/openrouter/components/chatcontentitems.py new file mode 100644 index 0000000..6a65c9c --- /dev/null +++ b/src/openrouter/components/chatcontentitems.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentaudio import ChatContentAudio, ChatContentAudioTypedDict +from .chatcontentfile import ChatContentFile, ChatContentFileTypedDict +from .chatcontentimage import ChatContentImage, ChatContentImageTypedDict +from .chatcontenttext import ChatContentText, ChatContentTextTypedDict +from .chatcontentvideo import ChatContentVideo, ChatContentVideoTypedDict +from .legacy_chatcontentvideo import ( + LegacyChatContentVideo, + LegacyChatContentVideoTypedDict, +) +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated, TypeAliasType + + +ChatContentItems1TypedDict = TypeAliasType( + "ChatContentItems1TypedDict", + Union[LegacyChatContentVideoTypedDict, ChatContentVideoTypedDict], +) + + +ChatContentItems1 = Annotated[ + Union[ + Annotated[LegacyChatContentVideo, Tag("input_video")], + Annotated[ChatContentVideo, Tag("video_url")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +ChatContentItemsTypedDict = TypeAliasType( + "ChatContentItemsTypedDict", + Union[ + ChatContentImageTypedDict, + ChatContentAudioTypedDict, + ChatContentFileTypedDict, + ChatContentTextTypedDict, + ChatContentItems1TypedDict, + ], +) +r"""Content part for chat completion messages""" + + +ChatContentItems = TypeAliasType( + "ChatContentItems", + Union[ + ChatContentImage, + ChatContentAudio, + ChatContentFile, + ChatContentText, + ChatContentItems1, + ], +) +r"""Content part for chat completion messages""" diff --git a/src/openrouter/components/chatcontenttext.py b/src/openrouter/components/chatcontenttext.py new file mode 100644 index 0000000..1fed3f5 --- /dev/null +++ b/src/openrouter/components/chatcontenttext.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentcachecontrol import ( + ChatContentCacheControl, + ChatContentCacheControlTypedDict, +) +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatContentTextType = Literal["text",] + + +class ChatContentTextTypedDict(TypedDict): + r"""Text content part""" + + type: ChatContentTextType + text: str + cache_control: NotRequired[ChatContentCacheControlTypedDict] + r"""Cache control for the content part""" + + +class ChatContentText(BaseModel): + r"""Text content part""" + + type: ChatContentTextType + + text: str + + cache_control: Optional[ChatContentCacheControl] = None + r"""Cache control for the content part""" diff --git a/src/openrouter/components/chatcontentvideo.py b/src/openrouter/components/chatcontentvideo.py new file mode 100644 index 0000000..2ece45e --- /dev/null +++ b/src/openrouter/components/chatcontentvideo.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentvideoinput import ChatContentVideoInput, ChatContentVideoInputTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatContentVideoType = Literal["video_url",] + + +class ChatContentVideoTypedDict(TypedDict): + r"""Video input content part""" + + type: ChatContentVideoType + video_url: ChatContentVideoInputTypedDict + r"""Video input object""" + + +class ChatContentVideo(BaseModel): + r"""Video input content part""" + + type: ChatContentVideoType + + video_url: ChatContentVideoInput + r"""Video input object""" diff --git a/src/openrouter/components/chatcontentvideoinput.py b/src/openrouter/components/chatcontentvideoinput.py new file mode 100644 index 0000000..48b8e57 --- /dev/null +++ b/src/openrouter/components/chatcontentvideoinput.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class ChatContentVideoInputTypedDict(TypedDict): + r"""Video input object""" + + url: str + r"""URL of the video (data: URLs supported)""" + + +class ChatContentVideoInput(BaseModel): + r"""Video input object""" + + url: str + r"""URL of the video (data: URLs supported)""" diff --git a/src/openrouter/components/chatdebugoptions.py b/src/openrouter/components/chatdebugoptions.py new file mode 100644 index 0000000..777d93e --- /dev/null +++ b/src/openrouter/components/chatdebugoptions.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ChatDebugOptionsTypedDict(TypedDict): + r"""Debug options for inspecting request transformations (streaming only)""" + + echo_upstream_body: NotRequired[bool] + r"""If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.""" + + +class ChatDebugOptions(BaseModel): + r"""Debug options for inspecting request transformations (streaming only)""" + + echo_upstream_body: Optional[bool] = None + r"""If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.""" diff --git a/src/openrouter/components/chatdevelopermessage.py b/src/openrouter/components/chatdevelopermessage.py new file mode 100644 index 0000000..aaaf742 --- /dev/null +++ b/src/openrouter/components/chatdevelopermessage.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontenttext import ChatContentText, ChatContentTextTypedDict +from openrouter.types import BaseModel +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ChatDeveloperMessageRole = Literal["developer",] + + +ChatDeveloperMessageContentTypedDict = TypeAliasType( + "ChatDeveloperMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]] +) +r"""Developer message content""" + + +ChatDeveloperMessageContent = TypeAliasType( + "ChatDeveloperMessageContent", Union[str, List[ChatContentText]] +) +r"""Developer message content""" + + +class ChatDeveloperMessageTypedDict(TypedDict): + r"""Developer message""" + + role: ChatDeveloperMessageRole + content: ChatDeveloperMessageContentTypedDict + r"""Developer message content""" + name: NotRequired[str] + r"""Optional name for the developer message""" + + +class ChatDeveloperMessage(BaseModel): + r"""Developer message""" + + role: ChatDeveloperMessageRole + + content: ChatDeveloperMessageContent + r"""Developer message content""" + + name: Optional[str] = None + r"""Optional name for the developer message""" diff --git a/src/openrouter/components/chatfinishreasonenum.py b/src/openrouter/components/chatfinishreasonenum.py new file mode 100644 index 0000000..00c38bd --- /dev/null +++ b/src/openrouter/components/chatfinishreasonenum.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ChatFinishReasonEnum = Union[ + Literal[ + "tool_calls", + "stop", + "length", + "content_filter", + "error", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/chatformatgrammarconfig.py b/src/openrouter/components/chatformatgrammarconfig.py new file mode 100644 index 0000000..9ea1098 --- /dev/null +++ b/src/openrouter/components/chatformatgrammarconfig.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatFormatGrammarConfigType = Literal["grammar",] + + +class ChatFormatGrammarConfigTypedDict(TypedDict): + r"""Custom grammar response format""" + + type: ChatFormatGrammarConfigType + grammar: str + r"""Custom grammar for text generation""" + + +class ChatFormatGrammarConfig(BaseModel): + r"""Custom grammar response format""" + + type: ChatFormatGrammarConfigType + + grammar: str + r"""Custom grammar for text generation""" diff --git a/src/openrouter/components/chatformatjsonschemaconfig.py b/src/openrouter/components/chatformatjsonschemaconfig.py new file mode 100644 index 0000000..be2887d --- /dev/null +++ b/src/openrouter/components/chatformatjsonschemaconfig.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatjsonschemaconfig import ChatJSONSchemaConfig, ChatJSONSchemaConfigTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatFormatJSONSchemaConfigType = Literal["json_schema",] + + +class ChatFormatJSONSchemaConfigTypedDict(TypedDict): + r"""JSON Schema response format for structured outputs""" + + type: ChatFormatJSONSchemaConfigType + json_schema: ChatJSONSchemaConfigTypedDict + r"""JSON Schema configuration object""" + + +class ChatFormatJSONSchemaConfig(BaseModel): + r"""JSON Schema response format for structured outputs""" + + type: ChatFormatJSONSchemaConfigType + + json_schema: ChatJSONSchemaConfig + r"""JSON Schema configuration object""" diff --git a/src/openrouter/components/chatformatpythonconfig.py b/src/openrouter/components/chatformatpythonconfig.py new file mode 100644 index 0000000..7dfae30 --- /dev/null +++ b/src/openrouter/components/chatformatpythonconfig.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatFormatPythonConfigType = Literal["python",] + + +class ChatFormatPythonConfigTypedDict(TypedDict): + r"""Python code response format""" + + type: ChatFormatPythonConfigType + + +class ChatFormatPythonConfig(BaseModel): + r"""Python code response format""" + + type: ChatFormatPythonConfigType diff --git a/src/openrouter/components/chatformattextconfig.py b/src/openrouter/components/chatformattextconfig.py new file mode 100644 index 0000000..7a6140f --- /dev/null +++ b/src/openrouter/components/chatformattextconfig.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatFormatTextConfigType = Literal["text",] + + +class ChatFormatTextConfigTypedDict(TypedDict): + r"""Default text response format""" + + type: ChatFormatTextConfigType + + +class ChatFormatTextConfig(BaseModel): + r"""Default text response format""" + + type: ChatFormatTextConfigType diff --git a/src/openrouter/components/chatfunctiontool.py b/src/openrouter/components/chatfunctiontool.py new file mode 100644 index 0000000..22fd9cd --- /dev/null +++ b/src/openrouter/components/chatfunctiontool.py @@ -0,0 +1,134 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentcachecontrol import ( + ChatContentCacheControl, + ChatContentCacheControlTypedDict, +) +from .chatwebsearchservertool import ( + ChatWebSearchServerTool, + ChatWebSearchServerToolTypedDict, +) +from .chatwebsearchshorthand import ( + ChatWebSearchShorthand, + ChatWebSearchShorthandTypedDict, +) +from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag, model_serializer +from typing import Any, Dict, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ChatFunctionToolType = Literal["function",] + + +class ChatFunctionToolFunctionFunctionTypedDict(TypedDict): + r"""Function definition for tool calling""" + + name: str + r"""Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" + description: NotRequired[str] + r"""Function description for the model""" + parameters: NotRequired[Dict[str, Nullable[Any]]] + r"""Function parameters as JSON Schema object""" + strict: NotRequired[Nullable[bool]] + r"""Enable strict schema adherence""" + + +class ChatFunctionToolFunctionFunction(BaseModel): + r"""Function definition for tool calling""" + + name: str + r"""Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" + + description: Optional[str] = None + r"""Function description for the model""" + + parameters: Optional[Dict[str, Nullable[Any]]] = None + r"""Function parameters as JSON Schema object""" + + strict: OptionalNullable[bool] = UNSET + r"""Enable strict schema adherence""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["description", "parameters", "strict"] + nullable_fields = ["strict"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class ChatFunctionToolFunctionTypedDict(TypedDict): + type: ChatFunctionToolType + function: ChatFunctionToolFunctionFunctionTypedDict + r"""Function definition for tool calling""" + cache_control: NotRequired[ChatContentCacheControlTypedDict] + r"""Cache control for the content part""" + + +class ChatFunctionToolFunction(BaseModel): + type: ChatFunctionToolType + + function: ChatFunctionToolFunctionFunction + r"""Function definition for tool calling""" + + cache_control: Optional[ChatContentCacheControl] = None + r"""Cache control for the content part""" + + +ChatFunctionToolTypedDict = TypeAliasType( + "ChatFunctionToolTypedDict", + Union[ + DatetimeServerToolTypedDict, + ChatWebSearchServerToolTypedDict, + ChatFunctionToolFunctionTypedDict, + ChatWebSearchShorthandTypedDict, + ], +) +r"""Tool definition for function calling (regular function or OpenRouter built-in server tool)""" + + +ChatFunctionTool = Annotated[ + Union[ + Annotated[ChatFunctionToolFunction, Tag("function")], + Annotated[DatetimeServerTool, Tag("openrouter:datetime")], + Annotated[ChatWebSearchServerTool, Tag("openrouter:web_search")], + Annotated[ChatWebSearchShorthand, Tag("web_search")], + Annotated[ChatWebSearchShorthand, Tag("web_search_preview")], + Annotated[ChatWebSearchShorthand, Tag("web_search_preview_2025_03_11")], + Annotated[ChatWebSearchShorthand, Tag("web_search_2025_08_26")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""Tool definition for function calling (regular function or OpenRouter built-in server tool)""" diff --git a/src/openrouter/components/chatgenerationparams.py b/src/openrouter/components/chatgenerationparams.py index fa8b22c..bf98e44 100644 --- a/src/openrouter/components/chatgenerationparams.py +++ b/src/openrouter/components/chatgenerationparams.py @@ -87,6 +87,7 @@ ChatGenerationParamsSortEnum = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] @@ -96,6 +97,7 @@ ChatGenerationParamsProviderSortConfigEnum = Literal[ "price", "throughput", "latency", + "exacto", ] @@ -104,6 +106,7 @@ ChatGenerationParamsBy = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] @@ -194,6 +197,7 @@ ChatGenerationParamsProviderSort = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] @@ -449,6 +453,10 @@ class ChatGenerationParamsPluginWebTypedDict(TypedDict): search_prompt: NotRequired[str] engine: NotRequired[WebSearchEngine] r"""The search engine to use for web search.""" + include_domains: NotRequired[List[str]] + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + exclude_domains: NotRequired[List[str]] + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" class ChatGenerationParamsPluginWeb(BaseModel): @@ -466,6 +474,12 @@ class ChatGenerationParamsPluginWeb(BaseModel): ] = None r"""The search engine to use for web search.""" + include_domains: Optional[List[str]] = None + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + exclude_domains: Optional[List[str]] = None + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + ChatGenerationParamsIDModeration = Literal["moderation",] @@ -671,11 +685,41 @@ Modality = Union[ Literal[ "text", "image", + "audio", ], UnrecognizedStr, ] +ChatGenerationParamsType = Literal["ephemeral",] + + +ChatGenerationParamsTTL = Union[ + Literal[ + "5m", + "1h", + ], + UnrecognizedStr, +] + + +class CacheControlTypedDict(TypedDict): + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + + type: ChatGenerationParamsType + ttl: NotRequired[ChatGenerationParamsTTL] + + +class CacheControl(BaseModel): + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + + type: ChatGenerationParamsType + + ttl: Annotated[ + Optional[ChatGenerationParamsTTL], PlainValidator(validate_open_enum(False)) + ] = None + + class ChatGenerationParamsTypedDict(TypedDict): r"""Chat completion request parameters""" @@ -706,7 +750,7 @@ class ChatGenerationParamsTypedDict(TypedDict): max_completion_tokens: NotRequired[Nullable[float]] r"""Maximum tokens in completion""" max_tokens: NotRequired[Nullable[float]] - r"""Maximum tokens (deprecated, use max_completion_tokens)""" + r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" metadata: NotRequired[Dict[str, str]] r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" presence_penalty: NotRequired[Nullable[float]] @@ -737,7 +781,9 @@ class ChatGenerationParamsTypedDict(TypedDict): image_config: NotRequired[Dict[str, ChatGenerationParamsImageConfigTypedDict]] r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.""" modalities: NotRequired[List[Modality]] - r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" + r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" + cache_control: NotRequired[CacheControlTypedDict] + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" class ChatGenerationParams(BaseModel): @@ -783,7 +829,7 @@ class ChatGenerationParams(BaseModel): r"""Maximum tokens in completion""" max_tokens: OptionalNullable[float] = UNSET - r"""Maximum tokens (deprecated, use max_completion_tokens)""" + r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" metadata: Optional[Dict[str, str]] = None r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" @@ -832,7 +878,10 @@ class ChatGenerationParams(BaseModel): modalities: Optional[ List[Annotated[Modality, PlainValidator(validate_open_enum(False))]] ] = None - r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" + r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" + + cache_control: Optional[CacheControl] = None + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -866,6 +915,7 @@ class ChatGenerationParams(BaseModel): "debug", "image_config", "modalities", + "cache_control", ] nullable_fields = [ "provider", diff --git a/src/openrouter/components/chatjsonschemaconfig.py b/src/openrouter/components/chatjsonschemaconfig.py new file mode 100644 index 0000000..0131544 --- /dev/null +++ b/src/openrouter/components/chatjsonschemaconfig.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ChatJSONSchemaConfigTypedDict(TypedDict): + r"""JSON Schema configuration object""" + + name: str + r"""Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" + description: NotRequired[str] + r"""Schema description for the model""" + schema_: NotRequired[Dict[str, Nullable[Any]]] + r"""JSON Schema object""" + strict: NotRequired[Nullable[bool]] + r"""Enable strict schema adherence""" + + +class ChatJSONSchemaConfig(BaseModel): + r"""JSON Schema configuration object""" + + name: str + r"""Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)""" + + description: Optional[str] = None + r"""Schema description for the model""" + + schema_: Annotated[ + Optional[Dict[str, Nullable[Any]]], pydantic.Field(alias="schema") + ] = None + r"""JSON Schema object""" + + strict: OptionalNullable[bool] = UNSET + r"""Enable strict schema adherence""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["description", "schema", "strict"] + nullable_fields = ["strict"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatmessagecontentitem.py b/src/openrouter/components/chatmessagecontentitem.py index e650b7f..8ebc9b7 100644 --- a/src/openrouter/components/chatmessagecontentitem.py +++ b/src/openrouter/components/chatmessagecontentitem.py @@ -5,6 +5,10 @@ from .chatmessagecontentitemaudio import ( ChatMessageContentItemAudio, ChatMessageContentItemAudioTypedDict, ) +from .chatmessagecontentitemfile import ( + ChatMessageContentItemFile, + ChatMessageContentItemFileTypedDict, +) from .chatmessagecontentitemimage import ( ChatMessageContentItemImage, ChatMessageContentItemImageTypedDict, @@ -49,6 +53,7 @@ ChatMessageContentItemTypedDict = TypeAliasType( Union[ ChatMessageContentItemImageTypedDict, ChatMessageContentItemAudioTypedDict, + ChatMessageContentItemFileTypedDict, ChatMessageContentItemTextTypedDict, ChatMessageContentItem1TypedDict, ], @@ -61,6 +66,7 @@ ChatMessageContentItem = TypeAliasType( Union[ ChatMessageContentItemImage, ChatMessageContentItemAudio, + ChatMessageContentItemFile, ChatMessageContentItemText, ChatMessageContentItem1, ], diff --git a/src/openrouter/components/chatmessagecontentitemcachecontrol.py b/src/openrouter/components/chatmessagecontentitemcachecontrol.py index d8ed801..af4b966 100644 --- a/src/openrouter/components/chatmessagecontentitemcachecontrol.py +++ b/src/openrouter/components/chatmessagecontentitemcachecontrol.py @@ -11,7 +11,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict ChatMessageContentItemCacheControlType = Literal["ephemeral",] -TTL = Union[ +ChatMessageContentItemCacheControlTTL = Union[ Literal[ "5m", "1h", @@ -24,7 +24,7 @@ class ChatMessageContentItemCacheControlTypedDict(TypedDict): r"""Cache control for the content part""" type: ChatMessageContentItemCacheControlType - ttl: NotRequired[TTL] + ttl: NotRequired[ChatMessageContentItemCacheControlTTL] class ChatMessageContentItemCacheControl(BaseModel): @@ -32,4 +32,7 @@ class ChatMessageContentItemCacheControl(BaseModel): type: ChatMessageContentItemCacheControlType - ttl: Annotated[Optional[TTL], PlainValidator(validate_open_enum(False))] = None + ttl: Annotated[ + Optional[ChatMessageContentItemCacheControlTTL], + PlainValidator(validate_open_enum(False)), + ] = None diff --git a/src/openrouter/components/chatmessagecontentitemfile.py b/src/openrouter/components/chatmessagecontentitemfile.py new file mode 100644 index 0000000..0256bb3 --- /dev/null +++ b/src/openrouter/components/chatmessagecontentitemfile.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatMessageContentItemFileType = Literal["file",] + + +class FileTypedDict(TypedDict): + file_data: NotRequired[str] + r"""File content as base64 data URL or URL""" + file_id: NotRequired[str] + r"""File ID for previously uploaded files""" + filename: NotRequired[str] + r"""Original filename""" + + +class File(BaseModel): + file_data: Optional[str] = None + r"""File content as base64 data URL or URL""" + + file_id: Optional[str] = None + r"""File ID for previously uploaded files""" + + filename: Optional[str] = None + r"""Original filename""" + + +class ChatMessageContentItemFileTypedDict(TypedDict): + r"""File content part for document processing""" + + type: ChatMessageContentItemFileType + file: FileTypedDict + + +class ChatMessageContentItemFile(BaseModel): + r"""File content part for document processing""" + + type: ChatMessageContentItemFileType + + file: File diff --git a/src/openrouter/components/chatmessages.py b/src/openrouter/components/chatmessages.py new file mode 100644 index 0000000..7d3054f --- /dev/null +++ b/src/openrouter/components/chatmessages.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatassistantmessage import ChatAssistantMessage, ChatAssistantMessageTypedDict +from .chatdevelopermessage import ChatDeveloperMessage, ChatDeveloperMessageTypedDict +from .chatsystemmessage import ChatSystemMessage, ChatSystemMessageTypedDict +from .chattoolmessage import ChatToolMessage, ChatToolMessageTypedDict +from .chatusermessage import ChatUserMessage, ChatUserMessageTypedDict +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated, TypeAliasType + + +ChatMessagesTypedDict = TypeAliasType( + "ChatMessagesTypedDict", + Union[ + ChatSystemMessageTypedDict, + ChatUserMessageTypedDict, + ChatDeveloperMessageTypedDict, + ChatToolMessageTypedDict, + ChatAssistantMessageTypedDict, + ], +) +r"""Chat completion message with role-based discrimination""" + + +ChatMessages = Annotated[ + Union[ + Annotated[ChatSystemMessage, Tag("system")], + Annotated[ChatUserMessage, Tag("user")], + Annotated[ChatDeveloperMessage, Tag("developer")], + Annotated[ChatAssistantMessage, Tag("assistant")], + Annotated[ChatToolMessage, Tag("tool")], + ], + Discriminator(lambda m: get_discriminator(m, "role", "role")), +] +r"""Chat completion message with role-based discrimination""" diff --git a/src/openrouter/components/chatmessagetokenlogprobs.py b/src/openrouter/components/chatmessagetokenlogprobs.py index 6af442a..d73e5e1 100644 --- a/src/openrouter/components/chatmessagetokenlogprobs.py +++ b/src/openrouter/components/chatmessagetokenlogprobs.py @@ -5,10 +5,16 @@ from .chatmessagetokenlogprob import ( ChatMessageTokenLogprob, ChatMessageTokenLogprobTypedDict, ) -from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from pydantic import model_serializer from typing import List -from typing_extensions import TypedDict +from typing_extensions import NotRequired, TypedDict class ChatMessageTokenLogprobsTypedDict(TypedDict): @@ -16,7 +22,7 @@ class ChatMessageTokenLogprobsTypedDict(TypedDict): content: Nullable[List[ChatMessageTokenLogprobTypedDict]] r"""Log probabilities for content tokens""" - refusal: Nullable[List[ChatMessageTokenLogprobTypedDict]] + refusal: NotRequired[Nullable[List[ChatMessageTokenLogprobTypedDict]]] r"""Log probabilities for refusal tokens""" @@ -26,12 +32,12 @@ class ChatMessageTokenLogprobs(BaseModel): content: Nullable[List[ChatMessageTokenLogprob]] r"""Log probabilities for content tokens""" - refusal: Nullable[List[ChatMessageTokenLogprob]] + refusal: OptionalNullable[List[ChatMessageTokenLogprob]] = UNSET r"""Log probabilities for refusal tokens""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] + optional_fields = ["refusal"] nullable_fields = ["content", "refusal"] null_default_fields = [] diff --git a/src/openrouter/components/chatnamedtoolchoice.py b/src/openrouter/components/chatnamedtoolchoice.py new file mode 100644 index 0000000..b725d19 --- /dev/null +++ b/src/openrouter/components/chatnamedtoolchoice.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatNamedToolChoiceType = Literal["function",] + + +class ChatNamedToolChoiceFunctionTypedDict(TypedDict): + name: str + r"""Function name to call""" + + +class ChatNamedToolChoiceFunction(BaseModel): + name: str + r"""Function name to call""" + + +class ChatNamedToolChoiceTypedDict(TypedDict): + r"""Named tool choice for specific function""" + + type: ChatNamedToolChoiceType + function: ChatNamedToolChoiceFunctionTypedDict + + +class ChatNamedToolChoice(BaseModel): + r"""Named tool choice for specific function""" + + type: ChatNamedToolChoiceType + + function: ChatNamedToolChoiceFunction diff --git a/src/openrouter/components/chatreasoningsummaryverbosityenum.py b/src/openrouter/components/chatreasoningsummaryverbosityenum.py new file mode 100644 index 0000000..8bbde15 --- /dev/null +++ b/src/openrouter/components/chatreasoningsummaryverbosityenum.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ChatReasoningSummaryVerbosityEnum = Union[ + Literal[ + "auto", + "concise", + "detailed", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/chatrequest.py b/src/openrouter/components/chatrequest.py new file mode 100644 index 0000000..0af80f7 --- /dev/null +++ b/src/openrouter/components/chatrequest.py @@ -0,0 +1,996 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatdebugoptions import ChatDebugOptions, ChatDebugOptionsTypedDict +from .chatformatgrammarconfig import ( + ChatFormatGrammarConfig, + ChatFormatGrammarConfigTypedDict, +) +from .chatformatjsonschemaconfig import ( + ChatFormatJSONSchemaConfig, + ChatFormatJSONSchemaConfigTypedDict, +) +from .chatformatpythonconfig import ( + ChatFormatPythonConfig, + ChatFormatPythonConfigTypedDict, +) +from .chatformattextconfig import ChatFormatTextConfig, ChatFormatTextConfigTypedDict +from .chatfunctiontool import ChatFunctionTool, ChatFunctionToolTypedDict +from .chatmessages import ChatMessages, ChatMessagesTypedDict +from .chatstreamoptions import ChatStreamOptions, ChatStreamOptionsTypedDict +from .chattoolchoice import ChatToolChoice, ChatToolChoiceTypedDict +from .contextcompressionengine import ContextCompressionEngine +from .datacollection import DataCollection +from .formatjsonobjectconfig import ( + FormatJSONObjectConfig, + FormatJSONObjectConfigTypedDict, +) +from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict +from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict +from .preferredminthroughput import ( + PreferredMinThroughput, + PreferredMinThroughputTypedDict, +) +from .providername import ProviderName +from .quantization import Quantization +from .websearchengine import WebSearchEngine +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ChatRequestOrderTypedDict = TypeAliasType( + "ChatRequestOrderTypedDict", Union[ProviderName, str] +) + + +ChatRequestOrder = TypeAliasType( + "ChatRequestOrder", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ChatRequestOnlyTypedDict = TypeAliasType( + "ChatRequestOnlyTypedDict", Union[ProviderName, str] +) + + +ChatRequestOnly = TypeAliasType( + "ChatRequestOnly", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ChatRequestIgnoreTypedDict = TypeAliasType( + "ChatRequestIgnoreTypedDict", Union[ProviderName, str] +) + + +ChatRequestIgnore = TypeAliasType( + "ChatRequestIgnore", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ChatRequestSortEnum = Union[ + Literal[ + "price", + "throughput", + "latency", + "exacto", + ], + UnrecognizedStr, +] + + +ChatRequestProviderSortConfigEnum = Literal[ + "price", + "throughput", + "latency", + "exacto", +] + + +ChatRequestBy = Union[ + Literal[ + "price", + "throughput", + "latency", + "exacto", + ], + UnrecognizedStr, +] +r"""The provider sorting strategy (price, throughput, latency)""" + + +ChatRequestPartition = Union[ + Literal[ + "model", + "none", + ], + UnrecognizedStr, +] +r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" + + +class ChatRequestProviderSortConfigTypedDict(TypedDict): + by: NotRequired[Nullable[ChatRequestBy]] + r"""The provider sorting strategy (price, throughput, latency)""" + partition: NotRequired[Nullable[ChatRequestPartition]] + r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" + + +class ChatRequestProviderSortConfig(BaseModel): + by: Annotated[ + OptionalNullable[ChatRequestBy], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""The provider sorting strategy (price, throughput, latency)""" + + partition: Annotated[ + OptionalNullable[ChatRequestPartition], + PlainValidator(validate_open_enum(False)), + ] = UNSET + r"""Partitioning strategy for sorting: \"model\" (default) groups endpoints by model before sorting (fallback models remain fallbacks), \"none\" sorts all endpoints together regardless of model.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["by", "partition"] + nullable_fields = ["by", "partition"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ChatRequestProviderSortConfigUnionTypedDict = TypeAliasType( + "ChatRequestProviderSortConfigUnionTypedDict", + Union[ChatRequestProviderSortConfigTypedDict, ChatRequestProviderSortConfigEnum], +) + + +ChatRequestProviderSortConfigUnion = TypeAliasType( + "ChatRequestProviderSortConfigUnion", + Union[ChatRequestProviderSortConfig, ChatRequestProviderSortConfigEnum], +) + + +ChatRequestProviderSort = Union[ + Literal[ + "price", + "throughput", + "latency", + "exacto", + ], + UnrecognizedStr, +] +r"""The provider sorting strategy (price, throughput, latency)""" + + +ChatRequestSortUnionTypedDict = TypeAliasType( + "ChatRequestSortUnionTypedDict", + Union[ + ChatRequestProviderSort, + ChatRequestProviderSortConfigUnionTypedDict, + ChatRequestSortEnum, + ], +) +r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + + +ChatRequestSortUnion = TypeAliasType( + "ChatRequestSortUnion", + Union[ + Annotated[ChatRequestProviderSort, PlainValidator(validate_open_enum(False))], + ChatRequestProviderSortConfigUnion, + Annotated[ChatRequestSortEnum, PlainValidator(validate_open_enum(False))], + ], +) +r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + + +class ChatRequestMaxPriceTypedDict(TypedDict): + r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" + + prompt: NotRequired[str] + r"""Price per million prompt tokens""" + completion: NotRequired[str] + image: NotRequired[str] + audio: NotRequired[str] + request: NotRequired[str] + + +class ChatRequestMaxPrice(BaseModel): + r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" + + prompt: Optional[str] = None + r"""Price per million prompt tokens""" + + completion: Optional[str] = None + + image: Optional[str] = None + + audio: Optional[str] = None + + request: Optional[str] = None + + +class ChatRequestProviderTypedDict(TypedDict): + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + allow_fallbacks: NotRequired[Nullable[bool]] + r"""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. + + """ + require_parameters: NotRequired[Nullable[bool]] + r"""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.""" + data_collection: NotRequired[Nullable[DataCollection]] + r"""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: NotRequired[Nullable[bool]] + r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" + enforce_distillable_text: NotRequired[Nullable[bool]] + r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" + order: NotRequired[Nullable[List[ChatRequestOrderTypedDict]]] + r"""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: NotRequired[Nullable[List[ChatRequestOnlyTypedDict]]] + r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" + ignore: NotRequired[Nullable[List[ChatRequestIgnoreTypedDict]]] + r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" + quantizations: NotRequired[Nullable[List[Quantization]]] + r"""A list of quantization levels to filter the provider by.""" + sort: NotRequired[Nullable[ChatRequestSortUnionTypedDict]] + max_price: NotRequired[ChatRequestMaxPriceTypedDict] + r"""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: NotRequired[Nullable[PreferredMinThroughputTypedDict]] + r"""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.""" + preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]] + r"""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.""" + + +class ChatRequestProvider(BaseModel): + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + allow_fallbacks: OptionalNullable[bool] = UNSET + r"""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. + + """ + + require_parameters: OptionalNullable[bool] = UNSET + r"""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.""" + + data_collection: Annotated[ + OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""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: OptionalNullable[bool] = UNSET + r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" + + enforce_distillable_text: OptionalNullable[bool] = UNSET + r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" + + order: OptionalNullable[List[ChatRequestOrder]] = UNSET + r"""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: OptionalNullable[List[ChatRequestOnly]] = UNSET + r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" + + ignore: OptionalNullable[List[ChatRequestIgnore]] = UNSET + r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" + + quantizations: OptionalNullable[ + List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]] + ] = UNSET + r"""A list of quantization levels to filter the provider by.""" + + sort: OptionalNullable[ChatRequestSortUnion] = UNSET + + max_price: Optional[ChatRequestMaxPrice] = None + r"""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: OptionalNullable[PreferredMinThroughput] = UNSET + r"""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.""" + + preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET + r"""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.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "allow_fallbacks", + "require_parameters", + "data_collection", + "zdr", + "enforce_distillable_text", + "order", + "only", + "ignore", + "quantizations", + "sort", + "max_price", + "preferred_min_throughput", + "preferred_max_latency", + ] + nullable_fields = [ + "allow_fallbacks", + "require_parameters", + "data_collection", + "zdr", + "enforce_distillable_text", + "order", + "only", + "ignore", + "quantizations", + "sort", + "preferred_min_throughput", + "preferred_max_latency", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ChatRequestIDContextCompression = Literal["context-compression",] + + +class ChatRequestPluginContextCompressionTypedDict(TypedDict): + id: ChatRequestIDContextCompression + enabled: NotRequired[bool] + r"""Set to false to disable the context-compression plugin for this request. Defaults to true.""" + engine: NotRequired[ContextCompressionEngine] + r"""The compression engine to use. Defaults to \"middle-out\".""" + + +class ChatRequestPluginContextCompression(BaseModel): + id: ChatRequestIDContextCompression + + enabled: Optional[bool] = None + r"""Set to false to disable the context-compression plugin for this request. Defaults to true.""" + + engine: Optional[ContextCompressionEngine] = None + r"""The compression engine to use. Defaults to \"middle-out\".""" + + +ChatRequestIDResponseHealing = Literal["response-healing",] + + +class ChatRequestPluginResponseHealingTypedDict(TypedDict): + id: ChatRequestIDResponseHealing + enabled: NotRequired[bool] + r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" + + +class ChatRequestPluginResponseHealing(BaseModel): + id: ChatRequestIDResponseHealing + + enabled: Optional[bool] = None + r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" + + +ChatRequestIDFileParser = Literal["file-parser",] + + +class ChatRequestPluginFileParserTypedDict(TypedDict): + id: ChatRequestIDFileParser + enabled: NotRequired[bool] + r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" + pdf: NotRequired[PDFParserOptionsTypedDict] + r"""Options for PDF parsing.""" + + +class ChatRequestPluginFileParser(BaseModel): + id: ChatRequestIDFileParser + + enabled: Optional[bool] = None + r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" + + pdf: Optional[PDFParserOptions] = None + r"""Options for PDF parsing.""" + + +ChatRequestIDWeb = Literal["web",] + + +class ChatRequestPluginWebTypedDict(TypedDict): + id: ChatRequestIDWeb + enabled: NotRequired[bool] + r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" + max_results: NotRequired[float] + search_prompt: NotRequired[str] + engine: NotRequired[WebSearchEngine] + r"""The search engine to use for web search.""" + include_domains: NotRequired[List[str]] + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + exclude_domains: NotRequired[List[str]] + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + +class ChatRequestPluginWeb(BaseModel): + id: ChatRequestIDWeb + + enabled: Optional[bool] = None + r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" + + max_results: Optional[float] = None + + search_prompt: Optional[str] = None + + engine: Annotated[ + Optional[WebSearchEngine], PlainValidator(validate_open_enum(False)) + ] = None + r"""The search engine to use for web search.""" + + include_domains: Optional[List[str]] = None + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + exclude_domains: Optional[List[str]] = None + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + +ChatRequestIDModeration = Literal["moderation",] + + +class ChatRequestPluginModerationTypedDict(TypedDict): + id: ChatRequestIDModeration + + +class ChatRequestPluginModeration(BaseModel): + id: ChatRequestIDModeration + + +ChatRequestIDAutoRouter = Literal["auto-router",] + + +class ChatRequestPluginAutoRouterTypedDict(TypedDict): + id: ChatRequestIDAutoRouter + enabled: NotRequired[bool] + r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + allowed_models: NotRequired[List[str]] + r"""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.""" + + +class ChatRequestPluginAutoRouter(BaseModel): + id: ChatRequestIDAutoRouter + + enabled: Optional[bool] = None + r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + + allowed_models: Optional[List[str]] = None + r"""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.""" + + +ChatRequestPluginUnionTypedDict = TypeAliasType( + "ChatRequestPluginUnionTypedDict", + Union[ + ChatRequestPluginModerationTypedDict, + ChatRequestPluginResponseHealingTypedDict, + ChatRequestPluginAutoRouterTypedDict, + ChatRequestPluginFileParserTypedDict, + ChatRequestPluginContextCompressionTypedDict, + ChatRequestPluginWebTypedDict, + ], +) + + +ChatRequestPluginUnion = Annotated[ + Union[ + Annotated[ChatRequestPluginAutoRouter, Tag("auto-router")], + Annotated[ChatRequestPluginModeration, Tag("moderation")], + Annotated[ChatRequestPluginWeb, Tag("web")], + Annotated[ChatRequestPluginFileParser, Tag("file-parser")], + Annotated[ChatRequestPluginResponseHealing, Tag("response-healing")], + Annotated[ChatRequestPluginContextCompression, Tag("context-compression")], + ], + Discriminator(lambda m: get_discriminator(m, "id", "id")), +] + + +class ChatRequestTraceTypedDict(TypedDict): + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + trace_id: NotRequired[str] + trace_name: NotRequired[str] + span_name: NotRequired[str] + generation_name: NotRequired[str] + parent_span_id: NotRequired[str] + + +class ChatRequestTrace(BaseModel): + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + trace_id: Optional[str] = None + + trace_name: Optional[str] = None + + span_name: Optional[str] = None + + generation_name: Optional[str] = None + + parent_span_id: Optional[str] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + +Effort = Union[ + Literal[ + "xhigh", + "high", + "medium", + "low", + "minimal", + "none", + ], + UnrecognizedStr, +] +r"""Constrains effort on reasoning for reasoning models""" + + +class ReasoningTypedDict(TypedDict): + r"""Configuration options for reasoning models""" + + effort: NotRequired[Nullable[Effort]] + r"""Constrains effort on reasoning for reasoning models""" + summary: NotRequired[Nullable[Any]] + + +class Reasoning(BaseModel): + r"""Configuration options for reasoning models""" + + effort: Annotated[ + OptionalNullable[Effort], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""Constrains effort on reasoning for reasoning models""" + + summary: OptionalNullable[Any] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["effort", "summary"] + nullable_fields = ["effort", "summary"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ResponseFormatTypedDict = TypeAliasType( + "ResponseFormatTypedDict", + Union[ + ChatFormatTextConfigTypedDict, + FormatJSONObjectConfigTypedDict, + ChatFormatPythonConfigTypedDict, + ChatFormatJSONSchemaConfigTypedDict, + ChatFormatGrammarConfigTypedDict, + ], +) +r"""Response format configuration""" + + +ResponseFormat = Annotated[ + Union[ + Annotated[ChatFormatTextConfig, Tag("text")], + Annotated[FormatJSONObjectConfig, Tag("json_object")], + Annotated[ChatFormatJSONSchemaConfig, Tag("json_schema")], + Annotated[ChatFormatGrammarConfig, Tag("grammar")], + Annotated[ChatFormatPythonConfig, Tag("python")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""Response format configuration""" + + +StopTypedDict = TypeAliasType("StopTypedDict", Union[str, List[str], Any]) +r"""Stop sequences (up to 4)""" + + +Stop = TypeAliasType("Stop", Union[str, List[str], Any]) +r"""Stop sequences (up to 4)""" + + +ChatRequestImageConfigTypedDict = TypeAliasType( + "ChatRequestImageConfigTypedDict", Union[str, float, List[Nullable[Any]]] +) + + +ChatRequestImageConfig = TypeAliasType( + "ChatRequestImageConfig", Union[str, float, List[Nullable[Any]]] +) + + +Modality = Union[ + Literal[ + "text", + "image", + "audio", + ], + UnrecognizedStr, +] + + +ChatRequestType = Literal["ephemeral",] + + +ChatRequestTTL = Union[ + Literal[ + "5m", + "1h", + ], + UnrecognizedStr, +] + + +class CacheControlTypedDict(TypedDict): + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + + type: ChatRequestType + ttl: NotRequired[ChatRequestTTL] + + +class CacheControl(BaseModel): + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + + type: ChatRequestType + + ttl: Annotated[ + Optional[ChatRequestTTL], PlainValidator(validate_open_enum(False)) + ] = None + + +ChatRequestServiceTier = Union[ + Literal[ + "auto", + "default", + "flex", + "priority", + "scale", + ], + UnrecognizedStr, +] +r"""The service tier to use for processing this request.""" + + +class ChatRequestTypedDict(TypedDict): + r"""Chat completion request parameters""" + + messages: List[ChatMessagesTypedDict] + r"""List of messages for the conversation""" + provider: NotRequired[Nullable[ChatRequestProviderTypedDict]] + r"""When multiple model providers are available, optionally indicate your routing preference.""" + plugins: NotRequired[List[ChatRequestPluginUnionTypedDict]] + r"""Plugins you want to enable for this request, including their settings.""" + user: NotRequired[str] + r"""Unique user identifier""" + session_id: NotRequired[str] + r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.""" + trace: NotRequired[ChatRequestTraceTypedDict] + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + model: NotRequired[str] + r"""Model to use for completion""" + models: NotRequired[List[str]] + r"""Models to use for completion""" + frequency_penalty: NotRequired[Nullable[float]] + r"""Frequency penalty (-2.0 to 2.0)""" + logit_bias: NotRequired[Nullable[Dict[str, float]]] + r"""Token logit bias adjustments""" + logprobs: NotRequired[Nullable[bool]] + r"""Return log probabilities""" + top_logprobs: NotRequired[Nullable[float]] + r"""Number of top log probabilities to return (0-20)""" + max_completion_tokens: NotRequired[Nullable[float]] + r"""Maximum tokens in completion""" + max_tokens: NotRequired[Nullable[float]] + r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" + metadata: NotRequired[Dict[str, str]] + r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" + presence_penalty: NotRequired[Nullable[float]] + r"""Presence penalty (-2.0 to 2.0)""" + reasoning: NotRequired[ReasoningTypedDict] + r"""Configuration options for reasoning models""" + response_format: NotRequired[ResponseFormatTypedDict] + r"""Response format configuration""" + seed: NotRequired[Nullable[int]] + r"""Random seed for deterministic outputs""" + stop: NotRequired[Nullable[StopTypedDict]] + r"""Stop sequences (up to 4)""" + stream: NotRequired[bool] + r"""Enable streaming response""" + stream_options: NotRequired[Nullable[ChatStreamOptionsTypedDict]] + r"""Streaming configuration options""" + temperature: NotRequired[Nullable[float]] + r"""Sampling temperature (0-2)""" + parallel_tool_calls: NotRequired[Nullable[bool]] + tool_choice: NotRequired[ChatToolChoiceTypedDict] + r"""Tool choice configuration""" + tools: NotRequired[List[ChatFunctionToolTypedDict]] + r"""Available tools for function calling""" + top_p: NotRequired[Nullable[float]] + r"""Nucleus sampling parameter (0-1)""" + debug: NotRequired[ChatDebugOptionsTypedDict] + r"""Debug options for inspecting request transformations (streaming only)""" + image_config: NotRequired[Dict[str, ChatRequestImageConfigTypedDict]] + r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.""" + modalities: NotRequired[List[Modality]] + r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" + cache_control: NotRequired[CacheControlTypedDict] + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + service_tier: NotRequired[Nullable[ChatRequestServiceTier]] + r"""The service tier to use for processing this request.""" + + +class ChatRequest(BaseModel): + r"""Chat completion request parameters""" + + messages: List[ChatMessages] + r"""List of messages for the conversation""" + + provider: OptionalNullable[ChatRequestProvider] = UNSET + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + plugins: Optional[List[ChatRequestPluginUnion]] = None + r"""Plugins you want to enable for this request, including their settings.""" + + user: Optional[str] = None + r"""Unique user identifier""" + + session_id: Optional[str] = None + r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.""" + + trace: Optional[ChatRequestTrace] = None + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + model: Optional[str] = None + r"""Model to use for completion""" + + models: Optional[List[str]] = None + r"""Models to use for completion""" + + frequency_penalty: OptionalNullable[float] = UNSET + r"""Frequency penalty (-2.0 to 2.0)""" + + logit_bias: OptionalNullable[Dict[str, float]] = UNSET + r"""Token logit bias adjustments""" + + logprobs: OptionalNullable[bool] = UNSET + r"""Return log probabilities""" + + top_logprobs: OptionalNullable[float] = UNSET + r"""Number of top log probabilities to return (0-20)""" + + max_completion_tokens: OptionalNullable[float] = UNSET + r"""Maximum tokens in completion""" + + max_tokens: OptionalNullable[float] = UNSET + r"""Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.""" + + metadata: Optional[Dict[str, str]] = None + r"""Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)""" + + presence_penalty: OptionalNullable[float] = UNSET + r"""Presence penalty (-2.0 to 2.0)""" + + reasoning: Optional[Reasoning] = None + r"""Configuration options for reasoning models""" + + response_format: Optional[ResponseFormat] = None + r"""Response format configuration""" + + seed: OptionalNullable[int] = UNSET + r"""Random seed for deterministic outputs""" + + stop: OptionalNullable[Stop] = UNSET + r"""Stop sequences (up to 4)""" + + stream: Optional[bool] = False + r"""Enable streaming response""" + + stream_options: OptionalNullable[ChatStreamOptions] = UNSET + r"""Streaming configuration options""" + + temperature: OptionalNullable[float] = 1 + r"""Sampling temperature (0-2)""" + + parallel_tool_calls: OptionalNullable[bool] = UNSET + + tool_choice: Optional[ChatToolChoice] = None + r"""Tool choice configuration""" + + tools: Optional[List[ChatFunctionTool]] = None + r"""Available tools for function calling""" + + top_p: OptionalNullable[float] = 1 + r"""Nucleus sampling parameter (0-1)""" + + debug: Optional[ChatDebugOptions] = None + r"""Debug options for inspecting request transformations (streaming only)""" + + image_config: Optional[Dict[str, ChatRequestImageConfig]] = None + r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.""" + + modalities: Optional[ + List[Annotated[Modality, PlainValidator(validate_open_enum(False))]] + ] = None + r"""Output modalities for the response. Supported values are \"text\", \"image\", and \"audio\".""" + + cache_control: Optional[CacheControl] = None + r"""Enable automatic prompt caching. When set, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.""" + + service_tier: Annotated[ + OptionalNullable[ChatRequestServiceTier], + PlainValidator(validate_open_enum(False)), + ] = UNSET + r"""The service tier to use for processing this request.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "provider", + "plugins", + "user", + "session_id", + "trace", + "model", + "models", + "frequency_penalty", + "logit_bias", + "logprobs", + "top_logprobs", + "max_completion_tokens", + "max_tokens", + "metadata", + "presence_penalty", + "reasoning", + "response_format", + "seed", + "stop", + "stream", + "stream_options", + "temperature", + "parallel_tool_calls", + "tool_choice", + "tools", + "top_p", + "debug", + "image_config", + "modalities", + "cache_control", + "service_tier", + ] + nullable_fields = [ + "provider", + "frequency_penalty", + "logit_bias", + "logprobs", + "top_logprobs", + "max_completion_tokens", + "max_tokens", + "presence_penalty", + "seed", + "stop", + "stream_options", + "temperature", + "parallel_tool_calls", + "top_p", + "service_tier", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatresponse.py b/src/openrouter/components/chatresponse.py index 4aa696f..b9f1c19 100644 --- a/src/openrouter/components/chatresponse.py +++ b/src/openrouter/components/chatresponse.py @@ -6,13 +6,7 @@ from .chatgenerationtokenusage import ( ChatGenerationTokenUsageTypedDict, ) from .chatresponsechoice import ChatResponseChoice, ChatResponseChoiceTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL from pydantic import model_serializer from typing import List, Literal, Optional from typing_extensions import NotRequired, TypedDict @@ -33,7 +27,7 @@ class ChatResponseTypedDict(TypedDict): model: str r"""Model used for completion""" object: ChatResponseObject - system_fingerprint: NotRequired[Nullable[str]] + system_fingerprint: Nullable[str] r"""System fingerprint""" usage: NotRequired[ChatGenerationTokenUsageTypedDict] r"""Token usage statistics""" @@ -56,7 +50,7 @@ class ChatResponse(BaseModel): object: ChatResponseObject - system_fingerprint: OptionalNullable[str] = UNSET + system_fingerprint: Nullable[str] r"""System fingerprint""" usage: Optional[ChatGenerationTokenUsage] = None @@ -64,7 +58,7 @@ class ChatResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["system_fingerprint", "usage"] + optional_fields = ["usage"] nullable_fields = ["system_fingerprint"] null_default_fields = [] diff --git a/src/openrouter/components/chatresult.py b/src/openrouter/components/chatresult.py new file mode 100644 index 0000000..472df5b --- /dev/null +++ b/src/openrouter/components/chatresult.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatchoice import ChatChoice, ChatChoiceTypedDict +from .chatusage import ChatUsage, ChatUsageTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatResultObject = Literal["chat.completion",] + + +class ChatResultTypedDict(TypedDict): + r"""Chat completion response""" + + id: str + r"""Unique completion identifier""" + choices: List[ChatChoiceTypedDict] + r"""List of completion choices""" + created: float + r"""Unix timestamp of creation""" + model: str + r"""Model used for completion""" + object: ChatResultObject + system_fingerprint: Nullable[str] + r"""System fingerprint""" + service_tier: NotRequired[Nullable[str]] + r"""The service tier used by the upstream provider for this request""" + usage: NotRequired[ChatUsageTypedDict] + r"""Token usage statistics""" + + +class ChatResult(BaseModel): + r"""Chat completion response""" + + id: str + r"""Unique completion identifier""" + + choices: List[ChatChoice] + r"""List of completion choices""" + + created: float + r"""Unix timestamp of creation""" + + model: str + r"""Model used for completion""" + + object: ChatResultObject + + system_fingerprint: Nullable[str] + r"""System fingerprint""" + + service_tier: OptionalNullable[str] = UNSET + r"""The service tier used by the upstream provider for this request""" + + usage: Optional[ChatUsage] = None + r"""Token usage statistics""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["service_tier", "usage"] + nullable_fields = ["system_fingerprint", "service_tier"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatstreamchoice.py b/src/openrouter/components/chatstreamchoice.py new file mode 100644 index 0000000..03e0839 --- /dev/null +++ b/src/openrouter/components/chatstreamchoice.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatstreamdelta import ChatStreamDelta, ChatStreamDeltaTypedDict +from .chattokenlogprobs import ChatTokenLogprobs, ChatTokenLogprobsTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any +from typing_extensions import NotRequired, TypedDict + + +class ChatStreamChoiceTypedDict(TypedDict): + r"""Streaming completion choice chunk""" + + delta: ChatStreamDeltaTypedDict + r"""Delta changes in streaming response""" + finish_reason: Nullable[Any] + index: float + r"""Choice index""" + logprobs: NotRequired[Nullable[ChatTokenLogprobsTypedDict]] + r"""Log probabilities for the completion""" + + +class ChatStreamChoice(BaseModel): + r"""Streaming completion choice chunk""" + + delta: ChatStreamDelta + r"""Delta changes in streaming response""" + + finish_reason: Nullable[Any] + + index: float + r"""Choice index""" + + logprobs: OptionalNullable[ChatTokenLogprobs] = UNSET + r"""Log probabilities for the completion""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["logprobs"] + nullable_fields = ["finish_reason", "logprobs"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatstreamchunk.py b/src/openrouter/components/chatstreamchunk.py new file mode 100644 index 0000000..59e17c2 --- /dev/null +++ b/src/openrouter/components/chatstreamchunk.py @@ -0,0 +1,119 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatstreamchoice import ChatStreamChoice, ChatStreamChoiceTypedDict +from .chatusage import ChatUsage, ChatUsageTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatStreamChunkObject = Literal["chat.completion.chunk",] + + +class ErrorTypedDict(TypedDict): + r"""Error information""" + + message: str + r"""Error message""" + code: float + r"""Error code""" + + +class Error(BaseModel): + r"""Error information""" + + message: str + r"""Error message""" + + code: float + r"""Error code""" + + +class ChatStreamChunkTypedDict(TypedDict): + r"""Streaming chat completion chunk""" + + id: str + r"""Unique chunk identifier""" + choices: List[ChatStreamChoiceTypedDict] + r"""List of streaming chunk choices""" + created: float + r"""Unix timestamp of creation""" + model: str + r"""Model used for completion""" + object: ChatStreamChunkObject + system_fingerprint: NotRequired[str] + r"""System fingerprint""" + service_tier: NotRequired[Nullable[str]] + r"""The service tier used by the upstream provider for this request""" + error: NotRequired[ErrorTypedDict] + r"""Error information""" + usage: NotRequired[ChatUsageTypedDict] + r"""Token usage statistics""" + + +class ChatStreamChunk(BaseModel): + r"""Streaming chat completion chunk""" + + id: str + r"""Unique chunk identifier""" + + choices: List[ChatStreamChoice] + r"""List of streaming chunk choices""" + + created: float + r"""Unix timestamp of creation""" + + model: str + r"""Model used for completion""" + + object: ChatStreamChunkObject + + system_fingerprint: Optional[str] = None + r"""System fingerprint""" + + service_tier: OptionalNullable[str] = UNSET + r"""The service tier used by the upstream provider for this request""" + + error: Optional[Error] = None + r"""Error information""" + + usage: Optional[ChatUsage] = None + r"""Token usage statistics""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["system_fingerprint", "service_tier", "error", "usage"] + nullable_fields = ["service_tier"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatstreamdelta.py b/src/openrouter/components/chatstreamdelta.py new file mode 100644 index 0000000..540982e --- /dev/null +++ b/src/openrouter/components/chatstreamdelta.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chataudiooutput import ChatAudioOutput, ChatAudioOutputTypedDict +from .chatstreamtoolcall import ChatStreamToolCall, ChatStreamToolCallTypedDict +from .reasoningdetailunion import ReasoningDetailUnion, ReasoningDetailUnionTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatStreamDeltaRole = Literal["assistant",] +r"""The role of the message author""" + + +class ChatStreamDeltaTypedDict(TypedDict): + r"""Delta changes in streaming response""" + + role: NotRequired[ChatStreamDeltaRole] + r"""The role of the message author""" + content: NotRequired[Nullable[str]] + r"""Message content delta""" + reasoning: NotRequired[Nullable[str]] + r"""Reasoning content delta""" + refusal: NotRequired[Nullable[str]] + r"""Refusal message delta""" + tool_calls: NotRequired[List[ChatStreamToolCallTypedDict]] + r"""Tool calls delta""" + reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]] + r"""Reasoning details for extended thinking models""" + audio: NotRequired[ChatAudioOutputTypedDict] + + +class ChatStreamDelta(BaseModel): + r"""Delta changes in streaming response""" + + role: Optional[ChatStreamDeltaRole] = None + r"""The role of the message author""" + + content: OptionalNullable[str] = UNSET + r"""Message content delta""" + + reasoning: OptionalNullable[str] = UNSET + r"""Reasoning content delta""" + + refusal: OptionalNullable[str] = UNSET + r"""Refusal message delta""" + + tool_calls: Optional[List[ChatStreamToolCall]] = None + r"""Tool calls delta""" + + reasoning_details: Optional[List[ReasoningDetailUnion]] = None + r"""Reasoning details for extended thinking models""" + + audio: Optional[ChatAudioOutput] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "role", + "content", + "reasoning", + "refusal", + "tool_calls", + "reasoning_details", + "audio", + ] + nullable_fields = ["content", "reasoning", "refusal"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatstreamingmessagechunk.py b/src/openrouter/components/chatstreamingmessagechunk.py index fb1d23e..016a6df 100644 --- a/src/openrouter/components/chatstreamingmessagechunk.py +++ b/src/openrouter/components/chatstreamingmessagechunk.py @@ -1,6 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .chatcompletionaudiooutput import ( + ChatCompletionAudioOutput, + ChatCompletionAudioOutputTypedDict, +) from .chatstreamingmessagetoolcall import ( ChatStreamingMessageToolCall, ChatStreamingMessageToolCallTypedDict, @@ -37,6 +41,7 @@ class ChatStreamingMessageChunkTypedDict(TypedDict): r"""Tool calls delta""" reasoning_details: NotRequired[List[ReasoningDetailUnionTypedDict]] r"""Reasoning details for extended thinking models""" + audio: NotRequired[ChatCompletionAudioOutputTypedDict] class ChatStreamingMessageChunk(BaseModel): @@ -60,6 +65,8 @@ class ChatStreamingMessageChunk(BaseModel): reasoning_details: Optional[List[ReasoningDetailUnion]] = None r"""Reasoning details for extended thinking models""" + audio: Optional[ChatCompletionAudioOutput] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -69,6 +76,7 @@ class ChatStreamingMessageChunk(BaseModel): "refusal", "tool_calls", "reasoning_details", + "audio", ] nullable_fields = ["content", "reasoning", "refusal"] null_default_fields = [] diff --git a/src/openrouter/components/chatstreamingresponsechunk.py b/src/openrouter/components/chatstreamingresponsechunk.py index d2a1fe0..2d7c347 100644 --- a/src/openrouter/components/chatstreamingresponsechunk.py +++ b/src/openrouter/components/chatstreamingresponsechunk.py @@ -6,14 +6,7 @@ from .chatgenerationtokenusage import ( ChatGenerationTokenUsageTypedDict, ) from .chatstreamingchoice import ChatStreamingChoice, ChatStreamingChoiceTypedDict -from openrouter.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer +from openrouter.types import BaseModel from typing import List, Literal, Optional from typing_extensions import NotRequired, TypedDict @@ -52,7 +45,7 @@ class ChatStreamingResponseChunkTypedDict(TypedDict): model: str r"""Model used for completion""" object: ChatStreamingResponseChunkObject - system_fingerprint: NotRequired[Nullable[str]] + system_fingerprint: NotRequired[str] r"""System fingerprint""" error: NotRequired[ErrorTypedDict] r"""Error information""" @@ -77,7 +70,7 @@ class ChatStreamingResponseChunk(BaseModel): object: ChatStreamingResponseChunkObject - system_fingerprint: OptionalNullable[str] = UNSET + system_fingerprint: Optional[str] = None r"""System fingerprint""" error: Optional[Error] = None @@ -85,33 +78,3 @@ class ChatStreamingResponseChunk(BaseModel): usage: Optional[ChatGenerationTokenUsage] = None r"""Token usage statistics""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = ["system_fingerprint", "error", "usage"] - nullable_fields = ["system_fingerprint"] - null_default_fields = [] - - serialized = handler(self) - - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - - return m diff --git a/src/openrouter/components/chatstreamtoolcall.py b/src/openrouter/components/chatstreamtoolcall.py new file mode 100644 index 0000000..0f25b0c --- /dev/null +++ b/src/openrouter/components/chatstreamtoolcall.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ChatStreamToolCallType = Literal["function",] +r"""Tool call type""" + + +class ChatStreamToolCallFunctionTypedDict(TypedDict): + r"""Function call details""" + + name: NotRequired[str] + r"""Function name""" + arguments: NotRequired[str] + r"""Function arguments as JSON string""" + + +class ChatStreamToolCallFunction(BaseModel): + r"""Function call details""" + + name: Optional[str] = None + r"""Function name""" + + arguments: Optional[str] = None + r"""Function arguments as JSON string""" + + +class ChatStreamToolCallTypedDict(TypedDict): + r"""Tool call delta for streaming responses""" + + index: float + r"""Tool call index in the array""" + id: NotRequired[str] + r"""Tool call identifier""" + type: NotRequired[ChatStreamToolCallType] + r"""Tool call type""" + function: NotRequired[ChatStreamToolCallFunctionTypedDict] + r"""Function call details""" + + +class ChatStreamToolCall(BaseModel): + r"""Tool call delta for streaming responses""" + + index: float + r"""Tool call index in the array""" + + id: Optional[str] = None + r"""Tool call identifier""" + + type: Optional[ChatStreamToolCallType] = None + r"""Tool call type""" + + function: Optional[ChatStreamToolCallFunction] = None + r"""Function call details""" diff --git a/src/openrouter/components/chatsystemmessage.py b/src/openrouter/components/chatsystemmessage.py new file mode 100644 index 0000000..e123812 --- /dev/null +++ b/src/openrouter/components/chatsystemmessage.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontenttext import ChatContentText, ChatContentTextTypedDict +from openrouter.types import BaseModel +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ChatSystemMessageRole = Literal["system",] + + +ChatSystemMessageContentTypedDict = TypeAliasType( + "ChatSystemMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]] +) +r"""System message content""" + + +ChatSystemMessageContent = TypeAliasType( + "ChatSystemMessageContent", Union[str, List[ChatContentText]] +) +r"""System message content""" + + +class ChatSystemMessageTypedDict(TypedDict): + r"""System message for setting behavior""" + + role: ChatSystemMessageRole + content: ChatSystemMessageContentTypedDict + r"""System message content""" + name: NotRequired[str] + r"""Optional name for the system message""" + + +class ChatSystemMessage(BaseModel): + r"""System message for setting behavior""" + + role: ChatSystemMessageRole + + content: ChatSystemMessageContent + r"""System message content""" + + name: Optional[str] = None + r"""Optional name for the system message""" diff --git a/src/openrouter/components/chattokenlogprob.py b/src/openrouter/components/chattokenlogprob.py new file mode 100644 index 0000000..a52d234 --- /dev/null +++ b/src/openrouter/components/chattokenlogprob.py @@ -0,0 +1,111 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List +from typing_extensions import Annotated, TypedDict + + +class ChatTokenLogprobTopLogprobTypedDict(TypedDict): + token: str + logprob: float + bytes_: Nullable[List[float]] + + +class ChatTokenLogprobTopLogprob(BaseModel): + token: str + + logprob: float + + bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["bytes"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class ChatTokenLogprobTypedDict(TypedDict): + r"""Token log probability information""" + + token: str + r"""The token""" + logprob: float + r"""Log probability of the token""" + bytes_: Nullable[List[float]] + r"""UTF-8 bytes of the token""" + top_logprobs: List[ChatTokenLogprobTopLogprobTypedDict] + r"""Top alternative tokens with probabilities""" + + +class ChatTokenLogprob(BaseModel): + r"""Token log probability information""" + + token: str + r"""The token""" + + logprob: float + r"""Log probability of the token""" + + bytes_: Annotated[Nullable[List[float]], pydantic.Field(alias="bytes")] + r"""UTF-8 bytes of the token""" + + top_logprobs: List[ChatTokenLogprobTopLogprob] + r"""Top alternative tokens with probabilities""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["bytes"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chattokenlogprobs.py b/src/openrouter/components/chattokenlogprobs.py new file mode 100644 index 0000000..037f8b5 --- /dev/null +++ b/src/openrouter/components/chattokenlogprobs.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chattokenlogprob import ChatTokenLogprob, ChatTokenLogprobTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ChatTokenLogprobsTypedDict(TypedDict): + r"""Log probabilities for the completion""" + + content: Nullable[List[ChatTokenLogprobTypedDict]] + r"""Log probabilities for content tokens""" + refusal: NotRequired[Nullable[List[ChatTokenLogprobTypedDict]]] + r"""Log probabilities for refusal tokens""" + + +class ChatTokenLogprobs(BaseModel): + r"""Log probabilities for the completion""" + + content: Nullable[List[ChatTokenLogprob]] + r"""Log probabilities for content tokens""" + + refusal: OptionalNullable[List[ChatTokenLogprob]] = UNSET + r"""Log probabilities for refusal tokens""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["refusal"] + nullable_fields = ["content", "refusal"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chattoolcall.py b/src/openrouter/components/chattoolcall.py new file mode 100644 index 0000000..4788e38 --- /dev/null +++ b/src/openrouter/components/chattoolcall.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ChatToolCallType = Literal["function",] + + +class ChatToolCallFunctionTypedDict(TypedDict): + name: str + r"""Function name to call""" + arguments: str + r"""Function arguments as JSON string""" + + +class ChatToolCallFunction(BaseModel): + name: str + r"""Function name to call""" + + arguments: str + r"""Function arguments as JSON string""" + + +class ChatToolCallTypedDict(TypedDict): + r"""Tool call made by the assistant""" + + id: str + r"""Tool call identifier""" + type: ChatToolCallType + function: ChatToolCallFunctionTypedDict + + +class ChatToolCall(BaseModel): + r"""Tool call made by the assistant""" + + id: str + r"""Tool call identifier""" + + type: ChatToolCallType + + function: ChatToolCallFunction diff --git a/src/openrouter/components/chattoolchoice.py b/src/openrouter/components/chattoolchoice.py new file mode 100644 index 0000000..4bdebae --- /dev/null +++ b/src/openrouter/components/chattoolchoice.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatnamedtoolchoice import ChatNamedToolChoice, ChatNamedToolChoiceTypedDict +from typing import Literal, Union +from typing_extensions import TypeAliasType + + +ChatToolChoiceRequired = Literal["required",] + + +ChatToolChoiceAuto = Literal["auto",] + + +ChatToolChoiceNone = Literal["none",] + + +ChatToolChoiceTypedDict = TypeAliasType( + "ChatToolChoiceTypedDict", + Union[ + ChatNamedToolChoiceTypedDict, + ChatToolChoiceNone, + ChatToolChoiceAuto, + ChatToolChoiceRequired, + ], +) +r"""Tool choice configuration""" + + +ChatToolChoice = TypeAliasType( + "ChatToolChoice", + Union[ + ChatNamedToolChoice, + ChatToolChoiceNone, + ChatToolChoiceAuto, + ChatToolChoiceRequired, + ], +) +r"""Tool choice configuration""" diff --git a/src/openrouter/components/chattoolmessage.py b/src/openrouter/components/chattoolmessage.py new file mode 100644 index 0000000..1738954 --- /dev/null +++ b/src/openrouter/components/chattoolmessage.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentitems import ChatContentItems, ChatContentItemsTypedDict +from openrouter.types import BaseModel +from typing import List, Literal, Union +from typing_extensions import TypeAliasType, TypedDict + + +ChatToolMessageRole = Literal["tool",] + + +ChatToolMessageContentTypedDict = TypeAliasType( + "ChatToolMessageContentTypedDict", Union[str, List[ChatContentItemsTypedDict]] +) +r"""Tool response content""" + + +ChatToolMessageContent = TypeAliasType( + "ChatToolMessageContent", Union[str, List[ChatContentItems]] +) +r"""Tool response content""" + + +class ChatToolMessageTypedDict(TypedDict): + r"""Tool response message""" + + role: ChatToolMessageRole + content: ChatToolMessageContentTypedDict + r"""Tool response content""" + tool_call_id: str + r"""ID of the assistant message tool call this message responds to""" + + +class ChatToolMessage(BaseModel): + r"""Tool response message""" + + role: ChatToolMessageRole + + content: ChatToolMessageContent + r"""Tool response content""" + + tool_call_id: str + r"""ID of the assistant message tool call this message responds to""" diff --git a/src/openrouter/components/chatusage.py b/src/openrouter/components/chatusage.py new file mode 100644 index 0000000..51f0bd6 --- /dev/null +++ b/src/openrouter/components/chatusage.py @@ -0,0 +1,175 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CompletionTokensDetailsTypedDict(TypedDict): + r"""Detailed completion token usage""" + + reasoning_tokens: NotRequired[Nullable[float]] + r"""Tokens used for reasoning""" + audio_tokens: NotRequired[Nullable[float]] + r"""Tokens used for audio output""" + accepted_prediction_tokens: NotRequired[Nullable[float]] + r"""Accepted prediction tokens""" + rejected_prediction_tokens: NotRequired[Nullable[float]] + r"""Rejected prediction tokens""" + + +class CompletionTokensDetails(BaseModel): + r"""Detailed completion token usage""" + + reasoning_tokens: OptionalNullable[float] = UNSET + r"""Tokens used for reasoning""" + + audio_tokens: OptionalNullable[float] = UNSET + r"""Tokens used for audio output""" + + accepted_prediction_tokens: OptionalNullable[float] = UNSET + r"""Accepted prediction tokens""" + + rejected_prediction_tokens: OptionalNullable[float] = UNSET + r"""Rejected prediction tokens""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "reasoning_tokens", + "audio_tokens", + "accepted_prediction_tokens", + "rejected_prediction_tokens", + ] + nullable_fields = [ + "reasoning_tokens", + "audio_tokens", + "accepted_prediction_tokens", + "rejected_prediction_tokens", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PromptTokensDetailsTypedDict(TypedDict): + r"""Detailed prompt token usage""" + + cached_tokens: NotRequired[float] + r"""Cached prompt tokens""" + cache_write_tokens: NotRequired[float] + r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing.""" + audio_tokens: NotRequired[float] + r"""Audio input tokens""" + video_tokens: NotRequired[float] + r"""Video input tokens""" + + +class PromptTokensDetails(BaseModel): + r"""Detailed prompt token usage""" + + cached_tokens: Optional[float] = None + r"""Cached prompt tokens""" + + cache_write_tokens: Optional[float] = None + r"""Tokens written to cache. Only returned for models with explicit caching and cache write pricing.""" + + audio_tokens: Optional[float] = None + r"""Audio input tokens""" + + video_tokens: Optional[float] = None + r"""Video input tokens""" + + +class ChatUsageTypedDict(TypedDict): + r"""Token usage statistics""" + + completion_tokens: float + r"""Number of tokens in the completion""" + prompt_tokens: float + r"""Number of tokens in the prompt""" + total_tokens: float + r"""Total number of tokens""" + completion_tokens_details: NotRequired[Nullable[CompletionTokensDetailsTypedDict]] + r"""Detailed completion token usage""" + prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] + r"""Detailed prompt token usage""" + + +class ChatUsage(BaseModel): + r"""Token usage statistics""" + + completion_tokens: float + r"""Number of tokens in the completion""" + + prompt_tokens: float + r"""Number of tokens in the prompt""" + + total_tokens: float + r"""Total number of tokens""" + + completion_tokens_details: OptionalNullable[CompletionTokensDetails] = UNSET + r"""Detailed completion token usage""" + + prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET + r"""Detailed prompt token usage""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["completion_tokens_details", "prompt_tokens_details"] + nullable_fields = ["completion_tokens_details", "prompt_tokens_details"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/chatusermessage.py b/src/openrouter/components/chatusermessage.py new file mode 100644 index 0000000..c8ecec5 --- /dev/null +++ b/src/openrouter/components/chatusermessage.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentitems import ChatContentItems, ChatContentItemsTypedDict +from openrouter.types import BaseModel +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ChatUserMessageRole = Literal["user",] + + +ChatUserMessageContentTypedDict = TypeAliasType( + "ChatUserMessageContentTypedDict", Union[str, List[ChatContentItemsTypedDict]] +) +r"""User message content""" + + +ChatUserMessageContent = TypeAliasType( + "ChatUserMessageContent", Union[str, List[ChatContentItems]] +) +r"""User message content""" + + +class ChatUserMessageTypedDict(TypedDict): + r"""User message""" + + role: ChatUserMessageRole + content: ChatUserMessageContentTypedDict + r"""User message content""" + name: NotRequired[str] + r"""Optional name for the user""" + + +class ChatUserMessage(BaseModel): + r"""User message""" + + role: ChatUserMessageRole + + content: ChatUserMessageContent + r"""User message content""" + + name: Optional[str] = None + r"""Optional name for the user""" diff --git a/src/openrouter/components/chatwebsearchservertool.py b/src/openrouter/components/chatwebsearchservertool.py new file mode 100644 index 0000000..48ad6da --- /dev/null +++ b/src/openrouter/components/chatwebsearchservertool.py @@ -0,0 +1,123 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +ChatWebSearchServerToolTypeOpenrouterWebSearch = Literal["openrouter:web_search",] + + +ChatWebSearchServerToolEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +ChatWebSearchServerToolSearchContextSize = Union[ + Literal[ + "low", + "medium", + "high", + ], + UnrecognizedStr, +] +r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + +ChatWebSearchServerToolParametersType = Literal["approximate",] + + +class ChatWebSearchServerToolUserLocationTypedDict(TypedDict): + r"""Approximate user location for location-biased results.""" + + type: NotRequired[ChatWebSearchServerToolParametersType] + city: NotRequired[str] + region: NotRequired[str] + country: NotRequired[str] + timezone: NotRequired[str] + + +class ChatWebSearchServerToolUserLocation(BaseModel): + r"""Approximate user location for location-biased results.""" + + type: Optional[ChatWebSearchServerToolParametersType] = None + + city: Optional[str] = None + + region: Optional[str] = None + + country: Optional[str] = None + + timezone: Optional[str] = None + + +class ChatWebSearchServerToolParametersTypedDict(TypedDict): + engine: NotRequired[ChatWebSearchServerToolEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + max_total_results: NotRequired[float] + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + search_context_size: NotRequired[ChatWebSearchServerToolSearchContextSize] + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + user_location: NotRequired[ChatWebSearchServerToolUserLocationTypedDict] + r"""Approximate user location for location-biased results.""" + allowed_domains: NotRequired[List[str]] + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + excluded_domains: NotRequired[List[str]] + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + +class ChatWebSearchServerToolParameters(BaseModel): + engine: Annotated[ + Optional[ChatWebSearchServerToolEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + max_total_results: Optional[float] = None + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + + search_context_size: Annotated[ + Optional[ChatWebSearchServerToolSearchContextSize], + PlainValidator(validate_open_enum(False)), + ] = None + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + user_location: Optional[ChatWebSearchServerToolUserLocation] = None + r"""Approximate user location for location-biased results.""" + + allowed_domains: Optional[List[str]] = None + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + excluded_domains: Optional[List[str]] = None + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + +class ChatWebSearchServerToolTypedDict(TypedDict): + r"""OpenRouter built-in server tool: searches the web for current information""" + + type: ChatWebSearchServerToolTypeOpenrouterWebSearch + parameters: NotRequired[ChatWebSearchServerToolParametersTypedDict] + + +class ChatWebSearchServerTool(BaseModel): + r"""OpenRouter built-in server tool: searches the web for current information""" + + type: ChatWebSearchServerToolTypeOpenrouterWebSearch + + parameters: Optional[ChatWebSearchServerToolParameters] = None diff --git a/src/openrouter/components/chatwebsearchshorthand.py b/src/openrouter/components/chatwebsearchshorthand.py new file mode 100644 index 0000000..92d86d4 --- /dev/null +++ b/src/openrouter/components/chatwebsearchshorthand.py @@ -0,0 +1,225 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +ChatWebSearchShorthandType = Union[ + Literal[ + "web_search", + "web_search_preview", + "web_search_preview_2025_03_11", + "web_search_2025_08_26", + ], + UnrecognizedStr, +] + + +ChatWebSearchShorthandEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +ChatWebSearchShorthandSearchContextSize = Union[ + Literal[ + "low", + "medium", + "high", + ], + UnrecognizedStr, +] +r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + +ChatWebSearchShorthandTypeApproximate = Literal["approximate",] + + +class ChatWebSearchShorthandUserLocationTypedDict(TypedDict): + r"""Approximate user location for location-biased results.""" + + type: NotRequired[ChatWebSearchShorthandTypeApproximate] + city: NotRequired[str] + region: NotRequired[str] + country: NotRequired[str] + timezone: NotRequired[str] + + +class ChatWebSearchShorthandUserLocation(BaseModel): + r"""Approximate user location for location-biased results.""" + + type: Optional[ChatWebSearchShorthandTypeApproximate] = None + + city: Optional[str] = None + + region: Optional[str] = None + + country: Optional[str] = None + + timezone: Optional[str] = None + + +ChatWebSearchShorthandParametersEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +ChatWebSearchShorthandParametersSearchContextSize = Union[ + Literal[ + "low", + "medium", + "high", + ], + UnrecognizedStr, +] +r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + +ChatWebSearchShorthandParametersType = Literal["approximate",] + + +class ChatWebSearchShorthandParametersUserLocationTypedDict(TypedDict): + r"""Approximate user location for location-biased results.""" + + type: NotRequired[ChatWebSearchShorthandParametersType] + city: NotRequired[str] + region: NotRequired[str] + country: NotRequired[str] + timezone: NotRequired[str] + + +class ChatWebSearchShorthandParametersUserLocation(BaseModel): + r"""Approximate user location for location-biased results.""" + + type: Optional[ChatWebSearchShorthandParametersType] = None + + city: Optional[str] = None + + region: Optional[str] = None + + country: Optional[str] = None + + timezone: Optional[str] = None + + +class ChatWebSearchShorthandParametersTypedDict(TypedDict): + engine: NotRequired[ChatWebSearchShorthandParametersEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + max_total_results: NotRequired[float] + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + search_context_size: NotRequired[ChatWebSearchShorthandParametersSearchContextSize] + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + user_location: NotRequired[ChatWebSearchShorthandParametersUserLocationTypedDict] + r"""Approximate user location for location-biased results.""" + allowed_domains: NotRequired[List[str]] + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + excluded_domains: NotRequired[List[str]] + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + +class ChatWebSearchShorthandParameters(BaseModel): + engine: Annotated[ + Optional[ChatWebSearchShorthandParametersEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + max_total_results: Optional[float] = None + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + + search_context_size: Annotated[ + Optional[ChatWebSearchShorthandParametersSearchContextSize], + PlainValidator(validate_open_enum(False)), + ] = None + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + user_location: Optional[ChatWebSearchShorthandParametersUserLocation] = None + r"""Approximate user location for location-biased results.""" + + allowed_domains: Optional[List[str]] = None + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + excluded_domains: Optional[List[str]] = None + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + +class ChatWebSearchShorthandTypedDict(TypedDict): + r"""Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search.""" + + type: ChatWebSearchShorthandType + engine: NotRequired[ChatWebSearchShorthandEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + max_total_results: NotRequired[float] + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + search_context_size: NotRequired[ChatWebSearchShorthandSearchContextSize] + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + user_location: NotRequired[ChatWebSearchShorthandUserLocationTypedDict] + r"""Approximate user location for location-biased results.""" + allowed_domains: NotRequired[List[str]] + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + excluded_domains: NotRequired[List[str]] + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + parameters: NotRequired[ChatWebSearchShorthandParametersTypedDict] + + +class ChatWebSearchShorthand(BaseModel): + r"""Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search.""" + + type: Annotated[ + ChatWebSearchShorthandType, PlainValidator(validate_open_enum(False)) + ] + + engine: Annotated[ + Optional[ChatWebSearchShorthandEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + max_total_results: Optional[float] = None + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops.""" + + search_context_size: Annotated[ + Optional[ChatWebSearchShorthandSearchContextSize], + PlainValidator(validate_open_enum(False)), + ] = None + r"""How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.""" + + user_location: Optional[ChatWebSearchShorthandUserLocation] = None + r"""Approximate user location for location-biased results.""" + + allowed_domains: Optional[List[str]] = None + r"""Limit search results to these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + excluded_domains: Optional[List[str]] = None + r"""Exclude search results from these domains. Applies to Exa and Parallel engines. Not supported with Firecrawl or native provider search.""" + + parameters: Optional[ChatWebSearchShorthandParameters] = None diff --git a/src/openrouter/components/codeinterpreterservertool.py b/src/openrouter/components/codeinterpreterservertool.py new file mode 100644 index 0000000..3342144 --- /dev/null +++ b/src/openrouter/components/codeinterpreterservertool.py @@ -0,0 +1,102 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeCodeInterpreter = Literal["code_interpreter",] + + +ContainerType = Literal["auto",] + + +MemoryLimit = Union[ + Literal[ + "1g", + "4g", + "16g", + "64g", + ], + UnrecognizedStr, +] + + +class ContainerAutoTypedDict(TypedDict): + type: ContainerType + file_ids: NotRequired[List[str]] + memory_limit: NotRequired[Nullable[MemoryLimit]] + + +class ContainerAuto(BaseModel): + type: ContainerType + + file_ids: Optional[List[str]] = None + + memory_limit: Annotated[ + OptionalNullable[MemoryLimit], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["file_ids", "memory_limit"] + nullable_fields = ["memory_limit"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ContainerTypedDict = TypeAliasType( + "ContainerTypedDict", Union[ContainerAutoTypedDict, str] +) + + +Container = TypeAliasType("Container", Union[ContainerAuto, str]) + + +class CodeInterpreterServerToolTypedDict(TypedDict): + r"""Code interpreter tool configuration""" + + type: TypeCodeInterpreter + container: ContainerTypedDict + + +class CodeInterpreterServerTool(BaseModel): + r"""Code interpreter tool configuration""" + + type: TypeCodeInterpreter + + container: Container diff --git a/src/openrouter/components/codexlocalshelltool.py b/src/openrouter/components/codexlocalshelltool.py new file mode 100644 index 0000000..ea86f79 --- /dev/null +++ b/src/openrouter/components/codexlocalshelltool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +CodexLocalShellToolType = Literal["local_shell",] + + +class CodexLocalShellToolTypedDict(TypedDict): + r"""Local shell tool configuration""" + + type: CodexLocalShellToolType + + +class CodexLocalShellTool(BaseModel): + r"""Local shell tool configuration""" + + type: CodexLocalShellToolType diff --git a/src/openrouter/components/compoundfilter.py b/src/openrouter/components/compoundfilter.py new file mode 100644 index 0000000..f4bcd55 --- /dev/null +++ b/src/openrouter/components/compoundfilter.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Union +from typing_extensions import Annotated, TypedDict + + +CompoundFilterType = Union[ + Literal[ + "and", + "or", + ], + UnrecognizedStr, +] + + +class CompoundFilterTypedDict(TypedDict): + r"""A compound filter that combines multiple comparison or compound filters""" + + type: CompoundFilterType + filters: List[Dict[str, Nullable[Any]]] + + +class CompoundFilter(BaseModel): + r"""A compound filter that combines multiple comparison or compound filters""" + + type: Annotated[CompoundFilterType, PlainValidator(validate_open_enum(False))] + + filters: List[Dict[str, Nullable[Any]]] diff --git a/src/openrouter/components/computeruseservertool.py b/src/openrouter/components/computeruseservertool.py new file mode 100644 index 0000000..c1596a6 --- /dev/null +++ b/src/openrouter/components/computeruseservertool.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict + + +ComputerUseServerToolType = Literal["computer_use_preview",] + + +Environment = Union[ + Literal[ + "windows", + "mac", + "linux", + "ubuntu", + "browser", + ], + UnrecognizedStr, +] + + +class ComputerUseServerToolTypedDict(TypedDict): + r"""Computer use preview tool configuration""" + + type: ComputerUseServerToolType + display_height: float + display_width: float + environment: Environment + + +class ComputerUseServerTool(BaseModel): + r"""Computer use preview tool configuration""" + + type: ComputerUseServerToolType + + display_height: float + + display_width: float + + environment: Annotated[Environment, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/conflictresponseerrordata.py b/src/openrouter/components/conflictresponseerrordata.py new file mode 100644 index 0000000..fdbfb16 --- /dev/null +++ b/src/openrouter/components/conflictresponseerrordata.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ConflictResponseErrorDataTypedDict(TypedDict): + r"""Error data for ConflictResponse""" + + code: int + message: str + metadata: NotRequired[Nullable[Dict[str, Nullable[Any]]]] + + +class ConflictResponseErrorData(BaseModel): + r"""Error data for ConflictResponse""" + + code: int + + message: str + + metadata: OptionalNullable[Dict[str, Nullable[Any]]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["metadata"] + nullable_fields = ["metadata"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/contentpartaddedevent.py b/src/openrouter/components/contentpartaddedevent.py new file mode 100644 index 0000000..8a0d0c7 --- /dev/null +++ b/src/openrouter/components/contentpartaddedevent.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openairesponsesrefusalcontent import ( + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContentTypedDict, +) +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from openrouter.types import BaseModel +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ContentPartAddedEventType = Literal["response.content_part.added",] + + +ContentPartAddedEventPartTypedDict = TypeAliasType( + "ContentPartAddedEventPartTypedDict", + Union[ + ReasoningTextContentTypedDict, + OpenAIResponsesRefusalContentTypedDict, + ResponseOutputTextTypedDict, + ], +) + + +ContentPartAddedEventPart = Annotated[ + Union[ + Annotated[ResponseOutputText, Tag("output_text")], + Annotated[ReasoningTextContent, Tag("reasoning_text")], + Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class ContentPartAddedEventTypedDict(TypedDict): + r"""Event emitted when a new content part is added to an output item""" + + type: ContentPartAddedEventType + output_index: float + item_id: str + content_index: float + part: ContentPartAddedEventPartTypedDict + sequence_number: float + + +class ContentPartAddedEvent(BaseModel): + r"""Event emitted when a new content part is added to an output item""" + + type: ContentPartAddedEventType + + output_index: float + + item_id: str + + content_index: float + + part: ContentPartAddedEventPart + + sequence_number: float diff --git a/src/openrouter/components/contentpartdoneevent.py b/src/openrouter/components/contentpartdoneevent.py new file mode 100644 index 0000000..f9046af --- /dev/null +++ b/src/openrouter/components/contentpartdoneevent.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openairesponsesrefusalcontent import ( + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContentTypedDict, +) +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from openrouter.types import BaseModel +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ContentPartDoneEventType = Literal["response.content_part.done",] + + +ContentPartDoneEventPartTypedDict = TypeAliasType( + "ContentPartDoneEventPartTypedDict", + Union[ + ReasoningTextContentTypedDict, + OpenAIResponsesRefusalContentTypedDict, + ResponseOutputTextTypedDict, + ], +) + + +ContentPartDoneEventPart = Annotated[ + Union[ + Annotated[ResponseOutputText, Tag("output_text")], + Annotated[ReasoningTextContent, Tag("reasoning_text")], + Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class ContentPartDoneEventTypedDict(TypedDict): + r"""Event emitted when a content part is complete""" + + type: ContentPartDoneEventType + output_index: float + item_id: str + content_index: float + part: ContentPartDoneEventPartTypedDict + sequence_number: float + + +class ContentPartDoneEvent(BaseModel): + r"""Event emitted when a content part is complete""" + + type: ContentPartDoneEventType + + output_index: float + + item_id: str + + content_index: float + + part: ContentPartDoneEventPart + + sequence_number: float diff --git a/src/openrouter/components/contextcompressionengine.py b/src/openrouter/components/contextcompressionengine.py new file mode 100644 index 0000000..7d5b6f7 --- /dev/null +++ b/src/openrouter/components/contextcompressionengine.py @@ -0,0 +1,8 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +ContextCompressionEngine = Literal["middle-out",] +r"""The compression engine to use. Defaults to \"middle-out\".""" diff --git a/src/openrouter/components/customtool.py b/src/openrouter/components/customtool.py new file mode 100644 index 0000000..bc706a4 --- /dev/null +++ b/src/openrouter/components/customtool.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import get_discriminator, validate_open_enum +import pydantic +from pydantic import Discriminator, Tag +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeCustom = Literal["custom",] + + +FormatTypeGrammar = Literal["grammar",] + + +Syntax = Union[ + Literal[ + "lark", + "regex", + ], + UnrecognizedStr, +] + + +class FormatGrammarTypedDict(TypedDict): + type: FormatTypeGrammar + definition: str + syntax: Syntax + + +class FormatGrammar(BaseModel): + type: FormatTypeGrammar + + definition: str + + syntax: Annotated[Syntax, PlainValidator(validate_open_enum(False))] + + +FormatTypeText = Literal["text",] + + +class FormatTextTypedDict(TypedDict): + type: FormatTypeText + + +class FormatText(BaseModel): + type: FormatTypeText + + +FormatTypedDict = TypeAliasType( + "FormatTypedDict", Union[FormatTextTypedDict, FormatGrammarTypedDict] +) + + +Format = Annotated[ + Union[Annotated[FormatText, Tag("text")], Annotated[FormatGrammar, Tag("grammar")]], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class CustomToolTypedDict(TypedDict): + r"""Custom tool configuration""" + + type: TypeCustom + name: str + description: NotRequired[str] + format_: NotRequired[FormatTypedDict] + + +class CustomTool(BaseModel): + r"""Custom tool configuration""" + + type: TypeCustom + + name: str + + description: Optional[str] = None + + format_: Annotated[Optional[Format], pydantic.Field(alias="format")] = None diff --git a/src/openrouter/components/datetimeservertool.py b/src/openrouter/components/datetimeservertool.py new file mode 100644 index 0000000..ced5c34 --- /dev/null +++ b/src/openrouter/components/datetimeservertool.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +DatetimeServerToolType = Literal["openrouter:datetime",] + + +class DatetimeServerToolParametersTypedDict(TypedDict): + timezone: NotRequired[str] + r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC.""" + + +class DatetimeServerToolParameters(BaseModel): + timezone: Optional[str] = None + r"""IANA timezone name (e.g. \"America/New_York\"). Defaults to UTC.""" + + +class DatetimeServerToolTypedDict(TypedDict): + r"""OpenRouter built-in server tool: returns the current date and time""" + + type: DatetimeServerToolType + parameters: NotRequired[DatetimeServerToolParametersTypedDict] + + +class DatetimeServerTool(BaseModel): + r"""OpenRouter built-in server tool: returns the current date and time""" + + type: DatetimeServerToolType + + parameters: Optional[DatetimeServerToolParameters] = None diff --git a/src/openrouter/components/defaultparameters.py b/src/openrouter/components/defaultparameters.py index b28498a..8af36cc 100644 --- a/src/openrouter/components/defaultparameters.py +++ b/src/openrouter/components/defaultparameters.py @@ -17,7 +17,10 @@ class DefaultParametersTypedDict(TypedDict): temperature: NotRequired[Nullable[float]] top_p: NotRequired[Nullable[float]] + top_k: NotRequired[Nullable[int]] frequency_penalty: NotRequired[Nullable[float]] + presence_penalty: NotRequired[Nullable[float]] + repetition_penalty: NotRequired[Nullable[float]] class DefaultParameters(BaseModel): @@ -27,12 +30,32 @@ class DefaultParameters(BaseModel): top_p: OptionalNullable[float] = UNSET + top_k: OptionalNullable[int] = UNSET + frequency_penalty: OptionalNullable[float] = UNSET + presence_penalty: OptionalNullable[float] = UNSET + + repetition_penalty: OptionalNullable[float] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["temperature", "top_p", "frequency_penalty"] - nullable_fields = ["temperature", "top_p", "frequency_penalty"] + optional_fields = [ + "temperature", + "top_p", + "top_k", + "frequency_penalty", + "presence_penalty", + "repetition_penalty", + ] + nullable_fields = [ + "temperature", + "top_p", + "top_k", + "frequency_penalty", + "presence_penalty", + "repetition_penalty", + ] null_default_fields = [] serialized = handler(self) diff --git a/src/openrouter/components/easyinputmessage.py b/src/openrouter/components/easyinputmessage.py new file mode 100644 index 0000000..b7a6d28 --- /dev/null +++ b/src/openrouter/components/easyinputmessage.py @@ -0,0 +1,223 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputaudio import InputAudio, InputAudioTypedDict +from .inputfile import InputFile, InputFileTypedDict +from .inputtext import InputText, InputTextTypedDict +from .inputvideo import InputVideo, InputVideoTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +EasyInputMessageTypeMessage = Literal["message",] + + +EasyInputMessageRoleDeveloper = Literal["developer",] + + +EasyInputMessageRoleAssistant = Literal["assistant",] + + +EasyInputMessageRoleSystem = Literal["system",] + + +EasyInputMessageRoleUser = Literal["user",] + + +EasyInputMessageRoleUnionTypedDict = TypeAliasType( + "EasyInputMessageRoleUnionTypedDict", + Union[ + EasyInputMessageRoleUser, + EasyInputMessageRoleSystem, + EasyInputMessageRoleAssistant, + EasyInputMessageRoleDeveloper, + ], +) + + +EasyInputMessageRoleUnion = TypeAliasType( + "EasyInputMessageRoleUnion", + Union[ + EasyInputMessageRoleUser, + EasyInputMessageRoleSystem, + EasyInputMessageRoleAssistant, + EasyInputMessageRoleDeveloper, + ], +) + + +EasyInputMessageContentType = Literal["input_image",] + + +EasyInputMessageDetail = Union[ + Literal[ + "auto", + "high", + "low", + ], + UnrecognizedStr, +] + + +class EasyInputMessageContentInputImageTypedDict(TypedDict): + r"""Image input content item""" + + type: EasyInputMessageContentType + detail: EasyInputMessageDetail + image_url: NotRequired[Nullable[str]] + + +class EasyInputMessageContentInputImage(BaseModel): + r"""Image input content item""" + + type: EasyInputMessageContentType + + detail: Annotated[EasyInputMessageDetail, PlainValidator(validate_open_enum(False))] + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["image_url"] + nullable_fields = ["image_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +EasyInputMessageContentUnion1TypedDict = TypeAliasType( + "EasyInputMessageContentUnion1TypedDict", + Union[ + InputTextTypedDict, + InputAudioTypedDict, + InputVideoTypedDict, + EasyInputMessageContentInputImageTypedDict, + InputFileTypedDict, + ], +) + + +EasyInputMessageContentUnion1 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[EasyInputMessageContentInputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + Annotated[InputAudio, Tag("input_audio")], + Annotated[InputVideo, Tag("input_video")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +EasyInputMessageContentUnion2TypedDict = TypeAliasType( + "EasyInputMessageContentUnion2TypedDict", + Union[List[EasyInputMessageContentUnion1TypedDict], str, Any], +) + + +EasyInputMessageContentUnion2 = TypeAliasType( + "EasyInputMessageContentUnion2", + Union[List[EasyInputMessageContentUnion1], str, Any], +) + + +EasyInputMessagePhaseFinalAnswer = Literal["final_answer",] + + +EasyInputMessagePhaseCommentary = Literal["commentary",] + + +EasyInputMessagePhaseUnionTypedDict = TypeAliasType( + "EasyInputMessagePhaseUnionTypedDict", + Union[EasyInputMessagePhaseCommentary, EasyInputMessagePhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +EasyInputMessagePhaseUnion = TypeAliasType( + "EasyInputMessagePhaseUnion", + Union[EasyInputMessagePhaseCommentary, EasyInputMessagePhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class EasyInputMessageTypedDict(TypedDict): + role: EasyInputMessageRoleUnionTypedDict + type: NotRequired[EasyInputMessageTypeMessage] + content: NotRequired[Nullable[EasyInputMessageContentUnion2TypedDict]] + phase: NotRequired[Nullable[EasyInputMessagePhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class EasyInputMessage(BaseModel): + role: EasyInputMessageRoleUnion + + type: Optional[EasyInputMessageTypeMessage] = None + + content: OptionalNullable[EasyInputMessageContentUnion2] = UNSET + + phase: OptionalNullable[EasyInputMessagePhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["type", "content", "phase"] + nullable_fields = ["content", "phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/errorevent.py b/src/openrouter/components/errorevent.py new file mode 100644 index 0000000..38fb520 --- /dev/null +++ b/src/openrouter/components/errorevent.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Literal +from typing_extensions import TypedDict + + +ErrorEventType = Literal["error",] + + +class ErrorEventTypedDict(TypedDict): + r"""Event emitted when an error occurs during streaming""" + + type: ErrorEventType + code: Nullable[str] + message: str + param: Nullable[str] + sequence_number: float + + +class ErrorEvent(BaseModel): + r"""Event emitted when an error occurs during streaming""" + + type: ErrorEventType + + code: Nullable[str] + + message: str + + param: Nullable[str] + + sequence_number: float + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [] + nullable_fields = ["code", "param"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/filesearchservertool.py b/src/openrouter/components/filesearchservertool.py new file mode 100644 index 0000000..347f023 --- /dev/null +++ b/src/openrouter/components/filesearchservertool.py @@ -0,0 +1,148 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .compoundfilter import CompoundFilter, CompoundFilterTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeFileSearch = Literal["file_search",] + + +FiltersType = Union[ + Literal[ + "eq", + "ne", + "gt", + "gte", + "lt", + "lte", + ], + UnrecognizedStr, +] + + +Value1TypedDict = TypeAliasType("Value1TypedDict", Union[str, float]) + + +Value1 = TypeAliasType("Value1", Union[str, float]) + + +Value2TypedDict = TypeAliasType( + "Value2TypedDict", Union[str, float, bool, List[Value1TypedDict]] +) + + +Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]]) + + +class FileSearchServerToolFiltersTypedDict(TypedDict): + key: str + type: FiltersType + value: Value2TypedDict + + +class FileSearchServerToolFilters(BaseModel): + key: str + + type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))] + + value: Value2 + + +FiltersTypedDict = TypeAliasType( + "FiltersTypedDict", + Union[CompoundFilterTypedDict, FileSearchServerToolFiltersTypedDict, Any], +) + + +Filters = TypeAliasType( + "Filters", Union[CompoundFilter, FileSearchServerToolFilters, Any] +) + + +Ranker = Union[ + Literal[ + "auto", + "default-2024-11-15", + ], + UnrecognizedStr, +] + + +class RankingOptionsTypedDict(TypedDict): + ranker: NotRequired[Ranker] + score_threshold: NotRequired[float] + + +class RankingOptions(BaseModel): + ranker: Annotated[Optional[Ranker], PlainValidator(validate_open_enum(False))] = ( + None + ) + + score_threshold: Optional[float] = None + + +class FileSearchServerToolTypedDict(TypedDict): + r"""File search tool configuration""" + + type: TypeFileSearch + vector_store_ids: List[str] + filters: NotRequired[Nullable[FiltersTypedDict]] + max_num_results: NotRequired[int] + ranking_options: NotRequired[RankingOptionsTypedDict] + + +class FileSearchServerTool(BaseModel): + r"""File search tool configuration""" + + type: TypeFileSearch + + vector_store_ids: List[str] + + filters: OptionalNullable[Filters] = UNSET + + max_num_results: Optional[int] = None + + ranking_options: Optional[RankingOptions] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["filters", "max_num_results", "ranking_options"] + nullable_fields = ["filters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/formatjsonobjectconfig.py b/src/openrouter/components/formatjsonobjectconfig.py new file mode 100644 index 0000000..a530b83 --- /dev/null +++ b/src/openrouter/components/formatjsonobjectconfig.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +FormatJSONObjectConfigType = Literal["json_object",] + + +class FormatJSONObjectConfigTypedDict(TypedDict): + r"""JSON object response format""" + + type: FormatJSONObjectConfigType + + +class FormatJSONObjectConfig(BaseModel): + r"""JSON object response format""" + + type: FormatJSONObjectConfigType diff --git a/src/openrouter/components/formatjsonschemaconfig.py b/src/openrouter/components/formatjsonschemaconfig.py new file mode 100644 index 0000000..109f115 --- /dev/null +++ b/src/openrouter/components/formatjsonschemaconfig.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +FormatJSONSchemaConfigType = Literal["json_schema",] + + +class FormatJSONSchemaConfigTypedDict(TypedDict): + r"""JSON schema constrained response format""" + + type: FormatJSONSchemaConfigType + name: str + schema_: Dict[str, Nullable[Any]] + description: NotRequired[str] + strict: NotRequired[Nullable[bool]] + + +class FormatJSONSchemaConfig(BaseModel): + r"""JSON schema constrained response format""" + + type: FormatJSONSchemaConfigType + + name: str + + schema_: Annotated[Dict[str, Nullable[Any]], pydantic.Field(alias="schema")] + + description: Optional[str] = None + + strict: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["description", "strict"] + nullable_fields = ["strict"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/formats.py b/src/openrouter/components/formats.py new file mode 100644 index 0000000..dcf0421 --- /dev/null +++ b/src/openrouter/components/formats.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .formatjsonobjectconfig import ( + FormatJSONObjectConfig, + FormatJSONObjectConfigTypedDict, +) +from .formatjsonschemaconfig import ( + FormatJSONSchemaConfig, + FormatJSONSchemaConfigTypedDict, +) +from .formattextconfig import FormatTextConfig, FormatTextConfigTypedDict +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated, TypeAliasType + + +FormatsTypedDict = TypeAliasType( + "FormatsTypedDict", + Union[ + FormatTextConfigTypedDict, + FormatJSONObjectConfigTypedDict, + FormatJSONSchemaConfigTypedDict, + ], +) +r"""Text response format configuration""" + + +Formats = Annotated[ + Union[ + Annotated[FormatTextConfig, Tag("text")], + Annotated[FormatJSONObjectConfig, Tag("json_object")], + Annotated[FormatJSONSchemaConfig, Tag("json_schema")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""Text response format configuration""" diff --git a/src/openrouter/components/formattextconfig.py b/src/openrouter/components/formattextconfig.py new file mode 100644 index 0000000..fddfc9b --- /dev/null +++ b/src/openrouter/components/formattextconfig.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +FormatTextConfigType = Literal["text",] + + +class FormatTextConfigTypedDict(TypedDict): + r"""Plain text response format""" + + type: FormatTextConfigType + + +class FormatTextConfig(BaseModel): + r"""Plain text response format""" + + type: FormatTextConfigType diff --git a/src/openrouter/components/functioncallargsdeltaevent.py b/src/openrouter/components/functioncallargsdeltaevent.py new file mode 100644 index 0000000..b035dc3 --- /dev/null +++ b/src/openrouter/components/functioncallargsdeltaevent.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +FunctionCallArgsDeltaEventType = Literal["response.function_call_arguments.delta",] + + +class FunctionCallArgsDeltaEventTypedDict(TypedDict): + r"""Event emitted when function call arguments are being streamed""" + + type: FunctionCallArgsDeltaEventType + item_id: str + output_index: float + delta: str + sequence_number: float + + +class FunctionCallArgsDeltaEvent(BaseModel): + r"""Event emitted when function call arguments are being streamed""" + + type: FunctionCallArgsDeltaEventType + + item_id: str + + output_index: float + + delta: str + + sequence_number: float diff --git a/src/openrouter/components/functioncallargsdoneevent.py b/src/openrouter/components/functioncallargsdoneevent.py new file mode 100644 index 0000000..335579b --- /dev/null +++ b/src/openrouter/components/functioncallargsdoneevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +FunctionCallArgsDoneEventType = Literal["response.function_call_arguments.done",] + + +class FunctionCallArgsDoneEventTypedDict(TypedDict): + r"""Event emitted when function call arguments streaming is complete""" + + type: FunctionCallArgsDoneEventType + item_id: str + output_index: float + name: str + arguments: str + sequence_number: float + + +class FunctionCallArgsDoneEvent(BaseModel): + r"""Event emitted when function call arguments streaming is complete""" + + type: FunctionCallArgsDoneEventType + + item_id: str + + output_index: float + + name: str + + arguments: str + + sequence_number: float diff --git a/src/openrouter/components/functioncallitem.py b/src/openrouter/components/functioncallitem.py new file mode 100644 index 0000000..666d0b0 --- /dev/null +++ b/src/openrouter/components/functioncallitem.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolcallstatusenum import ToolCallStatusEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +FunctionCallItemType = Literal["function_call",] + + +class FunctionCallItemTypedDict(TypedDict): + r"""A function call initiated by the model""" + + type: FunctionCallItemType + call_id: str + name: str + arguments: str + id: str + status: NotRequired[Nullable[ToolCallStatusEnum]] + + +class FunctionCallItem(BaseModel): + r"""A function call initiated by the model""" + + type: FunctionCallItemType + + call_id: str + + name: str + + arguments: str + + id: str + + status: Annotated[ + OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status"] + nullable_fields = ["status"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/functioncalloutputitem.py b/src/openrouter/components/functioncalloutputitem.py new file mode 100644 index 0000000..5173384 --- /dev/null +++ b/src/openrouter/components/functioncalloutputitem.py @@ -0,0 +1,169 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputfile import InputFile, InputFileTypedDict +from .inputtext import InputText, InputTextTypedDict +from .toolcallstatusenum import ToolCallStatusEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +FunctionCallOutputItemTypeFunctionCallOutput = Literal["function_call_output",] + + +OutputType = Literal["input_image",] + + +FunctionCallOutputItemDetail = Union[ + Literal[ + "auto", + "high", + "low", + ], + UnrecognizedStr, +] + + +class OutputInputImageTypedDict(TypedDict): + r"""Image input content item""" + + type: OutputType + detail: FunctionCallOutputItemDetail + image_url: NotRequired[Nullable[str]] + + +class OutputInputImage(BaseModel): + r"""Image input content item""" + + type: OutputType + + detail: Annotated[ + FunctionCallOutputItemDetail, PlainValidator(validate_open_enum(False)) + ] + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["image_url"] + nullable_fields = ["image_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +FunctionCallOutputItemOutputUnion1TypedDict = TypeAliasType( + "FunctionCallOutputItemOutputUnion1TypedDict", + Union[InputTextTypedDict, OutputInputImageTypedDict, InputFileTypedDict], +) + + +FunctionCallOutputItemOutputUnion1 = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[OutputInputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +FunctionCallOutputItemOutputUnion2TypedDict = TypeAliasType( + "FunctionCallOutputItemOutputUnion2TypedDict", + Union[str, List[FunctionCallOutputItemOutputUnion1TypedDict]], +) + + +FunctionCallOutputItemOutputUnion2 = TypeAliasType( + "FunctionCallOutputItemOutputUnion2", + Union[str, List[FunctionCallOutputItemOutputUnion1]], +) + + +class FunctionCallOutputItemTypedDict(TypedDict): + r"""The output from a function call execution""" + + type: FunctionCallOutputItemTypeFunctionCallOutput + call_id: str + output: FunctionCallOutputItemOutputUnion2TypedDict + id: NotRequired[Nullable[str]] + status: NotRequired[Nullable[ToolCallStatusEnum]] + + +class FunctionCallOutputItem(BaseModel): + r"""The output from a function call execution""" + + type: FunctionCallOutputItemTypeFunctionCallOutput + + call_id: str + + output: FunctionCallOutputItemOutputUnion2 + + id: OptionalNullable[str] = UNSET + + status: Annotated[ + OptionalNullable[ToolCallStatusEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "status"] + nullable_fields = ["id", "status"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/imagegencallcompletedevent.py b/src/openrouter/components/imagegencallcompletedevent.py new file mode 100644 index 0000000..72f0875 --- /dev/null +++ b/src/openrouter/components/imagegencallcompletedevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ImageGenCallCompletedEventType = Literal["response.image_generation_call.completed",] + + +class ImageGenCallCompletedEventTypedDict(TypedDict): + r"""Image generation call completed""" + + type: ImageGenCallCompletedEventType + item_id: str + output_index: float + sequence_number: float + + +class ImageGenCallCompletedEvent(BaseModel): + r"""Image generation call completed""" + + type: ImageGenCallCompletedEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/imagegencallgeneratingevent.py b/src/openrouter/components/imagegencallgeneratingevent.py new file mode 100644 index 0000000..91842cb --- /dev/null +++ b/src/openrouter/components/imagegencallgeneratingevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ImageGenCallGeneratingEventType = Literal["response.image_generation_call.generating",] + + +class ImageGenCallGeneratingEventTypedDict(TypedDict): + r"""Image generation call is generating""" + + type: ImageGenCallGeneratingEventType + item_id: str + output_index: float + sequence_number: float + + +class ImageGenCallGeneratingEvent(BaseModel): + r"""Image generation call is generating""" + + type: ImageGenCallGeneratingEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/imagegencallinprogressevent.py b/src/openrouter/components/imagegencallinprogressevent.py new file mode 100644 index 0000000..4b9b612 --- /dev/null +++ b/src/openrouter/components/imagegencallinprogressevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ImageGenCallInProgressEventType = Literal["response.image_generation_call.in_progress",] + + +class ImageGenCallInProgressEventTypedDict(TypedDict): + r"""Image generation call in progress""" + + type: ImageGenCallInProgressEventType + item_id: str + output_index: float + sequence_number: float + + +class ImageGenCallInProgressEvent(BaseModel): + r"""Image generation call in progress""" + + type: ImageGenCallInProgressEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/imagegencallpartialimageevent.py b/src/openrouter/components/imagegencallpartialimageevent.py new file mode 100644 index 0000000..8be2e33 --- /dev/null +++ b/src/openrouter/components/imagegencallpartialimageevent.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ImageGenCallPartialImageEventType = Literal[ + "response.image_generation_call.partial_image", +] + + +class ImageGenCallPartialImageEventTypedDict(TypedDict): + r"""Image generation call with partial image""" + + type: ImageGenCallPartialImageEventType + item_id: str + output_index: float + sequence_number: float + partial_image_b64: str + partial_image_index: float + + +class ImageGenCallPartialImageEvent(BaseModel): + r"""Image generation call with partial image""" + + type: ImageGenCallPartialImageEventType + + item_id: str + + output_index: float + + sequence_number: float + + partial_image_b64: str + + partial_image_index: float diff --git a/src/openrouter/components/imagegenerationservertool.py b/src/openrouter/components/imagegenerationservertool.py new file mode 100644 index 0000000..98d9225 --- /dev/null +++ b/src/openrouter/components/imagegenerationservertool.py @@ -0,0 +1,194 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +ImageGenerationServerToolType = Literal["image_generation",] + + +Background = Union[ + Literal[ + "transparent", + "opaque", + "auto", + ], + UnrecognizedStr, +] + + +InputFidelity = Union[ + Literal[ + "high", + "low", + ], + UnrecognizedStr, +] + + +class InputImageMaskTypedDict(TypedDict): + image_url: NotRequired[str] + file_id: NotRequired[str] + + +class InputImageMask(BaseModel): + image_url: Optional[str] = None + + file_id: Optional[str] = None + + +ModelEnum = Union[ + Literal[ + "gpt-image-1", + "gpt-image-1-mini", + ], + UnrecognizedStr, +] + + +Moderation = Union[ + Literal[ + "auto", + "low", + ], + UnrecognizedStr, +] + + +OutputFormat = Union[ + Literal[ + "png", + "webp", + "jpeg", + ], + UnrecognizedStr, +] + + +Quality = Union[ + Literal[ + "low", + "medium", + "high", + "auto", + ], + UnrecognizedStr, +] + + +Size = Union[ + Literal[ + "1024x1024", + "1024x1536", + "1536x1024", + "auto", + ], + UnrecognizedStr, +] + + +class ImageGenerationServerToolTypedDict(TypedDict): + r"""Image generation tool configuration""" + + type: ImageGenerationServerToolType + background: NotRequired[Background] + input_fidelity: NotRequired[Nullable[InputFidelity]] + input_image_mask: NotRequired[InputImageMaskTypedDict] + model: NotRequired[ModelEnum] + moderation: NotRequired[Moderation] + output_compression: NotRequired[float] + output_format: NotRequired[OutputFormat] + partial_images: NotRequired[float] + quality: NotRequired[Quality] + size: NotRequired[Size] + + +class ImageGenerationServerTool(BaseModel): + r"""Image generation tool configuration""" + + type: ImageGenerationServerToolType + + background: Annotated[ + Optional[Background], PlainValidator(validate_open_enum(False)) + ] = None + + input_fidelity: Annotated[ + OptionalNullable[InputFidelity], PlainValidator(validate_open_enum(False)) + ] = UNSET + + input_image_mask: Optional[InputImageMask] = None + + model: Annotated[Optional[ModelEnum], PlainValidator(validate_open_enum(False))] = ( + None + ) + + moderation: Annotated[ + Optional[Moderation], PlainValidator(validate_open_enum(False)) + ] = None + + output_compression: Optional[float] = None + + output_format: Annotated[ + Optional[OutputFormat], PlainValidator(validate_open_enum(False)) + ] = None + + partial_images: Optional[float] = None + + quality: Annotated[Optional[Quality], PlainValidator(validate_open_enum(False))] = ( + None + ) + + size: Annotated[Optional[Size], PlainValidator(validate_open_enum(False))] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "background", + "input_fidelity", + "input_image_mask", + "model", + "moderation", + "output_compression", + "output_format", + "partial_images", + "quality", + "size", + ] + nullable_fields = ["input_fidelity"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/incompletedetails.py b/src/openrouter/components/incompletedetails.py new file mode 100644 index 0000000..56dc096 --- /dev/null +++ b/src/openrouter/components/incompletedetails.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +Reason = Union[ + Literal[ + "max_output_tokens", + "content_filter", + ], + UnrecognizedStr, +] + + +class IncompleteDetailsTypedDict(TypedDict): + reason: NotRequired[Reason] + + +class IncompleteDetails(BaseModel): + reason: Annotated[Optional[Reason], PlainValidator(validate_open_enum(False))] = ( + None + ) diff --git a/src/openrouter/components/inputaudio.py b/src/openrouter/components/inputaudio.py new file mode 100644 index 0000000..0c0db5e --- /dev/null +++ b/src/openrouter/components/inputaudio.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +import pydantic +from pydantic.functional_validators import PlainValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict + + +InputAudioType = Literal["input_audio",] + + +InputAudioFormat = Union[ + Literal[ + "mp3", + "wav", + ], + UnrecognizedStr, +] + + +class InputAudioInputAudioTypedDict(TypedDict): + data: str + format_: InputAudioFormat + + +class InputAudioInputAudio(BaseModel): + data: str + + format_: Annotated[ + Annotated[InputAudioFormat, PlainValidator(validate_open_enum(False))], + pydantic.Field(alias="format"), + ] + + +class InputAudioTypedDict(TypedDict): + r"""Audio input content item""" + + type: InputAudioType + input_audio: InputAudioInputAudioTypedDict + + +class InputAudio(BaseModel): + r"""Audio input content item""" + + type: InputAudioType + + input_audio: InputAudioInputAudio diff --git a/src/openrouter/components/inputfile.py b/src/openrouter/components/inputfile.py new file mode 100644 index 0000000..ec4f269 --- /dev/null +++ b/src/openrouter/components/inputfile.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +InputFileType = Literal["input_file",] + + +class InputFileTypedDict(TypedDict): + r"""File input content item""" + + type: InputFileType + file_id: NotRequired[Nullable[str]] + file_data: NotRequired[str] + filename: NotRequired[str] + file_url: NotRequired[str] + + +class InputFile(BaseModel): + r"""File input content item""" + + type: InputFileType + + file_id: OptionalNullable[str] = UNSET + + file_data: Optional[str] = None + + filename: Optional[str] = None + + file_url: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["file_id", "file_data", "filename", "file_url"] + nullable_fields = ["file_id"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/inputimage.py b/src/openrouter/components/inputimage.py new file mode 100644 index 0000000..9888ab5 --- /dev/null +++ b/src/openrouter/components/inputimage.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +InputImageType = Literal["input_image",] + + +InputImageDetail = Union[ + Literal[ + "auto", + "high", + "low", + ], + UnrecognizedStr, +] + + +class InputImageTypedDict(TypedDict): + r"""Image input content item""" + + type: InputImageType + detail: InputImageDetail + image_url: NotRequired[Nullable[str]] + + +class InputImage(BaseModel): + r"""Image input content item""" + + type: InputImageType + + detail: Annotated[InputImageDetail, PlainValidator(validate_open_enum(False))] + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["image_url"] + nullable_fields = ["image_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/inputmessageitem.py b/src/openrouter/components/inputmessageitem.py new file mode 100644 index 0000000..808a7fa --- /dev/null +++ b/src/openrouter/components/inputmessageitem.py @@ -0,0 +1,184 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputaudio import InputAudio, InputAudioTypedDict +from .inputfile import InputFile, InputFileTypedDict +from .inputtext import InputText, InputTextTypedDict +from .inputvideo import InputVideo, InputVideoTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +InputMessageItemTypeMessage = Literal["message",] + + +InputMessageItemRoleDeveloper = Literal["developer",] + + +InputMessageItemRoleSystem = Literal["system",] + + +InputMessageItemRoleUser = Literal["user",] + + +InputMessageItemRoleUnionTypedDict = TypeAliasType( + "InputMessageItemRoleUnionTypedDict", + Union[ + InputMessageItemRoleUser, + InputMessageItemRoleSystem, + InputMessageItemRoleDeveloper, + ], +) + + +InputMessageItemRoleUnion = TypeAliasType( + "InputMessageItemRoleUnion", + Union[ + InputMessageItemRoleUser, + InputMessageItemRoleSystem, + InputMessageItemRoleDeveloper, + ], +) + + +InputMessageItemContentType = Literal["input_image",] + + +InputMessageItemDetail = Union[ + Literal[ + "auto", + "high", + "low", + ], + UnrecognizedStr, +] + + +class InputMessageItemContentInputImageTypedDict(TypedDict): + r"""Image input content item""" + + type: InputMessageItemContentType + detail: InputMessageItemDetail + image_url: NotRequired[Nullable[str]] + + +class InputMessageItemContentInputImage(BaseModel): + r"""Image input content item""" + + type: InputMessageItemContentType + + detail: Annotated[InputMessageItemDetail, PlainValidator(validate_open_enum(False))] + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["image_url"] + nullable_fields = ["image_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +InputMessageItemContentUnionTypedDict = TypeAliasType( + "InputMessageItemContentUnionTypedDict", + Union[ + InputTextTypedDict, + InputAudioTypedDict, + InputVideoTypedDict, + InputMessageItemContentInputImageTypedDict, + InputFileTypedDict, + ], +) + + +InputMessageItemContentUnion = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[InputMessageItemContentInputImage, Tag("input_image")], + Annotated[InputFile, Tag("input_file")], + Annotated[InputAudio, Tag("input_audio")], + Annotated[InputVideo, Tag("input_video")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class InputMessageItemTypedDict(TypedDict): + role: InputMessageItemRoleUnionTypedDict + id: NotRequired[str] + type: NotRequired[InputMessageItemTypeMessage] + content: NotRequired[Nullable[List[InputMessageItemContentUnionTypedDict]]] + + +class InputMessageItem(BaseModel): + role: InputMessageItemRoleUnion + + id: Optional[str] = None + + type: Optional[InputMessageItemTypeMessage] = None + + content: OptionalNullable[List[InputMessageItemContentUnion]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "type", "content"] + nullable_fields = ["content"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py new file mode 100644 index 0000000..d846015 --- /dev/null +++ b/src/openrouter/components/inputs_union.py @@ -0,0 +1,350 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .easyinputmessage import EasyInputMessage, EasyInputMessageTypedDict +from .functioncallitem import FunctionCallItem, FunctionCallItemTypedDict +from .functioncalloutputitem import ( + FunctionCallOutputItem, + FunctionCallOutputItemTypedDict, +) +from .inputmessageitem import InputMessageItem, InputMessageItemTypedDict +from .openairesponsesrefusalcontent import ( + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContentTypedDict, +) +from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict +from .outputfilesearchcallitem import ( + OutputFileSearchCallItem, + OutputFileSearchCallItemTypedDict, +) +from .outputfunctioncallitem import ( + OutputFunctionCallItem, + OutputFunctionCallItemTypedDict, +) +from .outputimagegenerationcallitem import ( + OutputImageGenerationCallItem, + OutputImageGenerationCallItemTypedDict, +) +from .outputservertoolitem import OutputServerToolItem, OutputServerToolItemTypedDict +from .outputwebsearchcallitem import ( + OutputWebSearchCallItem, + OutputWebSearchCallItemTypedDict, +) +from .reasoningitem import ReasoningItem, ReasoningItemTypedDict +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +import pydantic +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +InputsTypeReasoning = Literal["reasoning",] + + +InputsStatusInProgress2 = Literal["in_progress",] + + +InputsStatusIncomplete2 = Literal["incomplete",] + + +InputsStatusCompleted2 = Literal["completed",] + + +InputsStatusUnion2TypedDict = TypeAliasType( + "InputsStatusUnion2TypedDict", + Union[InputsStatusCompleted2, InputsStatusIncomplete2, InputsStatusInProgress2], +) + + +InputsStatusUnion2 = TypeAliasType( + "InputsStatusUnion2", + Union[InputsStatusCompleted2, InputsStatusIncomplete2, InputsStatusInProgress2], +) + + +InputsFormat = Union[ + Literal[ + "unknown", + "openai-responses-v1", + "azure-openai-responses-v1", + "xai-responses-v1", + "anthropic-claude-v1", + "google-gemini-v1", + ], + UnrecognizedStr, +] +r"""The format of the reasoning content""" + + +class InputsReasoningTypedDict(TypedDict): + r"""An output item containing reasoning""" + + type: InputsTypeReasoning + id: str + summary: Nullable[List[ReasoningSummaryTextTypedDict]] + content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] + encrypted_content: NotRequired[Nullable[str]] + status: NotRequired[InputsStatusUnion2TypedDict] + signature: NotRequired[Nullable[str]] + r"""A signature for the reasoning content, used for verification""" + format_: NotRequired[Nullable[InputsFormat]] + r"""The format of the reasoning content""" + + +class InputsReasoning(BaseModel): + r"""An output item containing reasoning""" + + type: InputsTypeReasoning + + id: str + + summary: Nullable[List[ReasoningSummaryText]] + + content: OptionalNullable[List[ReasoningTextContent]] = UNSET + + encrypted_content: OptionalNullable[str] = UNSET + + status: Optional[InputsStatusUnion2] = None + + signature: OptionalNullable[str] = UNSET + r"""A signature for the reasoning content, used for verification""" + + format_: Annotated[ + Annotated[ + OptionalNullable[InputsFormat], PlainValidator(validate_open_enum(False)) + ], + pydantic.Field(alias="format"), + ] = UNSET + r"""The format of the reasoning content""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "content", + "encrypted_content", + "status", + "signature", + "format", + ] + nullable_fields = [ + "content", + "summary", + "encrypted_content", + "signature", + "format", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +InputsRole = Literal["assistant",] + + +InputsTypeMessage = Literal["message",] + + +InputsStatusInProgress1 = Literal["in_progress",] + + +InputsStatusIncomplete1 = Literal["incomplete",] + + +InputsStatusCompleted1 = Literal["completed",] + + +InputsStatusUnion1TypedDict = TypeAliasType( + "InputsStatusUnion1TypedDict", + Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1], +) + + +InputsStatusUnion1 = TypeAliasType( + "InputsStatusUnion1", + Union[InputsStatusCompleted1, InputsStatusIncomplete1, InputsStatusInProgress1], +) + + +InputsContent1TypedDict = TypeAliasType( + "InputsContent1TypedDict", + Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict], +) + + +InputsContent1 = Annotated[ + Union[ + Annotated[ResponseOutputText, Tag("output_text")], + Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +InputsContent2TypedDict = TypeAliasType( + "InputsContent2TypedDict", Union[List[InputsContent1TypedDict], str, Any] +) + + +InputsContent2 = TypeAliasType("InputsContent2", Union[List[InputsContent1], str, Any]) + + +InputsPhaseFinalAnswer = Literal["final_answer",] + + +InputsPhaseCommentary = Literal["commentary",] + + +InputsPhaseUnionTypedDict = TypeAliasType( + "InputsPhaseUnionTypedDict", + Union[InputsPhaseCommentary, InputsPhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +InputsPhaseUnion = TypeAliasType( + "InputsPhaseUnion", Union[InputsPhaseCommentary, InputsPhaseFinalAnswer, Any] +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class InputsMessageTypedDict(TypedDict): + r"""An output message item""" + + id: str + role: InputsRole + type: InputsTypeMessage + content: Nullable[InputsContent2TypedDict] + status: NotRequired[InputsStatusUnion1TypedDict] + phase: NotRequired[Nullable[InputsPhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class InputsMessage(BaseModel): + r"""An output message item""" + + id: str + + role: InputsRole + + type: InputsTypeMessage + + content: Nullable[InputsContent2] + + status: Optional[InputsStatusUnion1] = None + + phase: OptionalNullable[InputsPhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status", "phase"] + nullable_fields = ["content", "phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +InputsUnion1TypedDict = TypeAliasType( + "InputsUnion1TypedDict", + Union[ + OutputWebSearchCallItemTypedDict, + EasyInputMessageTypedDict, + InputMessageItemTypedDict, + OutputServerToolItemTypedDict, + OutputImageGenerationCallItemTypedDict, + OutputFileSearchCallItemTypedDict, + FunctionCallOutputItemTypedDict, + OutputDatetimeItemTypedDict, + FunctionCallItemTypedDict, + OutputFunctionCallItemTypedDict, + InputsMessageTypedDict, + InputsReasoningTypedDict, + ReasoningItemTypedDict, + ], +) + + +InputsUnion1 = TypeAliasType( + "InputsUnion1", + Union[ + OutputWebSearchCallItem, + EasyInputMessage, + InputMessageItem, + OutputServerToolItem, + OutputImageGenerationCallItem, + OutputFileSearchCallItem, + FunctionCallOutputItem, + OutputDatetimeItem, + FunctionCallItem, + OutputFunctionCallItem, + InputsMessage, + InputsReasoning, + ReasoningItem, + ], +) + + +InputsUnionTypedDict = TypeAliasType( + "InputsUnionTypedDict", Union[str, List[InputsUnion1TypedDict]] +) +r"""Input for a response request - can be a string or array of items""" + + +InputsUnion = TypeAliasType("InputsUnion", Union[str, List[InputsUnion1]]) +r"""Input for a response request - can be a string or array of items""" diff --git a/src/openrouter/components/inputtext.py b/src/openrouter/components/inputtext.py new file mode 100644 index 0000000..cfc912b --- /dev/null +++ b/src/openrouter/components/inputtext.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +InputTextType = Literal["input_text",] + + +class InputTextTypedDict(TypedDict): + r"""Text input content item""" + + type: InputTextType + text: str + + +class InputText(BaseModel): + r"""Text input content item""" + + type: InputTextType + + text: str diff --git a/src/openrouter/components/inputvideo.py b/src/openrouter/components/inputvideo.py new file mode 100644 index 0000000..3a2e1e5 --- /dev/null +++ b/src/openrouter/components/inputvideo.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +InputVideoType = Literal["input_video",] + + +class InputVideoTypedDict(TypedDict): + r"""Video input content item""" + + type: InputVideoType + video_url: str + r"""A base64 data URL or remote URL that resolves to a video file""" + + +class InputVideo(BaseModel): + r"""Video input content item""" + + type: InputVideoType + + video_url: str + r"""A base64 data URL or remote URL that resolves to a video file""" diff --git a/src/openrouter/components/legacy_chatcontentvideo.py b/src/openrouter/components/legacy_chatcontentvideo.py new file mode 100644 index 0000000..b5dd4d1 --- /dev/null +++ b/src/openrouter/components/legacy_chatcontentvideo.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .chatcontentvideoinput import ChatContentVideoInput, ChatContentVideoInputTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict, deprecated + + +LegacyChatContentVideoType = Literal["input_video",] + + +@deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." +) +class LegacyChatContentVideoTypedDict(TypedDict): + r"""Video input content part (legacy format - deprecated)""" + + type: LegacyChatContentVideoType + video_url: ChatContentVideoInputTypedDict + r"""Video input object""" + + +@deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." +) +class LegacyChatContentVideo(BaseModel): + r"""Video input content part (legacy format - deprecated)""" + + type: LegacyChatContentVideoType + + video_url: ChatContentVideoInput + r"""Video input object""" diff --git a/src/openrouter/components/legacy_websearchservertool.py b/src/openrouter/components/legacy_websearchservertool.py new file mode 100644 index 0000000..a04ab37 --- /dev/null +++ b/src/openrouter/components/legacy_websearchservertool.py @@ -0,0 +1,151 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .searchcontextsizeenum import SearchContextSizeEnum +from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +LegacyWebSearchServerToolType = Literal["web_search",] + + +class LegacyWebSearchServerToolFiltersTypedDict(TypedDict): + allowed_domains: NotRequired[Nullable[List[str]]] + excluded_domains: NotRequired[Nullable[List[str]]] + + +class LegacyWebSearchServerToolFilters(BaseModel): + allowed_domains: OptionalNullable[List[str]] = UNSET + + excluded_domains: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["allowed_domains", "excluded_domains"] + nullable_fields = ["allowed_domains", "excluded_domains"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +LegacyWebSearchServerToolEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +class LegacyWebSearchServerToolTypedDict(TypedDict): + r"""Web search tool configuration""" + + type: LegacyWebSearchServerToolType + filters: NotRequired[Nullable[LegacyWebSearchServerToolFiltersTypedDict]] + search_context_size: NotRequired[SearchContextSizeEnum] + r"""Size of the search context for web search tools""" + user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]] + r"""User location information for web search""" + engine: NotRequired[LegacyWebSearchServerToolEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + +class LegacyWebSearchServerTool(BaseModel): + r"""Web search tool configuration""" + + type: LegacyWebSearchServerToolType + + filters: OptionalNullable[LegacyWebSearchServerToolFilters] = UNSET + + search_context_size: Annotated[ + Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Size of the search context for web search tools""" + + user_location: OptionalNullable[WebSearchUserLocation] = UNSET + r"""User location information for web search""" + + engine: Annotated[ + Optional[LegacyWebSearchServerToolEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "filters", + "search_context_size", + "user_location", + "engine", + "max_results", + ] + nullable_fields = ["filters", "user_location"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/mcpservertool.py b/src/openrouter/components/mcpservertool.py new file mode 100644 index 0000000..c613dd3 --- /dev/null +++ b/src/openrouter/components/mcpservertool.py @@ -0,0 +1,154 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +McpServerToolType = Literal["mcp",] + + +class AllowedToolsTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + read_only: NotRequired[bool] + + +class AllowedTools(BaseModel): + tool_names: Optional[List[str]] = None + + read_only: Optional[bool] = None + + +ConnectorID = Union[ + Literal[ + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint", + ], + UnrecognizedStr, +] + + +RequireApprovalNever = Literal["never",] + + +RequireApprovalAlways = Literal["always",] + + +class NeverTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + + +class Never(BaseModel): + tool_names: Optional[List[str]] = None + + +class AlwaysTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + + +class Always(BaseModel): + tool_names: Optional[List[str]] = None + + +class RequireApprovalTypedDict(TypedDict): + never: NotRequired[NeverTypedDict] + always: NotRequired[AlwaysTypedDict] + + +class RequireApproval(BaseModel): + never: Optional[Never] = None + + always: Optional[Always] = None + + +class McpServerToolTypedDict(TypedDict): + r"""MCP (Model Context Protocol) tool configuration""" + + type: McpServerToolType + server_label: str + allowed_tools: NotRequired[Nullable[Any]] + authorization: NotRequired[str] + connector_id: NotRequired[ConnectorID] + headers: NotRequired[Nullable[Dict[str, str]]] + require_approval: NotRequired[Nullable[Any]] + server_description: NotRequired[str] + server_url: NotRequired[str] + + +class McpServerTool(BaseModel): + r"""MCP (Model Context Protocol) tool configuration""" + + type: McpServerToolType + + server_label: str + + allowed_tools: OptionalNullable[Any] = UNSET + + authorization: Optional[str] = None + + connector_id: Annotated[ + Optional[ConnectorID], PlainValidator(validate_open_enum(False)) + ] = None + + headers: OptionalNullable[Dict[str, str]] = UNSET + + require_approval: OptionalNullable[Any] = UNSET + + server_description: Optional[str] = None + + server_url: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "allowed_tools", + "authorization", + "connector_id", + "headers", + "require_approval", + "server_description", + "server_url", + ] + nullable_fields = ["allowed_tools", "headers", "require_approval"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/model.py b/src/openrouter/components/model.py index 7a14da5..256a8d2 100644 --- a/src/openrouter/components/model.py +++ b/src/openrouter/components/model.py @@ -50,6 +50,8 @@ class ModelTypedDict(TypedDict): r"""Hugging Face model identifier, if applicable""" description: NotRequired[str] r"""Description of the model""" + knowledge_cutoff: NotRequired[Nullable[str]] + r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.""" expiration_date: NotRequired[Nullable[str]] r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.""" @@ -98,17 +100,26 @@ class Model(BaseModel): description: Optional[str] = None r"""Description of the model""" + knowledge_cutoff: OptionalNullable[str] = UNSET + r"""The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.""" + expiration_date: OptionalNullable[str] = UNSET r"""The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["hugging_face_id", "description", "expiration_date"] + optional_fields = [ + "hugging_face_id", + "description", + "knowledge_cutoff", + "expiration_date", + ] nullable_fields = [ "hugging_face_id", "context_length", "per_request_limits", "default_parameters", + "knowledge_cutoff", "expiration_date", ] null_default_fields = [] diff --git a/src/openrouter/components/openairesponsesinput_union.py b/src/openrouter/components/openairesponsesinput_union.py index aab3daf..0e0b1fa 100644 --- a/src/openrouter/components/openairesponsesinput_union.py +++ b/src/openrouter/components/openairesponsesinput_union.py @@ -86,10 +86,41 @@ class OpenAIResponsesInputFunctionCall(BaseModel): OpenAIResponsesInputTypeFunctionCallOutput = Literal["function_call_output",] +OpenAIResponsesInputOutput1TypedDict = TypeAliasType( + "OpenAIResponsesInputOutput1TypedDict", + Union[ + ResponseInputTextTypedDict, + ResponseInputImageTypedDict, + ResponseInputFileTypedDict, + ], +) + + +OpenAIResponsesInputOutput1 = Annotated[ + Union[ + Annotated[ResponseInputText, Tag("input_text")], + Annotated[ResponseInputImage, Tag("input_image")], + Annotated[ResponseInputFile, Tag("input_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +OpenAIResponsesInputOutput2TypedDict = TypeAliasType( + "OpenAIResponsesInputOutput2TypedDict", + Union[str, List[OpenAIResponsesInputOutput1TypedDict]], +) + + +OpenAIResponsesInputOutput2 = TypeAliasType( + "OpenAIResponsesInputOutput2", Union[str, List[OpenAIResponsesInputOutput1]] +) + + class OpenAIResponsesInputFunctionCallOutputTypedDict(TypedDict): type: OpenAIResponsesInputTypeFunctionCallOutput call_id: str - output: str + output: OpenAIResponsesInputOutput2TypedDict id: NotRequired[Nullable[str]] status: NotRequired[Nullable[ToolCallStatus]] @@ -99,7 +130,7 @@ class OpenAIResponsesInputFunctionCallOutput(BaseModel): call_id: str - output: str + output: OpenAIResponsesInputOutput2 id: OptionalNullable[str] = UNSET @@ -279,10 +310,33 @@ OpenAIResponsesInputContent2 = TypeAliasType( ) +OpenAIResponsesInputPhaseFinalAnswer = Literal["final_answer",] + + +OpenAIResponsesInputPhaseCommentary = Literal["commentary",] + + +OpenAIResponsesInputPhaseUnionTypedDict = TypeAliasType( + "OpenAIResponsesInputPhaseUnionTypedDict", + Union[ + OpenAIResponsesInputPhaseCommentary, OpenAIResponsesInputPhaseFinalAnswer, Any + ], +) + + +OpenAIResponsesInputPhaseUnion = TypeAliasType( + "OpenAIResponsesInputPhaseUnion", + Union[ + OpenAIResponsesInputPhaseCommentary, OpenAIResponsesInputPhaseFinalAnswer, Any + ], +) + + class OpenAIResponsesInputMessage1TypedDict(TypedDict): role: OpenAIResponsesInputRoleUnion1TypedDict content: OpenAIResponsesInputContent2TypedDict type: NotRequired[OpenAIResponsesInputTypeMessage1] + phase: NotRequired[Nullable[OpenAIResponsesInputPhaseUnionTypedDict]] class OpenAIResponsesInputMessage1(BaseModel): @@ -292,6 +346,38 @@ class OpenAIResponsesInputMessage1(BaseModel): type: Optional[OpenAIResponsesInputTypeMessage1] = None + phase: OptionalNullable[OpenAIResponsesInputPhaseUnion] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["type", "phase"] + nullable_fields = ["phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + OpenAIResponsesInputUnion1TypedDict = TypeAliasType( "OpenAIResponsesInputUnion1TypedDict", @@ -300,8 +386,8 @@ OpenAIResponsesInputUnion1TypedDict = TypeAliasType( OpenAIResponsesInputMessage2TypedDict, OutputItemImageGenerationCallTypedDict, OpenAIResponsesInputFunctionCallOutputTypedDict, - OutputMessageTypedDict, OpenAIResponsesInputFunctionCallTypedDict, + OutputMessageTypedDict, ], ) @@ -313,8 +399,8 @@ OpenAIResponsesInputUnion1 = TypeAliasType( OpenAIResponsesInputMessage2, OutputItemImageGenerationCall, OpenAIResponsesInputFunctionCallOutput, - OutputMessage, OpenAIResponsesInputFunctionCall, + OutputMessage, ], ) diff --git a/src/openrouter/components/openresponsesapplypatchtool.py b/src/openrouter/components/openresponsesapplypatchtool.py new file mode 100644 index 0000000..583e811 --- /dev/null +++ b/src/openrouter/components/openresponsesapplypatchtool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +OpenResponsesApplyPatchToolType = Literal["apply_patch",] + + +class OpenResponsesApplyPatchToolTypedDict(TypedDict): + r"""Apply patch tool configuration""" + + type: OpenResponsesApplyPatchToolType + + +class OpenResponsesApplyPatchTool(BaseModel): + r"""Apply patch tool configuration""" + + type: OpenResponsesApplyPatchToolType diff --git a/src/openrouter/components/openresponsescodeinterpretertool.py b/src/openrouter/components/openresponsescodeinterpretertool.py new file mode 100644 index 0000000..9b2ae39 --- /dev/null +++ b/src/openrouter/components/openresponsescodeinterpretertool.py @@ -0,0 +1,102 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeCodeInterpreter = Literal["code_interpreter",] + + +ContainerType = Literal["auto",] + + +MemoryLimit = Union[ + Literal[ + "1g", + "4g", + "16g", + "64g", + ], + UnrecognizedStr, +] + + +class ContainerAutoTypedDict(TypedDict): + type: ContainerType + file_ids: NotRequired[List[str]] + memory_limit: NotRequired[Nullable[MemoryLimit]] + + +class ContainerAuto(BaseModel): + type: ContainerType + + file_ids: Optional[List[str]] = None + + memory_limit: Annotated[ + OptionalNullable[MemoryLimit], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["file_ids", "memory_limit"] + nullable_fields = ["memory_limit"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ContainerTypedDict = TypeAliasType( + "ContainerTypedDict", Union[ContainerAutoTypedDict, str] +) + + +Container = TypeAliasType("Container", Union[ContainerAuto, str]) + + +class OpenResponsesCodeInterpreterToolTypedDict(TypedDict): + r"""Code interpreter tool configuration""" + + type: TypeCodeInterpreter + container: ContainerTypedDict + + +class OpenResponsesCodeInterpreterTool(BaseModel): + r"""Code interpreter tool configuration""" + + type: TypeCodeInterpreter + + container: Container diff --git a/src/openrouter/components/openresponsescomputertool.py b/src/openrouter/components/openresponsescomputertool.py new file mode 100644 index 0000000..2d42678 --- /dev/null +++ b/src/openrouter/components/openresponsescomputertool.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict + + +OpenResponsesComputerToolType = Literal["computer_use_preview",] + + +Environment = Union[ + Literal[ + "windows", + "mac", + "linux", + "ubuntu", + "browser", + ], + UnrecognizedStr, +] + + +class OpenResponsesComputerToolTypedDict(TypedDict): + r"""Computer use preview tool configuration""" + + type: OpenResponsesComputerToolType + display_height: float + display_width: float + environment: Environment + + +class OpenResponsesComputerTool(BaseModel): + r"""Computer use preview tool configuration""" + + type: OpenResponsesComputerToolType + + display_height: float + + display_width: float + + environment: Annotated[Environment, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/openresponsescustomtool.py b/src/openrouter/components/openresponsescustomtool.py new file mode 100644 index 0000000..51a788d --- /dev/null +++ b/src/openrouter/components/openresponsescustomtool.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import get_discriminator, validate_open_enum +import pydantic +from pydantic import Discriminator, Tag +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeCustom = Literal["custom",] + + +FormatTypeGrammar = Literal["grammar",] + + +Syntax = Union[ + Literal[ + "lark", + "regex", + ], + UnrecognizedStr, +] + + +class FormatGrammarTypedDict(TypedDict): + type: FormatTypeGrammar + definition: str + syntax: Syntax + + +class FormatGrammar(BaseModel): + type: FormatTypeGrammar + + definition: str + + syntax: Annotated[Syntax, PlainValidator(validate_open_enum(False))] + + +FormatTypeText = Literal["text",] + + +class FormatTextTypedDict(TypedDict): + type: FormatTypeText + + +class FormatText(BaseModel): + type: FormatTypeText + + +FormatTypedDict = TypeAliasType( + "FormatTypedDict", Union[FormatTextTypedDict, FormatGrammarTypedDict] +) + + +Format = Annotated[ + Union[Annotated[FormatText, Tag("text")], Annotated[FormatGrammar, Tag("grammar")]], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class OpenResponsesCustomToolTypedDict(TypedDict): + r"""Custom tool configuration""" + + type: TypeCustom + name: str + description: NotRequired[str] + format_: NotRequired[FormatTypedDict] + + +class OpenResponsesCustomTool(BaseModel): + r"""Custom tool configuration""" + + type: TypeCustom + + name: str + + description: Optional[str] = None + + format_: Annotated[Optional[Format], pydantic.Field(alias="format")] = None diff --git a/src/openrouter/components/openresponseseasyinputmessage.py b/src/openrouter/components/openresponseseasyinputmessage.py index fa62a0c..67d2fbd 100644 --- a/src/openrouter/components/openresponseseasyinputmessage.py +++ b/src/openrouter/components/openresponseseasyinputmessage.py @@ -16,7 +16,7 @@ from openrouter.types import ( from openrouter.utils import get_discriminator, validate_open_enum from pydantic import Discriminator, Tag, model_serializer from pydantic.functional_validators import PlainValidator -from typing import List, Literal, Optional, Union +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -146,25 +146,88 @@ OpenResponsesEasyInputMessageContentUnion1 = Annotated[ OpenResponsesEasyInputMessageContentUnion2TypedDict = TypeAliasType( "OpenResponsesEasyInputMessageContentUnion2TypedDict", - Union[List[OpenResponsesEasyInputMessageContentUnion1TypedDict], str], + Union[List[OpenResponsesEasyInputMessageContentUnion1TypedDict], str, Any], ) OpenResponsesEasyInputMessageContentUnion2 = TypeAliasType( "OpenResponsesEasyInputMessageContentUnion2", - Union[List[OpenResponsesEasyInputMessageContentUnion1], str], + Union[List[OpenResponsesEasyInputMessageContentUnion1], str, Any], ) +OpenResponsesEasyInputMessagePhaseFinalAnswer = Literal["final_answer",] + + +OpenResponsesEasyInputMessagePhaseCommentary = Literal["commentary",] + + +OpenResponsesEasyInputMessagePhaseUnionTypedDict = TypeAliasType( + "OpenResponsesEasyInputMessagePhaseUnionTypedDict", + Union[ + OpenResponsesEasyInputMessagePhaseCommentary, + OpenResponsesEasyInputMessagePhaseFinalAnswer, + Any, + ], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +OpenResponsesEasyInputMessagePhaseUnion = TypeAliasType( + "OpenResponsesEasyInputMessagePhaseUnion", + Union[ + OpenResponsesEasyInputMessagePhaseCommentary, + OpenResponsesEasyInputMessagePhaseFinalAnswer, + Any, + ], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + class OpenResponsesEasyInputMessageTypedDict(TypedDict): role: OpenResponsesEasyInputMessageRoleUnionTypedDict - content: OpenResponsesEasyInputMessageContentUnion2TypedDict type: NotRequired[OpenResponsesEasyInputMessageTypeMessage] + content: NotRequired[Nullable[OpenResponsesEasyInputMessageContentUnion2TypedDict]] + phase: NotRequired[Nullable[OpenResponsesEasyInputMessagePhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" class OpenResponsesEasyInputMessage(BaseModel): role: OpenResponsesEasyInputMessageRoleUnion - content: OpenResponsesEasyInputMessageContentUnion2 - type: Optional[OpenResponsesEasyInputMessageTypeMessage] = None + + content: OptionalNullable[OpenResponsesEasyInputMessageContentUnion2] = UNSET + + phase: OptionalNullable[OpenResponsesEasyInputMessagePhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["type", "content", "phase"] + nullable_fields = ["content", "phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponsesfilesearchtool.py b/src/openrouter/components/openresponsesfilesearchtool.py new file mode 100644 index 0000000..1da6491 --- /dev/null +++ b/src/openrouter/components/openresponsesfilesearchtool.py @@ -0,0 +1,148 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .compoundfilter import CompoundFilter, CompoundFilterTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeFileSearch = Literal["file_search",] + + +FiltersType = Union[ + Literal[ + "eq", + "ne", + "gt", + "gte", + "lt", + "lte", + ], + UnrecognizedStr, +] + + +Value1TypedDict = TypeAliasType("Value1TypedDict", Union[str, float]) + + +Value1 = TypeAliasType("Value1", Union[str, float]) + + +Value2TypedDict = TypeAliasType( + "Value2TypedDict", Union[str, float, bool, List[Value1TypedDict]] +) + + +Value2 = TypeAliasType("Value2", Union[str, float, bool, List[Value1]]) + + +class OpenResponsesFileSearchToolFiltersTypedDict(TypedDict): + key: str + type: FiltersType + value: Value2TypedDict + + +class OpenResponsesFileSearchToolFilters(BaseModel): + key: str + + type: Annotated[FiltersType, PlainValidator(validate_open_enum(False))] + + value: Value2 + + +FiltersTypedDict = TypeAliasType( + "FiltersTypedDict", + Union[CompoundFilterTypedDict, OpenResponsesFileSearchToolFiltersTypedDict, Any], +) + + +Filters = TypeAliasType( + "Filters", Union[CompoundFilter, OpenResponsesFileSearchToolFilters, Any] +) + + +Ranker = Union[ + Literal[ + "auto", + "default-2024-11-15", + ], + UnrecognizedStr, +] + + +class RankingOptionsTypedDict(TypedDict): + ranker: NotRequired[Ranker] + score_threshold: NotRequired[float] + + +class RankingOptions(BaseModel): + ranker: Annotated[Optional[Ranker], PlainValidator(validate_open_enum(False))] = ( + None + ) + + score_threshold: Optional[float] = None + + +class OpenResponsesFileSearchToolTypedDict(TypedDict): + r"""File search tool configuration""" + + type: TypeFileSearch + vector_store_ids: List[str] + filters: NotRequired[Nullable[FiltersTypedDict]] + max_num_results: NotRequired[int] + ranking_options: NotRequired[RankingOptionsTypedDict] + + +class OpenResponsesFileSearchTool(BaseModel): + r"""File search tool configuration""" + + type: TypeFileSearch + + vector_store_ids: List[str] + + filters: OptionalNullable[Filters] = UNSET + + max_num_results: Optional[int] = None + + ranking_options: Optional[RankingOptions] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["filters", "max_num_results", "ranking_options"] + nullable_fields = ["filters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponsesfunctioncalloutput.py b/src/openrouter/components/openresponsesfunctioncalloutput.py index d033081..4d010c4 100644 --- a/src/openrouter/components/openresponsesfunctioncalloutput.py +++ b/src/openrouter/components/openresponsesfunctioncalloutput.py @@ -1,6 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .responseinputfile import ResponseInputFile, ResponseInputFileTypedDict +from .responseinputtext import ResponseInputText, ResponseInputTextTypedDict from .toolcallstatus import ToolCallStatus from openrouter.types import ( BaseModel, @@ -8,23 +10,119 @@ from openrouter.types import ( OptionalNullable, UNSET, UNSET_SENTINEL, + UnrecognizedStr, ) -from openrouter.utils import validate_open_enum -from pydantic import model_serializer +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer from pydantic.functional_validators import PlainValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -OpenResponsesFunctionCallOutputType = Literal["function_call_output",] +OpenResponsesFunctionCallOutputTypeFunctionCallOutput = Literal["function_call_output",] + + +OutputType = Literal["input_image",] + + +OpenResponsesFunctionCallOutputDetail = Union[ + Literal[ + "auto", + "high", + "low", + ], + UnrecognizedStr, +] + + +class OutputInputImageTypedDict(TypedDict): + r"""Image input content item""" + + type: OutputType + detail: OpenResponsesFunctionCallOutputDetail + image_url: NotRequired[Nullable[str]] + + +class OutputInputImage(BaseModel): + r"""Image input content item""" + + type: OutputType + + detail: Annotated[ + OpenResponsesFunctionCallOutputDetail, PlainValidator(validate_open_enum(False)) + ] + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["image_url"] + nullable_fields = ["image_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +OpenResponsesFunctionCallOutputOutputUnion1TypedDict = TypeAliasType( + "OpenResponsesFunctionCallOutputOutputUnion1TypedDict", + Union[ + ResponseInputTextTypedDict, + OutputInputImageTypedDict, + ResponseInputFileTypedDict, + ], +) + + +OpenResponsesFunctionCallOutputOutputUnion1 = Annotated[ + Union[ + Annotated[ResponseInputText, Tag("input_text")], + Annotated[OutputInputImage, Tag("input_image")], + Annotated[ResponseInputFile, Tag("input_file")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +OpenResponsesFunctionCallOutputOutputUnion2TypedDict = TypeAliasType( + "OpenResponsesFunctionCallOutputOutputUnion2TypedDict", + Union[str, List[OpenResponsesFunctionCallOutputOutputUnion1TypedDict]], +) + + +OpenResponsesFunctionCallOutputOutputUnion2 = TypeAliasType( + "OpenResponsesFunctionCallOutputOutputUnion2", + Union[str, List[OpenResponsesFunctionCallOutputOutputUnion1]], +) class OpenResponsesFunctionCallOutputTypedDict(TypedDict): r"""The output from a function call execution""" - type: OpenResponsesFunctionCallOutputType + type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput call_id: str - output: str + output: OpenResponsesFunctionCallOutputOutputUnion2TypedDict id: NotRequired[Nullable[str]] status: NotRequired[Nullable[ToolCallStatus]] @@ -32,11 +130,11 @@ class OpenResponsesFunctionCallOutputTypedDict(TypedDict): class OpenResponsesFunctionCallOutput(BaseModel): r"""The output from a function call execution""" - type: OpenResponsesFunctionCallOutputType + type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput call_id: str - output: str + output: OpenResponsesFunctionCallOutputOutputUnion2 id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/components/openresponsesfunctionshelltool.py b/src/openrouter/components/openresponsesfunctionshelltool.py new file mode 100644 index 0000000..518e551 --- /dev/null +++ b/src/openrouter/components/openresponsesfunctionshelltool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +OpenResponsesFunctionShellToolType = Literal["shell",] + + +class OpenResponsesFunctionShellToolTypedDict(TypedDict): + r"""Shell tool configuration""" + + type: OpenResponsesFunctionShellToolType + + +class OpenResponsesFunctionShellTool(BaseModel): + r"""Shell tool configuration""" + + type: OpenResponsesFunctionShellToolType diff --git a/src/openrouter/components/openresponsesimagegenerationtool.py b/src/openrouter/components/openresponsesimagegenerationtool.py new file mode 100644 index 0000000..f2e695c --- /dev/null +++ b/src/openrouter/components/openresponsesimagegenerationtool.py @@ -0,0 +1,194 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +OpenResponsesImageGenerationToolType = Literal["image_generation",] + + +Background = Union[ + Literal[ + "transparent", + "opaque", + "auto", + ], + UnrecognizedStr, +] + + +InputFidelity = Union[ + Literal[ + "high", + "low", + ], + UnrecognizedStr, +] + + +class InputImageMaskTypedDict(TypedDict): + image_url: NotRequired[str] + file_id: NotRequired[str] + + +class InputImageMask(BaseModel): + image_url: Optional[str] = None + + file_id: Optional[str] = None + + +ModelEnum = Union[ + Literal[ + "gpt-image-1", + "gpt-image-1-mini", + ], + UnrecognizedStr, +] + + +Moderation = Union[ + Literal[ + "auto", + "low", + ], + UnrecognizedStr, +] + + +OutputFormat = Union[ + Literal[ + "png", + "webp", + "jpeg", + ], + UnrecognizedStr, +] + + +Quality = Union[ + Literal[ + "low", + "medium", + "high", + "auto", + ], + UnrecognizedStr, +] + + +Size = Union[ + Literal[ + "1024x1024", + "1024x1536", + "1536x1024", + "auto", + ], + UnrecognizedStr, +] + + +class OpenResponsesImageGenerationToolTypedDict(TypedDict): + r"""Image generation tool configuration""" + + type: OpenResponsesImageGenerationToolType + background: NotRequired[Background] + input_fidelity: NotRequired[Nullable[InputFidelity]] + input_image_mask: NotRequired[InputImageMaskTypedDict] + model: NotRequired[ModelEnum] + moderation: NotRequired[Moderation] + output_compression: NotRequired[float] + output_format: NotRequired[OutputFormat] + partial_images: NotRequired[float] + quality: NotRequired[Quality] + size: NotRequired[Size] + + +class OpenResponsesImageGenerationTool(BaseModel): + r"""Image generation tool configuration""" + + type: OpenResponsesImageGenerationToolType + + background: Annotated[ + Optional[Background], PlainValidator(validate_open_enum(False)) + ] = None + + input_fidelity: Annotated[ + OptionalNullable[InputFidelity], PlainValidator(validate_open_enum(False)) + ] = UNSET + + input_image_mask: Optional[InputImageMask] = None + + model: Annotated[Optional[ModelEnum], PlainValidator(validate_open_enum(False))] = ( + None + ) + + moderation: Annotated[ + Optional[Moderation], PlainValidator(validate_open_enum(False)) + ] = None + + output_compression: Optional[float] = None + + output_format: Annotated[ + Optional[OutputFormat], PlainValidator(validate_open_enum(False)) + ] = None + + partial_images: Optional[float] = None + + quality: Annotated[Optional[Quality], PlainValidator(validate_open_enum(False))] = ( + None + ) + + size: Annotated[Optional[Size], PlainValidator(validate_open_enum(False))] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "background", + "input_fidelity", + "input_image_mask", + "model", + "moderation", + "output_compression", + "output_format", + "partial_images", + "quality", + "size", + ] + nullable_fields = ["input_fidelity"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponsesinput_union.py b/src/openrouter/components/openresponsesinput_union.py new file mode 100644 index 0000000..7c90c1e --- /dev/null +++ b/src/openrouter/components/openresponsesinput_union.py @@ -0,0 +1,380 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openairesponsesrefusalcontent import ( + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContentTypedDict, +) +from .openresponseseasyinputmessage import ( + OpenResponsesEasyInputMessage, + OpenResponsesEasyInputMessageTypedDict, +) +from .openresponsesfunctioncalloutput import ( + OpenResponsesFunctionCallOutput, + OpenResponsesFunctionCallOutputTypedDict, +) +from .openresponsesfunctiontoolcall import ( + OpenResponsesFunctionToolCall, + OpenResponsesFunctionToolCallTypedDict, +) +from .openresponsesinputmessageitem import ( + OpenResponsesInputMessageItem, + OpenResponsesInputMessageItemTypedDict, +) +from .openresponsesreasoning import ( + OpenResponsesReasoning, + OpenResponsesReasoningTypedDict, +) +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from .responsesimagegenerationcall import ( + ResponsesImageGenerationCall, + ResponsesImageGenerationCallTypedDict, +) +from .responsesoutputitemfilesearchcall import ( + ResponsesOutputItemFileSearchCall, + ResponsesOutputItemFileSearchCallTypedDict, +) +from .responsesoutputitemfunctioncall import ( + ResponsesOutputItemFunctionCall, + ResponsesOutputItemFunctionCallTypedDict, +) +from .responseswebsearchcalloutput import ( + ResponsesWebSearchCallOutput, + ResponsesWebSearchCallOutputTypedDict, +) +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_open_enum +import pydantic +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +OpenResponsesInputTypeReasoning = Literal["reasoning",] + + +OpenResponsesInputStatusInProgress2 = Literal["in_progress",] + + +OpenResponsesInputStatusIncomplete2 = Literal["incomplete",] + + +OpenResponsesInputStatusCompleted2 = Literal["completed",] + + +OpenResponsesInputStatusUnion2TypedDict = TypeAliasType( + "OpenResponsesInputStatusUnion2TypedDict", + Union[ + OpenResponsesInputStatusCompleted2, + OpenResponsesInputStatusIncomplete2, + OpenResponsesInputStatusInProgress2, + ], +) + + +OpenResponsesInputStatusUnion2 = TypeAliasType( + "OpenResponsesInputStatusUnion2", + Union[ + OpenResponsesInputStatusCompleted2, + OpenResponsesInputStatusIncomplete2, + OpenResponsesInputStatusInProgress2, + ], +) + + +OpenResponsesInputFormat = Union[ + Literal[ + "unknown", + "openai-responses-v1", + "azure-openai-responses-v1", + "xai-responses-v1", + "anthropic-claude-v1", + "google-gemini-v1", + ], + UnrecognizedStr, +] +r"""The format of the reasoning content""" + + +class OpenResponsesInputReasoningTypedDict(TypedDict): + r"""An output item containing reasoning""" + + type: OpenResponsesInputTypeReasoning + id: str + summary: Nullable[List[ReasoningSummaryTextTypedDict]] + content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] + encrypted_content: NotRequired[Nullable[str]] + status: NotRequired[OpenResponsesInputStatusUnion2TypedDict] + signature: NotRequired[Nullable[str]] + r"""A signature for the reasoning content, used for verification""" + format_: NotRequired[Nullable[OpenResponsesInputFormat]] + r"""The format of the reasoning content""" + + +class OpenResponsesInputReasoning(BaseModel): + r"""An output item containing reasoning""" + + type: OpenResponsesInputTypeReasoning + + id: str + + summary: Nullable[List[ReasoningSummaryText]] + + content: OptionalNullable[List[ReasoningTextContent]] = UNSET + + encrypted_content: OptionalNullable[str] = UNSET + + status: Optional[OpenResponsesInputStatusUnion2] = None + + signature: OptionalNullable[str] = UNSET + r"""A signature for the reasoning content, used for verification""" + + format_: Annotated[ + Annotated[ + OptionalNullable[OpenResponsesInputFormat], + PlainValidator(validate_open_enum(False)), + ], + pydantic.Field(alias="format"), + ] = UNSET + r"""The format of the reasoning content""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "content", + "encrypted_content", + "status", + "signature", + "format", + ] + nullable_fields = [ + "content", + "summary", + "encrypted_content", + "signature", + "format", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +OpenResponsesInputRole = Literal["assistant",] + + +OpenResponsesInputTypeMessage = Literal["message",] + + +OpenResponsesInputStatusInProgress1 = Literal["in_progress",] + + +OpenResponsesInputStatusIncomplete1 = Literal["incomplete",] + + +OpenResponsesInputStatusCompleted1 = Literal["completed",] + + +OpenResponsesInputStatusUnion1TypedDict = TypeAliasType( + "OpenResponsesInputStatusUnion1TypedDict", + Union[ + OpenResponsesInputStatusCompleted1, + OpenResponsesInputStatusIncomplete1, + OpenResponsesInputStatusInProgress1, + ], +) + + +OpenResponsesInputStatusUnion1 = TypeAliasType( + "OpenResponsesInputStatusUnion1", + Union[ + OpenResponsesInputStatusCompleted1, + OpenResponsesInputStatusIncomplete1, + OpenResponsesInputStatusInProgress1, + ], +) + + +OpenResponsesInputContent1TypedDict = TypeAliasType( + "OpenResponsesInputContent1TypedDict", + Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict], +) + + +OpenResponsesInputContent1 = Annotated[ + Union[ + Annotated[ResponseOutputText, Tag("output_text")], + Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +OpenResponsesInputContent2TypedDict = TypeAliasType( + "OpenResponsesInputContent2TypedDict", + Union[List[OpenResponsesInputContent1TypedDict], str, Any], +) + + +OpenResponsesInputContent2 = TypeAliasType( + "OpenResponsesInputContent2", Union[List[OpenResponsesInputContent1], str, Any] +) + + +OpenResponsesInputPhaseFinalAnswer = Literal["final_answer",] + + +OpenResponsesInputPhaseCommentary = Literal["commentary",] + + +OpenResponsesInputPhaseUnionTypedDict = TypeAliasType( + "OpenResponsesInputPhaseUnionTypedDict", + Union[OpenResponsesInputPhaseCommentary, OpenResponsesInputPhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +OpenResponsesInputPhaseUnion = TypeAliasType( + "OpenResponsesInputPhaseUnion", + Union[OpenResponsesInputPhaseCommentary, OpenResponsesInputPhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class OpenResponsesInputMessageTypedDict(TypedDict): + r"""An output message item""" + + id: str + role: OpenResponsesInputRole + type: OpenResponsesInputTypeMessage + content: Nullable[OpenResponsesInputContent2TypedDict] + status: NotRequired[OpenResponsesInputStatusUnion1TypedDict] + phase: NotRequired[Nullable[OpenResponsesInputPhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class OpenResponsesInputMessage(BaseModel): + r"""An output message item""" + + id: str + + role: OpenResponsesInputRole + + type: OpenResponsesInputTypeMessage + + content: Nullable[OpenResponsesInputContent2] + + status: Optional[OpenResponsesInputStatusUnion1] = None + + phase: OptionalNullable[OpenResponsesInputPhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status", "phase"] + nullable_fields = ["content", "phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +OpenResponsesInputUnion1TypedDict = TypeAliasType( + "OpenResponsesInputUnion1TypedDict", + Union[ + OpenResponsesEasyInputMessageTypedDict, + OpenResponsesInputMessageItemTypedDict, + ResponsesWebSearchCallOutputTypedDict, + ResponsesOutputItemFileSearchCallTypedDict, + ResponsesImageGenerationCallTypedDict, + OpenResponsesFunctionCallOutputTypedDict, + OpenResponsesFunctionToolCallTypedDict, + OpenResponsesInputMessageTypedDict, + ResponsesOutputItemFunctionCallTypedDict, + OpenResponsesReasoningTypedDict, + OpenResponsesInputReasoningTypedDict, + ], +) + + +OpenResponsesInputUnion1 = TypeAliasType( + "OpenResponsesInputUnion1", + Union[ + OpenResponsesEasyInputMessage, + OpenResponsesInputMessageItem, + ResponsesWebSearchCallOutput, + ResponsesOutputItemFileSearchCall, + ResponsesImageGenerationCall, + OpenResponsesFunctionCallOutput, + OpenResponsesFunctionToolCall, + OpenResponsesInputMessage, + ResponsesOutputItemFunctionCall, + OpenResponsesReasoning, + OpenResponsesInputReasoning, + ], +) + + +OpenResponsesInputUnionTypedDict = TypeAliasType( + "OpenResponsesInputUnionTypedDict", + Union[str, List[OpenResponsesInputUnion1TypedDict]], +) +r"""Input for a response request - can be a string or array of items""" + + +OpenResponsesInputUnion = TypeAliasType( + "OpenResponsesInputUnion", Union[str, List[OpenResponsesInputUnion1]] +) +r"""Input for a response request - can be a string or array of items""" diff --git a/src/openrouter/components/openresponsesinputmessageitem.py b/src/openrouter/components/openresponsesinputmessageitem.py index 4b4a234..0ef39f6 100644 --- a/src/openrouter/components/openresponsesinputmessageitem.py +++ b/src/openrouter/components/openresponsesinputmessageitem.py @@ -141,16 +141,48 @@ OpenResponsesInputMessageItemContentUnion = Annotated[ class OpenResponsesInputMessageItemTypedDict(TypedDict): role: OpenResponsesInputMessageItemRoleUnionTypedDict - content: List[OpenResponsesInputMessageItemContentUnionTypedDict] id: NotRequired[str] type: NotRequired[OpenResponsesInputMessageItemTypeMessage] + content: NotRequired[ + Nullable[List[OpenResponsesInputMessageItemContentUnionTypedDict]] + ] class OpenResponsesInputMessageItem(BaseModel): role: OpenResponsesInputMessageItemRoleUnion - content: List[OpenResponsesInputMessageItemContentUnion] - id: Optional[str] = None type: Optional[OpenResponsesInputMessageItemTypeMessage] = None + + content: OptionalNullable[List[OpenResponsesInputMessageItemContentUnion]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["id", "type", "content"] + nullable_fields = ["content"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponseslocalshelltool.py b/src/openrouter/components/openresponseslocalshelltool.py new file mode 100644 index 0000000..50b0013 --- /dev/null +++ b/src/openrouter/components/openresponseslocalshelltool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +OpenResponsesLocalShellToolType = Literal["local_shell",] + + +class OpenResponsesLocalShellToolTypedDict(TypedDict): + r"""Local shell tool configuration""" + + type: OpenResponsesLocalShellToolType + + +class OpenResponsesLocalShellTool(BaseModel): + r"""Local shell tool configuration""" + + type: OpenResponsesLocalShellToolType diff --git a/src/openrouter/components/openresponsesmcptool.py b/src/openrouter/components/openresponsesmcptool.py new file mode 100644 index 0000000..5f15a1c --- /dev/null +++ b/src/openrouter/components/openresponsesmcptool.py @@ -0,0 +1,154 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +OpenResponsesMcpToolType = Literal["mcp",] + + +class AllowedToolsTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + read_only: NotRequired[bool] + + +class AllowedTools(BaseModel): + tool_names: Optional[List[str]] = None + + read_only: Optional[bool] = None + + +ConnectorID = Union[ + Literal[ + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint", + ], + UnrecognizedStr, +] + + +RequireApprovalNever = Literal["never",] + + +RequireApprovalAlways = Literal["always",] + + +class NeverTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + + +class Never(BaseModel): + tool_names: Optional[List[str]] = None + + +class AlwaysTypedDict(TypedDict): + tool_names: NotRequired[List[str]] + + +class Always(BaseModel): + tool_names: Optional[List[str]] = None + + +class RequireApprovalTypedDict(TypedDict): + never: NotRequired[NeverTypedDict] + always: NotRequired[AlwaysTypedDict] + + +class RequireApproval(BaseModel): + never: Optional[Never] = None + + always: Optional[Always] = None + + +class OpenResponsesMcpToolTypedDict(TypedDict): + r"""MCP (Model Context Protocol) tool configuration""" + + type: OpenResponsesMcpToolType + server_label: str + allowed_tools: NotRequired[Nullable[Any]] + authorization: NotRequired[str] + connector_id: NotRequired[ConnectorID] + headers: NotRequired[Nullable[Dict[str, str]]] + require_approval: NotRequired[Nullable[Any]] + server_description: NotRequired[str] + server_url: NotRequired[str] + + +class OpenResponsesMcpTool(BaseModel): + r"""MCP (Model Context Protocol) tool configuration""" + + type: OpenResponsesMcpToolType + + server_label: str + + allowed_tools: OptionalNullable[Any] = UNSET + + authorization: Optional[str] = None + + connector_id: Annotated[ + Optional[ConnectorID], PlainValidator(validate_open_enum(False)) + ] = None + + headers: OptionalNullable[Dict[str, str]] = UNSET + + require_approval: OptionalNullable[Any] = UNSET + + server_description: Optional[str] = None + + server_url: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "allowed_tools", + "authorization", + "connector_id", + "headers", + "require_approval", + "server_description", + "server_url", + ] + nullable_fields = ["allowed_tools", "headers", "require_approval"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponsesnonstreamingresponse.py b/src/openrouter/components/openresponsesnonstreamingresponse.py index 5bacc19..d5c805f 100644 --- a/src/openrouter/components/openresponsesnonstreamingresponse.py +++ b/src/openrouter/components/openresponsesnonstreamingresponse.py @@ -21,6 +21,39 @@ from .openairesponsestoolchoice_union import ( OpenAIResponsesToolChoiceUnionTypedDict, ) from .openairesponsestruncation import OpenAIResponsesTruncation +from .openresponsesapplypatchtool import ( + OpenResponsesApplyPatchTool, + OpenResponsesApplyPatchToolTypedDict, +) +from .openresponsescodeinterpretertool import ( + OpenResponsesCodeInterpreterTool, + OpenResponsesCodeInterpreterToolTypedDict, +) +from .openresponsescomputertool import ( + OpenResponsesComputerTool, + OpenResponsesComputerToolTypedDict, +) +from .openresponsescustomtool import ( + OpenResponsesCustomTool, + OpenResponsesCustomToolTypedDict, +) +from .openresponsesfilesearchtool import ( + OpenResponsesFileSearchTool, + OpenResponsesFileSearchToolTypedDict, +) +from .openresponsesfunctionshelltool import ( + OpenResponsesFunctionShellTool, + OpenResponsesFunctionShellToolTypedDict, +) +from .openresponsesimagegenerationtool import ( + OpenResponsesImageGenerationTool, + OpenResponsesImageGenerationToolTypedDict, +) +from .openresponseslocalshelltool import ( + OpenResponsesLocalShellTool, + OpenResponsesLocalShellToolTypedDict, +) +from .openresponsesmcptool import OpenResponsesMcpTool, OpenResponsesMcpToolTypedDict from .openresponsesusage import OpenResponsesUsage, OpenResponsesUsageTypedDict from .openresponseswebsearch20250826tool import ( OpenResponsesWebSearch20250826Tool, @@ -118,11 +151,20 @@ class OpenResponsesNonStreamingResponseToolFunction(BaseModel): OpenResponsesNonStreamingResponseToolUnionTypedDict = TypeAliasType( "OpenResponsesNonStreamingResponseToolUnionTypedDict", Union[ + OpenResponsesApplyPatchToolTypedDict, + OpenResponsesFunctionShellToolTypedDict, + OpenResponsesLocalShellToolTypedDict, + OpenResponsesCodeInterpreterToolTypedDict, OpenResponsesWebSearchPreviewToolTypedDict, OpenResponsesWebSearchPreview20250311ToolTypedDict, - OpenResponsesWebSearchToolTypedDict, + OpenResponsesComputerToolTypedDict, OpenResponsesWebSearch20250826ToolTypedDict, + OpenResponsesWebSearchToolTypedDict, + OpenResponsesCustomToolTypedDict, OpenResponsesNonStreamingResponseToolFunctionTypedDict, + OpenResponsesFileSearchToolTypedDict, + OpenResponsesMcpToolTypedDict, + OpenResponsesImageGenerationToolTypedDict, ], ) @@ -137,6 +179,15 @@ OpenResponsesNonStreamingResponseToolUnion = Annotated[ ], Annotated[OpenResponsesWebSearchTool, Tag("web_search")], Annotated[OpenResponsesWebSearch20250826Tool, Tag("web_search_2025_08_26")], + Annotated[OpenResponsesFileSearchTool, Tag("file_search")], + Annotated[OpenResponsesComputerTool, Tag("computer_use_preview")], + Annotated[OpenResponsesCodeInterpreterTool, Tag("code_interpreter")], + Annotated[OpenResponsesMcpTool, Tag("mcp")], + Annotated[OpenResponsesImageGenerationTool, Tag("image_generation")], + Annotated[OpenResponsesLocalShellTool, Tag("local_shell")], + Annotated[OpenResponsesFunctionShellTool, Tag("shell")], + Annotated[OpenResponsesApplyPatchTool, Tag("apply_patch")], + Annotated[OpenResponsesCustomTool, Tag("custom")], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] diff --git a/src/openrouter/components/openresponsesrequest.py b/src/openrouter/components/openresponsesrequest.py index 35e6daf..706d725 100644 --- a/src/openrouter/components/openresponsesrequest.py +++ b/src/openrouter/components/openresponsesrequest.py @@ -8,7 +8,43 @@ from .openairesponsestoolchoice_union import ( OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnionTypedDict, ) -from .openresponsesinput import OpenResponsesInput, OpenResponsesInputTypedDict +from .openresponsesapplypatchtool import ( + OpenResponsesApplyPatchTool, + OpenResponsesApplyPatchToolTypedDict, +) +from .openresponsescodeinterpretertool import ( + OpenResponsesCodeInterpreterTool, + OpenResponsesCodeInterpreterToolTypedDict, +) +from .openresponsescomputertool import ( + OpenResponsesComputerTool, + OpenResponsesComputerToolTypedDict, +) +from .openresponsescustomtool import ( + OpenResponsesCustomTool, + OpenResponsesCustomToolTypedDict, +) +from .openresponsesfilesearchtool import ( + OpenResponsesFileSearchTool, + OpenResponsesFileSearchToolTypedDict, +) +from .openresponsesfunctionshelltool import ( + OpenResponsesFunctionShellTool, + OpenResponsesFunctionShellToolTypedDict, +) +from .openresponsesimagegenerationtool import ( + OpenResponsesImageGenerationTool, + OpenResponsesImageGenerationToolTypedDict, +) +from .openresponsesinput_union import ( + OpenResponsesInputUnion, + OpenResponsesInputUnionTypedDict, +) +from .openresponseslocalshelltool import ( + OpenResponsesLocalShellTool, + OpenResponsesLocalShellToolTypedDict, +) +from .openresponsesmcptool import OpenResponsesMcpTool, OpenResponsesMcpToolTypedDict from .openresponsesreasoningconfig import ( OpenResponsesReasoningConfig, OpenResponsesReasoningConfigTypedDict, @@ -121,11 +157,20 @@ class OpenResponsesRequestToolFunction(BaseModel): OpenResponsesRequestToolUnionTypedDict = TypeAliasType( "OpenResponsesRequestToolUnionTypedDict", Union[ + OpenResponsesApplyPatchToolTypedDict, + OpenResponsesFunctionShellToolTypedDict, + OpenResponsesLocalShellToolTypedDict, + OpenResponsesCodeInterpreterToolTypedDict, OpenResponsesWebSearchPreviewToolTypedDict, OpenResponsesWebSearchPreview20250311ToolTypedDict, - OpenResponsesWebSearchToolTypedDict, + OpenResponsesComputerToolTypedDict, OpenResponsesWebSearch20250826ToolTypedDict, + OpenResponsesWebSearchToolTypedDict, + OpenResponsesCustomToolTypedDict, OpenResponsesRequestToolFunctionTypedDict, + OpenResponsesFileSearchToolTypedDict, + OpenResponsesMcpToolTypedDict, + OpenResponsesImageGenerationToolTypedDict, ], ) @@ -140,6 +185,15 @@ OpenResponsesRequestToolUnion = Annotated[ ], Annotated[OpenResponsesWebSearchTool, Tag("web_search")], Annotated[OpenResponsesWebSearch20250826Tool, Tag("web_search_2025_08_26")], + Annotated[OpenResponsesFileSearchTool, Tag("file_search")], + Annotated[OpenResponsesComputerTool, Tag("computer_use_preview")], + Annotated[OpenResponsesCodeInterpreterTool, Tag("code_interpreter")], + Annotated[OpenResponsesMcpTool, Tag("mcp")], + Annotated[OpenResponsesImageGenerationTool, Tag("image_generation")], + Annotated[OpenResponsesLocalShellTool, Tag("local_shell")], + Annotated[OpenResponsesFunctionShellTool, Tag("shell")], + Annotated[OpenResponsesApplyPatchTool, Tag("apply_patch")], + Annotated[OpenResponsesCustomTool, Tag("custom")], ], Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -443,6 +497,10 @@ class OpenResponsesRequestPluginWebTypedDict(TypedDict): search_prompt: NotRequired[str] engine: NotRequired[WebSearchEngine] r"""The search engine to use for web search.""" + include_domains: NotRequired[List[str]] + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + exclude_domains: NotRequired[List[str]] + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" class OpenResponsesRequestPluginWeb(BaseModel): @@ -460,6 +518,12 @@ class OpenResponsesRequestPluginWeb(BaseModel): ] = None r"""The search engine to use for web search.""" + include_domains: Optional[List[str]] = None + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + exclude_domains: Optional[List[str]] = None + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + OpenResponsesRequestIDModeration = Literal["moderation",] @@ -557,7 +621,7 @@ class OpenResponsesRequestTrace(BaseModel): class OpenResponsesRequestTypedDict(TypedDict): r"""Request schema for Responses endpoint""" - input: NotRequired[OpenResponsesInputTypedDict] + input: NotRequired[OpenResponsesInputUnionTypedDict] r"""Input for a response request - can be a string or array of items""" instructions: NotRequired[Nullable[str]] metadata: NotRequired[Nullable[Dict[str, str]]] @@ -608,7 +672,7 @@ class OpenResponsesRequestTypedDict(TypedDict): class OpenResponsesRequest(BaseModel): r"""Request schema for Responses endpoint""" - input: Optional[OpenResponsesInput] = None + input: Optional[OpenResponsesInputUnion] = None r"""Input for a response request - can be a string or array of items""" instructions: OptionalNullable[str] = UNSET diff --git a/src/openrouter/components/openresponsesresult.py b/src/openrouter/components/openresponsesresult.py new file mode 100644 index 0000000..7d7ae0a --- /dev/null +++ b/src/openrouter/components/openresponsesresult.py @@ -0,0 +1,353 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .applypatchservertool import ApplyPatchServerTool, ApplyPatchServerToolTypedDict +from .baseinputs_union import BaseInputsUnion, BaseInputsUnionTypedDict +from .basereasoningconfig import BaseReasoningConfig, BaseReasoningConfigTypedDict +from .codeinterpreterservertool import ( + CodeInterpreterServerTool, + CodeInterpreterServerToolTypedDict, +) +from .codexlocalshelltool import CodexLocalShellTool, CodexLocalShellToolTypedDict +from .computeruseservertool import ComputerUseServerTool, ComputerUseServerToolTypedDict +from .customtool import CustomTool, CustomToolTypedDict +from .filesearchservertool import FileSearchServerTool, FileSearchServerToolTypedDict +from .imagegenerationservertool import ( + ImageGenerationServerTool, + ImageGenerationServerToolTypedDict, +) +from .incompletedetails import IncompleteDetails, IncompleteDetailsTypedDict +from .legacy_websearchservertool import ( + LegacyWebSearchServerTool, + LegacyWebSearchServerToolTypedDict, +) +from .mcpservertool import McpServerTool, McpServerToolTypedDict +from .openairesponsesresponsestatus import OpenAIResponsesResponseStatus +from .openairesponsestoolchoice_union import ( + OpenAIResponsesToolChoiceUnion, + OpenAIResponsesToolChoiceUnionTypedDict, +) +from .outputitems import OutputItems, OutputItemsTypedDict +from .preview_20250311_websearchservertool import ( + Preview20250311WebSearchServerTool, + Preview20250311WebSearchServerToolTypedDict, +) +from .preview_websearchservertool import ( + PreviewWebSearchServerTool, + PreviewWebSearchServerToolTypedDict, +) +from .responseserrorfield import ResponsesErrorField, ResponsesErrorFieldTypedDict +from .shellservertool import ShellServerTool, ShellServerToolTypedDict +from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict +from .textconfig import TextConfig, TextConfigTypedDict +from .truncationenum import TruncationEnum +from .usage import Usage, UsageTypedDict +from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +OpenResponsesResultObject = Literal["response",] + + +OpenResponsesResultType = Literal["function",] + + +class OpenResponsesResultToolFunctionTypedDict(TypedDict): + r"""Function tool definition""" + + type: OpenResponsesResultType + name: str + parameters: Nullable[Dict[str, Nullable[Any]]] + description: NotRequired[Nullable[str]] + strict: NotRequired[Nullable[bool]] + + +class OpenResponsesResultToolFunction(BaseModel): + r"""Function tool definition""" + + type: OpenResponsesResultType + + name: str + + parameters: Nullable[Dict[str, Nullable[Any]]] + + description: OptionalNullable[str] = UNSET + + strict: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["description", "strict"] + nullable_fields = ["description", "strict", "parameters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +OpenResponsesResultToolUnionTypedDict = TypeAliasType( + "OpenResponsesResultToolUnionTypedDict", + Union[ + CodexLocalShellToolTypedDict, + ApplyPatchServerToolTypedDict, + ShellServerToolTypedDict, + CodeInterpreterServerToolTypedDict, + CustomToolTypedDict, + ComputerUseServerToolTypedDict, + OpenResponsesResultToolFunctionTypedDict, + FileSearchServerToolTypedDict, + LegacyWebSearchServerToolTypedDict, + WebSearchServerToolTypedDict, + Preview20250311WebSearchServerToolTypedDict, + PreviewWebSearchServerToolTypedDict, + McpServerToolTypedDict, + ImageGenerationServerToolTypedDict, + ], +) + + +OpenResponsesResultToolUnion = Annotated[ + Union[ + Annotated[OpenResponsesResultToolFunction, Tag("function")], + Annotated[PreviewWebSearchServerTool, Tag("web_search_preview")], + Annotated[ + Preview20250311WebSearchServerTool, Tag("web_search_preview_2025_03_11") + ], + Annotated[LegacyWebSearchServerTool, Tag("web_search")], + Annotated[WebSearchServerTool, Tag("web_search_2025_08_26")], + Annotated[FileSearchServerTool, Tag("file_search")], + Annotated[ComputerUseServerTool, Tag("computer_use_preview")], + Annotated[CodeInterpreterServerTool, Tag("code_interpreter")], + Annotated[McpServerTool, Tag("mcp")], + Annotated[ImageGenerationServerTool, Tag("image_generation")], + Annotated[CodexLocalShellTool, Tag("local_shell")], + Annotated[ShellServerTool, Tag("shell")], + Annotated[ApplyPatchServerTool, Tag("apply_patch")], + Annotated[CustomTool, Tag("custom")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class OpenResponsesResultTypedDict(TypedDict): + r"""Complete non-streaming response from the Responses API""" + + id: str + object: OpenResponsesResultObject + created_at: float + model: str + status: OpenAIResponsesResponseStatus + completed_at: Nullable[float] + output: List[OutputItemsTypedDict] + error: Nullable[ResponsesErrorFieldTypedDict] + r"""Error information returned from the API""" + incomplete_details: Nullable[IncompleteDetailsTypedDict] + temperature: Nullable[float] + top_p: Nullable[float] + presence_penalty: Nullable[float] + frequency_penalty: Nullable[float] + instructions: Nullable[BaseInputsUnionTypedDict] + metadata: Nullable[Dict[str, str]] + r"""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.""" + tools: List[OpenResponsesResultToolUnionTypedDict] + tool_choice: OpenAIResponsesToolChoiceUnionTypedDict + parallel_tool_calls: bool + user: NotRequired[Nullable[str]] + output_text: NotRequired[str] + prompt_cache_key: NotRequired[Nullable[str]] + safety_identifier: NotRequired[Nullable[str]] + usage: NotRequired[Nullable[UsageTypedDict]] + r"""Token usage information for the response""" + max_tool_calls: NotRequired[Nullable[float]] + top_logprobs: NotRequired[float] + max_output_tokens: NotRequired[Nullable[float]] + prompt: NotRequired[Nullable[StoredPromptTemplateTypedDict]] + background: NotRequired[Nullable[bool]] + previous_response_id: NotRequired[Nullable[str]] + reasoning: NotRequired[Nullable[BaseReasoningConfigTypedDict]] + service_tier: NotRequired[Nullable[str]] + store: NotRequired[bool] + truncation: NotRequired[Nullable[TruncationEnum]] + text: NotRequired[TextConfigTypedDict] + r"""Text output configuration including format and verbosity""" + + +class OpenResponsesResult(BaseModel): + r"""Complete non-streaming response from the Responses API""" + + id: str + + object: OpenResponsesResultObject + + created_at: float + + model: str + + status: Annotated[ + OpenAIResponsesResponseStatus, PlainValidator(validate_open_enum(False)) + ] + + completed_at: Nullable[float] + + output: List[OutputItems] + + error: Nullable[ResponsesErrorField] + r"""Error information returned from the API""" + + incomplete_details: Nullable[IncompleteDetails] + + temperature: Nullable[float] + + top_p: Nullable[float] + + presence_penalty: Nullable[float] + + frequency_penalty: Nullable[float] + + instructions: Nullable[BaseInputsUnion] + + metadata: Nullable[Dict[str, str]] + r"""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.""" + + tools: List[OpenResponsesResultToolUnion] + + tool_choice: OpenAIResponsesToolChoiceUnion + + parallel_tool_calls: bool + + user: OptionalNullable[str] = UNSET + + output_text: Optional[str] = None + + prompt_cache_key: OptionalNullable[str] = UNSET + + safety_identifier: OptionalNullable[str] = UNSET + + usage: OptionalNullable[Usage] = UNSET + r"""Token usage information for the response""" + + max_tool_calls: OptionalNullable[float] = UNSET + + top_logprobs: Optional[float] = None + + max_output_tokens: OptionalNullable[float] = UNSET + + prompt: OptionalNullable[StoredPromptTemplate] = UNSET + + background: OptionalNullable[bool] = UNSET + + previous_response_id: OptionalNullable[str] = UNSET + + reasoning: OptionalNullable[BaseReasoningConfig] = UNSET + + service_tier: OptionalNullable[str] = UNSET + + store: Optional[bool] = None + + truncation: Annotated[ + OptionalNullable[TruncationEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + text: Optional[TextConfig] = None + r"""Text output configuration including format and verbosity""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "user", + "output_text", + "prompt_cache_key", + "safety_identifier", + "usage", + "max_tool_calls", + "top_logprobs", + "max_output_tokens", + "prompt", + "background", + "previous_response_id", + "reasoning", + "service_tier", + "store", + "truncation", + "text", + ] + nullable_fields = [ + "completed_at", + "user", + "prompt_cache_key", + "safety_identifier", + "error", + "incomplete_details", + "usage", + "max_tool_calls", + "max_output_tokens", + "temperature", + "top_p", + "presence_penalty", + "frequency_penalty", + "instructions", + "metadata", + "prompt", + "background", + "previous_response_id", + "reasoning", + "service_tier", + "truncation", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/openresponsesstreamevent.py b/src/openrouter/components/openresponsesstreamevent.py index 8b21548..5ec67a1 100644 --- a/src/openrouter/components/openresponsesstreamevent.py +++ b/src/openrouter/components/openresponsesstreamevent.py @@ -29,7 +29,6 @@ from .openresponsesimagegencallpartialimage import ( OpenResponsesImageGenCallPartialImage, OpenResponsesImageGenCallPartialImageTypedDict, ) -from .openresponseslogprobs import OpenResponsesLogProbs, OpenResponsesLogProbsTypedDict from .openresponsesnonstreamingresponse import ( OpenResponsesNonStreamingResponse, OpenResponsesNonStreamingResponseTypedDict, @@ -60,9 +59,10 @@ from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict from .responsesoutputitem import ResponsesOutputItem, ResponsesOutputItemTypedDict from openrouter.types import BaseModel from openrouter.utils import get_discriminator +import pydantic from pydantic import Discriminator, Tag -from typing import List, Literal, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict TypeResponseReasoningSummaryPartDone = Literal["response.reasoning_summary_part.done",] @@ -254,6 +254,45 @@ class OpenResponsesStreamEventResponseRefusalDelta(BaseModel): TypeResponseOutputTextDone = Literal["response.output_text.done",] +class OpenResponsesStreamEventTopLogprob2TypedDict(TypedDict): + r"""Alternative token with its log probability""" + + token: NotRequired[str] + logprob: NotRequired[float] + bytes_: NotRequired[List[float]] + + +class OpenResponsesStreamEventTopLogprob2(BaseModel): + r"""Alternative token with its log probability""" + + token: Optional[str] = None + + logprob: Optional[float] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class OpenResponsesStreamEventLogprob2TypedDict(TypedDict): + r"""Log probability information for a token""" + + logprob: float + token: str + top_logprobs: NotRequired[List[OpenResponsesStreamEventTopLogprob2TypedDict]] + bytes_: NotRequired[List[float]] + + +class OpenResponsesStreamEventLogprob2(BaseModel): + r"""Log probability information for a token""" + + logprob: float + + token: str + + top_logprobs: Optional[List[OpenResponsesStreamEventTopLogprob2]] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + class OpenResponsesStreamEventResponseOutputTextDoneTypedDict(TypedDict): r"""Event emitted when text streaming is complete""" @@ -263,7 +302,7 @@ class OpenResponsesStreamEventResponseOutputTextDoneTypedDict(TypedDict): content_index: float text: str sequence_number: float - logprobs: List[OpenResponsesLogProbsTypedDict] + logprobs: List[OpenResponsesStreamEventLogprob2TypedDict] class OpenResponsesStreamEventResponseOutputTextDone(BaseModel): @@ -281,17 +320,56 @@ class OpenResponsesStreamEventResponseOutputTextDone(BaseModel): sequence_number: float - logprobs: List[OpenResponsesLogProbs] + logprobs: List[OpenResponsesStreamEventLogprob2] TypeResponseOutputTextDelta = Literal["response.output_text.delta",] +class OpenResponsesStreamEventTopLogprob1TypedDict(TypedDict): + r"""Alternative token with its log probability""" + + token: NotRequired[str] + logprob: NotRequired[float] + bytes_: NotRequired[List[float]] + + +class OpenResponsesStreamEventTopLogprob1(BaseModel): + r"""Alternative token with its log probability""" + + token: Optional[str] = None + + logprob: Optional[float] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class OpenResponsesStreamEventLogprob1TypedDict(TypedDict): + r"""Log probability information for a token""" + + logprob: float + token: str + top_logprobs: NotRequired[List[OpenResponsesStreamEventTopLogprob1TypedDict]] + bytes_: NotRequired[List[float]] + + +class OpenResponsesStreamEventLogprob1(BaseModel): + r"""Log probability information for a token""" + + logprob: float + + token: str + + top_logprobs: Optional[List[OpenResponsesStreamEventTopLogprob1]] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + class OpenResponsesStreamEventResponseOutputTextDeltaTypedDict(TypedDict): r"""Event emitted when a text delta is streamed""" type: TypeResponseOutputTextDelta - logprobs: List[OpenResponsesLogProbsTypedDict] + logprobs: List[OpenResponsesStreamEventLogprob1TypedDict] output_index: float item_id: str content_index: float @@ -304,7 +382,7 @@ class OpenResponsesStreamEventResponseOutputTextDelta(BaseModel): type: TypeResponseOutputTextDelta - logprobs: List[OpenResponsesLogProbs] + logprobs: List[OpenResponsesStreamEventLogprob1] output_index: float diff --git a/src/openrouter/components/outputdatetimeitem.py b/src/openrouter/components/outputdatetimeitem.py new file mode 100644 index 0000000..d11192e --- /dev/null +++ b/src/openrouter/components/outputdatetimeitem.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +OutputDatetimeItemType = Literal["openrouter:datetime",] + + +OutputDatetimeItemStatus = Union[ + Literal[ + "completed", + "in_progress", + "incomplete", + ], + UnrecognizedStr, +] + + +class OutputDatetimeItemTypedDict(TypedDict): + r"""An openrouter:datetime server tool output item""" + + type: OutputDatetimeItemType + status: OutputDatetimeItemStatus + datetime: str + r"""ISO 8601 datetime string""" + timezone: str + r"""IANA timezone name""" + id: NotRequired[str] + + +class OutputDatetimeItem(BaseModel): + r"""An openrouter:datetime server tool output item""" + + type: OutputDatetimeItemType + + status: Annotated[ + OutputDatetimeItemStatus, PlainValidator(validate_open_enum(False)) + ] + + datetime: str + r"""ISO 8601 datetime string""" + + timezone: str + r"""IANA timezone name""" + + id: Optional[str] = None diff --git a/src/openrouter/components/outputfilesearchcallitem.py b/src/openrouter/components/outputfilesearchcallitem.py new file mode 100644 index 0000000..ce347e9 --- /dev/null +++ b/src/openrouter/components/outputfilesearchcallitem.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .websearchstatus import WebSearchStatus +from openrouter.types import BaseModel +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +OutputFileSearchCallItemType = Literal["file_search_call",] + + +class OutputFileSearchCallItemTypedDict(TypedDict): + type: OutputFileSearchCallItemType + id: str + queries: List[str] + status: WebSearchStatus + + +class OutputFileSearchCallItem(BaseModel): + type: OutputFileSearchCallItemType + + id: str + + queries: List[str] + + status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/outputfunctioncallitem.py b/src/openrouter/components/outputfunctioncallitem.py new file mode 100644 index 0000000..f82f43b --- /dev/null +++ b/src/openrouter/components/outputfunctioncallitem.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +OutputFunctionCallItemType = Literal["function_call",] + + +OutputFunctionCallItemStatusInProgress = Literal["in_progress",] + + +OutputFunctionCallItemStatusIncomplete = Literal["incomplete",] + + +OutputFunctionCallItemStatusCompleted = Literal["completed",] + + +OutputFunctionCallItemStatusUnionTypedDict = TypeAliasType( + "OutputFunctionCallItemStatusUnionTypedDict", + Union[ + OutputFunctionCallItemStatusCompleted, + OutputFunctionCallItemStatusIncomplete, + OutputFunctionCallItemStatusInProgress, + ], +) + + +OutputFunctionCallItemStatusUnion = TypeAliasType( + "OutputFunctionCallItemStatusUnion", + Union[ + OutputFunctionCallItemStatusCompleted, + OutputFunctionCallItemStatusIncomplete, + OutputFunctionCallItemStatusInProgress, + ], +) + + +class OutputFunctionCallItemTypedDict(TypedDict): + type: OutputFunctionCallItemType + name: str + arguments: str + call_id: str + id: NotRequired[str] + status: NotRequired[OutputFunctionCallItemStatusUnionTypedDict] + + +class OutputFunctionCallItem(BaseModel): + type: OutputFunctionCallItemType + + name: str + + arguments: str + + call_id: str + + id: Optional[str] = None + + status: Optional[OutputFunctionCallItemStatusUnion] = None diff --git a/src/openrouter/components/outputimagegenerationcallitem.py b/src/openrouter/components/outputimagegenerationcallitem.py new file mode 100644 index 0000000..2347dba --- /dev/null +++ b/src/openrouter/components/outputimagegenerationcallitem.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .imagegenerationstatus import ImageGenerationStatus +from openrouter.types import BaseModel, Nullable, OptionalNullable, UNSET_SENTINEL +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +OutputImageGenerationCallItemType = Literal["image_generation_call",] + + +class OutputImageGenerationCallItemTypedDict(TypedDict): + type: OutputImageGenerationCallItemType + id: str + status: ImageGenerationStatus + result: NotRequired[Nullable[str]] + + +class OutputImageGenerationCallItem(BaseModel): + type: OutputImageGenerationCallItemType + + id: str + + status: Annotated[ImageGenerationStatus, PlainValidator(validate_open_enum(False))] + + result: OptionalNullable[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["result"] + nullable_fields = ["result"] + null_default_fields = ["result"] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py new file mode 100644 index 0000000..1936438 --- /dev/null +++ b/src/openrouter/components/outputitems.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .outputfilesearchcallitem import ( + OutputFileSearchCallItem, + OutputFileSearchCallItemTypedDict, +) +from .outputfunctioncallitem import ( + OutputFunctionCallItem, + OutputFunctionCallItemTypedDict, +) +from .outputimagegenerationcallitem import ( + OutputImageGenerationCallItem, + OutputImageGenerationCallItemTypedDict, +) +from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict +from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict +from .outputservertoolitem import OutputServerToolItem, OutputServerToolItemTypedDict +from .outputwebsearchcallitem import ( + OutputWebSearchCallItem, + OutputWebSearchCallItemTypedDict, +) +from typing import Union +from typing_extensions import TypeAliasType + + +OutputItemsTypedDict = TypeAliasType( + "OutputItemsTypedDict", + Union[ + OutputWebSearchCallItemTypedDict, + OutputFileSearchCallItemTypedDict, + OutputImageGenerationCallItemTypedDict, + OutputServerToolItemTypedDict, + OutputMessageItemTypedDict, + OutputFunctionCallItemTypedDict, + OutputReasoningItemTypedDict, + ], +) +r"""An output item from the response""" + + +OutputItems = TypeAliasType( + "OutputItems", + Union[ + OutputWebSearchCallItem, + OutputFileSearchCallItem, + OutputImageGenerationCallItem, + OutputServerToolItem, + OutputMessageItem, + OutputFunctionCallItem, + OutputReasoningItem, + ], +) +r"""An output item from the response""" diff --git a/src/openrouter/components/outputmessage.py b/src/openrouter/components/outputmessage.py index 1304077..497bcc0 100644 --- a/src/openrouter/components/outputmessage.py +++ b/src/openrouter/components/outputmessage.py @@ -6,10 +6,16 @@ from .openairesponsesrefusalcontent import ( OpenAIResponsesRefusalContentTypedDict, ) from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict -from openrouter.types import BaseModel +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import List, Literal, Optional, Union +from pydantic import Discriminator, Tag, model_serializer +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -63,12 +69,34 @@ OutputMessageContent = Annotated[ ] +OutputMessagePhaseFinalAnswer = Literal["final_answer",] + + +OutputMessagePhaseCommentary = Literal["commentary",] + + +OutputMessagePhaseUnionTypedDict = TypeAliasType( + "OutputMessagePhaseUnionTypedDict", + Union[OutputMessagePhaseCommentary, OutputMessagePhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +OutputMessagePhaseUnion = TypeAliasType( + "OutputMessagePhaseUnion", + Union[OutputMessagePhaseCommentary, OutputMessagePhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + class OutputMessageTypedDict(TypedDict): id: str role: OutputMessageRole type: OutputMessageType content: List[OutputMessageContentTypedDict] status: NotRequired[OutputMessageStatusUnionTypedDict] + phase: NotRequired[Nullable[OutputMessagePhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" class OutputMessage(BaseModel): @@ -81,3 +109,36 @@ class OutputMessage(BaseModel): content: List[OutputMessageContent] status: Optional[OutputMessageStatusUnion] = None + + phase: OptionalNullable[OutputMessagePhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status", "phase"] + nullable_fields = ["phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/outputmessageitem.py b/src/openrouter/components/outputmessageitem.py new file mode 100644 index 0000000..fbe391b --- /dev/null +++ b/src/openrouter/components/outputmessageitem.py @@ -0,0 +1,148 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .openairesponsesrefusalcontent import ( + OpenAIResponsesRefusalContent, + OpenAIResponsesRefusalContentTypedDict, +) +from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag, model_serializer +from typing import Any, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +OutputMessageItemRole = Literal["assistant",] + + +OutputMessageItemType = Literal["message",] + + +OutputMessageItemStatusInProgress = Literal["in_progress",] + + +OutputMessageItemStatusIncomplete = Literal["incomplete",] + + +OutputMessageItemStatusCompleted = Literal["completed",] + + +OutputMessageItemStatusUnionTypedDict = TypeAliasType( + "OutputMessageItemStatusUnionTypedDict", + Union[ + OutputMessageItemStatusCompleted, + OutputMessageItemStatusIncomplete, + OutputMessageItemStatusInProgress, + ], +) + + +OutputMessageItemStatusUnion = TypeAliasType( + "OutputMessageItemStatusUnion", + Union[ + OutputMessageItemStatusCompleted, + OutputMessageItemStatusIncomplete, + OutputMessageItemStatusInProgress, + ], +) + + +OutputMessageItemContentTypedDict = TypeAliasType( + "OutputMessageItemContentTypedDict", + Union[OpenAIResponsesRefusalContentTypedDict, ResponseOutputTextTypedDict], +) + + +OutputMessageItemContent = Annotated[ + Union[ + Annotated[ResponseOutputText, Tag("output_text")], + Annotated[OpenAIResponsesRefusalContent, Tag("refusal")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +OutputMessageItemPhaseFinalAnswer = Literal["final_answer",] + + +OutputMessageItemPhaseCommentary = Literal["commentary",] + + +OutputMessageItemPhaseUnionTypedDict = TypeAliasType( + "OutputMessageItemPhaseUnionTypedDict", + Union[OutputMessageItemPhaseCommentary, OutputMessageItemPhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +OutputMessageItemPhaseUnion = TypeAliasType( + "OutputMessageItemPhaseUnion", + Union[OutputMessageItemPhaseCommentary, OutputMessageItemPhaseFinalAnswer, Any], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class OutputMessageItemTypedDict(TypedDict): + r"""An output message item""" + + id: str + role: OutputMessageItemRole + type: OutputMessageItemType + content: List[OutputMessageItemContentTypedDict] + status: NotRequired[OutputMessageItemStatusUnionTypedDict] + phase: NotRequired[Nullable[OutputMessageItemPhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +class OutputMessageItem(BaseModel): + r"""An output message item""" + + id: str + + role: OutputMessageItemRole + + type: OutputMessageItemType + + content: List[OutputMessageItemContent] + + status: Optional[OutputMessageItemStatusUnion] = None + + phase: OptionalNullable[OutputMessageItemPhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status", "phase"] + nullable_fields = ["phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/outputmodality.py b/src/openrouter/components/outputmodality.py index a127bd4..b3120b0 100644 --- a/src/openrouter/components/outputmodality.py +++ b/src/openrouter/components/outputmodality.py @@ -11,6 +11,7 @@ OutputModality = Union[ "image", "embeddings", "audio", + "video", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/outputmodalityenum.py b/src/openrouter/components/outputmodalityenum.py new file mode 100644 index 0000000..ccd5283 --- /dev/null +++ b/src/openrouter/components/outputmodalityenum.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +OutputModalityEnum = Union[ + Literal[ + "text", + "image", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/outputreasoningitem.py b/src/openrouter/components/outputreasoningitem.py new file mode 100644 index 0000000..5ab5d77 --- /dev/null +++ b/src/openrouter/components/outputreasoningitem.py @@ -0,0 +1,144 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +OutputReasoningItemType = Literal["reasoning",] + + +OutputReasoningItemStatusInProgress = Literal["in_progress",] + + +OutputReasoningItemStatusIncomplete = Literal["incomplete",] + + +OutputReasoningItemStatusCompleted = Literal["completed",] + + +OutputReasoningItemStatusUnionTypedDict = TypeAliasType( + "OutputReasoningItemStatusUnionTypedDict", + Union[ + OutputReasoningItemStatusCompleted, + OutputReasoningItemStatusIncomplete, + OutputReasoningItemStatusInProgress, + ], +) + + +OutputReasoningItemStatusUnion = TypeAliasType( + "OutputReasoningItemStatusUnion", + Union[ + OutputReasoningItemStatusCompleted, + OutputReasoningItemStatusIncomplete, + OutputReasoningItemStatusInProgress, + ], +) + + +OutputReasoningItemFormat = Union[ + Literal[ + "unknown", + "openai-responses-v1", + "azure-openai-responses-v1", + "xai-responses-v1", + "anthropic-claude-v1", + "google-gemini-v1", + ], + UnrecognizedStr, +] +r"""The format of the reasoning content""" + + +class OutputReasoningItemTypedDict(TypedDict): + r"""An output item containing reasoning""" + + type: OutputReasoningItemType + id: str + summary: List[ReasoningSummaryTextTypedDict] + content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] + encrypted_content: NotRequired[Nullable[str]] + status: NotRequired[OutputReasoningItemStatusUnionTypedDict] + signature: NotRequired[Nullable[str]] + r"""A signature for the reasoning content, used for verification""" + format_: NotRequired[Nullable[OutputReasoningItemFormat]] + r"""The format of the reasoning content""" + + +class OutputReasoningItem(BaseModel): + r"""An output item containing reasoning""" + + type: OutputReasoningItemType + + id: str + + summary: List[ReasoningSummaryText] + + content: OptionalNullable[List[ReasoningTextContent]] = UNSET + + encrypted_content: OptionalNullable[str] = UNSET + + status: Optional[OutputReasoningItemStatusUnion] = None + + signature: OptionalNullable[str] = UNSET + r"""A signature for the reasoning content, used for verification""" + + format_: Annotated[ + Annotated[ + OptionalNullable[OutputReasoningItemFormat], + PlainValidator(validate_open_enum(False)), + ], + pydantic.Field(alias="format"), + ] = UNSET + r"""The format of the reasoning content""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "content", + "encrypted_content", + "status", + "signature", + "format", + ] + nullable_fields = ["content", "encrypted_content", "signature", "format"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/outputservertoolitem.py b/src/openrouter/components/outputservertoolitem.py new file mode 100644 index 0000000..abfbff5 --- /dev/null +++ b/src/openrouter/components/outputservertoolitem.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel, Nullable, UnrecognizedStr +from openrouter.utils import validate_open_enum +import pydantic +from pydantic import ConfigDict +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +OutputServerToolItemStatus = Union[ + Literal[ + "completed", + "in_progress", + "incomplete", + ], + UnrecognizedStr, +] + + +class OutputServerToolItemTypedDict(TypedDict): + r"""A generic OpenRouter server tool output item""" + + type: str + r"""Server tool type (e.g. openrouter:datetime, openrouter:web_search)""" + status: OutputServerToolItemStatus + id: NotRequired[str] + + +class OutputServerToolItem(BaseModel): + r"""A generic OpenRouter server tool output item""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + type: str + r"""Server tool type (e.g. openrouter:datetime, openrouter:web_search)""" + + status: Annotated[ + OutputServerToolItemStatus, PlainValidator(validate_open_enum(False)) + ] + + id: Optional[str] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/src/openrouter/components/outputwebsearchcallitem.py b/src/openrouter/components/outputwebsearchcallitem.py new file mode 100644 index 0000000..84d048c --- /dev/null +++ b/src/openrouter/components/outputwebsearchcallitem.py @@ -0,0 +1,147 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .websearchstatus import WebSearchStatus +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +TypeWebSearchCall = Literal["web_search_call",] + + +TypeFindInPage = Literal["find_in_page",] + + +class ActionFindInPageTypedDict(TypedDict): + type: TypeFindInPage + pattern: str + url: str + + +class ActionFindInPage(BaseModel): + type: TypeFindInPage + + pattern: str + + url: str + + +TypeOpenPage = Literal["open_page",] + + +class ActionOpenPageTypedDict(TypedDict): + type: TypeOpenPage + url: NotRequired[Nullable[str]] + + +class ActionOpenPage(BaseModel): + type: TypeOpenPage + + url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["url"] + nullable_fields = ["url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +TypeSearch = Literal["search",] + + +TypeURL = Literal["url",] + + +class SourceTypedDict(TypedDict): + type: TypeURL + url: str + + +class Source(BaseModel): + type: TypeURL + + url: str + + +class ActionSearchTypedDict(TypedDict): + type: TypeSearch + query: str + queries: NotRequired[List[str]] + sources: NotRequired[List[SourceTypedDict]] + + +class ActionSearch(BaseModel): + type: TypeSearch + + query: str + + queries: Optional[List[str]] = None + + sources: Optional[List[Source]] = None + + +ActionTypedDict = TypeAliasType( + "ActionTypedDict", + Union[ActionOpenPageTypedDict, ActionFindInPageTypedDict, ActionSearchTypedDict], +) + + +Action = Annotated[ + Union[ + Annotated[ActionSearch, Tag("search")], + Annotated[ActionOpenPage, Tag("open_page")], + Annotated[ActionFindInPage, Tag("find_in_page")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +class OutputWebSearchCallItemTypedDict(TypedDict): + type: TypeWebSearchCall + id: str + action: ActionTypedDict + status: WebSearchStatus + + +class OutputWebSearchCallItem(BaseModel): + type: TypeWebSearchCall + + id: str + + action: Action + + status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/pdfparserengine.py b/src/openrouter/components/pdfparserengine.py index 4951697..36c5f8f 100644 --- a/src/openrouter/components/pdfparserengine.py +++ b/src/openrouter/components/pdfparserengine.py @@ -2,15 +2,36 @@ from __future__ import annotations from openrouter.types import UnrecognizedStr +from openrouter.utils import validate_open_enum +from pydantic.functional_validators import PlainValidator from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType -PDFParserEngine = Union[ +PDFParserEnginePDFText = Literal["pdf-text",] + + +PDFParserEngineEnum = Union[ Literal[ "mistral-ocr", - "pdf-text", "native", + "cloudflare-ai", ], UnrecognizedStr, ] -r"""The engine to use for parsing PDF files.""" + + +PDFParserEngineTypedDict = TypeAliasType( + "PDFParserEngineTypedDict", Union[PDFParserEngineEnum, PDFParserEnginePDFText] +) +r"""The engine to use for parsing PDF files. \"pdf-text\" is deprecated and automatically redirected to \"cloudflare-ai\".""" + + +PDFParserEngine = TypeAliasType( + "PDFParserEngine", + Union[ + Annotated[PDFParserEngineEnum, PlainValidator(validate_open_enum(False))], + PDFParserEnginePDFText, + ], +) +r"""The engine to use for parsing PDF files. \"pdf-text\" is deprecated and automatically redirected to \"cloudflare-ai\".""" diff --git a/src/openrouter/components/pdfparseroptions.py b/src/openrouter/components/pdfparseroptions.py index 13f177f..4510e73 100644 --- a/src/openrouter/components/pdfparseroptions.py +++ b/src/openrouter/components/pdfparseroptions.py @@ -1,25 +1,21 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .pdfparserengine import PDFParserEngine +from .pdfparserengine import PDFParserEngine, PDFParserEngineTypedDict from openrouter.types import BaseModel -from openrouter.utils import validate_open_enum -from pydantic.functional_validators import PlainValidator from typing import Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing_extensions import NotRequired, TypedDict class PDFParserOptionsTypedDict(TypedDict): r"""Options for PDF parsing.""" - engine: NotRequired[PDFParserEngine] - r"""The engine to use for parsing PDF files.""" + engine: NotRequired[PDFParserEngineTypedDict] + r"""The engine to use for parsing PDF files. \"pdf-text\" is deprecated and automatically redirected to \"cloudflare-ai\".""" class PDFParserOptions(BaseModel): r"""Options for PDF parsing.""" - engine: Annotated[ - Optional[PDFParserEngine], PlainValidator(validate_open_enum(False)) - ] = None - r"""The engine to use for parsing PDF files.""" + engine: Optional[PDFParserEngine] = None + r"""The engine to use for parsing PDF files. \"pdf-text\" is deprecated and automatically redirected to \"cloudflare-ai\".""" diff --git a/src/openrouter/components/preview_20250311_websearchservertool.py b/src/openrouter/components/preview_20250311_websearchservertool.py new file mode 100644 index 0000000..883019b --- /dev/null +++ b/src/openrouter/components/preview_20250311_websearchservertool.py @@ -0,0 +1,152 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .preview_websearchuserlocation import ( + PreviewWebSearchUserLocation, + PreviewWebSearchUserLocationTypedDict, +) +from .searchcontextsizeenum import SearchContextSizeEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +Preview20250311WebSearchServerToolType = Literal["web_search_preview_2025_03_11",] + + +Preview20250311WebSearchServerToolEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +class Preview20250311WebSearchServerToolFiltersTypedDict(TypedDict): + allowed_domains: NotRequired[Nullable[List[str]]] + excluded_domains: NotRequired[Nullable[List[str]]] + + +class Preview20250311WebSearchServerToolFilters(BaseModel): + allowed_domains: OptionalNullable[List[str]] = UNSET + + excluded_domains: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["allowed_domains", "excluded_domains"] + nullable_fields = ["allowed_domains", "excluded_domains"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class Preview20250311WebSearchServerToolTypedDict(TypedDict): + r"""Web search preview tool configuration (2025-03-11 version)""" + + type: Preview20250311WebSearchServerToolType + search_context_size: NotRequired[SearchContextSizeEnum] + r"""Size of the search context for web search tools""" + user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]] + engine: NotRequired[Preview20250311WebSearchServerToolEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + filters: NotRequired[Nullable[Preview20250311WebSearchServerToolFiltersTypedDict]] + + +class Preview20250311WebSearchServerTool(BaseModel): + r"""Web search preview tool configuration (2025-03-11 version)""" + + type: Preview20250311WebSearchServerToolType + + search_context_size: Annotated[ + Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Size of the search context for web search tools""" + + user_location: OptionalNullable[PreviewWebSearchUserLocation] = UNSET + + engine: Annotated[ + Optional[Preview20250311WebSearchServerToolEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + filters: OptionalNullable[Preview20250311WebSearchServerToolFilters] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "search_context_size", + "user_location", + "engine", + "max_results", + "filters", + ] + nullable_fields = ["user_location", "filters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/preview_websearchservertool.py b/src/openrouter/components/preview_websearchservertool.py new file mode 100644 index 0000000..0903c5a --- /dev/null +++ b/src/openrouter/components/preview_websearchservertool.py @@ -0,0 +1,152 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .preview_websearchuserlocation import ( + PreviewWebSearchUserLocation, + PreviewWebSearchUserLocationTypedDict, +) +from .searchcontextsizeenum import SearchContextSizeEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +PreviewWebSearchServerToolType = Literal["web_search_preview",] + + +PreviewWebSearchServerToolEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +class PreviewWebSearchServerToolFiltersTypedDict(TypedDict): + allowed_domains: NotRequired[Nullable[List[str]]] + excluded_domains: NotRequired[Nullable[List[str]]] + + +class PreviewWebSearchServerToolFilters(BaseModel): + allowed_domains: OptionalNullable[List[str]] = UNSET + + excluded_domains: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["allowed_domains", "excluded_domains"] + nullable_fields = ["allowed_domains", "excluded_domains"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class PreviewWebSearchServerToolTypedDict(TypedDict): + r"""Web search preview tool configuration""" + + type: PreviewWebSearchServerToolType + search_context_size: NotRequired[SearchContextSizeEnum] + r"""Size of the search context for web search tools""" + user_location: NotRequired[Nullable[PreviewWebSearchUserLocationTypedDict]] + engine: NotRequired[PreviewWebSearchServerToolEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + filters: NotRequired[Nullable[PreviewWebSearchServerToolFiltersTypedDict]] + + +class PreviewWebSearchServerTool(BaseModel): + r"""Web search preview tool configuration""" + + type: PreviewWebSearchServerToolType + + search_context_size: Annotated[ + Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Size of the search context for web search tools""" + + user_location: OptionalNullable[PreviewWebSearchUserLocation] = UNSET + + engine: Annotated[ + Optional[PreviewWebSearchServerToolEngine], + PlainValidator(validate_open_enum(False)), + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + filters: OptionalNullable[PreviewWebSearchServerToolFilters] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "search_context_size", + "user_location", + "engine", + "max_results", + "filters", + ] + nullable_fields = ["user_location", "filters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/preview_websearchuserlocation.py b/src/openrouter/components/preview_websearchuserlocation.py new file mode 100644 index 0000000..72dd152 --- /dev/null +++ b/src/openrouter/components/preview_websearchuserlocation.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal +from typing_extensions import NotRequired, TypedDict + + +PreviewWebSearchUserLocationType = Literal["approximate",] + + +class PreviewWebSearchUserLocationTypedDict(TypedDict): + type: PreviewWebSearchUserLocationType + city: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + region: NotRequired[Nullable[str]] + timezone: NotRequired[Nullable[str]] + + +class PreviewWebSearchUserLocation(BaseModel): + type: PreviewWebSearchUserLocationType + + city: OptionalNullable[str] = UNSET + + country: OptionalNullable[str] = UNSET + + region: OptionalNullable[str] = UNSET + + timezone: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["city", "country", "region", "timezone"] + nullable_fields = ["city", "country", "region", "timezone"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/providername.py b/src/openrouter/components/providername.py index 67f95e7..413ecfc 100644 --- a/src/openrouter/components/providername.py +++ b/src/openrouter/components/providername.py @@ -7,6 +7,7 @@ from typing import Literal, Union ProviderName = Union[ Literal[ + "AkashML", "AI21", "AionLabs", "Alibaba", @@ -64,6 +65,7 @@ ProviderName = Union[ "Parasail", "Perplexity", "Phala", + "Reka", "Relace", "SambaNova", "Seed", diff --git a/src/openrouter/components/providerpreferences.py b/src/openrouter/components/providerpreferences.py index 8cb76ac..819a6da 100644 --- a/src/openrouter/components/providerpreferences.py +++ b/src/openrouter/components/providerpreferences.py @@ -62,6 +62,7 @@ ProviderPreferencesSortEnum = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] @@ -71,6 +72,7 @@ ProviderPreferencesProviderSortConfigEnum = Literal[ "price", "throughput", "latency", + "exacto", ] @@ -79,6 +81,7 @@ ProviderPreferencesBy = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] @@ -168,6 +171,7 @@ ProviderPreferencesProviderSort = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/providersort.py b/src/openrouter/components/providersort.py index 528a881..7325f36 100644 --- a/src/openrouter/components/providersort.py +++ b/src/openrouter/components/providersort.py @@ -10,6 +10,7 @@ ProviderSort = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/providersortconfig.py b/src/openrouter/components/providersortconfig.py index cba451e..4e1073b 100644 --- a/src/openrouter/components/providersortconfig.py +++ b/src/openrouter/components/providersortconfig.py @@ -21,6 +21,7 @@ By = Union[ "price", "throughput", "latency", + "exacto", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/reasoningconfig.py b/src/openrouter/components/reasoningconfig.py new file mode 100644 index 0000000..513a56d --- /dev/null +++ b/src/openrouter/components/reasoningconfig.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningeffortenum import ReasoningEffortEnum +from .reasoningsummaryverbosityenum import ReasoningSummaryVerbosityEnum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ReasoningConfigTypedDict(TypedDict): + r"""Configuration for reasoning mode in the response""" + + effort: NotRequired[Nullable[ReasoningEffortEnum]] + summary: NotRequired[Nullable[ReasoningSummaryVerbosityEnum]] + max_tokens: NotRequired[Nullable[float]] + enabled: NotRequired[Nullable[bool]] + + +class ReasoningConfig(BaseModel): + r"""Configuration for reasoning mode in the response""" + + effort: Annotated[ + OptionalNullable[ReasoningEffortEnum], PlainValidator(validate_open_enum(False)) + ] = UNSET + + summary: Annotated[ + OptionalNullable[ReasoningSummaryVerbosityEnum], + PlainValidator(validate_open_enum(False)), + ] = UNSET + + max_tokens: OptionalNullable[float] = UNSET + + enabled: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["effort", "summary", "max_tokens", "enabled"] + nullable_fields = ["effort", "summary", "max_tokens", "enabled"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/reasoningdeltaevent.py b/src/openrouter/components/reasoningdeltaevent.py new file mode 100644 index 0000000..ef4af5f --- /dev/null +++ b/src/openrouter/components/reasoningdeltaevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningDeltaEventType = Literal["response.reasoning_text.delta",] + + +class ReasoningDeltaEventTypedDict(TypedDict): + r"""Event emitted when reasoning text delta is streamed""" + + type: ReasoningDeltaEventType + output_index: float + item_id: str + content_index: float + delta: str + sequence_number: float + + +class ReasoningDeltaEvent(BaseModel): + r"""Event emitted when reasoning text delta is streamed""" + + type: ReasoningDeltaEventType + + output_index: float + + item_id: str + + content_index: float + + delta: str + + sequence_number: float diff --git a/src/openrouter/components/reasoningdoneevent.py b/src/openrouter/components/reasoningdoneevent.py new file mode 100644 index 0000000..3dcca9f --- /dev/null +++ b/src/openrouter/components/reasoningdoneevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningDoneEventType = Literal["response.reasoning_text.done",] + + +class ReasoningDoneEventTypedDict(TypedDict): + r"""Event emitted when reasoning text streaming is complete""" + + type: ReasoningDoneEventType + output_index: float + item_id: str + content_index: float + text: str + sequence_number: float + + +class ReasoningDoneEvent(BaseModel): + r"""Event emitted when reasoning text streaming is complete""" + + type: ReasoningDoneEventType + + output_index: float + + item_id: str + + content_index: float + + text: str + + sequence_number: float diff --git a/src/openrouter/components/reasoningeffortenum.py b/src/openrouter/components/reasoningeffortenum.py new file mode 100644 index 0000000..58d10b5 --- /dev/null +++ b/src/openrouter/components/reasoningeffortenum.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ReasoningEffortEnum = Union[ + Literal[ + "xhigh", + "high", + "medium", + "low", + "minimal", + "none", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/reasoningitem.py b/src/openrouter/components/reasoningitem.py new file mode 100644 index 0000000..9fdf1e6 --- /dev/null +++ b/src/openrouter/components/reasoningitem.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ReasoningItemType = Literal["reasoning",] + + +ReasoningItemStatusInProgress = Literal["in_progress",] + + +ReasoningItemStatusIncomplete = Literal["incomplete",] + + +ReasoningItemStatusCompleted = Literal["completed",] + + +ReasoningItemStatusUnionTypedDict = TypeAliasType( + "ReasoningItemStatusUnionTypedDict", + Union[ + ReasoningItemStatusCompleted, + ReasoningItemStatusIncomplete, + ReasoningItemStatusInProgress, + ], +) + + +ReasoningItemStatusUnion = TypeAliasType( + "ReasoningItemStatusUnion", + Union[ + ReasoningItemStatusCompleted, + ReasoningItemStatusIncomplete, + ReasoningItemStatusInProgress, + ], +) + + +ReasoningItemFormat = Union[ + Literal[ + "unknown", + "openai-responses-v1", + "azure-openai-responses-v1", + "xai-responses-v1", + "anthropic-claude-v1", + "google-gemini-v1", + ], + UnrecognizedStr, +] + + +class ReasoningItemTypedDict(TypedDict): + r"""Reasoning output item with signature and format extensions""" + + type: ReasoningItemType + id: str + summary: List[ReasoningSummaryTextTypedDict] + content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]] + encrypted_content: NotRequired[Nullable[str]] + status: NotRequired[ReasoningItemStatusUnionTypedDict] + signature: NotRequired[Nullable[str]] + format_: NotRequired[Nullable[ReasoningItemFormat]] + + +class ReasoningItem(BaseModel): + r"""Reasoning output item with signature and format extensions""" + + type: ReasoningItemType + + id: str + + summary: List[ReasoningSummaryText] + + content: OptionalNullable[List[ReasoningTextContent]] = UNSET + + encrypted_content: OptionalNullable[str] = UNSET + + status: Optional[ReasoningItemStatusUnion] = None + + signature: OptionalNullable[str] = UNSET + + format_: Annotated[ + Annotated[ + OptionalNullable[ReasoningItemFormat], + PlainValidator(validate_open_enum(False)), + ], + pydantic.Field(alias="format"), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "content", + "encrypted_content", + "status", + "signature", + "format", + ] + nullable_fields = ["content", "encrypted_content", "signature", "format"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/reasoningsummarypartaddedevent.py b/src/openrouter/components/reasoningsummarypartaddedevent.py new file mode 100644 index 0000000..1c451f8 --- /dev/null +++ b/src/openrouter/components/reasoningsummarypartaddedevent.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningSummaryPartAddedEventType = Literal["response.reasoning_summary_part.added",] + + +class ReasoningSummaryPartAddedEventTypedDict(TypedDict): + r"""Event emitted when a reasoning summary part is added""" + + type: ReasoningSummaryPartAddedEventType + output_index: float + item_id: str + summary_index: float + part: ReasoningSummaryTextTypedDict + sequence_number: float + + +class ReasoningSummaryPartAddedEvent(BaseModel): + r"""Event emitted when a reasoning summary part is added""" + + type: ReasoningSummaryPartAddedEventType + + output_index: float + + item_id: str + + summary_index: float + + part: ReasoningSummaryText + + sequence_number: float diff --git a/src/openrouter/components/reasoningsummarypartdoneevent.py b/src/openrouter/components/reasoningsummarypartdoneevent.py new file mode 100644 index 0000000..f229104 --- /dev/null +++ b/src/openrouter/components/reasoningsummarypartdoneevent.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningSummaryPartDoneEventType = Literal["response.reasoning_summary_part.done",] + + +class ReasoningSummaryPartDoneEventTypedDict(TypedDict): + r"""Event emitted when a reasoning summary part is complete""" + + type: ReasoningSummaryPartDoneEventType + output_index: float + item_id: str + summary_index: float + part: ReasoningSummaryTextTypedDict + sequence_number: float + + +class ReasoningSummaryPartDoneEvent(BaseModel): + r"""Event emitted when a reasoning summary part is complete""" + + type: ReasoningSummaryPartDoneEventType + + output_index: float + + item_id: str + + summary_index: float + + part: ReasoningSummaryText + + sequence_number: float diff --git a/src/openrouter/components/reasoningsummarytextdeltaevent.py b/src/openrouter/components/reasoningsummarytextdeltaevent.py new file mode 100644 index 0000000..f5070ae --- /dev/null +++ b/src/openrouter/components/reasoningsummarytextdeltaevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningSummaryTextDeltaEventType = Literal["response.reasoning_summary_text.delta",] + + +class ReasoningSummaryTextDeltaEventTypedDict(TypedDict): + r"""Event emitted when reasoning summary text delta is streamed""" + + type: ReasoningSummaryTextDeltaEventType + item_id: str + output_index: float + summary_index: float + delta: str + sequence_number: float + + +class ReasoningSummaryTextDeltaEvent(BaseModel): + r"""Event emitted when reasoning summary text delta is streamed""" + + type: ReasoningSummaryTextDeltaEventType + + item_id: str + + output_index: float + + summary_index: float + + delta: str + + sequence_number: float diff --git a/src/openrouter/components/reasoningsummarytextdoneevent.py b/src/openrouter/components/reasoningsummarytextdoneevent.py new file mode 100644 index 0000000..2f0d77b --- /dev/null +++ b/src/openrouter/components/reasoningsummarytextdoneevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ReasoningSummaryTextDoneEventType = Literal["response.reasoning_summary_text.done",] + + +class ReasoningSummaryTextDoneEventTypedDict(TypedDict): + r"""Event emitted when reasoning summary text streaming is complete""" + + type: ReasoningSummaryTextDoneEventType + item_id: str + output_index: float + summary_index: float + text: str + sequence_number: float + + +class ReasoningSummaryTextDoneEvent(BaseModel): + r"""Event emitted when reasoning summary text streaming is complete""" + + type: ReasoningSummaryTextDoneEventType + + item_id: str + + output_index: float + + summary_index: float + + text: str + + sequence_number: float diff --git a/src/openrouter/components/reasoningsummaryverbosityenum.py b/src/openrouter/components/reasoningsummaryverbosityenum.py new file mode 100644 index 0000000..6cfcfb3 --- /dev/null +++ b/src/openrouter/components/reasoningsummaryverbosityenum.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ReasoningSummaryVerbosityEnum = Union[ + Literal[ + "auto", + "concise", + "detailed", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/refusaldeltaevent.py b/src/openrouter/components/refusaldeltaevent.py new file mode 100644 index 0000000..fa8e880 --- /dev/null +++ b/src/openrouter/components/refusaldeltaevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +RefusalDeltaEventType = Literal["response.refusal.delta",] + + +class RefusalDeltaEventTypedDict(TypedDict): + r"""Event emitted when a refusal delta is streamed""" + + type: RefusalDeltaEventType + output_index: float + item_id: str + content_index: float + delta: str + sequence_number: float + + +class RefusalDeltaEvent(BaseModel): + r"""Event emitted when a refusal delta is streamed""" + + type: RefusalDeltaEventType + + output_index: float + + item_id: str + + content_index: float + + delta: str + + sequence_number: float diff --git a/src/openrouter/components/refusaldoneevent.py b/src/openrouter/components/refusaldoneevent.py new file mode 100644 index 0000000..7865231 --- /dev/null +++ b/src/openrouter/components/refusaldoneevent.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +RefusalDoneEventType = Literal["response.refusal.done",] + + +class RefusalDoneEventTypedDict(TypedDict): + r"""Event emitted when refusal streaming is complete""" + + type: RefusalDoneEventType + output_index: float + item_id: str + content_index: float + refusal: str + sequence_number: float + + +class RefusalDoneEvent(BaseModel): + r"""Event emitted when refusal streaming is complete""" + + type: RefusalDoneEventType + + output_index: float + + item_id: str + + content_index: float + + refusal: str + + sequence_number: float diff --git a/src/openrouter/components/responseincludesenum.py b/src/openrouter/components/responseincludesenum.py new file mode 100644 index 0000000..9da58c5 --- /dev/null +++ b/src/openrouter/components/responseincludesenum.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ResponseIncludesEnum = Union[ + Literal[ + "file_search_call.results", + "message.input_image.image_url", + "computer_call_output.output.image_url", + "reasoning.encrypted_content", + "code_interpreter_call.outputs", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/responseoutputtext.py b/src/openrouter/components/responseoutputtext.py index f962eb0..b92a2b1 100644 --- a/src/openrouter/components/responseoutputtext.py +++ b/src/openrouter/components/responseoutputtext.py @@ -28,14 +28,14 @@ class ResponseOutputTextTopLogprob(BaseModel): logprob: float -class LogprobTypedDict(TypedDict): +class ResponseOutputTextLogprobTypedDict(TypedDict): token: str bytes_: List[float] logprob: float top_logprobs: List[ResponseOutputTextTopLogprobTypedDict] -class Logprob(BaseModel): +class ResponseOutputTextLogprob(BaseModel): token: str bytes_: Annotated[List[float], pydantic.Field(alias="bytes")] @@ -49,7 +49,7 @@ class ResponseOutputTextTypedDict(TypedDict): type: ResponseOutputTextType text: str annotations: NotRequired[List[OpenAIResponsesAnnotationTypedDict]] - logprobs: NotRequired[List[LogprobTypedDict]] + logprobs: NotRequired[List[ResponseOutputTextLogprobTypedDict]] class ResponseOutputText(BaseModel): @@ -59,4 +59,4 @@ class ResponseOutputText(BaseModel): annotations: Optional[List[OpenAIResponsesAnnotation]] = None - logprobs: Optional[List[Logprob]] = None + logprobs: Optional[List[ResponseOutputTextLogprob]] = None diff --git a/src/openrouter/components/responsesoutputmessage.py b/src/openrouter/components/responsesoutputmessage.py index 6717a26..5302365 100644 --- a/src/openrouter/components/responsesoutputmessage.py +++ b/src/openrouter/components/responsesoutputmessage.py @@ -6,10 +6,16 @@ from .openairesponsesrefusalcontent import ( OpenAIResponsesRefusalContentTypedDict, ) from .responseoutputtext import ResponseOutputText, ResponseOutputTextTypedDict -from openrouter.types import BaseModel +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from openrouter.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import List, Literal, Optional, Union +from pydantic import Discriminator, Tag, model_serializer +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -63,6 +69,34 @@ ResponsesOutputMessageContent = Annotated[ ] +ResponsesOutputMessagePhaseFinalAnswer = Literal["final_answer",] + + +ResponsesOutputMessagePhaseCommentary = Literal["commentary",] + + +ResponsesOutputMessagePhaseUnionTypedDict = TypeAliasType( + "ResponsesOutputMessagePhaseUnionTypedDict", + Union[ + ResponsesOutputMessagePhaseCommentary, + ResponsesOutputMessagePhaseFinalAnswer, + Any, + ], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + +ResponsesOutputMessagePhaseUnion = TypeAliasType( + "ResponsesOutputMessagePhaseUnion", + Union[ + ResponsesOutputMessagePhaseCommentary, + ResponsesOutputMessagePhaseFinalAnswer, + Any, + ], +) +r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + class ResponsesOutputMessageTypedDict(TypedDict): r"""An output message item""" @@ -71,6 +105,8 @@ class ResponsesOutputMessageTypedDict(TypedDict): type: ResponsesOutputMessageType content: List[ResponsesOutputMessageContentTypedDict] status: NotRequired[ResponsesOutputMessageStatusUnionTypedDict] + phase: NotRequired[Nullable[ResponsesOutputMessagePhaseUnionTypedDict]] + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" class ResponsesOutputMessage(BaseModel): @@ -85,3 +121,36 @@ class ResponsesOutputMessage(BaseModel): content: List[ResponsesOutputMessageContent] status: Optional[ResponsesOutputMessageStatusUnion] = None + + phase: OptionalNullable[ResponsesOutputMessagePhaseUnion] = UNSET + r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["status", "phase"] + nullable_fields = ["phase"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py new file mode 100644 index 0000000..122a041 --- /dev/null +++ b/src/openrouter/components/responsesrequest.py @@ -0,0 +1,857 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .applypatchservertool import ApplyPatchServerTool, ApplyPatchServerToolTypedDict +from .codeinterpreterservertool import ( + CodeInterpreterServerTool, + CodeInterpreterServerToolTypedDict, +) +from .codexlocalshelltool import CodexLocalShellTool, CodexLocalShellToolTypedDict +from .computeruseservertool import ComputerUseServerTool, ComputerUseServerToolTypedDict +from .contextcompressionengine import ContextCompressionEngine +from .customtool import CustomTool, CustomToolTypedDict +from .datacollection import DataCollection +from .datetimeservertool import DatetimeServerTool, DatetimeServerToolTypedDict +from .filesearchservertool import FileSearchServerTool, FileSearchServerToolTypedDict +from .imagegenerationservertool import ( + ImageGenerationServerTool, + ImageGenerationServerToolTypedDict, +) +from .inputs_union import InputsUnion, InputsUnionTypedDict +from .legacy_websearchservertool import ( + LegacyWebSearchServerTool, + LegacyWebSearchServerToolTypedDict, +) +from .mcpservertool import McpServerTool, McpServerToolTypedDict +from .openairesponsestoolchoice_union import ( + OpenAIResponsesToolChoiceUnion, + OpenAIResponsesToolChoiceUnionTypedDict, +) +from .openairesponsestruncation import OpenAIResponsesTruncation +from .outputmodalityenum import OutputModalityEnum +from .pdfparseroptions import PDFParserOptions, PDFParserOptionsTypedDict +from .preferredmaxlatency import PreferredMaxLatency, PreferredMaxLatencyTypedDict +from .preferredminthroughput import ( + PreferredMinThroughput, + PreferredMinThroughputTypedDict, +) +from .preview_20250311_websearchservertool import ( + Preview20250311WebSearchServerTool, + Preview20250311WebSearchServerToolTypedDict, +) +from .preview_websearchservertool import ( + PreviewWebSearchServerTool, + PreviewWebSearchServerToolTypedDict, +) +from .providername import ProviderName +from .providersort import ProviderSort +from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict +from .quantization import Quantization +from .reasoningconfig import ReasoningConfig, ReasoningConfigTypedDict +from .responseincludesenum import ResponseIncludesEnum +from .shellservertool import ShellServerTool, ShellServerToolTypedDict +from .storedprompttemplate import StoredPromptTemplate, StoredPromptTemplateTypedDict +from .textextendedconfig import TextExtendedConfig, TextExtendedConfigTypedDict +from .websearchengine import WebSearchEngine +from .websearchservertool import WebSearchServerTool, WebSearchServerToolTypedDict +from .websearchservertool_openrouter import ( + WebSearchServerToolOpenRouter, + WebSearchServerToolOpenRouterTypedDict, +) +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator, validate_const, validate_open_enum +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic.functional_validators import AfterValidator, PlainValidator +from typing import Any, Dict, List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ResponsesRequestType = Literal["function",] + + +class ResponsesRequestToolFunctionTypedDict(TypedDict): + r"""Function tool definition""" + + type: ResponsesRequestType + name: str + parameters: Nullable[Dict[str, Nullable[Any]]] + description: NotRequired[Nullable[str]] + strict: NotRequired[Nullable[bool]] + + +class ResponsesRequestToolFunction(BaseModel): + r"""Function tool definition""" + + type: ResponsesRequestType + + name: str + + parameters: Nullable[Dict[str, Nullable[Any]]] + + description: OptionalNullable[str] = UNSET + + strict: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["description", "strict"] + nullable_fields = ["description", "strict", "parameters"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ResponsesRequestToolUnionTypedDict = TypeAliasType( + "ResponsesRequestToolUnionTypedDict", + Union[ + CodexLocalShellToolTypedDict, + ApplyPatchServerToolTypedDict, + ShellServerToolTypedDict, + WebSearchServerToolOpenRouterTypedDict, + DatetimeServerToolTypedDict, + CodeInterpreterServerToolTypedDict, + CustomToolTypedDict, + ComputerUseServerToolTypedDict, + ResponsesRequestToolFunctionTypedDict, + FileSearchServerToolTypedDict, + WebSearchServerToolTypedDict, + LegacyWebSearchServerToolTypedDict, + Preview20250311WebSearchServerToolTypedDict, + PreviewWebSearchServerToolTypedDict, + McpServerToolTypedDict, + ImageGenerationServerToolTypedDict, + ], +) + + +ResponsesRequestToolUnion = Annotated[ + Union[ + Annotated[ResponsesRequestToolFunction, Tag("function")], + Annotated[PreviewWebSearchServerTool, Tag("web_search_preview")], + Annotated[ + Preview20250311WebSearchServerTool, Tag("web_search_preview_2025_03_11") + ], + Annotated[LegacyWebSearchServerTool, Tag("web_search")], + Annotated[WebSearchServerTool, Tag("web_search_2025_08_26")], + Annotated[FileSearchServerTool, Tag("file_search")], + Annotated[ComputerUseServerTool, Tag("computer_use_preview")], + Annotated[CodeInterpreterServerTool, Tag("code_interpreter")], + Annotated[McpServerTool, Tag("mcp")], + Annotated[ImageGenerationServerTool, Tag("image_generation")], + Annotated[CodexLocalShellTool, Tag("local_shell")], + Annotated[ShellServerTool, Tag("shell")], + Annotated[ApplyPatchServerTool, Tag("apply_patch")], + Annotated[CustomTool, Tag("custom")], + Annotated[DatetimeServerTool, Tag("openrouter:datetime")], + Annotated[WebSearchServerToolOpenRouter, Tag("openrouter:web_search")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +ResponsesRequestImageConfigTypedDict = TypeAliasType( + "ResponsesRequestImageConfigTypedDict", Union[str, float] +) + + +ResponsesRequestImageConfig = TypeAliasType( + "ResponsesRequestImageConfig", Union[str, float] +) + + +ResponsesRequestServiceTier = Union[ + Literal[ + "auto", + "default", + "flex", + "priority", + "scale", + ], + UnrecognizedStr, +] + + +ResponsesRequestOrderTypedDict = TypeAliasType( + "ResponsesRequestOrderTypedDict", Union[ProviderName, str] +) + + +ResponsesRequestOrder = TypeAliasType( + "ResponsesRequestOrder", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ResponsesRequestOnlyTypedDict = TypeAliasType( + "ResponsesRequestOnlyTypedDict", Union[ProviderName, str] +) + + +ResponsesRequestOnly = TypeAliasType( + "ResponsesRequestOnly", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ResponsesRequestIgnoreTypedDict = TypeAliasType( + "ResponsesRequestIgnoreTypedDict", Union[ProviderName, str] +) + + +ResponsesRequestIgnore = TypeAliasType( + "ResponsesRequestIgnore", + Union[Annotated[ProviderName, PlainValidator(validate_open_enum(False))], str], +) + + +ResponsesRequestSortTypedDict = TypeAliasType( + "ResponsesRequestSortTypedDict", + Union[ProviderSortConfigTypedDict, ProviderSort, Any], +) +r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + + +ResponsesRequestSort = TypeAliasType( + "ResponsesRequestSort", + Union[ + ProviderSortConfig, + Annotated[ProviderSort, PlainValidator(validate_open_enum(False))], + Any, + ], +) +r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + + +class ResponsesRequestMaxPriceTypedDict(TypedDict): + r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" + + prompt: NotRequired[str] + r"""Price per million prompt tokens""" + completion: NotRequired[str] + image: NotRequired[str] + audio: NotRequired[str] + request: NotRequired[str] + + +class ResponsesRequestMaxPrice(BaseModel): + r"""The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.""" + + prompt: Optional[str] = None + r"""Price per million prompt tokens""" + + completion: Optional[str] = None + + image: Optional[str] = None + + audio: Optional[str] = None + + request: Optional[str] = None + + +class ResponsesRequestProviderTypedDict(TypedDict): + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + allow_fallbacks: NotRequired[Nullable[bool]] + r"""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. + + """ + require_parameters: NotRequired[Nullable[bool]] + r"""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.""" + data_collection: NotRequired[Nullable[DataCollection]] + r"""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: NotRequired[Nullable[bool]] + r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" + enforce_distillable_text: NotRequired[Nullable[bool]] + r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" + order: NotRequired[Nullable[List[ResponsesRequestOrderTypedDict]]] + r"""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: NotRequired[Nullable[List[ResponsesRequestOnlyTypedDict]]] + r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" + ignore: NotRequired[Nullable[List[ResponsesRequestIgnoreTypedDict]]] + r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" + quantizations: NotRequired[Nullable[List[Quantization]]] + r"""A list of quantization levels to filter the provider by.""" + sort: NotRequired[Nullable[ResponsesRequestSortTypedDict]] + r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + max_price: NotRequired[ResponsesRequestMaxPriceTypedDict] + r"""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: NotRequired[Nullable[PreferredMinThroughputTypedDict]] + r"""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.""" + preferred_max_latency: NotRequired[Nullable[PreferredMaxLatencyTypedDict]] + r"""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.""" + + +class ResponsesRequestProvider(BaseModel): + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + allow_fallbacks: OptionalNullable[bool] = UNSET + r"""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. + + """ + + require_parameters: OptionalNullable[bool] = UNSET + r"""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.""" + + data_collection: Annotated[ + OptionalNullable[DataCollection], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""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: OptionalNullable[bool] = UNSET + r"""Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.""" + + enforce_distillable_text: OptionalNullable[bool] = UNSET + r"""Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.""" + + order: OptionalNullable[List[ResponsesRequestOrder]] = UNSET + r"""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: OptionalNullable[List[ResponsesRequestOnly]] = UNSET + r"""List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.""" + + ignore: OptionalNullable[List[ResponsesRequestIgnore]] = UNSET + r"""List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.""" + + quantizations: OptionalNullable[ + List[Annotated[Quantization, PlainValidator(validate_open_enum(False))]] + ] = UNSET + r"""A list of quantization levels to filter the provider by.""" + + sort: OptionalNullable[ResponsesRequestSort] = UNSET + r"""The sorting strategy to use for this request, if \"order\" is not specified. When set, no load balancing is performed.""" + + max_price: Optional[ResponsesRequestMaxPrice] = None + r"""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: OptionalNullable[PreferredMinThroughput] = UNSET + r"""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.""" + + preferred_max_latency: OptionalNullable[PreferredMaxLatency] = UNSET + r"""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.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "allow_fallbacks", + "require_parameters", + "data_collection", + "zdr", + "enforce_distillable_text", + "order", + "only", + "ignore", + "quantizations", + "sort", + "max_price", + "preferred_min_throughput", + "preferred_max_latency", + ] + nullable_fields = [ + "allow_fallbacks", + "require_parameters", + "data_collection", + "zdr", + "enforce_distillable_text", + "order", + "only", + "ignore", + "quantizations", + "sort", + "preferred_min_throughput", + "preferred_max_latency", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +ResponsesRequestIDContextCompression = Literal["context-compression",] + + +class ResponsesRequestPluginContextCompressionTypedDict(TypedDict): + id: ResponsesRequestIDContextCompression + enabled: NotRequired[bool] + r"""Set to false to disable the context-compression plugin for this request. Defaults to true.""" + engine: NotRequired[ContextCompressionEngine] + r"""The compression engine to use. Defaults to \"middle-out\".""" + + +class ResponsesRequestPluginContextCompression(BaseModel): + id: ResponsesRequestIDContextCompression + + enabled: Optional[bool] = None + r"""Set to false to disable the context-compression plugin for this request. Defaults to true.""" + + engine: Optional[ContextCompressionEngine] = None + r"""The compression engine to use. Defaults to \"middle-out\".""" + + +ResponsesRequestIDResponseHealing = Literal["response-healing",] + + +class ResponsesRequestPluginResponseHealingTypedDict(TypedDict): + id: ResponsesRequestIDResponseHealing + enabled: NotRequired[bool] + r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" + + +class ResponsesRequestPluginResponseHealing(BaseModel): + id: ResponsesRequestIDResponseHealing + + enabled: Optional[bool] = None + r"""Set to false to disable the response-healing plugin for this request. Defaults to true.""" + + +ResponsesRequestIDFileParser = Literal["file-parser",] + + +class ResponsesRequestPluginFileParserTypedDict(TypedDict): + id: ResponsesRequestIDFileParser + enabled: NotRequired[bool] + r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" + pdf: NotRequired[PDFParserOptionsTypedDict] + r"""Options for PDF parsing.""" + + +class ResponsesRequestPluginFileParser(BaseModel): + id: ResponsesRequestIDFileParser + + enabled: Optional[bool] = None + r"""Set to false to disable the file-parser plugin for this request. Defaults to true.""" + + pdf: Optional[PDFParserOptions] = None + r"""Options for PDF parsing.""" + + +ResponsesRequestIDWeb = Literal["web",] + + +class ResponsesRequestPluginWebTypedDict(TypedDict): + id: ResponsesRequestIDWeb + enabled: NotRequired[bool] + r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" + max_results: NotRequired[float] + search_prompt: NotRequired[str] + engine: NotRequired[WebSearchEngine] + r"""The search engine to use for web search.""" + include_domains: NotRequired[List[str]] + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + exclude_domains: NotRequired[List[str]] + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + +class ResponsesRequestPluginWeb(BaseModel): + id: ResponsesRequestIDWeb + + enabled: Optional[bool] = None + r"""Set to false to disable the web-search plugin for this request. Defaults to true.""" + + max_results: Optional[float] = None + + search_prompt: Optional[str] = None + + engine: Annotated[ + Optional[WebSearchEngine], PlainValidator(validate_open_enum(False)) + ] = None + r"""The search engine to use for web search.""" + + include_domains: Optional[List[str]] = None + r"""A list of domains to restrict web search results to. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + exclude_domains: Optional[List[str]] = None + r"""A list of domains to exclude from web search results. Supports wildcards (e.g. \"*.substack.com\") and path filtering (e.g. \"openai.com/blog\").""" + + +ResponsesRequestIDModeration = Literal["moderation",] + + +class ResponsesRequestPluginModerationTypedDict(TypedDict): + id: ResponsesRequestIDModeration + + +class ResponsesRequestPluginModeration(BaseModel): + id: ResponsesRequestIDModeration + + +ResponsesRequestIDAutoRouter = Literal["auto-router",] + + +class ResponsesRequestPluginAutoRouterTypedDict(TypedDict): + id: ResponsesRequestIDAutoRouter + enabled: NotRequired[bool] + r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + allowed_models: NotRequired[List[str]] + r"""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.""" + + +class ResponsesRequestPluginAutoRouter(BaseModel): + id: ResponsesRequestIDAutoRouter + + enabled: Optional[bool] = None + r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + + allowed_models: Optional[List[str]] = None + r"""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.""" + + +ResponsesRequestPluginUnionTypedDict = TypeAliasType( + "ResponsesRequestPluginUnionTypedDict", + Union[ + ResponsesRequestPluginModerationTypedDict, + ResponsesRequestPluginResponseHealingTypedDict, + ResponsesRequestPluginAutoRouterTypedDict, + ResponsesRequestPluginFileParserTypedDict, + ResponsesRequestPluginContextCompressionTypedDict, + ResponsesRequestPluginWebTypedDict, + ], +) + + +ResponsesRequestPluginUnion = Annotated[ + Union[ + Annotated[ResponsesRequestPluginAutoRouter, Tag("auto-router")], + Annotated[ResponsesRequestPluginModeration, Tag("moderation")], + Annotated[ResponsesRequestPluginWeb, Tag("web")], + Annotated[ResponsesRequestPluginFileParser, Tag("file-parser")], + Annotated[ResponsesRequestPluginResponseHealing, Tag("response-healing")], + Annotated[ResponsesRequestPluginContextCompression, Tag("context-compression")], + ], + Discriminator(lambda m: get_discriminator(m, "id", "id")), +] + + +class ResponsesRequestTraceTypedDict(TypedDict): + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + trace_id: NotRequired[str] + trace_name: NotRequired[str] + span_name: NotRequired[str] + generation_name: NotRequired[str] + parent_span_id: NotRequired[str] + + +class ResponsesRequestTrace(BaseModel): + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + trace_id: Optional[str] = None + + trace_name: Optional[str] = None + + span_name: Optional[str] = None + + generation_name: Optional[str] = None + + parent_span_id: Optional[str] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + +class ResponsesRequestTypedDict(TypedDict): + r"""Request schema for Responses endpoint""" + + input: NotRequired[InputsUnionTypedDict] + r"""Input for a response request - can be a string or array of items""" + instructions: NotRequired[Nullable[str]] + metadata: NotRequired[Nullable[Dict[str, str]]] + r"""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.""" + tools: NotRequired[List[ResponsesRequestToolUnionTypedDict]] + tool_choice: NotRequired[OpenAIResponsesToolChoiceUnionTypedDict] + parallel_tool_calls: NotRequired[Nullable[bool]] + model: NotRequired[str] + models: NotRequired[List[str]] + text: NotRequired[TextExtendedConfigTypedDict] + r"""Text output configuration including format and verbosity""" + reasoning: NotRequired[Nullable[ReasoningConfigTypedDict]] + r"""Configuration for reasoning mode in the response""" + max_output_tokens: NotRequired[Nullable[float]] + temperature: NotRequired[Nullable[float]] + top_p: NotRequired[Nullable[float]] + top_logprobs: NotRequired[Nullable[int]] + max_tool_calls: NotRequired[Nullable[int]] + presence_penalty: NotRequired[Nullable[float]] + frequency_penalty: NotRequired[Nullable[float]] + top_k: NotRequired[float] + image_config: NotRequired[Dict[str, ResponsesRequestImageConfigTypedDict]] + r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.""" + modalities: NotRequired[List[OutputModalityEnum]] + r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" + prompt_cache_key: NotRequired[Nullable[str]] + previous_response_id: NotRequired[Nullable[str]] + prompt: NotRequired[Nullable[StoredPromptTemplateTypedDict]] + include: NotRequired[Nullable[List[ResponseIncludesEnum]]] + background: NotRequired[Nullable[bool]] + safety_identifier: NotRequired[Nullable[str]] + store: Literal[False] + service_tier: NotRequired[Nullable[ResponsesRequestServiceTier]] + truncation: NotRequired[Nullable[OpenAIResponsesTruncation]] + stream: NotRequired[bool] + provider: NotRequired[Nullable[ResponsesRequestProviderTypedDict]] + r"""When multiple model providers are available, optionally indicate your routing preference.""" + plugins: NotRequired[List[ResponsesRequestPluginUnionTypedDict]] + r"""Plugins you want to enable for this request, including their settings.""" + user: NotRequired[str] + r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.""" + session_id: NotRequired[str] + r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.""" + trace: NotRequired[ResponsesRequestTraceTypedDict] + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + +class ResponsesRequest(BaseModel): + r"""Request schema for Responses endpoint""" + + input: Optional[InputsUnion] = None + r"""Input for a response request - can be a string or array of items""" + + instructions: OptionalNullable[str] = UNSET + + metadata: OptionalNullable[Dict[str, str]] = UNSET + r"""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.""" + + tools: Optional[List[ResponsesRequestToolUnion]] = None + + tool_choice: Optional[OpenAIResponsesToolChoiceUnion] = None + + parallel_tool_calls: OptionalNullable[bool] = UNSET + + model: Optional[str] = None + + models: Optional[List[str]] = None + + text: Optional[TextExtendedConfig] = None + r"""Text output configuration including format and verbosity""" + + reasoning: OptionalNullable[ReasoningConfig] = UNSET + r"""Configuration for reasoning mode in the response""" + + max_output_tokens: OptionalNullable[float] = UNSET + + temperature: OptionalNullable[float] = UNSET + + top_p: OptionalNullable[float] = UNSET + + top_logprobs: OptionalNullable[int] = UNSET + + max_tool_calls: OptionalNullable[int] = UNSET + + presence_penalty: OptionalNullable[float] = UNSET + + frequency_penalty: OptionalNullable[float] = UNSET + + top_k: Optional[float] = None + + image_config: Optional[Dict[str, ResponsesRequestImageConfig]] = None + r"""Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.""" + + modalities: Optional[ + List[Annotated[OutputModalityEnum, PlainValidator(validate_open_enum(False))]] + ] = None + r"""Output modalities for the response. Supported values are \"text\" and \"image\".""" + + prompt_cache_key: OptionalNullable[str] = UNSET + + previous_response_id: OptionalNullable[str] = UNSET + + prompt: OptionalNullable[StoredPromptTemplate] = UNSET + + include: OptionalNullable[ + List[Annotated[ResponseIncludesEnum, PlainValidator(validate_open_enum(False))]] + ] = UNSET + + background: OptionalNullable[bool] = UNSET + + safety_identifier: OptionalNullable[str] = UNSET + + STORE: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="store"), + ] = False + + service_tier: Annotated[ + OptionalNullable[ResponsesRequestServiceTier], + PlainValidator(validate_open_enum(False)), + ] = "auto" + + truncation: Annotated[ + OptionalNullable[OpenAIResponsesTruncation], + PlainValidator(validate_open_enum(False)), + ] = UNSET + + stream: Optional[bool] = False + + provider: OptionalNullable[ResponsesRequestProvider] = UNSET + r"""When multiple model providers are available, optionally indicate your routing preference.""" + + plugins: Optional[List[ResponsesRequestPluginUnion]] = None + r"""Plugins you want to enable for this request, including their settings.""" + + user: Optional[str] = None + r"""A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.""" + + session_id: Optional[str] = None + r"""A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.""" + + trace: Optional[ResponsesRequestTrace] = None + r"""Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "input", + "instructions", + "metadata", + "tools", + "tool_choice", + "parallel_tool_calls", + "model", + "models", + "text", + "reasoning", + "max_output_tokens", + "temperature", + "top_p", + "top_logprobs", + "max_tool_calls", + "presence_penalty", + "frequency_penalty", + "top_k", + "image_config", + "modalities", + "prompt_cache_key", + "previous_response_id", + "prompt", + "include", + "background", + "safety_identifier", + "store", + "service_tier", + "truncation", + "stream", + "provider", + "plugins", + "user", + "session_id", + "trace", + ] + nullable_fields = [ + "instructions", + "metadata", + "parallel_tool_calls", + "reasoning", + "max_output_tokens", + "temperature", + "top_p", + "top_logprobs", + "max_tool_calls", + "presence_penalty", + "frequency_penalty", + "prompt_cache_key", + "previous_response_id", + "prompt", + "include", + "background", + "safety_identifier", + "service_tier", + "truncation", + "provider", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/responseswebsearchcalloutput.py b/src/openrouter/components/responseswebsearchcalloutput.py index 98621d6..1998402 100644 --- a/src/openrouter/components/responseswebsearchcalloutput.py +++ b/src/openrouter/components/responseswebsearchcalloutput.py @@ -2,25 +2,146 @@ from __future__ import annotations from .websearchstatus import WebSearchStatus -from openrouter.types import BaseModel -from openrouter.utils import validate_open_enum +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from openrouter.utils import get_discriminator, validate_open_enum +from pydantic import Discriminator, Tag, model_serializer from pydantic.functional_validators import PlainValidator -from typing import Literal -from typing_extensions import Annotated, TypedDict +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -ResponsesWebSearchCallOutputType = Literal["web_search_call",] +TypeWebSearchCall = Literal["web_search_call",] + + +TypeFindInPage = Literal["find_in_page",] + + +class ActionFindInPageTypedDict(TypedDict): + type: TypeFindInPage + pattern: str + url: str + + +class ActionFindInPage(BaseModel): + type: TypeFindInPage + + pattern: str + + url: str + + +TypeOpenPage = Literal["open_page",] + + +class ActionOpenPageTypedDict(TypedDict): + type: TypeOpenPage + url: NotRequired[Nullable[str]] + + +class ActionOpenPage(BaseModel): + type: TypeOpenPage + + url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["url"] + nullable_fields = ["url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +TypeSearch = Literal["search",] + + +TypeURL = Literal["url",] + + +class SourceTypedDict(TypedDict): + type: TypeURL + url: str + + +class Source(BaseModel): + type: TypeURL + + url: str + + +class ActionSearchTypedDict(TypedDict): + type: TypeSearch + query: str + queries: NotRequired[List[str]] + sources: NotRequired[List[SourceTypedDict]] + + +class ActionSearch(BaseModel): + type: TypeSearch + + query: str + + queries: Optional[List[str]] = None + + sources: Optional[List[Source]] = None + + +ActionTypedDict = TypeAliasType( + "ActionTypedDict", + Union[ActionOpenPageTypedDict, ActionFindInPageTypedDict, ActionSearchTypedDict], +) + + +Action = Annotated[ + Union[ + Annotated[ActionSearch, Tag("search")], + Annotated[ActionOpenPage, Tag("open_page")], + Annotated[ActionFindInPage, Tag("find_in_page")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] class ResponsesWebSearchCallOutputTypedDict(TypedDict): - type: ResponsesWebSearchCallOutputType + type: TypeWebSearchCall id: str + action: ActionTypedDict status: WebSearchStatus class ResponsesWebSearchCallOutput(BaseModel): - type: ResponsesWebSearchCallOutputType + type: TypeWebSearchCall id: str + action: Action + status: Annotated[WebSearchStatus, PlainValidator(validate_open_enum(False))] diff --git a/src/openrouter/components/searchcontextsizeenum.py b/src/openrouter/components/searchcontextsizeenum.py new file mode 100644 index 0000000..7faa97b --- /dev/null +++ b/src/openrouter/components/searchcontextsizeenum.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +SearchContextSizeEnum = Union[ + Literal[ + "low", + "medium", + "high", + ], + UnrecognizedStr, +] +r"""Size of the search context for web search tools""" diff --git a/src/openrouter/components/shellservertool.py b/src/openrouter/components/shellservertool.py new file mode 100644 index 0000000..7e26325 --- /dev/null +++ b/src/openrouter/components/shellservertool.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +ShellServerToolType = Literal["shell",] + + +class ShellServerToolTypedDict(TypedDict): + r"""Shell tool configuration""" + + type: ShellServerToolType + + +class ShellServerTool(BaseModel): + r"""Shell tool configuration""" + + type: ShellServerToolType diff --git a/src/openrouter/components/storedprompttemplate.py b/src/openrouter/components/storedprompttemplate.py new file mode 100644 index 0000000..ffb7a43 --- /dev/null +++ b/src/openrouter/components/storedprompttemplate.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputfile import InputFile, InputFileTypedDict +from .inputimage import InputImage, InputImageTypedDict +from .inputtext import InputText, InputTextTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +VariablesTypedDict = TypeAliasType( + "VariablesTypedDict", + Union[InputTextTypedDict, InputImageTypedDict, InputFileTypedDict, str], +) + + +Variables = TypeAliasType("Variables", Union[InputText, InputImage, InputFile, str]) + + +class StoredPromptTemplateTypedDict(TypedDict): + id: str + variables: NotRequired[Nullable[Dict[str, VariablesTypedDict]]] + + +class StoredPromptTemplate(BaseModel): + id: str + + variables: OptionalNullable[Dict[str, Variables]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["variables"] + nullable_fields = ["variables"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/streamevents.py b/src/openrouter/components/streamevents.py new file mode 100644 index 0000000..58d2694 --- /dev/null +++ b/src/openrouter/components/streamevents.py @@ -0,0 +1,346 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .annotationaddedevent import AnnotationAddedEvent, AnnotationAddedEventTypedDict +from .contentpartaddedevent import ContentPartAddedEvent, ContentPartAddedEventTypedDict +from .contentpartdoneevent import ContentPartDoneEvent, ContentPartDoneEventTypedDict +from .errorevent import ErrorEvent, ErrorEventTypedDict +from .functioncallargsdeltaevent import ( + FunctionCallArgsDeltaEvent, + FunctionCallArgsDeltaEventTypedDict, +) +from .functioncallargsdoneevent import ( + FunctionCallArgsDoneEvent, + FunctionCallArgsDoneEventTypedDict, +) +from .imagegencallcompletedevent import ( + ImageGenCallCompletedEvent, + ImageGenCallCompletedEventTypedDict, +) +from .imagegencallgeneratingevent import ( + ImageGenCallGeneratingEvent, + ImageGenCallGeneratingEventTypedDict, +) +from .imagegencallinprogressevent import ( + ImageGenCallInProgressEvent, + ImageGenCallInProgressEventTypedDict, +) +from .imagegencallpartialimageevent import ( + ImageGenCallPartialImageEvent, + ImageGenCallPartialImageEventTypedDict, +) +from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict +from .outputitems import OutputItems, OutputItemsTypedDict +from .reasoningdeltaevent import ReasoningDeltaEvent, ReasoningDeltaEventTypedDict +from .reasoningdoneevent import ReasoningDoneEvent, ReasoningDoneEventTypedDict +from .reasoningsummarypartaddedevent import ( + ReasoningSummaryPartAddedEvent, + ReasoningSummaryPartAddedEventTypedDict, +) +from .reasoningsummarypartdoneevent import ( + ReasoningSummaryPartDoneEvent, + ReasoningSummaryPartDoneEventTypedDict, +) +from .reasoningsummarytextdeltaevent import ( + ReasoningSummaryTextDeltaEvent, + ReasoningSummaryTextDeltaEventTypedDict, +) +from .reasoningsummarytextdoneevent import ( + ReasoningSummaryTextDoneEvent, + ReasoningSummaryTextDoneEventTypedDict, +) +from .refusaldeltaevent import RefusalDeltaEvent, RefusalDeltaEventTypedDict +from .refusaldoneevent import RefusalDoneEvent, RefusalDoneEventTypedDict +from .textdeltaevent import TextDeltaEvent, TextDeltaEventTypedDict +from .textdoneevent import TextDoneEvent, TextDoneEventTypedDict +from .websearchcallcompletedevent import ( + WebSearchCallCompletedEvent, + WebSearchCallCompletedEventTypedDict, +) +from .websearchcallinprogressevent import ( + WebSearchCallInProgressEvent, + WebSearchCallInProgressEventTypedDict, +) +from .websearchcallsearchingevent import ( + WebSearchCallSearchingEvent, + WebSearchCallSearchingEventTypedDict, +) +from openrouter.types import BaseModel +from openrouter.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +TypeResponseOutputItemDone = Literal["response.output_item.done",] + + +class StreamEventsResponseOutputItemDoneTypedDict(TypedDict): + r"""Event emitted when an output item is complete""" + + type: TypeResponseOutputItemDone + output_index: float + item: OutputItemsTypedDict + r"""An output item from the response""" + sequence_number: float + + +class StreamEventsResponseOutputItemDone(BaseModel): + r"""Event emitted when an output item is complete""" + + type: TypeResponseOutputItemDone + + output_index: float + + item: OutputItems + r"""An output item from the response""" + + sequence_number: float + + +TypeResponseOutputItemAdded = Literal["response.output_item.added",] + + +class StreamEventsResponseOutputItemAddedTypedDict(TypedDict): + r"""Event emitted when a new output item is added to the response""" + + type: TypeResponseOutputItemAdded + output_index: float + item: OutputItemsTypedDict + r"""An output item from the response""" + sequence_number: float + + +class StreamEventsResponseOutputItemAdded(BaseModel): + r"""Event emitted when a new output item is added to the response""" + + type: TypeResponseOutputItemAdded + + output_index: float + + item: OutputItems + r"""An output item from the response""" + + sequence_number: float + + +TypeResponseFailed = Literal["response.failed",] + + +class StreamEventsResponseFailedTypedDict(TypedDict): + r"""Event emitted when a response has failed""" + + type: TypeResponseFailed + response: OpenResponsesResultTypedDict + r"""Complete non-streaming response from the Responses API""" + sequence_number: float + + +class StreamEventsResponseFailed(BaseModel): + r"""Event emitted when a response has failed""" + + type: TypeResponseFailed + + response: OpenResponsesResult + r"""Complete non-streaming response from the Responses API""" + + sequence_number: float + + +TypeResponseIncomplete = Literal["response.incomplete",] + + +class StreamEventsResponseIncompleteTypedDict(TypedDict): + r"""Event emitted when a response is incomplete""" + + type: TypeResponseIncomplete + response: OpenResponsesResultTypedDict + r"""Complete non-streaming response from the Responses API""" + sequence_number: float + + +class StreamEventsResponseIncomplete(BaseModel): + r"""Event emitted when a response is incomplete""" + + type: TypeResponseIncomplete + + response: OpenResponsesResult + r"""Complete non-streaming response from the Responses API""" + + sequence_number: float + + +TypeResponseCompleted = Literal["response.completed",] + + +class StreamEventsResponseCompletedTypedDict(TypedDict): + r"""Event emitted when a response has completed successfully""" + + type: TypeResponseCompleted + response: OpenResponsesResultTypedDict + r"""Complete non-streaming response from the Responses API""" + sequence_number: float + + +class StreamEventsResponseCompleted(BaseModel): + r"""Event emitted when a response has completed successfully""" + + type: TypeResponseCompleted + + response: OpenResponsesResult + r"""Complete non-streaming response from the Responses API""" + + sequence_number: float + + +TypeResponseInProgress = Literal["response.in_progress",] + + +class StreamEventsResponseInProgressTypedDict(TypedDict): + r"""Event emitted when a response is in progress""" + + type: TypeResponseInProgress + response: OpenResponsesResultTypedDict + r"""Complete non-streaming response from the Responses API""" + sequence_number: float + + +class StreamEventsResponseInProgress(BaseModel): + r"""Event emitted when a response is in progress""" + + type: TypeResponseInProgress + + response: OpenResponsesResult + r"""Complete non-streaming response from the Responses API""" + + sequence_number: float + + +TypeResponseCreated = Literal["response.created",] + + +class StreamEventsResponseCreatedTypedDict(TypedDict): + r"""Event emitted when a response is created""" + + type: TypeResponseCreated + response: OpenResponsesResultTypedDict + r"""Complete non-streaming response from the Responses API""" + sequence_number: float + + +class StreamEventsResponseCreated(BaseModel): + r"""Event emitted when a response is created""" + + type: TypeResponseCreated + + response: OpenResponsesResult + r"""Complete non-streaming response from the Responses API""" + + sequence_number: float + + +StreamEventsTypedDict = TypeAliasType( + "StreamEventsTypedDict", + Union[ + StreamEventsResponseCreatedTypedDict, + StreamEventsResponseInProgressTypedDict, + StreamEventsResponseCompletedTypedDict, + StreamEventsResponseIncompleteTypedDict, + StreamEventsResponseFailedTypedDict, + StreamEventsResponseOutputItemAddedTypedDict, + StreamEventsResponseOutputItemDoneTypedDict, + WebSearchCallCompletedEventTypedDict, + WebSearchCallSearchingEventTypedDict, + WebSearchCallInProgressEventTypedDict, + ImageGenCallCompletedEventTypedDict, + ImageGenCallGeneratingEventTypedDict, + ImageGenCallInProgressEventTypedDict, + FunctionCallArgsDeltaEventTypedDict, + ErrorEventTypedDict, + ReasoningSummaryTextDeltaEventTypedDict, + ReasoningSummaryTextDoneEventTypedDict, + ReasoningDeltaEventTypedDict, + ReasoningDoneEventTypedDict, + ReasoningSummaryPartAddedEventTypedDict, + ReasoningSummaryPartDoneEventTypedDict, + ContentPartAddedEventTypedDict, + FunctionCallArgsDoneEventTypedDict, + RefusalDoneEventTypedDict, + RefusalDeltaEventTypedDict, + ImageGenCallPartialImageEventTypedDict, + ContentPartDoneEventTypedDict, + TextDeltaEventTypedDict, + TextDoneEventTypedDict, + AnnotationAddedEventTypedDict, + ], +) +r"""Union of all possible event types emitted during response streaming""" + + +StreamEvents = Annotated[ + Union[ + Annotated[StreamEventsResponseCreated, Tag("response.created")], + Annotated[StreamEventsResponseInProgress, Tag("response.in_progress")], + Annotated[StreamEventsResponseCompleted, Tag("response.completed")], + Annotated[StreamEventsResponseIncomplete, Tag("response.incomplete")], + Annotated[StreamEventsResponseFailed, Tag("response.failed")], + Annotated[ErrorEvent, Tag("error")], + Annotated[ + StreamEventsResponseOutputItemAdded, Tag("response.output_item.added") + ], + Annotated[StreamEventsResponseOutputItemDone, Tag("response.output_item.done")], + Annotated[ContentPartAddedEvent, Tag("response.content_part.added")], + Annotated[ContentPartDoneEvent, Tag("response.content_part.done")], + Annotated[TextDeltaEvent, Tag("response.output_text.delta")], + Annotated[TextDoneEvent, Tag("response.output_text.done")], + Annotated[RefusalDeltaEvent, Tag("response.refusal.delta")], + Annotated[RefusalDoneEvent, Tag("response.refusal.done")], + Annotated[AnnotationAddedEvent, Tag("response.output_text.annotation.added")], + Annotated[ + FunctionCallArgsDeltaEvent, Tag("response.function_call_arguments.delta") + ], + Annotated[ + FunctionCallArgsDoneEvent, Tag("response.function_call_arguments.done") + ], + Annotated[ReasoningDeltaEvent, Tag("response.reasoning_text.delta")], + Annotated[ReasoningDoneEvent, Tag("response.reasoning_text.done")], + Annotated[ + ReasoningSummaryPartAddedEvent, Tag("response.reasoning_summary_part.added") + ], + Annotated[ + ReasoningSummaryPartDoneEvent, Tag("response.reasoning_summary_part.done") + ], + Annotated[ + ReasoningSummaryTextDeltaEvent, Tag("response.reasoning_summary_text.delta") + ], + Annotated[ + ReasoningSummaryTextDoneEvent, Tag("response.reasoning_summary_text.done") + ], + Annotated[ + ImageGenCallInProgressEvent, + Tag("response.image_generation_call.in_progress"), + ], + Annotated[ + ImageGenCallGeneratingEvent, + Tag("response.image_generation_call.generating"), + ], + Annotated[ + ImageGenCallPartialImageEvent, + Tag("response.image_generation_call.partial_image"), + ], + Annotated[ + ImageGenCallCompletedEvent, Tag("response.image_generation_call.completed") + ], + Annotated[ + WebSearchCallInProgressEvent, Tag("response.web_search_call.in_progress") + ], + Annotated[ + WebSearchCallSearchingEvent, Tag("response.web_search_call.searching") + ], + Annotated[ + WebSearchCallCompletedEvent, Tag("response.web_search_call.completed") + ], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""Union of all possible event types emitted during response streaming""" diff --git a/src/openrouter/components/textconfig.py b/src/openrouter/components/textconfig.py new file mode 100644 index 0000000..cf8fa53 --- /dev/null +++ b/src/openrouter/components/textconfig.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .formats import Formats, FormatsTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +TextConfigVerbosity = Union[ + Literal[ + "high", + "low", + "medium", + ], + UnrecognizedStr, +] + + +class TextConfigTypedDict(TypedDict): + r"""Text output configuration including format and verbosity""" + + format_: NotRequired[FormatsTypedDict] + r"""Text response format configuration""" + verbosity: NotRequired[Nullable[TextConfigVerbosity]] + + +class TextConfig(BaseModel): + r"""Text output configuration including format and verbosity""" + + format_: Annotated[Optional[Formats], pydantic.Field(alias="format")] = None + r"""Text response format configuration""" + + verbosity: Annotated[ + OptionalNullable[TextConfigVerbosity], PlainValidator(validate_open_enum(False)) + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["format", "verbosity"] + nullable_fields = ["verbosity"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/textdeltaevent.py b/src/openrouter/components/textdeltaevent.py new file mode 100644 index 0000000..c42bdbc --- /dev/null +++ b/src/openrouter/components/textdeltaevent.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +import pydantic +from typing import List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +TextDeltaEventType = Literal["response.output_text.delta",] + + +class TextDeltaEventTopLogprobTypedDict(TypedDict): + r"""Alternative token with its log probability""" + + token: NotRequired[str] + logprob: NotRequired[float] + bytes_: NotRequired[List[float]] + + +class TextDeltaEventTopLogprob(BaseModel): + r"""Alternative token with its log probability""" + + token: Optional[str] = None + + logprob: Optional[float] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class TextDeltaEventLogprobTypedDict(TypedDict): + r"""Log probability information for a token""" + + logprob: float + token: str + top_logprobs: NotRequired[List[TextDeltaEventTopLogprobTypedDict]] + bytes_: NotRequired[List[float]] + + +class TextDeltaEventLogprob(BaseModel): + r"""Log probability information for a token""" + + logprob: float + + token: str + + top_logprobs: Optional[List[TextDeltaEventTopLogprob]] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class TextDeltaEventTypedDict(TypedDict): + r"""Event emitted when a text delta is streamed""" + + type: TextDeltaEventType + logprobs: List[TextDeltaEventLogprobTypedDict] + output_index: float + item_id: str + content_index: float + delta: str + sequence_number: float + + +class TextDeltaEvent(BaseModel): + r"""Event emitted when a text delta is streamed""" + + type: TextDeltaEventType + + logprobs: List[TextDeltaEventLogprob] + + output_index: float + + item_id: str + + content_index: float + + delta: str + + sequence_number: float diff --git a/src/openrouter/components/textdoneevent.py b/src/openrouter/components/textdoneevent.py new file mode 100644 index 0000000..a21655a --- /dev/null +++ b/src/openrouter/components/textdoneevent.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +import pydantic +from typing import List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +TextDoneEventType = Literal["response.output_text.done",] + + +class TextDoneEventTopLogprobTypedDict(TypedDict): + r"""Alternative token with its log probability""" + + token: NotRequired[str] + logprob: NotRequired[float] + bytes_: NotRequired[List[float]] + + +class TextDoneEventTopLogprob(BaseModel): + r"""Alternative token with its log probability""" + + token: Optional[str] = None + + logprob: Optional[float] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class TextDoneEventLogprobTypedDict(TypedDict): + r"""Log probability information for a token""" + + logprob: float + token: str + top_logprobs: NotRequired[List[TextDoneEventTopLogprobTypedDict]] + bytes_: NotRequired[List[float]] + + +class TextDoneEventLogprob(BaseModel): + r"""Log probability information for a token""" + + logprob: float + + token: str + + top_logprobs: Optional[List[TextDoneEventTopLogprob]] = None + + bytes_: Annotated[Optional[List[float]], pydantic.Field(alias="bytes")] = None + + +class TextDoneEventTypedDict(TypedDict): + r"""Event emitted when text streaming is complete""" + + type: TextDoneEventType + output_index: float + item_id: str + content_index: float + text: str + sequence_number: float + logprobs: List[TextDoneEventLogprobTypedDict] + + +class TextDoneEvent(BaseModel): + r"""Event emitted when text streaming is complete""" + + type: TextDoneEventType + + output_index: float + + item_id: str + + content_index: float + + text: str + + sequence_number: float + + logprobs: List[TextDoneEventLogprob] diff --git a/src/openrouter/components/textextendedconfig.py b/src/openrouter/components/textextendedconfig.py new file mode 100644 index 0000000..ee561b1 --- /dev/null +++ b/src/openrouter/components/textextendedconfig.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .formats import Formats, FormatsTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +TextExtendedConfigVerbosity = Union[ + Literal[ + "high", + "low", + "medium", + ], + UnrecognizedStr, +] + + +class TextExtendedConfigTypedDict(TypedDict): + r"""Text output configuration including format and verbosity""" + + format_: NotRequired[FormatsTypedDict] + r"""Text response format configuration""" + verbosity: NotRequired[Nullable[TextExtendedConfigVerbosity]] + + +class TextExtendedConfig(BaseModel): + r"""Text output configuration including format and verbosity""" + + format_: Annotated[Optional[Formats], pydantic.Field(alias="format")] = None + r"""Text response format configuration""" + + verbosity: Annotated[ + OptionalNullable[TextExtendedConfigVerbosity], + PlainValidator(validate_open_enum(False)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["format", "verbosity"] + nullable_fields = ["verbosity"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/toolcallstatusenum.py b/src/openrouter/components/toolcallstatusenum.py new file mode 100644 index 0000000..feeccd7 --- /dev/null +++ b/src/openrouter/components/toolcallstatusenum.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +ToolCallStatusEnum = Union[ + Literal[ + "in_progress", + "completed", + "incomplete", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/truncationenum.py b/src/openrouter/components/truncationenum.py new file mode 100644 index 0000000..d848ca9 --- /dev/null +++ b/src/openrouter/components/truncationenum.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import UnrecognizedStr +from typing import Literal, Union + + +TruncationEnum = Union[ + Literal[ + "auto", + "disabled", + ], + UnrecognizedStr, +] diff --git a/src/openrouter/components/usage.py b/src/openrouter/components/usage.py new file mode 100644 index 0000000..37e41bf --- /dev/null +++ b/src/openrouter/components/usage.py @@ -0,0 +1,140 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class InputTokensDetailsTypedDict(TypedDict): + cached_tokens: float + + +class InputTokensDetails(BaseModel): + cached_tokens: float + + +class OutputTokensDetailsTypedDict(TypedDict): + reasoning_tokens: float + + +class OutputTokensDetails(BaseModel): + reasoning_tokens: float + + +class CostDetailsTypedDict(TypedDict): + upstream_inference_input_cost: float + upstream_inference_output_cost: float + upstream_inference_cost: NotRequired[Nullable[float]] + + +class CostDetails(BaseModel): + upstream_inference_input_cost: float + + upstream_inference_output_cost: float + + upstream_inference_cost: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["upstream_inference_cost"] + nullable_fields = ["upstream_inference_cost"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class UsageTypedDict(TypedDict): + r"""Token usage information for the response""" + + input_tokens: float + input_tokens_details: InputTokensDetailsTypedDict + output_tokens: float + output_tokens_details: OutputTokensDetailsTypedDict + total_tokens: float + cost: NotRequired[Nullable[float]] + r"""Cost of the completion""" + is_byok: NotRequired[bool] + r"""Whether a request was made using a Bring Your Own Key configuration""" + cost_details: NotRequired[CostDetailsTypedDict] + + +class Usage(BaseModel): + r"""Token usage information for the response""" + + input_tokens: float + + input_tokens_details: InputTokensDetails + + output_tokens: float + + output_tokens_details: OutputTokensDetails + + total_tokens: float + + cost: OptionalNullable[float] = UNSET + r"""Cost of the completion""" + + is_byok: Optional[bool] = None + r"""Whether a request was made using a Bring Your Own Key configuration""" + + cost_details: Optional[CostDetails] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["cost", "is_byok", "cost_details"] + nullable_fields = ["cost"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/websearchcallcompletedevent.py b/src/openrouter/components/websearchcallcompletedevent.py new file mode 100644 index 0000000..3e4c846 --- /dev/null +++ b/src/openrouter/components/websearchcallcompletedevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +WebSearchCallCompletedEventType = Literal["response.web_search_call.completed",] + + +class WebSearchCallCompletedEventTypedDict(TypedDict): + r"""Web search call completed""" + + type: WebSearchCallCompletedEventType + item_id: str + output_index: float + sequence_number: float + + +class WebSearchCallCompletedEvent(BaseModel): + r"""Web search call completed""" + + type: WebSearchCallCompletedEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/websearchcallinprogressevent.py b/src/openrouter/components/websearchcallinprogressevent.py new file mode 100644 index 0000000..1bd1ad0 --- /dev/null +++ b/src/openrouter/components/websearchcallinprogressevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +WebSearchCallInProgressEventType = Literal["response.web_search_call.in_progress",] + + +class WebSearchCallInProgressEventTypedDict(TypedDict): + r"""Web search call in progress""" + + type: WebSearchCallInProgressEventType + item_id: str + output_index: float + sequence_number: float + + +class WebSearchCallInProgressEvent(BaseModel): + r"""Web search call in progress""" + + type: WebSearchCallInProgressEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/websearchcallsearchingevent.py b/src/openrouter/components/websearchcallsearchingevent.py new file mode 100644 index 0000000..3d93cbc --- /dev/null +++ b/src/openrouter/components/websearchcallsearchingevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal +from typing_extensions import TypedDict + + +WebSearchCallSearchingEventType = Literal["response.web_search_call.searching",] + + +class WebSearchCallSearchingEventTypedDict(TypedDict): + r"""Web search call is searching""" + + type: WebSearchCallSearchingEventType + item_id: str + output_index: float + sequence_number: float + + +class WebSearchCallSearchingEvent(BaseModel): + r"""Web search call is searching""" + + type: WebSearchCallSearchingEventType + + item_id: str + + output_index: float + + sequence_number: float diff --git a/src/openrouter/components/websearchengine.py b/src/openrouter/components/websearchengine.py index 40dafa8..992db72 100644 --- a/src/openrouter/components/websearchengine.py +++ b/src/openrouter/components/websearchengine.py @@ -9,6 +9,8 @@ WebSearchEngine = Union[ Literal[ "native", "exa", + "firecrawl", + "parallel", ], UnrecognizedStr, ] diff --git a/src/openrouter/components/websearchservertool.py b/src/openrouter/components/websearchservertool.py new file mode 100644 index 0000000..c59e38c --- /dev/null +++ b/src/openrouter/components/websearchservertool.py @@ -0,0 +1,150 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .searchcontextsizeenum import SearchContextSizeEnum +from .websearchuserlocation import WebSearchUserLocation, WebSearchUserLocationTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import validate_open_enum +from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +WebSearchServerToolType = Literal["web_search_2025_08_26",] + + +class WebSearchServerToolFiltersTypedDict(TypedDict): + allowed_domains: NotRequired[Nullable[List[str]]] + excluded_domains: NotRequired[Nullable[List[str]]] + + +class WebSearchServerToolFilters(BaseModel): + allowed_domains: OptionalNullable[List[str]] = UNSET + + excluded_domains: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["allowed_domains", "excluded_domains"] + nullable_fields = ["allowed_domains", "excluded_domains"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +WebSearchServerToolEngine = Union[ + Literal[ + "auto", + "native", + "exa", + "firecrawl", + "parallel", + ], + UnrecognizedStr, +] +r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + +class WebSearchServerToolTypedDict(TypedDict): + r"""Web search tool configuration (2025-08-26 version)""" + + type: WebSearchServerToolType + filters: NotRequired[Nullable[WebSearchServerToolFiltersTypedDict]] + search_context_size: NotRequired[SearchContextSizeEnum] + r"""Size of the search context for web search tools""" + user_location: NotRequired[Nullable[WebSearchUserLocationTypedDict]] + r"""User location information for web search""" + engine: NotRequired[WebSearchServerToolEngine] + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + +class WebSearchServerTool(BaseModel): + r"""Web search tool configuration (2025-08-26 version)""" + + type: WebSearchServerToolType + + filters: OptionalNullable[WebSearchServerToolFilters] = UNSET + + search_context_size: Annotated[ + Optional[SearchContextSizeEnum], PlainValidator(validate_open_enum(False)) + ] = None + r"""Size of the search context for web search tools""" + + user_location: OptionalNullable[WebSearchUserLocation] = UNSET + r"""User location information for web search""" + + engine: Annotated[ + Optional[WebSearchServerToolEngine], PlainValidator(validate_open_enum(False)) + ] = None + r"""Which search engine to use. \"auto\" (default) uses native if the provider supports it, otherwise Exa. \"native\" forces the provider's built-in search. \"exa\" forces the Exa search API. \"firecrawl\" uses Firecrawl (requires BYOK). \"parallel\" uses the Parallel search API.""" + + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "filters", + "search_context_size", + "user_location", + "engine", + "max_results", + ] + nullable_fields = ["filters", "user_location"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/components/websearchservertool_openrouter.py b/src/openrouter/components/websearchservertool_openrouter.py new file mode 100644 index 0000000..b624ce7 --- /dev/null +++ b/src/openrouter/components/websearchservertool_openrouter.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import BaseModel +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +WebSearchServerToolOpenRouterType = Literal["openrouter:web_search",] + + +class WebSearchServerToolOpenRouterParametersTypedDict(TypedDict): + max_results: NotRequired[float] + r"""Maximum number of search results to return per search call. Defaults to 5.""" + max_total_results: NotRequired[float] + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results.""" + + +class WebSearchServerToolOpenRouterParameters(BaseModel): + max_results: Optional[float] = None + r"""Maximum number of search results to return per search call. Defaults to 5.""" + + max_total_results: Optional[float] = None + r"""Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results.""" + + +class WebSearchServerToolOpenRouterTypedDict(TypedDict): + r"""OpenRouter built-in server tool: searches the web for current information""" + + type: WebSearchServerToolOpenRouterType + parameters: NotRequired[WebSearchServerToolOpenRouterParametersTypedDict] + + +class WebSearchServerToolOpenRouter(BaseModel): + r"""OpenRouter built-in server tool: searches the web for current information""" + + type: WebSearchServerToolOpenRouterType + + parameters: Optional[WebSearchServerToolOpenRouterParameters] = None diff --git a/src/openrouter/components/websearchuserlocation.py b/src/openrouter/components/websearchuserlocation.py new file mode 100644 index 0000000..4ffc90b --- /dev/null +++ b/src/openrouter/components/websearchuserlocation.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +WebSearchUserLocationType = Literal["approximate",] + + +class WebSearchUserLocationTypedDict(TypedDict): + r"""User location information for web search""" + + type: NotRequired[WebSearchUserLocationType] + city: NotRequired[Nullable[str]] + country: NotRequired[Nullable[str]] + region: NotRequired[Nullable[str]] + timezone: NotRequired[Nullable[str]] + + +class WebSearchUserLocation(BaseModel): + r"""User location information for web search""" + + type: Optional[WebSearchUserLocationType] = None + + city: OptionalNullable[str] = UNSET + + country: OptionalNullable[str] = UNSET + + region: OptionalNullable[str] = UNSET + + timezone: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["type", "city", "country", "region", "timezone"] + nullable_fields = ["city", "country", "region", "timezone"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/openrouter/credits.py b/src/openrouter/credits.py index 9ad87fd..43b95ff 100644 --- a/src/openrouter/credits.py +++ b/src/openrouter/credits.py @@ -16,7 +16,8 @@ class Credits(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -29,7 +30,9 @@ class Credits(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -48,7 +51,8 @@ class Credits(BaseSDK): request = operations.GetCreditsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -65,7 +69,8 @@ class Credits(BaseSDK): http_headers=http_headers, _globals=operations.GetCreditsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -130,7 +135,8 @@ class Credits(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -143,7 +149,9 @@ class Credits(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -162,7 +170,8 @@ class Credits(BaseSDK): request = operations.GetCreditsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -179,7 +188,8 @@ class Credits(BaseSDK): http_headers=http_headers, _globals=operations.GetCreditsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -251,7 +261,8 @@ class Credits(BaseSDK): sender: str, chain_id: components.ChainID, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -268,7 +279,9 @@ class Credits(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -287,7 +300,8 @@ class Credits(BaseSDK): request = operations.CreateCoinbaseChargeRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, create_charge_request=components.CreateChargeRequest( amount=amount, sender=sender, @@ -309,7 +323,8 @@ class Credits(BaseSDK): http_headers=http_headers, _globals=operations.CreateCoinbaseChargeGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=utils.get_pydantic_model( security, operations.CreateCoinbaseChargeSecurity @@ -395,7 +410,8 @@ class Credits(BaseSDK): sender: str, chain_id: components.ChainID, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -412,7 +428,9 @@ class Credits(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -431,7 +449,8 @@ class Credits(BaseSDK): request = operations.CreateCoinbaseChargeRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, create_charge_request=components.CreateChargeRequest( amount=amount, sender=sender, @@ -453,7 +472,8 @@ class Credits(BaseSDK): http_headers=http_headers, _globals=operations.CreateCoinbaseChargeGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=utils.get_pydantic_model( security, operations.CreateCoinbaseChargeSecurity diff --git a/src/openrouter/embeddings.py b/src/openrouter/embeddings.py index 9a32c49..0709e41 100644 --- a/src/openrouter/embeddings.py +++ b/src/openrouter/embeddings.py @@ -24,7 +24,8 @@ class Embeddings(BaseSDK): input: Union[operations.InputUnion, operations.InputUnionTypedDict], model: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, encoding_format: Optional[operations.EncodingFormat] = None, dimensions: Optional[int] = None, user: Optional[str] = None, @@ -49,7 +50,9 @@ class Embeddings(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param encoding_format: :param dimensions: @@ -74,7 +77,8 @@ class Embeddings(BaseSDK): request = operations.CreateEmbeddingsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateEmbeddingsRequestBody( input=utils.get_pydantic_model(input, operations.InputUnion), model=model, @@ -104,7 +108,8 @@ class Embeddings(BaseSDK): http_headers=http_headers, _globals=operations.CreateEmbeddingsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -230,7 +235,8 @@ class Embeddings(BaseSDK): input: Union[operations.InputUnion, operations.InputUnionTypedDict], model: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, encoding_format: Optional[operations.EncodingFormat] = None, dimensions: Optional[int] = None, user: Optional[str] = None, @@ -255,7 +261,9 @@ class Embeddings(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param encoding_format: :param dimensions: @@ -280,7 +288,8 @@ class Embeddings(BaseSDK): request = operations.CreateEmbeddingsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateEmbeddingsRequestBody( input=utils.get_pydantic_model(input, operations.InputUnion), model=model, @@ -310,7 +319,8 @@ class Embeddings(BaseSDK): http_headers=http_headers, _globals=operations.CreateEmbeddingsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -434,7 +444,8 @@ class Embeddings(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -447,7 +458,9 @@ class Embeddings(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -466,7 +479,8 @@ class Embeddings(BaseSDK): request = operations.ListEmbeddingsModelsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -483,7 +497,8 @@ class Embeddings(BaseSDK): http_headers=http_headers, _globals=operations.ListEmbeddingsModelsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -543,7 +558,8 @@ class Embeddings(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -556,7 +572,9 @@ class Embeddings(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -575,7 +593,8 @@ class Embeddings(BaseSDK): request = operations.ListEmbeddingsModelsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -592,7 +611,8 @@ class Embeddings(BaseSDK): http_headers=http_headers, _globals=operations.ListEmbeddingsModelsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/endpoints.py b/src/openrouter/endpoints.py index 0d37b12..09823d3 100644 --- a/src/openrouter/endpoints.py +++ b/src/openrouter/endpoints.py @@ -18,7 +18,8 @@ class Endpoints(BaseSDK): author: str, slug: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -31,7 +32,9 @@ class Endpoints(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -50,7 +53,8 @@ class Endpoints(BaseSDK): request = operations.ListEndpointsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, author=author, slug=slug, ) @@ -69,7 +73,8 @@ class Endpoints(BaseSDK): http_headers=http_headers, _globals=operations.ListEndpointsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -131,7 +136,8 @@ class Endpoints(BaseSDK): author: str, slug: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -144,7 +150,9 @@ class Endpoints(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -163,7 +171,8 @@ class Endpoints(BaseSDK): request = operations.ListEndpointsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, author=author, slug=slug, ) @@ -182,7 +191,8 @@ class Endpoints(BaseSDK): http_headers=http_headers, _globals=operations.ListEndpointsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -242,7 +252,8 @@ class Endpoints(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -253,7 +264,9 @@ class Endpoints(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -272,7 +285,8 @@ class Endpoints(BaseSDK): request = operations.ListEndpointsZdrRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -289,7 +303,8 @@ class Endpoints(BaseSDK): http_headers=http_headers, _globals=operations.ListEndpointsZdrGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -346,7 +361,8 @@ class Endpoints(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -357,7 +373,9 @@ class Endpoints(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -376,7 +394,8 @@ class Endpoints(BaseSDK): request = operations.ListEndpointsZdrRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -393,7 +412,8 @@ class Endpoints(BaseSDK): http_headers=http_headers, _globals=operations.ListEndpointsZdrGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/errors/__init__.py b/src/openrouter/errors/__init__.py index 2c9e7bb..dc5ef68 100644 --- a/src/openrouter/errors/__init__.py +++ b/src/openrouter/errors/__init__.py @@ -15,6 +15,7 @@ if TYPE_CHECKING: BadRequestResponseError, BadRequestResponseErrorData, ) + from .conflictresponse_error import ConflictResponseError, ConflictResponseErrorData from .edgenetworktimeoutresponse_error import ( EdgeNetworkTimeoutResponseError, EdgeNetworkTimeoutResponseErrorData, @@ -69,6 +70,8 @@ __all__ = [ "BadGatewayResponseErrorData", "BadRequestResponseError", "BadRequestResponseErrorData", + "ConflictResponseError", + "ConflictResponseErrorData", "EdgeNetworkTimeoutResponseError", "EdgeNetworkTimeoutResponseErrorData", "ForbiddenResponseError", @@ -104,6 +107,8 @@ _dynamic_imports: dict[str, str] = { "BadGatewayResponseErrorData": ".badgatewayresponse_error", "BadRequestResponseError": ".badrequestresponse_error", "BadRequestResponseErrorData": ".badrequestresponse_error", + "ConflictResponseError": ".conflictresponse_error", + "ConflictResponseErrorData": ".conflictresponse_error", "EdgeNetworkTimeoutResponseError": ".edgenetworktimeoutresponse_error", "EdgeNetworkTimeoutResponseErrorData": ".edgenetworktimeoutresponse_error", "ForbiddenResponseError": ".forbiddenresponse_error", diff --git a/src/openrouter/errors/badgatewayresponse_error.py b/src/openrouter/errors/badgatewayresponse_error.py index 9275737..b2138fd 100644 --- a/src/openrouter/errors/badgatewayresponse_error.py +++ b/src/openrouter/errors/badgatewayresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class BadGatewayResponseErrorData(BaseModel): error: components_badgatewayresponseerrordata.BadGatewayResponseErrorData r"""Error data for BadGatewayResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/badrequestresponse_error.py b/src/openrouter/errors/badrequestresponse_error.py index 085e9d4..eb34f26 100644 --- a/src/openrouter/errors/badrequestresponse_error.py +++ b/src/openrouter/errors/badrequestresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class BadRequestResponseErrorData(BaseModel): error: components_badrequestresponseerrordata.BadRequestResponseErrorData r"""Error data for BadRequestResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/conflictresponse_error.py b/src/openrouter/errors/conflictresponse_error.py new file mode 100644 index 0000000..4c23784 --- /dev/null +++ b/src/openrouter/errors/conflictresponse_error.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dataclasses import dataclass, field +import httpx +from openrouter.components import ( + conflictresponseerrordata as components_conflictresponseerrordata, +) +from openrouter.errors import OpenRouterError +from openrouter.types import BaseModel, OptionalNullable, UNSET +from typing import Optional + + +class ConflictResponseErrorData(BaseModel): + error: components_conflictresponseerrordata.ConflictResponseErrorData + r"""Error data for ConflictResponse""" + user_id: OptionalNullable[str] = UNSET + + +@dataclass(unsafe_hash=True) +class ConflictResponseError(OpenRouterError): + r"""Conflict - Resource conflict or concurrent modification""" + + data: ConflictResponseErrorData = field(hash=False) + + def __init__( + self, + data: ConflictResponseErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + fallback = body or raw_response.text + message = str(data.error.message) or fallback + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/src/openrouter/errors/edgenetworktimeoutresponse_error.py b/src/openrouter/errors/edgenetworktimeoutresponse_error.py index 276eb1d..c2881a5 100644 --- a/src/openrouter/errors/edgenetworktimeoutresponse_error.py +++ b/src/openrouter/errors/edgenetworktimeoutresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class EdgeNetworkTimeoutResponseErrorData(BaseModel): error: components_edgenetworktimeoutresponseerrordata.EdgeNetworkTimeoutResponseErrorData r"""Error data for EdgeNetworkTimeoutResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/forbiddenresponse_error.py b/src/openrouter/errors/forbiddenresponse_error.py index 5ca9c5a..f9fd3e5 100644 --- a/src/openrouter/errors/forbiddenresponse_error.py +++ b/src/openrouter/errors/forbiddenresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class ForbiddenResponseErrorData(BaseModel): error: components_forbiddenresponseerrordata.ForbiddenResponseErrorData r"""Error data for ForbiddenResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/internalserverresponse_error.py b/src/openrouter/errors/internalserverresponse_error.py index 0fd627a..2d8be82 100644 --- a/src/openrouter/errors/internalserverresponse_error.py +++ b/src/openrouter/errors/internalserverresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class InternalServerResponseErrorData(BaseModel): error: components_internalserverresponseerrordata.InternalServerResponseErrorData r"""Error data for InternalServerResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/notfoundresponse_error.py b/src/openrouter/errors/notfoundresponse_error.py index 0bf88e1..99c3f9f 100644 --- a/src/openrouter/errors/notfoundresponse_error.py +++ b/src/openrouter/errors/notfoundresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class NotFoundResponseErrorData(BaseModel): error: components_notfoundresponseerrordata.NotFoundResponseErrorData r"""Error data for NotFoundResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/payloadtoolargeresponse_error.py b/src/openrouter/errors/payloadtoolargeresponse_error.py index 1adc6b0..8b9daa2 100644 --- a/src/openrouter/errors/payloadtoolargeresponse_error.py +++ b/src/openrouter/errors/payloadtoolargeresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class PayloadTooLargeResponseErrorData(BaseModel): error: components_payloadtoolargeresponseerrordata.PayloadTooLargeResponseErrorData r"""Error data for PayloadTooLargeResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/paymentrequiredresponse_error.py b/src/openrouter/errors/paymentrequiredresponse_error.py index 25a6c0d..fe3b3c2 100644 --- a/src/openrouter/errors/paymentrequiredresponse_error.py +++ b/src/openrouter/errors/paymentrequiredresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class PaymentRequiredResponseErrorData(BaseModel): error: components_paymentrequiredresponseerrordata.PaymentRequiredResponseErrorData r"""Error data for PaymentRequiredResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/provideroverloadedresponse_error.py b/src/openrouter/errors/provideroverloadedresponse_error.py index 7c9a231..bdb7061 100644 --- a/src/openrouter/errors/provideroverloadedresponse_error.py +++ b/src/openrouter/errors/provideroverloadedresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class ProviderOverloadedResponseErrorData(BaseModel): error: components_provideroverloadedresponseerrordata.ProviderOverloadedResponseErrorData r"""Error data for ProviderOverloadedResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/requesttimeoutresponse_error.py b/src/openrouter/errors/requesttimeoutresponse_error.py index 1aeceb8..4937892 100644 --- a/src/openrouter/errors/requesttimeoutresponse_error.py +++ b/src/openrouter/errors/requesttimeoutresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class RequestTimeoutResponseErrorData(BaseModel): error: components_requesttimeoutresponseerrordata.RequestTimeoutResponseErrorData r"""Error data for RequestTimeoutResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/serviceunavailableresponse_error.py b/src/openrouter/errors/serviceunavailableresponse_error.py index 665f9c4..b94cfc2 100644 --- a/src/openrouter/errors/serviceunavailableresponse_error.py +++ b/src/openrouter/errors/serviceunavailableresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class ServiceUnavailableResponseErrorData(BaseModel): error: components_serviceunavailableresponseerrordata.ServiceUnavailableResponseErrorData r"""Error data for ServiceUnavailableResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/toomanyrequestsresponse_error.py b/src/openrouter/errors/toomanyrequestsresponse_error.py index 294f591..bdf7914 100644 --- a/src/openrouter/errors/toomanyrequestsresponse_error.py +++ b/src/openrouter/errors/toomanyrequestsresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class TooManyRequestsResponseErrorData(BaseModel): error: components_toomanyrequestsresponseerrordata.TooManyRequestsResponseErrorData r"""Error data for TooManyRequestsResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/unauthorizedresponse_error.py b/src/openrouter/errors/unauthorizedresponse_error.py index 6b30617..7f9c5a6 100644 --- a/src/openrouter/errors/unauthorizedresponse_error.py +++ b/src/openrouter/errors/unauthorizedresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class UnauthorizedResponseErrorData(BaseModel): error: components_unauthorizedresponseerrordata.UnauthorizedResponseErrorData r"""Error data for UnauthorizedResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/errors/unprocessableentityresponse_error.py b/src/openrouter/errors/unprocessableentityresponse_error.py index a700217..7304f75 100644 --- a/src/openrouter/errors/unprocessableentityresponse_error.py +++ b/src/openrouter/errors/unprocessableentityresponse_error.py @@ -14,7 +14,6 @@ from typing import Optional class UnprocessableEntityResponseErrorData(BaseModel): error: components_unprocessableentityresponseerrordata.UnprocessableEntityResponseErrorData r"""Error data for UnprocessableEntityResponse""" - user_id: OptionalNullable[str] = UNSET diff --git a/src/openrouter/generations.py b/src/openrouter/generations.py index 7a3a199..ccf3642 100644 --- a/src/openrouter/generations.py +++ b/src/openrouter/generations.py @@ -17,7 +17,8 @@ class Generations(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -29,7 +30,9 @@ class Generations(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -48,7 +51,8 @@ class Generations(BaseSDK): request = operations.GetGenerationRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -66,7 +70,8 @@ class Generations(BaseSDK): http_headers=http_headers, _globals=operations.GetGenerationGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -168,7 +173,8 @@ class Generations(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -180,7 +186,9 @@ class Generations(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -199,7 +207,8 @@ class Generations(BaseSDK): request = operations.GetGenerationRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -217,7 +226,8 @@ class Generations(BaseSDK): http_headers=http_headers, _globals=operations.GetGenerationGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/guardrails.py b/src/openrouter/guardrails.py index a8454a6..31dd3fb 100644 --- a/src/openrouter/guardrails.py +++ b/src/openrouter/guardrails.py @@ -16,7 +16,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -31,7 +32,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -52,7 +55,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -71,7 +75,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -131,7 +136,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -146,7 +152,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -167,7 +175,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -186,7 +195,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -247,13 +257,15 @@ class Guardrails(BaseSDK): *, name: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, description: OptionalNullable[str] = UNSET, limit_usd: OptionalNullable[float] = UNSET, reset_interval: OptionalNullable[ operations.CreateGuardrailResetIntervalRequest ] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + ignored_providers: OptionalNullable[List[str]] = UNSET, allowed_models: OptionalNullable[List[str]] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -269,12 +281,15 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param description: Description of the guardrail :param limit_usd: Spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) :param allowed_providers: List of allowed provider IDs + :param ignored_providers: List of provider IDs to exclude from routing :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param enforce_zdr: Whether to enforce zero data retention :param retries: Override the default retry configuration for this method @@ -294,13 +309,15 @@ class Guardrails(BaseSDK): request = operations.CreateGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateGuardrailRequestBody( name=name, description=description, limit_usd=limit_usd, reset_interval=reset_interval, allowed_providers=allowed_providers, + ignored_providers=ignored_providers, allowed_models=allowed_models, enforce_zdr=enforce_zdr, ), @@ -320,7 +337,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.CreateGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -393,13 +411,15 @@ class Guardrails(BaseSDK): *, name: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, description: OptionalNullable[str] = UNSET, limit_usd: OptionalNullable[float] = UNSET, reset_interval: OptionalNullable[ operations.CreateGuardrailResetIntervalRequest ] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + ignored_providers: OptionalNullable[List[str]] = UNSET, allowed_models: OptionalNullable[List[str]] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -415,12 +435,15 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param description: Description of the guardrail :param limit_usd: Spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) :param allowed_providers: List of allowed provider IDs + :param ignored_providers: List of provider IDs to exclude from routing :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param enforce_zdr: Whether to enforce zero data retention :param retries: Override the default retry configuration for this method @@ -440,13 +463,15 @@ class Guardrails(BaseSDK): request = operations.CreateGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateGuardrailRequestBody( name=name, description=description, limit_usd=limit_usd, reset_interval=reset_interval, allowed_providers=allowed_providers, + ignored_providers=ignored_providers, allowed_models=allowed_models, enforce_zdr=enforce_zdr, ), @@ -466,7 +491,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.CreateGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -539,7 +565,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -553,7 +580,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -572,7 +601,8 @@ class Guardrails(BaseSDK): request = operations.GetGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -590,7 +620,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.GetGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -656,7 +687,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -670,7 +702,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -689,7 +723,8 @@ class Guardrails(BaseSDK): request = operations.GetGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -707,7 +742,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.GetGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -773,7 +809,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, name: Optional[str] = None, description: OptionalNullable[str] = UNSET, limit_usd: OptionalNullable[float] = UNSET, @@ -781,6 +818,7 @@ class Guardrails(BaseSDK): operations.UpdateGuardrailResetIntervalRequest ] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + ignored_providers: OptionalNullable[List[str]] = UNSET, allowed_models: OptionalNullable[List[str]] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -796,13 +834,16 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param name: New name for the guardrail :param description: New description for the guardrail :param limit_usd: New spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) :param allowed_providers: New list of allowed provider IDs + :param ignored_providers: List of provider IDs to exclude from routing :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param enforce_zdr: Whether to enforce zero data retention :param retries: Override the default retry configuration for this method @@ -822,7 +863,8 @@ class Guardrails(BaseSDK): request = operations.UpdateGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.UpdateGuardrailRequestBody( name=name, @@ -830,6 +872,7 @@ class Guardrails(BaseSDK): limit_usd=limit_usd, reset_interval=reset_interval, allowed_providers=allowed_providers, + ignored_providers=ignored_providers, allowed_models=allowed_models, enforce_zdr=enforce_zdr, ), @@ -849,7 +892,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.UpdateGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -927,7 +971,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, name: Optional[str] = None, description: OptionalNullable[str] = UNSET, limit_usd: OptionalNullable[float] = UNSET, @@ -935,6 +980,7 @@ class Guardrails(BaseSDK): operations.UpdateGuardrailResetIntervalRequest ] = UNSET, allowed_providers: OptionalNullable[List[str]] = UNSET, + ignored_providers: OptionalNullable[List[str]] = UNSET, allowed_models: OptionalNullable[List[str]] = UNSET, enforce_zdr: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -950,13 +996,16 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param name: New name for the guardrail :param description: New description for the guardrail :param limit_usd: New spending limit in USD :param reset_interval: Interval at which the limit resets (daily, weekly, monthly) :param allowed_providers: New list of allowed provider IDs + :param ignored_providers: List of provider IDs to exclude from routing :param allowed_models: Array of model identifiers (slug or canonical_slug accepted) :param enforce_zdr: Whether to enforce zero data retention :param retries: Override the default retry configuration for this method @@ -976,7 +1025,8 @@ class Guardrails(BaseSDK): request = operations.UpdateGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.UpdateGuardrailRequestBody( name=name, @@ -984,6 +1034,7 @@ class Guardrails(BaseSDK): limit_usd=limit_usd, reset_interval=reset_interval, allowed_providers=allowed_providers, + ignored_providers=ignored_providers, allowed_models=allowed_models, enforce_zdr=enforce_zdr, ), @@ -1003,7 +1054,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.UpdateGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -1081,7 +1133,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1095,7 +1148,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1114,7 +1169,8 @@ class Guardrails(BaseSDK): request = operations.DeleteGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -1132,7 +1188,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.DeleteGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1198,7 +1255,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1212,7 +1270,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1231,7 +1291,8 @@ class Guardrails(BaseSDK): request = operations.DeleteGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, ) @@ -1249,7 +1310,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.DeleteGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1314,7 +1376,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1329,7 +1392,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1350,7 +1415,8 @@ class Guardrails(BaseSDK): request = operations.ListKeyAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -1369,7 +1435,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListKeyAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1431,7 +1498,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1446,7 +1514,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1467,7 +1537,8 @@ class Guardrails(BaseSDK): request = operations.ListKeyAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -1486,7 +1557,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListKeyAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1548,7 +1620,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1563,7 +1636,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1584,7 +1659,8 @@ class Guardrails(BaseSDK): request = operations.ListMemberAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -1603,7 +1679,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListMemberAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1665,7 +1742,8 @@ class Guardrails(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1680,7 +1758,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1701,7 +1781,8 @@ class Guardrails(BaseSDK): request = operations.ListMemberAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, offset=offset, limit=limit, ) @@ -1720,7 +1801,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListMemberAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1783,7 +1865,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1799,7 +1882,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1820,7 +1905,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailKeyAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, offset=offset, limit=limit, @@ -1840,7 +1926,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailKeyAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -1908,7 +1995,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1924,7 +2012,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -1945,7 +2035,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailKeyAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, offset=offset, limit=limit, @@ -1965,7 +2056,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailKeyAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -2034,7 +2126,8 @@ class Guardrails(BaseSDK): id: str, key_hashes: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2049,7 +2142,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2068,7 +2163,8 @@ class Guardrails(BaseSDK): request = operations.BulkAssignKeysToGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkAssignKeysToGuardrailRequestBody( key_hashes=key_hashes, @@ -2089,7 +2185,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkAssignKeysToGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -2170,7 +2267,8 @@ class Guardrails(BaseSDK): id: str, key_hashes: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2185,7 +2283,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2204,7 +2304,8 @@ class Guardrails(BaseSDK): request = operations.BulkAssignKeysToGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkAssignKeysToGuardrailRequestBody( key_hashes=key_hashes, @@ -2225,7 +2326,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkAssignKeysToGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -2305,7 +2407,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -2321,7 +2424,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -2342,7 +2447,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailMemberAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, offset=offset, limit=limit, @@ -2362,7 +2468,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailMemberAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -2430,7 +2537,8 @@ class Guardrails(BaseSDK): *, id: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, offset: Optional[str] = None, limit: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -2446,7 +2554,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param offset: Number of records to skip for pagination :param limit: Maximum number of records to return (max 100) @@ -2467,7 +2577,8 @@ class Guardrails(BaseSDK): request = operations.ListGuardrailMemberAssignmentsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, offset=offset, limit=limit, @@ -2487,7 +2598,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.ListGuardrailMemberAssignmentsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -2556,7 +2668,8 @@ class Guardrails(BaseSDK): id: str, member_user_ids: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2571,7 +2684,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2590,7 +2705,8 @@ class Guardrails(BaseSDK): request = operations.BulkAssignMembersToGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkAssignMembersToGuardrailRequestBody( member_user_ids=member_user_ids, @@ -2611,7 +2727,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkAssignMembersToGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -2692,7 +2809,8 @@ class Guardrails(BaseSDK): id: str, member_user_ids: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2707,7 +2825,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2726,7 +2846,8 @@ class Guardrails(BaseSDK): request = operations.BulkAssignMembersToGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkAssignMembersToGuardrailRequestBody( member_user_ids=member_user_ids, @@ -2747,7 +2868,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkAssignMembersToGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -2828,7 +2950,8 @@ class Guardrails(BaseSDK): id: str, key_hashes: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2843,7 +2966,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2862,7 +2987,8 @@ class Guardrails(BaseSDK): request = operations.BulkUnassignKeysFromGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkUnassignKeysFromGuardrailRequestBody( key_hashes=key_hashes, @@ -2883,7 +3009,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkUnassignKeysFromGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -2964,7 +3091,8 @@ class Guardrails(BaseSDK): id: str, key_hashes: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -2979,7 +3107,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -2998,7 +3128,8 @@ class Guardrails(BaseSDK): request = operations.BulkUnassignKeysFromGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkUnassignKeysFromGuardrailRequestBody( key_hashes=key_hashes, @@ -3019,7 +3150,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkUnassignKeysFromGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -3100,7 +3232,8 @@ class Guardrails(BaseSDK): id: str, member_user_ids: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3115,7 +3248,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -3134,7 +3269,8 @@ class Guardrails(BaseSDK): request = operations.BulkUnassignMembersFromGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkUnassignMembersFromGuardrailRequestBody( member_user_ids=member_user_ids, @@ -3155,7 +3291,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkUnassignMembersFromGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -3236,7 +3373,8 @@ class Guardrails(BaseSDK): id: str, member_user_ids: List[str], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3251,7 +3389,9 @@ class Guardrails(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -3270,7 +3410,8 @@ class Guardrails(BaseSDK): request = operations.BulkUnassignMembersFromGuardrailRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, id=id, request_body=operations.BulkUnassignMembersFromGuardrailRequestBody( member_user_ids=member_user_ids, @@ -3291,7 +3432,8 @@ class Guardrails(BaseSDK): http_headers=http_headers, _globals=operations.BulkUnassignMembersFromGuardrailGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( diff --git a/src/openrouter/models/internal/globals.py b/src/openrouter/models/internal/globals.py index 248f13e..701741b 100644 --- a/src/openrouter/models/internal/globals.py +++ b/src/openrouter/models/internal/globals.py @@ -14,10 +14,14 @@ class GlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class Globals(BaseModel): @@ -31,11 +35,20 @@ class Globals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/models_.py b/src/openrouter/models_.py index ae103c1..9da3b00 100644 --- a/src/openrouter/models_.py +++ b/src/openrouter/models_.py @@ -16,7 +16,9 @@ class Models(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + output_modalities: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -27,8 +29,11 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\". :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -46,7 +51,9 @@ class Models(BaseSDK): request = operations.ListModelsCountRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + output_modalities=output_modalities, ) req = self._build_request( @@ -63,7 +70,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.ListModelsCountGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -89,13 +97,18 @@ class Models(BaseSDK): ), ), request=req, - error_status_codes=["4XX", "500", "5XX"], + error_status_codes=["400", "4XX", "500", "5XX"], retry_config=retry_config, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(components.ModelsCountResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, http_res + ) + raise errors.BadRequestResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -118,7 +131,9 @@ class Models(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, + output_modalities: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -129,8 +144,11 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\". :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -148,7 +166,9 @@ class Models(BaseSDK): request = operations.ListModelsCountRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + output_modalities=output_modalities, ) req = self._build_request_async( @@ -165,7 +185,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.ListModelsCountGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -191,13 +212,18 @@ class Models(BaseSDK): ), ), request=req, - error_status_codes=["4XX", "500", "5XX"], + error_status_codes=["400", "4XX", "500", "5XX"], retry_config=retry_config, ) response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(components.ModelsCountResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestResponseErrorData, http_res + ) + raise errors.BadRequestResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -220,9 +246,11 @@ class Models(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, category: Optional[operations.Category] = None, supported_parameters: Optional[str] = None, + output_modalities: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -233,10 +261,13 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param category: Filter models by use case category :param supported_parameters: + :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\". :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -254,9 +285,11 @@ class Models(BaseSDK): request = operations.GetModelsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, category=category, supported_parameters=supported_parameters, + output_modalities=output_modalities, ) req = self._build_request( @@ -273,7 +306,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.GetModelsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -333,9 +367,11 @@ class Models(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, category: Optional[operations.Category] = None, supported_parameters: Optional[str] = None, + output_modalities: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -346,10 +382,13 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param category: Filter models by use case category :param supported_parameters: + :param output_modalities: Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\". :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -367,9 +406,11 @@ class Models(BaseSDK): request = operations.GetModelsRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, category=category, supported_parameters=supported_parameters, + output_modalities=output_modalities, ) req = self._build_request_async( @@ -386,7 +427,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.GetModelsGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -450,7 +492,8 @@ class Models(BaseSDK): operations.ListModelsUserSecurityTypedDict, ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -464,7 +507,9 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -483,7 +528,8 @@ class Models(BaseSDK): request = operations.ListModelsUserRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -500,7 +546,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.ListModelsUserGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=utils.get_pydantic_model( security, operations.ListModelsUserSecurity @@ -569,7 +616,8 @@ class Models(BaseSDK): operations.ListModelsUserSecurityTypedDict, ], http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -583,7 +631,9 @@ class Models(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -602,7 +652,8 @@ class Models(BaseSDK): request = operations.ListModelsUserRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -619,7 +670,8 @@ class Models(BaseSDK): http_headers=http_headers, _globals=operations.ListModelsUserGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=utils.get_pydantic_model( security, operations.ListModelsUserSecurity diff --git a/src/openrouter/oauth.py b/src/openrouter/oauth.py index ff44c48..b31df9f 100644 --- a/src/openrouter/oauth.py +++ b/src/openrouter/oauth.py @@ -18,7 +18,8 @@ class OAuth(BaseSDK): *, code: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, code_verifier: Optional[str] = None, code_challenge_method: OptionalNullable[ operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod @@ -36,7 +37,9 @@ class OAuth(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param code_verifier: The code verifier if code_challenge was used in the authorization request :param code_challenge_method: The method used to generate the code challenge @@ -57,7 +60,8 @@ class OAuth(BaseSDK): request = operations.ExchangeAuthCodeForAPIKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.ExchangeAuthCodeForAPIKeyRequestBody( code=code, code_verifier=code_verifier, @@ -79,7 +83,8 @@ class OAuth(BaseSDK): http_headers=http_headers, _globals=operations.ExchangeAuthCodeForAPIKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -154,7 +159,8 @@ class OAuth(BaseSDK): *, code: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, code_verifier: Optional[str] = None, code_challenge_method: OptionalNullable[ operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod @@ -172,7 +178,9 @@ class OAuth(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param code_verifier: The code verifier if code_challenge was used in the authorization request :param code_challenge_method: The method used to generate the code challenge @@ -193,7 +201,8 @@ class OAuth(BaseSDK): request = operations.ExchangeAuthCodeForAPIKeyRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.ExchangeAuthCodeForAPIKeyRequestBody( code=code, code_verifier=code_verifier, @@ -215,7 +224,8 @@ class OAuth(BaseSDK): http_headers=http_headers, _globals=operations.ExchangeAuthCodeForAPIKeyGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -290,7 +300,8 @@ class OAuth(BaseSDK): *, callback_url: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[ operations.CreateAuthKeysCodeCodeChallengeMethod @@ -312,7 +323,9 @@ class OAuth(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param code_challenge: PKCE code challenge for enhanced security :param code_challenge_method: The method used to generate the code challenge @@ -337,7 +350,8 @@ class OAuth(BaseSDK): request = operations.CreateAuthKeysCodeRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateAuthKeysCodeRequestBody( callback_url=callback_url, code_challenge=code_challenge, @@ -363,7 +377,8 @@ class OAuth(BaseSDK): http_headers=http_headers, _globals=operations.CreateAuthKeysCodeGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -396,7 +411,7 @@ class OAuth(BaseSDK): ), ), request=req, - error_status_codes=["400", "401", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "409", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -415,6 +430,11 @@ class OAuth(BaseSDK): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "409", "application/json"): + response_data = unmarshal_json_response( + errors.ConflictResponseErrorData, http_res + ) + raise errors.ConflictResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res @@ -438,7 +458,8 @@ class OAuth(BaseSDK): *, callback_url: str, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[ operations.CreateAuthKeysCodeCodeChallengeMethod @@ -460,7 +481,9 @@ class OAuth(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param code_challenge: PKCE code challenge for enhanced security :param code_challenge_method: The method used to generate the code challenge @@ -485,7 +508,8 @@ class OAuth(BaseSDK): request = operations.CreateAuthKeysCodeRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, request_body=operations.CreateAuthKeysCodeRequestBody( callback_url=callback_url, code_challenge=code_challenge, @@ -511,7 +535,8 @@ class OAuth(BaseSDK): http_headers=http_headers, _globals=operations.CreateAuthKeysCodeGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -544,7 +569,7 @@ class OAuth(BaseSDK): ), ), request=req, - error_status_codes=["400", "401", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "409", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -563,6 +588,11 @@ class OAuth(BaseSDK): errors.UnauthorizedResponseErrorData, http_res ) raise errors.UnauthorizedResponseError(response_data, http_res) + if utils.match_response(http_res, "409", "application/json"): + response_data = unmarshal_json_response( + errors.ConflictResponseErrorData, http_res + ) + raise errors.ConflictResponseError(response_data, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response( errors.InternalServerResponseErrorData, http_res diff --git a/src/openrouter/operations/__init__.py b/src/openrouter/operations/__init__.py index e3aca11..f25347d 100644 --- a/src/openrouter/operations/__init__.py +++ b/src/openrouter/operations/__init__.py @@ -349,6 +349,8 @@ if TYPE_CHECKING: ListModelsUserSecurityTypedDict, ) from .listproviders import ( + Datacenter, + Headquarters, ListProvidersData, ListProvidersDataTypedDict, ListProvidersGlobals, @@ -503,6 +505,7 @@ __all__ = [ "CreateResponsesResponseBody", "CreateResponsesResponseBodyTypedDict", "CreateResponsesResponseTypedDict", + "Datacenter", "DeleteGuardrailGlobals", "DeleteGuardrailGlobalsTypedDict", "DeleteGuardrailRequest", @@ -578,6 +581,7 @@ __all__ = [ "GetUserActivityRequestTypedDict", "GetUserActivityResponse", "GetUserActivityResponseTypedDict", + "Headquarters", "ImageURL", "ImageURLTypedDict", "Input", @@ -999,6 +1003,8 @@ _dynamic_imports: dict[str, str] = { "ListModelsUserRequestTypedDict": ".listmodelsuser", "ListModelsUserSecurity": ".listmodelsuser", "ListModelsUserSecurityTypedDict": ".listmodelsuser", + "Datacenter": ".listproviders", + "Headquarters": ".listproviders", "ListProvidersData": ".listproviders", "ListProvidersDataTypedDict": ".listproviders", "ListProvidersGlobals": ".listproviders", diff --git a/src/openrouter/operations/bulkassignkeystoguardrail.py b/src/openrouter/operations/bulkassignkeystoguardrail.py index f4e1a67..f258d3d 100644 --- a/src/openrouter/operations/bulkassignkeystoguardrail.py +++ b/src/openrouter/operations/bulkassignkeystoguardrail.py @@ -19,10 +19,14 @@ class BulkAssignKeysToGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkAssignKeysToGuardrailGlobals(BaseModel): @@ -36,15 +40,24 @@ class BulkAssignKeysToGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkAssignKeysToGuardrailRequestBodyTypedDict(TypedDict): key_hashes: List[str] @@ -65,10 +78,14 @@ class BulkAssignKeysToGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkAssignKeysToGuardrailRequest(BaseModel): @@ -92,15 +109,24 @@ class BulkAssignKeysToGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkAssignKeysToGuardrailResponseTypedDict(TypedDict): r"""Assignment result""" diff --git a/src/openrouter/operations/bulkassignmemberstoguardrail.py b/src/openrouter/operations/bulkassignmemberstoguardrail.py index fc5c674..1ebb22d 100644 --- a/src/openrouter/operations/bulkassignmemberstoguardrail.py +++ b/src/openrouter/operations/bulkassignmemberstoguardrail.py @@ -19,10 +19,14 @@ class BulkAssignMembersToGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkAssignMembersToGuardrailGlobals(BaseModel): @@ -36,15 +40,24 @@ class BulkAssignMembersToGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkAssignMembersToGuardrailRequestBodyTypedDict(TypedDict): member_user_ids: List[str] @@ -65,10 +78,14 @@ class BulkAssignMembersToGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkAssignMembersToGuardrailRequest(BaseModel): @@ -92,15 +109,24 @@ class BulkAssignMembersToGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkAssignMembersToGuardrailResponseTypedDict(TypedDict): r"""Assignment result""" diff --git a/src/openrouter/operations/bulkunassignkeysfromguardrail.py b/src/openrouter/operations/bulkunassignkeysfromguardrail.py index 6b88cbc..45cd84b 100644 --- a/src/openrouter/operations/bulkunassignkeysfromguardrail.py +++ b/src/openrouter/operations/bulkunassignkeysfromguardrail.py @@ -19,10 +19,14 @@ class BulkUnassignKeysFromGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkUnassignKeysFromGuardrailGlobals(BaseModel): @@ -36,15 +40,24 @@ class BulkUnassignKeysFromGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkUnassignKeysFromGuardrailRequestBodyTypedDict(TypedDict): key_hashes: List[str] @@ -65,10 +78,14 @@ class BulkUnassignKeysFromGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkUnassignKeysFromGuardrailRequest(BaseModel): @@ -92,15 +109,24 @@ class BulkUnassignKeysFromGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkUnassignKeysFromGuardrailResponseTypedDict(TypedDict): r"""Unassignment result""" diff --git a/src/openrouter/operations/bulkunassignmembersfromguardrail.py b/src/openrouter/operations/bulkunassignmembersfromguardrail.py index 8cdde8d..ac6e0c1 100644 --- a/src/openrouter/operations/bulkunassignmembersfromguardrail.py +++ b/src/openrouter/operations/bulkunassignmembersfromguardrail.py @@ -19,10 +19,14 @@ class BulkUnassignMembersFromGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkUnassignMembersFromGuardrailGlobals(BaseModel): @@ -36,15 +40,24 @@ class BulkUnassignMembersFromGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkUnassignMembersFromGuardrailRequestBodyTypedDict(TypedDict): member_user_ids: List[str] @@ -65,10 +78,14 @@ class BulkUnassignMembersFromGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class BulkUnassignMembersFromGuardrailRequest(BaseModel): @@ -92,15 +109,24 @@ class BulkUnassignMembersFromGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class BulkUnassignMembersFromGuardrailResponseTypedDict(TypedDict): r"""Unassignment result""" diff --git a/src/openrouter/operations/createauthkeyscode.py b/src/openrouter/operations/createauthkeyscode.py index 62f121a..610f446 100644 --- a/src/openrouter/operations/createauthkeyscode.py +++ b/src/openrouter/operations/createauthkeyscode.py @@ -29,10 +29,14 @@ class CreateAuthKeysCodeGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateAuthKeysCodeGlobals(BaseModel): @@ -46,15 +50,24 @@ class CreateAuthKeysCodeGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + CreateAuthKeysCodeCodeChallengeMethod = Union[ Literal[ @@ -166,10 +179,14 @@ class CreateAuthKeysCodeRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateAuthKeysCodeRequest(BaseModel): @@ -188,15 +205,24 @@ class CreateAuthKeysCodeRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CreateAuthKeysCodeDataTypedDict(TypedDict): r"""Auth code data""" diff --git a/src/openrouter/operations/createcoinbasecharge.py b/src/openrouter/operations/createcoinbasecharge.py index 2fe8172..dc83233 100644 --- a/src/openrouter/operations/createcoinbasecharge.py +++ b/src/openrouter/operations/createcoinbasecharge.py @@ -20,10 +20,14 @@ class CreateCoinbaseChargeGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateCoinbaseChargeGlobals(BaseModel): @@ -37,15 +41,24 @@ class CreateCoinbaseChargeGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CreateCoinbaseChargeSecurityTypedDict(TypedDict): bearer: str @@ -72,10 +85,14 @@ class CreateCoinbaseChargeRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateCoinbaseChargeRequest(BaseModel): @@ -94,15 +111,24 @@ class CreateCoinbaseChargeRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CallDataTypedDict(TypedDict): deadline: str diff --git a/src/openrouter/operations/createembeddings.py b/src/openrouter/operations/createembeddings.py index 637389e..bf520a6 100644 --- a/src/openrouter/operations/createembeddings.py +++ b/src/openrouter/operations/createembeddings.py @@ -23,10 +23,14 @@ class CreateEmbeddingsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateEmbeddingsGlobals(BaseModel): @@ -40,15 +44,24 @@ class CreateEmbeddingsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + TypeImageURL = Literal["image_url",] @@ -165,10 +178,14 @@ class CreateEmbeddingsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateEmbeddingsRequest(BaseModel): @@ -187,15 +204,24 @@ class CreateEmbeddingsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + Object = Literal["list",] diff --git a/src/openrouter/operations/createguardrail.py b/src/openrouter/operations/createguardrail.py index 629fa8a..8f24ce4 100644 --- a/src/openrouter/operations/createguardrail.py +++ b/src/openrouter/operations/createguardrail.py @@ -28,10 +28,14 @@ class CreateGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateGuardrailGlobals(BaseModel): @@ -45,15 +49,24 @@ class CreateGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + CreateGuardrailResetIntervalRequest = Union[ Literal[ @@ -77,6 +90,8 @@ class CreateGuardrailRequestBodyTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model identifiers (slug or canonical_slug accepted)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -102,6 +117,9 @@ class CreateGuardrailRequestBody(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model identifiers (slug or canonical_slug accepted)""" @@ -115,6 +133,7 @@ class CreateGuardrailRequestBody(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", ] @@ -123,6 +142,7 @@ class CreateGuardrailRequestBody(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", ] @@ -160,10 +180,14 @@ class CreateGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateGuardrailRequest(BaseModel): @@ -182,15 +206,24 @@ class CreateGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + CreateGuardrailResetIntervalResponse = Union[ Literal[ @@ -220,6 +253,8 @@ class CreateGuardrailDataTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs (immutable identifiers)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -255,6 +290,9 @@ class CreateGuardrailData(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs (immutable identifiers)""" @@ -271,6 +309,7 @@ class CreateGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", @@ -280,6 +319,7 @@ class CreateGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", diff --git a/src/openrouter/operations/createkeys.py b/src/openrouter/operations/createkeys.py index f53ff9e..77d35e2 100644 --- a/src/openrouter/operations/createkeys.py +++ b/src/openrouter/operations/createkeys.py @@ -29,10 +29,14 @@ class CreateKeysGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateKeysGlobals(BaseModel): @@ -46,15 +50,24 @@ class CreateKeysGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + CreateKeysLimitReset = Union[ Literal[ @@ -142,10 +155,14 @@ class CreateKeysRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateKeysRequest(BaseModel): @@ -164,15 +181,24 @@ class CreateKeysRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CreateKeysDataTypedDict(TypedDict): r"""The created API key information""" @@ -213,6 +239,8 @@ class CreateKeysDataTypedDict(TypedDict): r"""ISO 8601 timestamp of when the API key was created""" updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -274,6 +302,9 @@ class CreateKeysData(BaseModel): updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -286,6 +317,7 @@ class CreateKeysData(BaseModel): "limit_reset", "updated_at", "expires_at", + "creator_user_id", ] null_default_fields = [] diff --git a/src/openrouter/operations/createresponses.py b/src/openrouter/operations/createresponses.py index 2865ddc..e92bbc2 100644 --- a/src/openrouter/operations/createresponses.py +++ b/src/openrouter/operations/createresponses.py @@ -2,9 +2,9 @@ from __future__ import annotations from openrouter.components import ( - openresponsesnonstreamingresponse as components_openresponsesnonstreamingresponse, - openresponsesrequest as components_openresponsesrequest, - openresponsesstreamevent as components_openresponsesstreamevent, + openresponsesresult as components_openresponsesresult, + responsesrequest as components_responsesrequest, + streamevents as components_streamevents, ) from openrouter.types import BaseModel from openrouter.utils import ( @@ -24,10 +24,14 @@ class CreateResponsesGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateResponsesGlobals(BaseModel): @@ -41,34 +45,45 @@ class CreateResponsesGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CreateResponsesRequestTypedDict(TypedDict): - open_responses_request: ( - components_openresponsesrequest.OpenResponsesRequestTypedDict - ) + responses_request: components_responsesrequest.ResponsesRequestTypedDict http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class CreateResponsesRequest(BaseModel): - open_responses_request: Annotated[ - components_openresponsesrequest.OpenResponsesRequest, + responses_request: Annotated[ + components_responsesrequest.ResponsesRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] @@ -82,40 +97,47 @@ class CreateResponsesRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class CreateResponsesResponseBodyTypedDict(TypedDict): r"""Successful response""" - data: components_openresponsesstreamevent.OpenResponsesStreamEventTypedDict + data: components_streamevents.StreamEventsTypedDict r"""Union of all possible event types emitted during response streaming""" class CreateResponsesResponseBody(BaseModel): r"""Successful response""" - data: components_openresponsesstreamevent.OpenResponsesStreamEvent + data: components_streamevents.StreamEvents r"""Union of all possible event types emitted during response streaming""" CreateResponsesResponseTypedDict = TypeAliasType( "CreateResponsesResponseTypedDict", Union[ - components_openresponsesnonstreamingresponse.OpenResponsesNonStreamingResponseTypedDict, + components_openresponsesresult.OpenResponsesResultTypedDict, Union[ - eventstreaming.EventStream[ - components_openresponsesstreamevent.OpenResponsesStreamEventTypedDict - ], + eventstreaming.EventStream[components_streamevents.StreamEventsTypedDict], eventstreaming.EventStreamAsync[ - components_openresponsesstreamevent.OpenResponsesStreamEventTypedDict + components_streamevents.StreamEventsTypedDict ], ], ], @@ -125,14 +147,10 @@ CreateResponsesResponseTypedDict = TypeAliasType( CreateResponsesResponse = TypeAliasType( "CreateResponsesResponse", Union[ - components_openresponsesnonstreamingresponse.OpenResponsesNonStreamingResponse, + components_openresponsesresult.OpenResponsesResult, Union[ - eventstreaming.EventStream[ - components_openresponsesstreamevent.OpenResponsesStreamEvent - ], - eventstreaming.EventStreamAsync[ - components_openresponsesstreamevent.OpenResponsesStreamEvent - ], + eventstreaming.EventStream[components_streamevents.StreamEvents], + eventstreaming.EventStreamAsync[components_streamevents.StreamEvents], ], ], ) diff --git a/src/openrouter/operations/deleteguardrail.py b/src/openrouter/operations/deleteguardrail.py index 23367ff..2eade13 100644 --- a/src/openrouter/operations/deleteguardrail.py +++ b/src/openrouter/operations/deleteguardrail.py @@ -20,10 +20,14 @@ class DeleteGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class DeleteGuardrailGlobals(BaseModel): @@ -37,15 +41,24 @@ class DeleteGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class DeleteGuardrailRequestTypedDict(TypedDict): id: str @@ -55,10 +68,14 @@ class DeleteGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class DeleteGuardrailRequest(BaseModel): @@ -77,15 +94,24 @@ class DeleteGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class DeleteGuardrailResponseTypedDict(TypedDict): r"""Guardrail deleted successfully""" diff --git a/src/openrouter/operations/deletekeys.py b/src/openrouter/operations/deletekeys.py index 986ea96..51d4881 100644 --- a/src/openrouter/operations/deletekeys.py +++ b/src/openrouter/operations/deletekeys.py @@ -20,10 +20,14 @@ class DeleteKeysGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class DeleteKeysGlobals(BaseModel): @@ -37,15 +41,24 @@ class DeleteKeysGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class DeleteKeysRequestTypedDict(TypedDict): hash: str @@ -55,10 +68,14 @@ class DeleteKeysRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class DeleteKeysRequest(BaseModel): @@ -77,15 +94,24 @@ class DeleteKeysRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class DeleteKeysResponseTypedDict(TypedDict): r"""API key deleted successfully""" diff --git a/src/openrouter/operations/exchangeauthcodeforapikey.py b/src/openrouter/operations/exchangeauthcodeforapikey.py index 4e14679..eb44748 100644 --- a/src/openrouter/operations/exchangeauthcodeforapikey.py +++ b/src/openrouter/operations/exchangeauthcodeforapikey.py @@ -28,10 +28,14 @@ class ExchangeAuthCodeForAPIKeyGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ExchangeAuthCodeForAPIKeyGlobals(BaseModel): @@ -45,15 +49,24 @@ class ExchangeAuthCodeForAPIKeyGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + ExchangeAuthCodeForAPIKeyCodeChallengeMethod = Union[ Literal[ @@ -127,10 +140,14 @@ class ExchangeAuthCodeForAPIKeyRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ExchangeAuthCodeForAPIKeyRequest(BaseModel): @@ -149,15 +166,24 @@ class ExchangeAuthCodeForAPIKeyRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ExchangeAuthCodeForAPIKeyResponseTypedDict(TypedDict): r"""Successfully exchanged code for an API key""" diff --git a/src/openrouter/operations/getcredits.py b/src/openrouter/operations/getcredits.py index 4c79e6d..54ebfd6 100644 --- a/src/openrouter/operations/getcredits.py +++ b/src/openrouter/operations/getcredits.py @@ -14,10 +14,14 @@ class GetCreditsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetCreditsGlobals(BaseModel): @@ -31,15 +35,24 @@ class GetCreditsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetCreditsRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -47,10 +60,14 @@ class GetCreditsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetCreditsRequest(BaseModel): @@ -64,15 +81,24 @@ class GetCreditsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetCreditsDataTypedDict(TypedDict): total_credits: float diff --git a/src/openrouter/operations/getcurrentkey.py b/src/openrouter/operations/getcurrentkey.py index 8836057..f293fd6 100644 --- a/src/openrouter/operations/getcurrentkey.py +++ b/src/openrouter/operations/getcurrentkey.py @@ -22,10 +22,14 @@ class GetCurrentKeyGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetCurrentKeyGlobals(BaseModel): @@ -39,15 +43,24 @@ class GetCurrentKeyGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetCurrentKeyRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -55,10 +68,14 @@ class GetCurrentKeyRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetCurrentKeyRequest(BaseModel): @@ -72,15 +89,24 @@ class GetCurrentKeyRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + @deprecated( "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." @@ -147,6 +173,8 @@ class GetCurrentKeyDataTypedDict(TypedDict): r"""Type of limit reset for the API key""" include_byok_in_limit: bool r"""Whether to include external BYOK usage in the credit limit""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" rate_limit: RateLimitTypedDict r"""Legacy rate limit information about a key. Will always return -1.""" expires_at: NotRequired[Nullable[datetime]] @@ -209,6 +237,9 @@ class GetCurrentKeyData(BaseModel): include_byok_in_limit: bool r"""Whether to include external BYOK usage in the credit limit""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" + rate_limit: Annotated[ RateLimit, pydantic.Field( @@ -223,7 +254,13 @@ class GetCurrentKeyData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["expires_at"] - nullable_fields = ["limit", "limit_remaining", "limit_reset", "expires_at"] + nullable_fields = [ + "limit", + "limit_remaining", + "limit_reset", + "expires_at", + "creator_user_id", + ] null_default_fields = [] serialized = handler(self) diff --git a/src/openrouter/operations/getgeneration.py b/src/openrouter/operations/getgeneration.py index 05aa6ff..8a71781 100644 --- a/src/openrouter/operations/getgeneration.py +++ b/src/openrouter/operations/getgeneration.py @@ -21,10 +21,14 @@ class GetGenerationGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetGenerationGlobals(BaseModel): @@ -38,15 +42,24 @@ class GetGenerationGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetGenerationRequestTypedDict(TypedDict): id: str @@ -55,10 +68,14 @@ class GetGenerationRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetGenerationRequest(BaseModel): @@ -76,20 +93,30 @@ class GetGenerationRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + APIType = Union[ Literal[ "completions", "embeddings", + "video", ], UnrecognizedStr, ] @@ -126,6 +153,7 @@ ProviderName = Union[ "Together 2", "Ubicloud", "01.AI", + "AkashML", "AI21", "AionLabs", "Alibaba", @@ -183,6 +211,7 @@ ProviderName = Union[ "Parasail", "Perplexity", "Phala", + "Reka", "Relace", "SambaNova", "Seed", @@ -341,6 +370,10 @@ class GetGenerationDataTypedDict(TypedDict): r"""Router used for the request (e.g., openrouter/auto)""" provider_responses: Nullable[List[ProviderResponseTypedDict]] r"""List of provider responses for this generation, including fallback attempts""" + user_agent: Nullable[str] + r"""User-Agent header from the request""" + http_referer: Nullable[str] + r"""Referer header from the request""" class GetGenerationData(BaseModel): @@ -448,6 +481,12 @@ class GetGenerationData(BaseModel): provider_responses: Nullable[List[ProviderResponse]] r"""List of provider responses for this generation, including fallback attempts""" + user_agent: Nullable[str] + r"""User-Agent header from the request""" + + http_referer: Nullable[str] + r"""Referer header from the request""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [] @@ -479,6 +518,8 @@ class GetGenerationData(BaseModel): "api_type", "router", "provider_responses", + "user_agent", + "http_referer", ] null_default_fields = [] diff --git a/src/openrouter/operations/getguardrail.py b/src/openrouter/operations/getguardrail.py index 8d185cc..f8f5d38 100644 --- a/src/openrouter/operations/getguardrail.py +++ b/src/openrouter/operations/getguardrail.py @@ -28,10 +28,14 @@ class GetGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetGuardrailGlobals(BaseModel): @@ -45,15 +49,24 @@ class GetGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetGuardrailRequestTypedDict(TypedDict): id: str @@ -63,10 +76,14 @@ class GetGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetGuardrailRequest(BaseModel): @@ -85,15 +102,24 @@ class GetGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + GetGuardrailResetInterval = Union[ Literal[ @@ -123,6 +149,8 @@ class GetGuardrailDataTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs (immutable identifiers)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -158,6 +186,9 @@ class GetGuardrailData(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs (immutable identifiers)""" @@ -174,6 +205,7 @@ class GetGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", @@ -183,6 +215,7 @@ class GetGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", diff --git a/src/openrouter/operations/getkey.py b/src/openrouter/operations/getkey.py index af7317e..66d56e0 100644 --- a/src/openrouter/operations/getkey.py +++ b/src/openrouter/operations/getkey.py @@ -22,10 +22,14 @@ class GetKeyGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetKeyGlobals(BaseModel): @@ -39,15 +43,24 @@ class GetKeyGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetKeyRequestTypedDict(TypedDict): hash: str @@ -57,10 +70,14 @@ class GetKeyRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetKeyRequest(BaseModel): @@ -79,15 +96,24 @@ class GetKeyRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetKeyDataTypedDict(TypedDict): r"""The API key information""" @@ -128,6 +154,8 @@ class GetKeyDataTypedDict(TypedDict): r"""ISO 8601 timestamp of when the API key was created""" updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -189,6 +217,9 @@ class GetKeyData(BaseModel): updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -201,6 +232,7 @@ class GetKeyData(BaseModel): "limit_reset", "updated_at", "expires_at", + "creator_user_id", ] null_default_fields = [] diff --git a/src/openrouter/operations/getmodels.py b/src/openrouter/operations/getmodels.py index 6a9cc9e..472068d 100644 --- a/src/openrouter/operations/getmodels.py +++ b/src/openrouter/operations/getmodels.py @@ -20,10 +20,14 @@ class GetModelsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetModelsGlobals(BaseModel): @@ -37,15 +41,24 @@ class GetModelsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + Category = Union[ Literal[ @@ -73,13 +86,19 @@ class GetModelsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ category: NotRequired[Category] r"""Filter models by use case category""" supported_parameters: NotRequired[str] + output_modalities: NotRequired[str] + r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".""" class GetModelsRequest(BaseModel): @@ -93,15 +112,24 @@ class GetModelsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + category: Annotated[ Annotated[Optional[Category], PlainValidator(validate_open_enum(False))], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -112,3 +140,9 @@ class GetModelsRequest(BaseModel): Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None + + output_modalities: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".""" diff --git a/src/openrouter/operations/getuseractivity.py b/src/openrouter/operations/getuseractivity.py index fef1ba4..9dacdcd 100644 --- a/src/openrouter/operations/getuseractivity.py +++ b/src/openrouter/operations/getuseractivity.py @@ -15,10 +15,14 @@ class GetUserActivityGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class GetUserActivityGlobals(BaseModel): @@ -32,15 +36,24 @@ class GetUserActivityGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class GetUserActivityRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -48,9 +61,13 @@ class GetUserActivityRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ date_: NotRequired[str] r"""Filter by a single UTC date in the last 30 days (YYYY-MM-DD format).""" @@ -67,15 +84,24 @@ class GetUserActivityRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + date_: Annotated[ Optional[str], pydantic.Field(alias="date"), diff --git a/src/openrouter/operations/list.py b/src/openrouter/operations/list.py index 63ecc47..649e842 100644 --- a/src/openrouter/operations/list.py +++ b/src/openrouter/operations/list.py @@ -22,10 +22,14 @@ class ListGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListGlobals(BaseModel): @@ -39,15 +43,24 @@ class ListGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -55,9 +68,13 @@ class ListRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ include_disabled: NotRequired[str] r"""Whether to include disabled API keys in the response""" @@ -76,15 +93,24 @@ class ListRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + include_disabled: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -135,6 +161,8 @@ class ListDataTypedDict(TypedDict): r"""ISO 8601 timestamp of when the API key was created""" updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -194,6 +222,9 @@ class ListData(BaseModel): updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -206,6 +237,7 @@ class ListData(BaseModel): "limit_reset", "updated_at", "expires_at", + "creator_user_id", ] null_default_fields = [] diff --git a/src/openrouter/operations/listembeddingsmodels.py b/src/openrouter/operations/listembeddingsmodels.py index fc32d4d..a4042ee 100644 --- a/src/openrouter/operations/listembeddingsmodels.py +++ b/src/openrouter/operations/listembeddingsmodels.py @@ -14,10 +14,14 @@ class ListEmbeddingsModelsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEmbeddingsModelsGlobals(BaseModel): @@ -31,15 +35,24 @@ class ListEmbeddingsModelsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListEmbeddingsModelsRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -47,10 +60,14 @@ class ListEmbeddingsModelsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEmbeddingsModelsRequest(BaseModel): @@ -64,11 +81,20 @@ class ListEmbeddingsModelsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/listendpoints.py b/src/openrouter/operations/listendpoints.py index 3e20e63..4470cd2 100644 --- a/src/openrouter/operations/listendpoints.py +++ b/src/openrouter/operations/listendpoints.py @@ -17,10 +17,14 @@ class ListEndpointsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEndpointsGlobals(BaseModel): @@ -34,15 +38,24 @@ class ListEndpointsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListEndpointsRequestTypedDict(TypedDict): author: str @@ -52,10 +65,14 @@ class ListEndpointsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEndpointsRequest(BaseModel): @@ -77,15 +94,24 @@ class ListEndpointsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListEndpointsResponseTypedDict(TypedDict): r"""Returns a list of endpoints""" diff --git a/src/openrouter/operations/listendpointszdr.py b/src/openrouter/operations/listendpointszdr.py index 6814c5e..23e735d 100644 --- a/src/openrouter/operations/listendpointszdr.py +++ b/src/openrouter/operations/listendpointszdr.py @@ -15,10 +15,14 @@ class ListEndpointsZdrGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEndpointsZdrGlobals(BaseModel): @@ -32,15 +36,24 @@ class ListEndpointsZdrGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListEndpointsZdrRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -48,10 +61,14 @@ class ListEndpointsZdrRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListEndpointsZdrRequest(BaseModel): @@ -65,15 +82,24 @@ class ListEndpointsZdrRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListEndpointsZdrResponseTypedDict(TypedDict): r"""Returns a list of endpoints""" diff --git a/src/openrouter/operations/listguardrailkeyassignments.py b/src/openrouter/operations/listguardrailkeyassignments.py index d90770f..28a84b6 100644 --- a/src/openrouter/operations/listguardrailkeyassignments.py +++ b/src/openrouter/operations/listguardrailkeyassignments.py @@ -20,10 +20,14 @@ class ListGuardrailKeyAssignmentsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListGuardrailKeyAssignmentsGlobals(BaseModel): @@ -37,15 +41,24 @@ class ListGuardrailKeyAssignmentsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListGuardrailKeyAssignmentsRequestTypedDict(TypedDict): id: str @@ -55,9 +68,13 @@ class ListGuardrailKeyAssignmentsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ offset: NotRequired[str] r"""Number of records to skip for pagination""" @@ -81,15 +98,24 @@ class ListGuardrailKeyAssignmentsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), diff --git a/src/openrouter/operations/listguardrailmemberassignments.py b/src/openrouter/operations/listguardrailmemberassignments.py index 45b6c42..88cb8d0 100644 --- a/src/openrouter/operations/listguardrailmemberassignments.py +++ b/src/openrouter/operations/listguardrailmemberassignments.py @@ -20,10 +20,14 @@ class ListGuardrailMemberAssignmentsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListGuardrailMemberAssignmentsGlobals(BaseModel): @@ -37,15 +41,24 @@ class ListGuardrailMemberAssignmentsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListGuardrailMemberAssignmentsRequestTypedDict(TypedDict): id: str @@ -55,9 +68,13 @@ class ListGuardrailMemberAssignmentsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ offset: NotRequired[str] r"""Number of records to skip for pagination""" @@ -81,15 +98,24 @@ class ListGuardrailMemberAssignmentsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), diff --git a/src/openrouter/operations/listguardrails.py b/src/openrouter/operations/listguardrails.py index 89f34ae..d6c1886 100644 --- a/src/openrouter/operations/listguardrails.py +++ b/src/openrouter/operations/listguardrails.py @@ -28,10 +28,14 @@ class ListGuardrailsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListGuardrailsGlobals(BaseModel): @@ -45,15 +49,24 @@ class ListGuardrailsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListGuardrailsRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -61,9 +74,13 @@ class ListGuardrailsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ offset: NotRequired[str] r"""Number of records to skip for pagination""" @@ -82,15 +99,24 @@ class ListGuardrailsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -130,6 +156,8 @@ class ListGuardrailsDataTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs (immutable identifiers)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -163,6 +191,9 @@ class ListGuardrailsData(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs (immutable identifiers)""" @@ -179,6 +210,7 @@ class ListGuardrailsData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", @@ -188,6 +220,7 @@ class ListGuardrailsData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", diff --git a/src/openrouter/operations/listkeyassignments.py b/src/openrouter/operations/listkeyassignments.py index 870d9de..36df9a6 100644 --- a/src/openrouter/operations/listkeyassignments.py +++ b/src/openrouter/operations/listkeyassignments.py @@ -15,10 +15,14 @@ class ListKeyAssignmentsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListKeyAssignmentsGlobals(BaseModel): @@ -32,15 +36,24 @@ class ListKeyAssignmentsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListKeyAssignmentsRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -48,9 +61,13 @@ class ListKeyAssignmentsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ offset: NotRequired[str] r"""Number of records to skip for pagination""" @@ -69,15 +86,24 @@ class ListKeyAssignmentsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), diff --git a/src/openrouter/operations/listmemberassignments.py b/src/openrouter/operations/listmemberassignments.py index c6ae44e..a6684dd 100644 --- a/src/openrouter/operations/listmemberassignments.py +++ b/src/openrouter/operations/listmemberassignments.py @@ -15,10 +15,14 @@ class ListMemberAssignmentsGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListMemberAssignmentsGlobals(BaseModel): @@ -32,15 +36,24 @@ class ListMemberAssignmentsGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListMemberAssignmentsRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -48,9 +61,13 @@ class ListMemberAssignmentsRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. + """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + """ offset: NotRequired[str] r"""Number of records to skip for pagination""" @@ -69,15 +86,24 @@ class ListMemberAssignmentsRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + offset: Annotated[ Optional[str], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), diff --git a/src/openrouter/operations/listmodelscount.py b/src/openrouter/operations/listmodelscount.py index 77b8ead..3d8a59a 100644 --- a/src/openrouter/operations/listmodelscount.py +++ b/src/openrouter/operations/listmodelscount.py @@ -2,7 +2,7 @@ from __future__ import annotations from openrouter.types import BaseModel -from openrouter.utils import FieldMetadata, HeaderMetadata +from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -14,10 +14,14 @@ class ListModelsCountGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListModelsCountGlobals(BaseModel): @@ -31,15 +35,24 @@ class ListModelsCountGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListModelsCountRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -47,10 +60,16 @@ class ListModelsCountRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + output_modalities: NotRequired[str] + r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".""" class ListModelsCountRequest(BaseModel): @@ -64,11 +83,26 @@ class ListModelsCountRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + output_modalities: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter models by output modality. Accepts a comma-separated list of modalities (text, image, audio, embeddings) or \"all\" to include all models. Defaults to \"text\".""" diff --git a/src/openrouter/operations/listmodelsuser.py b/src/openrouter/operations/listmodelsuser.py index 8f3668f..d25eea8 100644 --- a/src/openrouter/operations/listmodelsuser.py +++ b/src/openrouter/operations/listmodelsuser.py @@ -14,10 +14,14 @@ class ListModelsUserGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListModelsUserGlobals(BaseModel): @@ -31,15 +35,24 @@ class ListModelsUserGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListModelsUserSecurityTypedDict(TypedDict): bearer: str @@ -65,10 +78,14 @@ class ListModelsUserRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListModelsUserRequest(BaseModel): @@ -82,11 +99,20 @@ class ListModelsUserRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ diff --git a/src/openrouter/operations/listproviders.py b/src/openrouter/operations/listproviders.py index 2f905fd..be65217 100644 --- a/src/openrouter/operations/listproviders.py +++ b/src/openrouter/operations/listproviders.py @@ -7,11 +7,13 @@ from openrouter.types import ( OptionalNullable, UNSET, UNSET_SENTINEL, + UnrecognizedStr, ) -from openrouter.utils import FieldMetadata, HeaderMetadata +from openrouter.utils import FieldMetadata, HeaderMetadata, validate_open_enum import pydantic from pydantic import model_serializer -from typing import List, Optional +from pydantic.functional_validators import PlainValidator +from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,10 +23,14 @@ class ListProvidersGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListProvidersGlobals(BaseModel): @@ -38,15 +44,24 @@ class ListProvidersGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class ListProvidersRequestTypedDict(TypedDict): http_referer: NotRequired[str] @@ -54,10 +69,14 @@ class ListProvidersRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class ListProvidersRequest(BaseModel): @@ -71,15 +90,537 @@ class ListProvidersRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + + +Headquarters = Union[ + Literal[ + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CU", + "CV", + "CW", + "CX", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HM", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SY", + "SZ", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + ], + UnrecognizedStr, +] +r"""ISO 3166-1 Alpha-2 country code of the provider headquarters""" + + +Datacenter = Union[ + Literal[ + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CU", + "CV", + "CW", + "CX", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HM", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SY", + "SZ", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + ], + UnrecognizedStr, +] + class ListProvidersDataTypedDict(TypedDict): name: str @@ -92,6 +633,10 @@ class ListProvidersDataTypedDict(TypedDict): r"""URL to the provider's terms of service""" status_page_url: NotRequired[Nullable[str]] r"""URL to the provider's status page""" + headquarters: NotRequired[Nullable[Headquarters]] + r"""ISO 3166-1 Alpha-2 country code of the provider headquarters""" + datacenters: NotRequired[Nullable[List[Datacenter]]] + r"""ISO 3166-1 Alpha-2 country codes of the provider datacenter locations""" class ListProvidersData(BaseModel): @@ -110,13 +655,30 @@ class ListProvidersData(BaseModel): status_page_url: OptionalNullable[str] = UNSET r"""URL to the provider's status page""" + headquarters: Annotated[ + OptionalNullable[Headquarters], PlainValidator(validate_open_enum(False)) + ] = UNSET + r"""ISO 3166-1 Alpha-2 country code of the provider headquarters""" + + datacenters: OptionalNullable[ + List[Annotated[Datacenter, PlainValidator(validate_open_enum(False))]] + ] = UNSET + r"""ISO 3166-1 Alpha-2 country codes of the provider datacenter locations""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["terms_of_service_url", "status_page_url"] + optional_fields = [ + "terms_of_service_url", + "status_page_url", + "headquarters", + "datacenters", + ] nullable_fields = [ "privacy_policy_url", "terms_of_service_url", "status_page_url", + "headquarters", + "datacenters", ] null_default_fields = [] diff --git a/src/openrouter/operations/sendchatcompletionrequest.py b/src/openrouter/operations/sendchatcompletionrequest.py index bb23c22..ef5ccb0 100644 --- a/src/openrouter/operations/sendchatcompletionrequest.py +++ b/src/openrouter/operations/sendchatcompletionrequest.py @@ -2,9 +2,9 @@ from __future__ import annotations from openrouter.components import ( - chatgenerationparams as components_chatgenerationparams, - chatresponse as components_chatresponse, - chatstreamingresponsechunk as components_chatstreamingresponsechunk, + chatrequest as components_chatrequest, + chatresult as components_chatresult, + chatstreamchunk as components_chatstreamchunk, ) from openrouter.types import BaseModel from openrouter.utils import ( @@ -24,10 +24,14 @@ class SendChatCompletionRequestGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class SendChatCompletionRequestGlobals(BaseModel): @@ -41,34 +45,45 @@ class SendChatCompletionRequestGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class SendChatCompletionRequestRequestTypedDict(TypedDict): - chat_generation_params: ( - components_chatgenerationparams.ChatGenerationParamsTypedDict - ) + chat_request: components_chatrequest.ChatRequestTypedDict http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class SendChatCompletionRequestRequest(BaseModel): - chat_generation_params: Annotated[ - components_chatgenerationparams.ChatGenerationParams, + chat_request: Annotated[ + components_chatrequest.ChatRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] @@ -82,40 +97,49 @@ class SendChatCompletionRequestRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class SendChatCompletionRequestResponseBodyTypedDict(TypedDict): r"""Successful chat completion response""" - data: components_chatstreamingresponsechunk.ChatStreamingResponseChunkTypedDict + data: components_chatstreamchunk.ChatStreamChunkTypedDict r"""Streaming chat completion chunk""" class SendChatCompletionRequestResponseBody(BaseModel): r"""Successful chat completion response""" - data: components_chatstreamingresponsechunk.ChatStreamingResponseChunk + data: components_chatstreamchunk.ChatStreamChunk r"""Streaming chat completion chunk""" SendChatCompletionRequestResponseTypedDict = TypeAliasType( "SendChatCompletionRequestResponseTypedDict", Union[ - components_chatresponse.ChatResponseTypedDict, + components_chatresult.ChatResultTypedDict, Union[ eventstreaming.EventStream[ - components_chatstreamingresponsechunk.ChatStreamingResponseChunkTypedDict + components_chatstreamchunk.ChatStreamChunkTypedDict ], eventstreaming.EventStreamAsync[ - components_chatstreamingresponsechunk.ChatStreamingResponseChunkTypedDict + components_chatstreamchunk.ChatStreamChunkTypedDict ], ], ], @@ -125,14 +149,10 @@ SendChatCompletionRequestResponseTypedDict = TypeAliasType( SendChatCompletionRequestResponse = TypeAliasType( "SendChatCompletionRequestResponse", Union[ - components_chatresponse.ChatResponse, + components_chatresult.ChatResult, Union[ - eventstreaming.EventStream[ - components_chatstreamingresponsechunk.ChatStreamingResponseChunk - ], - eventstreaming.EventStreamAsync[ - components_chatstreamingresponsechunk.ChatStreamingResponseChunk - ], + eventstreaming.EventStream[components_chatstreamchunk.ChatStreamChunk], + eventstreaming.EventStreamAsync[components_chatstreamchunk.ChatStreamChunk], ], ], ) diff --git a/src/openrouter/operations/updateguardrail.py b/src/openrouter/operations/updateguardrail.py index 061dc40..77946e4 100644 --- a/src/openrouter/operations/updateguardrail.py +++ b/src/openrouter/operations/updateguardrail.py @@ -29,10 +29,14 @@ class UpdateGuardrailGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class UpdateGuardrailGlobals(BaseModel): @@ -46,15 +50,24 @@ class UpdateGuardrailGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + UpdateGuardrailResetIntervalRequest = Union[ Literal[ @@ -78,6 +91,8 @@ class UpdateGuardrailRequestBodyTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""New list of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model identifiers (slug or canonical_slug accepted)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -103,6 +118,9 @@ class UpdateGuardrailRequestBody(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""New list of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model identifiers (slug or canonical_slug accepted)""" @@ -117,6 +135,7 @@ class UpdateGuardrailRequestBody(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", ] @@ -125,6 +144,7 @@ class UpdateGuardrailRequestBody(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", ] @@ -164,10 +184,14 @@ class UpdateGuardrailRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class UpdateGuardrailRequest(BaseModel): @@ -191,15 +215,24 @@ class UpdateGuardrailRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + UpdateGuardrailResetIntervalResponse = Union[ Literal[ @@ -229,6 +262,8 @@ class UpdateGuardrailDataTypedDict(TypedDict): r"""Interval at which the limit resets (daily, weekly, monthly)""" allowed_providers: NotRequired[Nullable[List[str]]] r"""List of allowed provider IDs""" + ignored_providers: NotRequired[Nullable[List[str]]] + r"""List of provider IDs to exclude from routing""" allowed_models: NotRequired[Nullable[List[str]]] r"""Array of model canonical_slugs (immutable identifiers)""" enforce_zdr: NotRequired[Nullable[bool]] @@ -264,6 +299,9 @@ class UpdateGuardrailData(BaseModel): allowed_providers: OptionalNullable[List[str]] = UNSET r"""List of allowed provider IDs""" + ignored_providers: OptionalNullable[List[str]] = UNSET + r"""List of provider IDs to exclude from routing""" + allowed_models: OptionalNullable[List[str]] = UNSET r"""Array of model canonical_slugs (immutable identifiers)""" @@ -280,6 +318,7 @@ class UpdateGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", @@ -289,6 +328,7 @@ class UpdateGuardrailData(BaseModel): "limit_usd", "reset_interval", "allowed_providers", + "ignored_providers", "allowed_models", "enforce_zdr", "updated_at", diff --git a/src/openrouter/operations/updatekeys.py b/src/openrouter/operations/updatekeys.py index 740bf48..c54d2e7 100644 --- a/src/openrouter/operations/updatekeys.py +++ b/src/openrouter/operations/updatekeys.py @@ -30,10 +30,14 @@ class UpdateKeysGlobalsTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class UpdateKeysGlobals(BaseModel): @@ -47,15 +51,24 @@ class UpdateKeysGlobals(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + UpdateKeysLimitReset = Union[ Literal[ @@ -146,10 +159,14 @@ class UpdateKeysRequestTypedDict(TypedDict): This is used to track API usage per application. """ - x_title: NotRequired[str] + x_open_router_title: NotRequired[str] r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: NotRequired[str] + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ class UpdateKeysRequest(BaseModel): @@ -173,15 +190,24 @@ class UpdateKeysRequest(BaseModel): """ - x_title: Annotated[ + x_open_router_title: Annotated[ Optional[str], - pydantic.Field(alias="X-Title"), + pydantic.Field(alias="X-OpenRouter-Title"), FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard. """ + x_open_router_categories: Annotated[ + Optional[str], + pydantic.Field(alias="X-OpenRouter-Categories"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + + """ + class UpdateKeysDataTypedDict(TypedDict): r"""The updated API key information""" @@ -222,6 +248,8 @@ class UpdateKeysDataTypedDict(TypedDict): r"""ISO 8601 timestamp of when the API key was created""" updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" expires_at: NotRequired[Nullable[datetime]] r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -283,6 +311,9 @@ class UpdateKeysData(BaseModel): updated_at: Nullable[str] r"""ISO 8601 timestamp of when the API key was last updated""" + creator_user_id: Nullable[str] + r"""The user ID of the key creator. For organization-owned keys, this is the member who created the key. For individual users, this is the user's own ID.""" + expires_at: OptionalNullable[datetime] = UNSET r"""ISO 8601 UTC timestamp when the API key expires, or null if no expiration""" @@ -295,6 +326,7 @@ class UpdateKeysData(BaseModel): "limit_reset", "updated_at", "expires_at", + "creator_user_id", ] null_default_fields = [] diff --git a/src/openrouter/providers.py b/src/openrouter/providers.py index 228f618..31e1e3a 100644 --- a/src/openrouter/providers.py +++ b/src/openrouter/providers.py @@ -16,7 +16,8 @@ class Providers(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -27,7 +28,9 @@ class Providers(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -46,7 +49,8 @@ class Providers(BaseSDK): request = operations.ListProvidersRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request( @@ -63,7 +67,8 @@ class Providers(BaseSDK): http_headers=http_headers, _globals=operations.ListProvidersGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, @@ -118,7 +123,8 @@ class Providers(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -129,7 +135,9 @@ class Providers(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -148,7 +156,8 @@ class Providers(BaseSDK): request = operations.ListProvidersRequest( http_referer=http_referer, - x_title=x_title, + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, ) req = self._build_request_async( @@ -165,7 +174,8 @@ class Providers(BaseSDK): http_headers=http_headers, _globals=operations.ListProvidersGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, allow_empty_value=None, diff --git a/src/openrouter/responses.py b/src/openrouter/responses.py index d3382e7..fbc9fac 100644 --- a/src/openrouter/responses.py +++ b/src/openrouter/responses.py @@ -23,16 +23,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -45,16 +46,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -66,50 +61,50 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Union[Literal[False], None] = None, provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> components.OpenResponsesNonStreamingResponse: + ) -> components.OpenResponsesResult: r"""Create a response Creates a streaming or non-streaming response using OpenResponses API format @@ -117,7 +112,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -150,8 +147,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -165,16 +162,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -187,16 +185,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -208,50 +200,50 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Literal[True], provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> eventstreaming.EventStream[components.OpenResponsesStreamEvent]: + ) -> eventstreaming.EventStream[components.StreamEvents]: r"""Create a response Creates a streaming or non-streaming response using OpenResponses API format @@ -259,7 +251,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -292,8 +286,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -306,16 +300,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -328,16 +323,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -349,43 +338,43 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Optional[bool] = False, provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -400,7 +389,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -433,8 +424,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -454,15 +445,14 @@ class Responses(BaseSDK): request = operations.CreateResponsesRequest( http_referer=http_referer, - x_title=x_title, - open_responses_request=components.OpenResponsesRequest( - input=utils.get_pydantic_model( - input, Optional[components.OpenResponsesInput] - ), + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + responses_request=components.ResponsesRequest( + input=utils.get_pydantic_model(input, Optional[components.InputsUnion]), instructions=instructions, metadata=metadata, tools=utils.get_pydantic_model( - tools, Optional[List[components.OpenResponsesRequestToolUnion]] + tools, Optional[List[components.ResponsesRequestToolUnion]] ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion] @@ -471,10 +461,10 @@ class Responses(BaseSDK): model=model, models=models, text=utils.get_pydantic_model( - text, Optional[components.OpenResponsesResponseText] + text, Optional[components.TextExtendedConfig] ), reasoning=utils.get_pydantic_model( - reasoning, OptionalNullable[components.OpenResponsesReasoningConfig] + reasoning, OptionalNullable[components.ReasoningConfig] ), max_output_tokens=max_output_tokens, temperature=temperature, @@ -489,7 +479,7 @@ class Responses(BaseSDK): prompt_cache_key=prompt_cache_key, previous_response_id=previous_response_id, prompt=utils.get_pydantic_model( - prompt, OptionalNullable[components.OpenAIResponsesPrompt] + prompt, OptionalNullable[components.StoredPromptTemplate] ), include=include, background=background, @@ -498,15 +488,15 @@ class Responses(BaseSDK): truncation=truncation, stream=stream, provider=utils.get_pydantic_model( - provider, OptionalNullable[components.OpenResponsesRequestProvider] + provider, OptionalNullable[components.ResponsesRequestProvider] ), plugins=utils.get_pydantic_model( - plugins, Optional[List[components.OpenResponsesRequestPluginUnion]] + plugins, Optional[List[components.ResponsesRequestPluginUnion]] ), user=user, session_id=session_id, trace=utils.get_pydantic_model( - trace, Optional[components.OpenResponsesRequestTrace] + trace, Optional[components.ResponsesRequestTrace] ), ), ) @@ -525,15 +515,16 @@ class Responses(BaseSDK): http_headers=http_headers, _globals=operations.CreateResponsesGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.open_responses_request, + request.responses_request, False, False, "json", - components.OpenResponsesRequest, + components.ResponsesRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -583,7 +574,7 @@ class Responses(BaseSDK): if utils.match_response(http_res, "200", "application/json"): http_res_text = utils.stream_to_text(http_res) return unmarshal_json_response( - components.OpenResponsesNonStreamingResponse, http_res, http_res_text + components.OpenResponsesResult, http_res, http_res_text ) if utils.match_response(http_res, "200", "text/event-stream"): return eventstreaming.EventStream( @@ -713,16 +704,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -735,16 +727,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -756,50 +742,50 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Union[Literal[False], None] = None, provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> components.OpenResponsesNonStreamingResponse: + ) -> components.OpenResponsesResult: r"""Create a response Creates a streaming or non-streaming response using OpenResponses API format @@ -807,7 +793,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -840,8 +828,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -855,16 +843,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -877,16 +866,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -898,50 +881,50 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Literal[True], provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> eventstreaming.EventStreamAsync[components.OpenResponsesStreamEvent]: + ) -> eventstreaming.EventStreamAsync[components.StreamEvents]: r"""Create a response Creates a streaming or non-streaming response using OpenResponses API format @@ -949,7 +932,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -982,8 +967,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -996,16 +981,17 @@ class Responses(BaseSDK): self, *, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, input: Optional[ - Union[components.OpenResponsesInput, components.OpenResponsesInputTypedDict] + Union[components.InputsUnion, components.InputsUnionTypedDict] ] = None, instructions: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, str]] = UNSET, tools: Optional[ Union[ - List[components.OpenResponsesRequestToolUnion], - List[components.OpenResponsesRequestToolUnionTypedDict], + List[components.ResponsesRequestToolUnion], + List[components.ResponsesRequestToolUnionTypedDict], ] ] = None, tool_choice: Optional[ @@ -1018,16 +1004,10 @@ class Responses(BaseSDK): model: Optional[str] = None, models: Optional[List[str]] = None, text: Optional[ - Union[ - components.OpenResponsesResponseText, - components.OpenResponsesResponseTextTypedDict, - ] + Union[components.TextExtendedConfig, components.TextExtendedConfigTypedDict] ] = None, reasoning: OptionalNullable[ - Union[ - components.OpenResponsesReasoningConfig, - components.OpenResponsesReasoningConfigTypedDict, - ] + Union[components.ReasoningConfig, components.ReasoningConfigTypedDict] ] = UNSET, max_output_tokens: OptionalNullable[float] = UNSET, temperature: OptionalNullable[float] = UNSET, @@ -1039,43 +1019,43 @@ class Responses(BaseSDK): top_k: Optional[float] = None, image_config: Optional[ Union[ - Dict[str, components.OpenResponsesRequestImageConfig], - Dict[str, components.OpenResponsesRequestImageConfigTypedDict], + Dict[str, components.ResponsesRequestImageConfig], + Dict[str, components.ResponsesRequestImageConfigTypedDict], ] ] = None, - modalities: Optional[List[components.ResponsesOutputModality]] = None, + modalities: Optional[List[components.OutputModalityEnum]] = None, prompt_cache_key: OptionalNullable[str] = UNSET, previous_response_id: OptionalNullable[str] = UNSET, prompt: OptionalNullable[ Union[ - components.OpenAIResponsesPrompt, - components.OpenAIResponsesPromptTypedDict, + components.StoredPromptTemplate, + components.StoredPromptTemplateTypedDict, ] ] = UNSET, - include: OptionalNullable[List[components.OpenAIResponsesIncludable]] = UNSET, + include: OptionalNullable[List[components.ResponseIncludesEnum]] = UNSET, background: OptionalNullable[bool] = UNSET, safety_identifier: OptionalNullable[str] = UNSET, - service_tier: Optional[components.ServiceTier] = "auto", - truncation: OptionalNullable[components.Truncation] = UNSET, + service_tier: OptionalNullable[components.ResponsesRequestServiceTier] = "auto", + truncation: OptionalNullable[components.OpenAIResponsesTruncation] = UNSET, stream: Optional[bool] = False, provider: OptionalNullable[ Union[ - components.OpenResponsesRequestProvider, - components.OpenResponsesRequestProviderTypedDict, + components.ResponsesRequestProvider, + components.ResponsesRequestProviderTypedDict, ] ] = UNSET, plugins: Optional[ Union[ - List[components.OpenResponsesRequestPluginUnion], - List[components.OpenResponsesRequestPluginUnionTypedDict], + List[components.ResponsesRequestPluginUnion], + List[components.ResponsesRequestPluginUnionTypedDict], ] ] = None, user: Optional[str] = None, session_id: Optional[str] = None, trace: Optional[ Union[ - components.OpenResponsesRequestTrace, - components.OpenResponsesRequestTraceTypedDict, + components.ResponsesRequestTrace, + components.ResponsesRequestTraceTypedDict, ] ] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1090,7 +1070,9 @@ class Responses(BaseSDK): :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. - :param x_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + :param x_open_router_title: The app display name allows you to customize how your app appears in OpenRouter's dashboard. + + :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. :param input: Input for a response request - can be a string or array of items :param instructions: @@ -1123,8 +1105,8 @@ class Responses(BaseSDK): :param stream: :param provider: When multiple model providers are available, optionally indicate your routing preference. :param plugins: Plugins you want to enable for this request, including their settings. - :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 128 characters. - :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. + :param user: A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + :param session_id: A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. :param trace: Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1144,15 +1126,14 @@ class Responses(BaseSDK): request = operations.CreateResponsesRequest( http_referer=http_referer, - x_title=x_title, - open_responses_request=components.OpenResponsesRequest( - input=utils.get_pydantic_model( - input, Optional[components.OpenResponsesInput] - ), + x_open_router_title=x_open_router_title, + x_open_router_categories=x_open_router_categories, + responses_request=components.ResponsesRequest( + input=utils.get_pydantic_model(input, Optional[components.InputsUnion]), instructions=instructions, metadata=metadata, tools=utils.get_pydantic_model( - tools, Optional[List[components.OpenResponsesRequestToolUnion]] + tools, Optional[List[components.ResponsesRequestToolUnion]] ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[components.OpenAIResponsesToolChoiceUnion] @@ -1161,10 +1142,10 @@ class Responses(BaseSDK): model=model, models=models, text=utils.get_pydantic_model( - text, Optional[components.OpenResponsesResponseText] + text, Optional[components.TextExtendedConfig] ), reasoning=utils.get_pydantic_model( - reasoning, OptionalNullable[components.OpenResponsesReasoningConfig] + reasoning, OptionalNullable[components.ReasoningConfig] ), max_output_tokens=max_output_tokens, temperature=temperature, @@ -1179,7 +1160,7 @@ class Responses(BaseSDK): prompt_cache_key=prompt_cache_key, previous_response_id=previous_response_id, prompt=utils.get_pydantic_model( - prompt, OptionalNullable[components.OpenAIResponsesPrompt] + prompt, OptionalNullable[components.StoredPromptTemplate] ), include=include, background=background, @@ -1188,15 +1169,15 @@ class Responses(BaseSDK): truncation=truncation, stream=stream, provider=utils.get_pydantic_model( - provider, OptionalNullable[components.OpenResponsesRequestProvider] + provider, OptionalNullable[components.ResponsesRequestProvider] ), plugins=utils.get_pydantic_model( - plugins, Optional[List[components.OpenResponsesRequestPluginUnion]] + plugins, Optional[List[components.ResponsesRequestPluginUnion]] ), user=user, session_id=session_id, trace=utils.get_pydantic_model( - trace, Optional[components.OpenResponsesRequestTrace] + trace, Optional[components.ResponsesRequestTrace] ), ), ) @@ -1215,15 +1196,16 @@ class Responses(BaseSDK): http_headers=http_headers, _globals=operations.CreateResponsesGlobals( http_referer=self.sdk_configuration.globals.http_referer, - x_title=self.sdk_configuration.globals.x_title, + x_open_router_title=self.sdk_configuration.globals.x_open_router_title, + x_open_router_categories=self.sdk_configuration.globals.x_open_router_categories, ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.open_responses_request, + request.responses_request, False, False, "json", - components.OpenResponsesRequest, + components.ResponsesRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1273,7 +1255,7 @@ class Responses(BaseSDK): if utils.match_response(http_res, "200", "application/json"): http_res_text = await utils.stream_to_text_async(http_res) return unmarshal_json_response( - components.OpenResponsesNonStreamingResponse, http_res, http_res_text + components.OpenResponsesResult, http_res, http_res_text ) if utils.match_response(http_res, "200", "text/event-stream"): return eventstreaming.EventStreamAsync( diff --git a/src/openrouter/sdk.py b/src/openrouter/sdk.py index 84ff3ef..5796a31 100644 --- a/src/openrouter/sdk.py +++ b/src/openrouter/sdk.py @@ -76,7 +76,8 @@ class OpenRouter(BaseSDK): self, api_key: Optional[Union[Optional[str], Callable[[], Optional[str]]]] = None, http_referer: Optional[str] = None, - x_title: Optional[str] = None, + x_open_router_title: Optional[str] = None, + x_open_router_categories: Optional[str] = None, server: Optional[str] = None, server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, @@ -90,7 +91,8 @@ class OpenRouter(BaseSDK): :param api_key: The api_key required for authentication :param http_referer: Configures the http_referer parameter for all supported operations - :param x_title: Configures the x_title parameter for all supported operations + :param x_open_router_title: Configures the x_open_router_title parameter for all supported operations + :param x_open_router_categories: Configures the x_open_router_categories parameter for all supported operations :param server: The server by name to use for all methods :param server_url: The server URL to use for all methods :param url_params: Parameters to optionally template the server URL with @@ -135,7 +137,12 @@ class OpenRouter(BaseSDK): http_referer=utils.get_global_from_env( http_referer, "OPENROUTER_HTTP_REFERER", str ), - x_title=utils.get_global_from_env(x_title, "OPENROUTER_X_TITLE", str), + x_open_router_title=utils.get_global_from_env( + x_open_router_title, "OPENROUTER_X_OPEN_ROUTER_TITLE", str + ), + x_open_router_categories=utils.get_global_from_env( + x_open_router_categories, "OPENROUTER_X_OPEN_ROUTER_CATEGORIES", str + ), ) BaseSDK.__init__( diff --git a/uv.lock b/uv.lock index 65058fe..856f2cb 100644 --- a/uv.lock +++ b/uv.lock @@ -211,7 +211,7 @@ wheels = [ [[package]] name = "openrouter" -version = "0.7.11" +version = "0.8.0" source = { editable = "." } dependencies = [ { name = "httpcore" },