From c823b7e56ba5e6a24aa7bf87b2e6437dcf1e35f1 Mon Sep 17 00:00:00 2001 From: OpenRouter Team Date: Fri, 20 Feb 2026 19:10:02 +0000 Subject: [PATCH] Commits included in this export: - 45687f423707f5838461585c568a024a19eb2f06 - 3103d3ca68b6e42ccdb6136588ec2b6edc8dcab0 - fd9f991606027cd86116317c71f8eb7b4e2aa3eb - 0f312019161edd76c1e5923d142c788d22f096d5 - b94b8ad48e2dc7c2379391093712e3c81364fec2 - 5dbab2094bc744db4a90b3097520d897e5d0d634 - 4c47d1af1735db18a1c1a7f463e801c7f71ad4e5 - 6ddaaa6989d725bbe966e45f7aed0c1bd72f9153 - 4779741b6ba710b1299612b82e8544516bd9dd6a - 22083fcc8f58884d8212d6f3314b231c4ddd21cd - a925a620f97196d509e073a163caac053bd82316 - 5c05d8829784601ffd151acef1a6978c266f913d - f89c632902372adc214d3591e1fbcaf41729c0c3 - 6f4fff535fbf4274255c255ae23620b8e00e614f - ef358e96cb01e469b77d44683603a602b0813116 - e6299b4ebfe5c2eed6c598771f0fd99f84555401 - 24d3f0ee1c2aa19a62f7902836034080b9246813 - 68922847c2969b773887310eb7aa9a814e199c5a - 729ee2338c39df22461526153e7f4ba868fd498e - e1074ff86fccf5e48406b7595298873106d3cc5a - 8288fa51fbc499fc8689d79853d00cadc3b7d823 - 123bbdaf841d299162a82ee2573adfbb70a45b8f - 70dbc74eeb11775c0cb59981b350251c8212da38 - 4d48e4f6bb936e785787314a965298da6b78fea0 - 718729a573ee98893a4408d5a52ab4686661fe54 - 12cba68b6d64b8974a2a6a81c518a789489017b7 - b1edfb513a2f1f1056f7a0cf9d39d9c45272acc0 - b867adcde6b64f3f2a11c4626254b39098e4b0b4 - 21912c097b4066d109766c6b4492826595cd57c5 - bc1ed85adc976a4634ca8a41b82e4fc2c39a864f - 8d10b121356a215a589092326b8f604293147de1 - 7828708558cfa789b51d6d3ee35fc0e893dea32d - d145c89c941937a312ed1357590d2bfda9a3603d - 12f05b5dee397ead47cfcd545a7a2e3c7ff57524 - dd28f75a19a015809797c7abf3f8758f7c37262e - b8b107ca04e2e4dc39dd8c97c285dff665de6f05 - c96e569781e07ab44172d9c69940ec17bafd81f4 - c9d5a90e3c2b5077a2bdd49773f1a46d1a5a79c7 - cdf5dfb908ef3afe57e29b9c4e1bedcdd31c7c49 - 58b08f87116ceab9076de2fdc0a4c74c919b44c4 - 2592bdc8b4b7c695a3d689390aedc9a42914acc8 - 95dc994c2fcb701f3a8d8ffe410aa2e91ea8120b - a552a86da33c602a8f0eb8e40724d9154b63cac9 - 7b49f98f8599508b9aca6921a48d446ca04d41ce - 2841134445f6a925c9072b6eccb1be9adcf3797c - 5d59d49f32086b2f4d38961e4d11744bdbda72c1 - edeedb0ad02de9951408298c66a6a6ccbd683f7f - 037329dc548fbdefbfcc1d84d85c67d227afce0d - 67ac9ff744a5c802380876ebf56b939625a44e13 - 74c003f4ecf72520cb9097d38495f1f9839379a5 - 5140ef0b1fdbb58e8aa1d20ca08bdd948f4dadaf - a3d789c36cdaf821e400a6fe9eefbe1a82bc5819 - 2a87802bcec26e7e3cea535c680f4b71dbb10b15 - 16e9a45c7816adf1e33efce1e384eb9879dc2b28 - 7358fd8e8c7476dc6b75b300084e225ece79bceb - 8199c8abea6e6acefa8c37a1336a56c7fcdd3a07 - d17e8505a8d46baf3192a92a530986bbce7014b2 - 7ab5200031221f71aaff2503c9af1c706ccb7634 - 0f4cd4840b46f21e843d0d40bdaf587ba0e5b2cd - b19e35320304f4313b4fa27c5dc8d348e4a5a5c2 - 9994ceca26eab71d3b22a5de2f7fd530f21a071d - ee2da3156a55471cf3d3c66d4c00944eebdd898d - 0a4e2198ab076e9b8530bdf1cf481367b1fed971 - a5804a88b7417d2c18a741de8683fa3f59f29028 - bf787ed35487961a465347bde6d952f5b985ae53 - 6ece2ee3b6782c672d487f857d4b9a5255e97d27 - 57ff7bba84d38a88e31eeef75fa3d3de34f55af3 - afa7f5af2d4c9cbdf18bbafdb7ce70b882c02d10 - aae3911dcc666a818f9b58f3ca47a25de252c6da - 449925fbabb1b1c3eac565f0ee99176402e5762c - 491e5ac99a7a4b3f76e2a5e2dff3b833e3a1fbfb - e9f17b7f0df89e2159f37631fd0a890c0510401a - a28de4933b3212eb4c31601d07b0e9120f33aaa1 - 5657366b127cb27f2ae49dedf4cd776bb4c0bb5c - 18216342b2bd775c35b0b6619a24801224445de2 - 6590c4d866f9ff23fff051574e609c09ab8ddb12 - f0f552336ce1215d2ec768c0bdca5028a968680c - 70b651e298470af96f40625c6094cd4aae008483 - b395cc4176ff5decc52636ec18b6db8fe89d4ed1 - d0b664a88597f79c5b0d5f19a2179b6d8fabddbc - d3862269e3fa6e044cf7f3a307f5d8f07bff863f - 6c895dcb22935a2a164767c7d09840123b6fae8e - 86f3da290f484de3b6620c65c408d2a8437c0e67 - 21a4f580479b3b0fa2b4381802dbaf90eb005d2b - fb941b1ca6ce407fd344d1ba1efe0d443f0dddd0 - 20c2d10632637680294895ac242bca1805b52b7a - 20425ada8aa09714f5d46e151d4df55e950a34a1 - 716848405ea7296b735f8ed026d4da07b49a651f - 638eec62dcc7c000010a40962e61ec35e7e5d3a0 - 8ef06dcfce6842466412935d935a57ff57b10d76 - 72c52708b8f989005ca8837e5491462798a51e46 - ebaac50f2143ae5a6f3025e997aa1ad70d110a1f - ace3723b9883c46d2d7c33c21146a59d403093ef - 79cf17a40fed709c93b3f7e35d7065e76a355996 - 66fa5870420336037921914fd69e3a01e14223e4 - 95d711fd9ac03bd2831208b12c3841640464c093 - 779c34de0724d6b72150b39cd6193dd84625ddb8 - d91887e755fbb466326ed27b74a1dcd66f64639d - 762342705a61b57d39ddb50ff87dc3b41dfa8d32 - dc3fc7fea5df69c6a2ba7ab963607360d51ce714 (And 49 more changes) GitOrigin-RevId: 45687f423707f5838461585c568a024a19eb2f06 --- .speakeasy/gen.lock | 157 ++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/in.openapi.yaml | 108 +++++++- .speakeasy/out.openapi.yaml | 103 ++++++- .speakeasy/workflow.lock | 8 +- docs/models/assistantmessage.md | 2 +- docs/models/chatgenerationparams.md | 2 + docs/models/chatstreamingmessagechunk.md | 2 +- docs/models/openresponsesrequest.md | 3 +- .../createauthkeyscoderequestbody.md | 4 +- docs/models/operations/providername.md | 2 +- docs/models/operations/usagelimittype.md | 19 ++ docs/models/providername.md | 2 +- docs/models/schema19.md | 35 +-- docs/models/schema20.md | 31 +++ ...ypted.md => schema20reasoningencrypted.md} | 8 +- ...summary.md => schema20reasoningsummary.md} | 8 +- ...soningtext.md => schema20reasoningtext.md} | 8 +- docs/models/{schema21.md => schema22.md} | 6 +- docs/models/schema5enum.md | 2 +- docs/models/tooldefinitionjson.md | 9 +- docs/models/trace.md | 22 ++ examples/nextjs-example/package.json | 4 +- jsr.json | 2 +- package.json | 2 +- src/lib/config.ts | 4 +- src/models/assistantmessage.ts | 18 +- src/models/chatgenerationparams.ts | 12 + src/models/chatstreamingmessagechunk.ts | 6 +- src/models/index.ts | 1 + src/models/openresponsesrequest.ts | 54 ++++ src/models/operations/createauthkeyscode.ts | 31 +++ src/models/operations/getgeneration.ts | 1 + src/models/providername.ts | 1 + src/models/schema19.ts | 260 +++--------------- src/models/schema20.ts | 241 ++++++++++++++++ src/models/schema5.ts | 1 + src/models/tooldefinitionjson.ts | 13 + 38 files changed, 798 insertions(+), 396 deletions(-) create mode 100644 docs/models/operations/usagelimittype.md create mode 100644 docs/models/schema20.md rename docs/models/{schema19reasoningencrypted.md => schema20reasoningencrypted.md} (81%) rename docs/models/{schema19reasoningsummary.md => schema20reasoningsummary.md} (82%) rename docs/models/{schema19reasoningtext.md => schema20reasoningtext.md} (84%) rename docs/models/{schema21.md => schema22.md} (75%) create mode 100644 docs/models/trace.md create mode 100644 src/models/schema20.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6d78967e..3e918987 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,23 +1,24 @@ lockVersion: 2.0.0 id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: - docChecksum: 0dda1c9b912f3b0986c559a9ae99ea1e + docChecksum: ef1409600952fe713a6a6a4d0355ac14 docVersion: 1.0.0 speakeasyVersion: 1.680.0 generationVersion: 2.788.4 - releaseVersion: 0.8.0 - configChecksum: 51650e178782499be5772cddc3911720 + releaseVersion: 0.9.3 + configChecksum: 13400b0ef9801f8575049849a6309e98 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: a2c7ea46-9d3a-4bbd-8d6c-5e16d0c2ec64 - pristine_commit_hash: 451c1e75861ae1ad385622e9a902052fbb5ec0ba - pristine_tree_hash: bd7d7f5dedbcdc8555d1bec59229aea147b56cc6 + generation_id: 5acc01ea-df48-4576-9fed-85773eb4eeea + pristine_commit_hash: 083f9bef24aa402dd64d8460dcb47b4c6a89f651 + pristine_tree_hash: 6d3b2a3cdc2fc9673eb23d8ac260f28d7b27404a features: typescript: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 + additionalProperties: 0.1.2 constsAndDefaults: 0.1.12 core: 3.26.16 customCodeRegions: 0.1.0 @@ -88,8 +89,8 @@ trackedFiles: pristine_git_object: 342542484892f40ebac8a4113f6016114e16f3ee docs/models/assistantmessage.md: id: 7e0218023943 - last_write_checksum: sha1:52f189d2543df2212359cf830829f03afe2fbd66 - pristine_git_object: 76711bea4c838e5c7dbeb8621a0623143f30decc + last_write_checksum: sha1:f775feb286f1f025a8bdc28a00981769c6dc35c2 + pristine_git_object: 115600ea2f363dc9592b43be0f5d464ae098280e docs/models/assistantmessagecontent.md: id: 9f1795bbe642 last_write_checksum: sha1:dd290dd2754fd452f1ed8c026a00e310bfd7bd03 @@ -120,8 +121,8 @@ trackedFiles: pristine_git_object: f0436c70d31701f55c4b4668c93c59ac65f8be37 docs/models/chatgenerationparams.md: id: bb3446bdc077 - last_write_checksum: sha1:039f4493f147bb0764a05a09002ca4c89df9d49b - pristine_git_object: c5802561a7e21f233133c8a021f68b3ec9a8dc9c + last_write_checksum: sha1:e8df0fe3275000ba8393cb784bb27d5fa86ed90c + pristine_git_object: 0363ffc8e16bcedaa2061492f22cdd3cda135a54 docs/models/chatgenerationparamsimageconfig.md: id: 84ed14ec0766 last_write_checksum: sha1:d1a564dc909fc6a87a45bc37e3fb2cae1ee29021 @@ -208,8 +209,8 @@ trackedFiles: pristine_git_object: 8751bd5a0caaac21f3726acb067e08acd1432776 docs/models/chatstreamingmessagechunk.md: id: f904722b1ed6 - last_write_checksum: sha1:70b26ba6365d38c7781af427355981908ef5a87b - pristine_git_object: 09d63c5b45f59d48540d38e532a980d7ad479511 + last_write_checksum: sha1:3fc6c5c76d0a6ae43dccaa2140ff834dcb48e6f1 + pristine_git_object: e84333618548f39dd70416d2aaf6587bf9bfaec9 docs/models/chatstreamingmessagechunkrole.md: id: 570be00c9576 last_write_checksum: sha1:43c1a234e149f4d104ea3403ff0eada9c25a04a9 @@ -816,8 +817,8 @@ trackedFiles: pristine_git_object: 58b79f7952dde1e36fc3696b72a2e7d5fff2d06b docs/models/openresponsesrequest.md: id: 31fbfb05398d - last_write_checksum: sha1:923e82298f26d9bc9214d3769047cab7d3104d73 - pristine_git_object: 15c300127dd9304088b3bca633c5d647ef026ee9 + last_write_checksum: sha1:f895611e3356d6bec3bbe3b1844ed04b5505db9e + pristine_git_object: b6770d897cfe41cae88f29ba439a5001605634a9 docs/models/openresponsesrequestignore.md: id: 1a7632be7d10 last_write_checksum: sha1:c0e3072d51d1b5f00239a5ae9c2c79bf46da8e19 @@ -1068,8 +1069,8 @@ trackedFiles: pristine_git_object: 9502d9d59e917351bec93c3c1c736ddb35d5bfc3 docs/models/operations/createauthkeyscoderequestbody.md: id: 41569d05ee8b - last_write_checksum: sha1:0600c727f5c22fdce81760b96956cfb835c5121a - pristine_git_object: dbb3cde4930120175d9a7d99bffb3272aa8a76ec + last_write_checksum: sha1:5d7996ddad24270c2c0e8f11498068d07be6f397 + pristine_git_object: 9e51f134d7964144989224d9ce193840877be666 docs/models/operations/createauthkeyscoderesponse.md: id: 94a1e2c0f03a last_write_checksum: sha1:8f4eaa9a5649fce1940c6d145138916b9076d5e3 @@ -1536,8 +1537,8 @@ trackedFiles: pristine_git_object: 6319d7beaa2d9709e126f07a3207533fcf24c1b8 docs/models/operations/providername.md: id: 616da1534f02 - last_write_checksum: sha1:a3f25ec3d8f6eb5543f367015ade7c805b8ee252 - pristine_git_object: 0bf0432a9d6cdb36ddc7c42e532809118f901a1e + last_write_checksum: sha1:b07571b39ad2771160d9c290e3d1f5b8069bd330 + pristine_git_object: b2bfaaf5c20d0d6ebbef2827a1d3d63e25dd1c52 docs/models/operations/providerresponse.md: id: 8af09d586b03 last_write_checksum: sha1:3969076345480f6e5738cc0299685a56331137f0 @@ -1618,6 +1619,10 @@ trackedFiles: id: 735448cf5655 last_write_checksum: sha1:4b96e81e4d478f4f489cc9b24728e5997641200f pristine_git_object: 9fd024851b0da0e68bd923c5ade17fffb9dc8410 + docs/models/operations/usagelimittype.md: + id: 22ad2742a599 + last_write_checksum: sha1:a335e4d7dd1a524b56249fb7e18c1bc3842036ff + pristine_git_object: d408cad7efc99651ffb7f2aee4d44ae1f13cab0c docs/models/operations/web3data.md: id: c7e71a30706c last_write_checksum: sha1:f20566610f7231c6e4b8616b55612cb645aec2b4 @@ -1776,8 +1781,8 @@ trackedFiles: pristine_git_object: 999451dd3bba7ed9c6ea46afd253b08f7e3f52e5 docs/models/providername.md: id: 661ee6ccfa8a - last_write_checksum: sha1:d5d492a523f8f864ed0fb1f9c9392323fbfefb3b - pristine_git_object: 0483a53e988b0ddfef832dcdc69a99bb2d55aecf + last_write_checksum: sha1:152f83cae6c6392b06ca65f0e35025eb8f56532d + pristine_git_object: 0e34e26bcec148923dd00327722473a0f5394bd7 docs/models/provideroverloadedresponseerrordata.md: id: 23d66996874e last_write_checksum: sha1:93e27b1eabea198409d833c54370b889a138f6b0 @@ -2160,24 +2165,28 @@ trackedFiles: pristine_git_object: 39f9a71b8276493ffea88de4ae61a47f27277d03 docs/models/schema19.md: id: a1918c602c97 - last_write_checksum: sha1:e840979f2ff09151616b46c9c2bbc8f0c419fbd9 - pristine_git_object: aa2d2931b1b3b60faa3d703d9ff0848f1c5f4f48 - docs/models/schema19reasoningencrypted.md: - id: bef8249cf600 - last_write_checksum: sha1:d2d3e8a3f12f36636de2c4c3f72c2637b6160756 - pristine_git_object: 2ef1668e819ebe96b736a5dad819f7785e919375 - docs/models/schema19reasoningsummary.md: - id: 2884b6e8d663 - last_write_checksum: sha1:d4638f1ea9b5c92744384fa55560a41fd0fe2e98 - pristine_git_object: 9595a9de68d56e7012f00d8bdf72c4217f96021b - docs/models/schema19reasoningtext.md: - id: 94d85a504b7a - last_write_checksum: sha1:980d6961d6438eaa091d8f82cb27b3dac5ed1c63 - pristine_git_object: d9fbcced669fc610456c275a0b0540cc7edf4d18 - docs/models/schema21.md: - id: 3ae2a63feaa4 - last_write_checksum: sha1:7aa4056a76f38ba3fe953bc38aa17adba8acba67 - pristine_git_object: 7cddb12216cee68755fc5122c49b91c5c39de830 + last_write_checksum: sha1:67f0cff79cac03b6a103998439e04504102b5509 + pristine_git_object: ea7933fbbae4381f501994d760c4e960a60e8676 + docs/models/schema20.md: + id: 2ed2864ff3c4 + last_write_checksum: sha1:511b6d43adb62079641072db00f4df91979aebc4 + pristine_git_object: 67c0f7775b3a94bf9afd18a3a1de649d19733fba + docs/models/schema20reasoningencrypted.md: + id: 96a79cc440eb + last_write_checksum: sha1:2db44373e4eb8748ed8551d7a94f7b0ae792e7c2 + pristine_git_object: d7bb3852b8b2244866d36ae0df2e0bd000c8894a + docs/models/schema20reasoningsummary.md: + id: 04c19747a3a5 + last_write_checksum: sha1:0cea991244e1f0b2824fd882cf834d975b7916bf + pristine_git_object: 2b2babaa852bf57adac18e9f2be7b9e1cb9d3f5e + docs/models/schema20reasoningtext.md: + id: 8f2e670b2d14 + last_write_checksum: sha1:062fe10a23c5b79961712c002c3e9ede35dbcfc5 + pristine_git_object: 2ea49313881cf8569ca0be1e31d88589eb3ed1ee + docs/models/schema22.md: + id: 3eec46cb8125 + last_write_checksum: sha1:97335e495635f5b9ca6321c758a0174c7de6a2bf + pristine_git_object: da4b1a0db4f876d323b24511bd7dd4263bf476a5 docs/models/schema3.md: id: 082bedbd3961 last_write_checksum: sha1:ccc46a9e8a10a7f5449e0032a922e0f688c676d8 @@ -2188,8 +2197,8 @@ trackedFiles: pristine_git_object: c8bd7fbcb6b0864537817fde15b672cf7240a3c1 docs/models/schema5enum.md: id: 8cc4e5e6f57f - last_write_checksum: sha1:46fec4f027c1c99af32ef4c2ecbf3c4d76d5e339 - pristine_git_object: cd07a0e9145207e04b30d442789cb9581a830958 + last_write_checksum: sha1:e603ac61c509ded4b344baa04347d548b5d212e7 + pristine_git_object: 4b5639ccc1f578de9d9b814f7af8bf4c6e2b6878 docs/models/schema8.md: id: b7fc1c31b395 last_write_checksum: sha1:65caddd51adeb138c4d2697f9b08dd4cfab57d4c @@ -2232,8 +2241,8 @@ trackedFiles: pristine_git_object: 91c2d0a7ed73db9e7156634849a512da44564816 docs/models/tooldefinitionjson.md: id: 30e8e6d8a7d2 - last_write_checksum: sha1:09b8133ac650550d8d9db33bb8a330bc434d9dd9 - pristine_git_object: d8993e62121c8ae0733faa7946b72569e4d5d974 + last_write_checksum: sha1:57a78557876d5ae4828d893e723a49564decd717 + pristine_git_object: 469f0f24cd8f1853fa4675aa627ccf18f4a1a712 docs/models/tooldefinitionjsonfunction.md: id: 75761f9c1950 last_write_checksum: sha1:82a4f3e911d54c86f538b3f0f87c7ea70fcd5983 @@ -2254,6 +2263,10 @@ trackedFiles: id: 6d198b9b973b last_write_checksum: sha1:4df4b348401c3e30d52b27aad85d649bfea28ed2 pristine_git_object: e318660cf6780d3417a5271672f8f9416ec08060 + docs/models/trace.md: + id: 0ed477c0186a + last_write_checksum: sha1:23c3e804e7ee886e46f3fc3232c484c52d2c5931 + pristine_git_object: 6b56181561fe044afc8b9928c26b9424edd872e7 docs/models/truncation.md: id: 075cd6c561df last_write_checksum: sha1:a4d0e764b76646b4cbc000895f1512dcad4e09fb @@ -2384,12 +2397,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:cb80f2c7d507bdca84d0fa1d3d6b891ce607ae47 - pristine_git_object: 2d1f7055f8a6294771f7ba50692e8497246e1d19 + last_write_checksum: sha1:a8001642fef5c31a8076caea5e0a613e6af7e0cc + pristine_git_object: 4f282001bc659cc8f83c449afef948c10764a448 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:40346950444d9374e141c5d2e7d9ea32c1852856 - pristine_git_object: 56389bb7325171c710bf27068daa83190d57989d + last_write_checksum: sha1:1adc558d0e3eaa89ec151f2e36f40154a565a9c1 + pristine_git_object: be248dd744c64eb759eb512aa4aaad1deaf79314 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -2556,8 +2569,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:23d7aec033b120bf2ec84920d89183a71e556659 - pristine_git_object: 4dcf5869566f3b7242a49487782bd8a196c9cdf9 + last_write_checksum: sha1:9d549839bf41dca2ad1fb41eef161dcd2fdf0bbc + pristine_git_object: fbdb2a0c404b7bc7f4c7d55a1e181a3a6b0b42fb src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -2624,8 +2637,8 @@ trackedFiles: pristine_git_object: c13ce72558d6d7e328189266bca17c00b433ab2a src/models/assistantmessage.ts: id: 2147a953e992 - last_write_checksum: sha1:1dbbc90af00e688f22ff31eddaf94eaa533b15d7 - pristine_git_object: 81ba1846a6453b24689cb4f561dd6eba20f413cd + last_write_checksum: sha1:ea651499ba840011dd7b09514b0ef9bcce1c5836 + pristine_git_object: e869a89bc3f3c83bf640d01834435c5848426e7c src/models/badgatewayresponseerrordata.ts: id: de317517c298 last_write_checksum: sha1:0c142f4aa9e808430a0caffe3c454146875e7c56 @@ -2644,8 +2657,8 @@ trackedFiles: pristine_git_object: 9f509fc94bcb4b1c24b5046b3cb6e2b7b637c118 src/models/chatgenerationparams.ts: id: f98a2a558f3f - last_write_checksum: sha1:d0eb1a7bcf8f8ea6da811f6d001c46017d8ad755 - pristine_git_object: 5de6d6588189a5c5da6264d0d2d3d2fbd174add7 + last_write_checksum: sha1:6c13d781d8c3b0d06acb62ab4ed0077e73e648f1 + pristine_git_object: 452ddf8dbbdb212a39a13c358c7eb5c621cdc081 src/models/chatgenerationtokenusage.ts: id: 1d57b0d238b8 last_write_checksum: sha1:c07f2e7a811b665994f9ae1d42df31aa701388ff @@ -2700,8 +2713,8 @@ trackedFiles: pristine_git_object: 43fa1d4cf1de1de8bd7fdd33c8a8260a9f6b3602 src/models/chatstreamingmessagechunk.ts: id: 339ee7e4b920 - last_write_checksum: sha1:3b626c19b00b500680e7e4bd4cba5a7bc31b617d - pristine_git_object: fb1171fa67fe08b432131d9f2c13fc846d35f953 + last_write_checksum: sha1:bbb25285d1d005ab85ef09e230dcd269f3cc8343 + pristine_git_object: 05646953428bf141f3f271f1a528bce8e5b15dcd src/models/chatstreamingmessagetoolcall.ts: id: 74ba154581ba last_write_checksum: sha1:bff3523e97b1d522d79810caaf849509d1d9d280 @@ -2840,8 +2853,8 @@ trackedFiles: pristine_git_object: db61647cd182502b2b3b5333ee3a0bba66542645 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:8107e23b16666b9aa3f5d4393fa7f10cfd8852fe - pristine_git_object: 1330b6a98e31a963061e279bf8a69c6434a80efe + last_write_checksum: sha1:45d879b5f2d1ffe02a0c26083c1ec5ecd56dd819 + pristine_git_object: 5af68c37932329637ff26e7f852d6486239f8d16 src/models/inputmodality.ts: id: 771d5d4c91ec last_write_checksum: sha1:7f742bf5a1e6b7953ea96df4c4cef29c602accad @@ -3020,8 +3033,8 @@ trackedFiles: pristine_git_object: 438e3268f5050c6e3e4899d019e9671f0ef9a556 src/models/openresponsesrequest.ts: id: ff8a31d46b1c - last_write_checksum: sha1:0d0ed188e0a8133eed1e5c5e0546ce21839c10dd - pristine_git_object: dae7dabb9dab203fe7ac5b0fef400fee5e4fe33a + last_write_checksum: sha1:bd69c0d4ffb903995fa58bd0eea1ba6d7fd700c9 + pristine_git_object: c974c8e9aefbc9c2f9127019c8d9a1b3316de959 src/models/openresponsesresponsetext.ts: id: aded1ce23b04 last_write_checksum: sha1:5046f904e0b5db52fbae46d9bbed94d651b7b0ef @@ -3072,8 +3085,8 @@ trackedFiles: pristine_git_object: b1cee1916f9fca2cd03b30a6723df85d89f0f028 src/models/operations/createauthkeyscode.ts: id: 1443f6afbf40 - last_write_checksum: sha1:765f931d589b433b0ee597425212c62725fc1988 - pristine_git_object: d12a0b230da2428ee7ebb7c2c56e3da5513c0d36 + last_write_checksum: sha1:00a755f7d44b65af50fc56cf92a2bfca618f0737 + pristine_git_object: 8979e7afe267d5449a312b065ab9b5c268d7ea2c src/models/operations/createcoinbasecharge.ts: id: 1e75ac2debf2 last_write_checksum: sha1:9da654d157dfcad5897b2d2d606827abf626fdd0 @@ -3116,8 +3129,8 @@ trackedFiles: pristine_git_object: 2677e460511944b9c01e063c03956af071e7f933 src/models/operations/getgeneration.ts: id: 5cdb2959d2a5 - last_write_checksum: sha1:5340d088c5810bec1d8833cccd1c9a972def5864 - pristine_git_object: f32739a9593a193fdcd8231317f1b643410bbfc6 + last_write_checksum: sha1:2c071bcdff10facacd81b9b8090a3aa1aa02f54b + pristine_git_object: 98798dd9343d8a44677141ec0d6382a238e69f72 src/models/operations/getguardrail.ts: id: 11c366ebdade last_write_checksum: sha1:13348e3498ff474d192662d5e437d438d42877c2 @@ -3256,8 +3269,8 @@ trackedFiles: pristine_git_object: d2180d165594e1e5a5cd373ad9b0e03b13acce61 src/models/providername.ts: id: 89e536fb023a - last_write_checksum: sha1:2a476e8d383764d6455af2f5158d94cb56656679 - pristine_git_object: 41aa063bd1f0e46f86a8c74820e5f80426936a92 + last_write_checksum: sha1:631f393306798a6837f84ab517559e27c313930d + pristine_git_object: eca31616292f8b3884fb409d0249ba989aff788d src/models/provideroverloadedresponseerrordata.ts: id: 379f1256314f last_write_checksum: sha1:0458b6a8454adfa7c415e3bd7f49f2879cc6093e @@ -3416,12 +3429,16 @@ trackedFiles: pristine_git_object: d410ec3d6ae94f8cb4391f82343968b4e2e89030 src/models/schema19.ts: id: 6aa8d65adcb3 - last_write_checksum: sha1:7e99f2092ff0f3ede005d43d36e36daaafdadf94 - pristine_git_object: 15e01a96c9bb013343c768eb2cd2f2da3cecb9f4 + last_write_checksum: sha1:229e2f47a737c751da81686a331390d03e7f8a55 + pristine_git_object: 4c8e893894d239c0a3bd8d77d49aa1df2b99efdc + src/models/schema20.ts: + id: 5f7513725376 + last_write_checksum: sha1:9dae195c39b4412b84655fd4058d6f6957d61352 + pristine_git_object: 78505c82bbf80fd23716c62baa50588a97b231f3 src/models/schema5.ts: id: 6013b8ad4236 - last_write_checksum: sha1:df2f0193c20ae44d7e64e4679702dac1fc16df6b - pristine_git_object: 6b140f2a155a28ec1abf3ffff165e4519984fe4c + last_write_checksum: sha1:1868bec916b542f584b115e149f11fec26a4229d + pristine_git_object: 1bd4edd9ee5a1debb256c8b97ffc4ae922341532 src/models/security.ts: id: d90c6c784ca5 last_write_checksum: sha1:90d7a8903f46cd2ea5428527343a003511fc78c9 @@ -3440,8 +3457,8 @@ trackedFiles: pristine_git_object: 1585e3f90f3f774a0b955cb671e7745c5b95473b src/models/tooldefinitionjson.ts: id: 546c340f3013 - last_write_checksum: sha1:554556b413cd0b845ddcf77a614ea71375de2c24 - pristine_git_object: 8456579f999ff223573519e0595978297d10c8e6 + last_write_checksum: sha1:732fa7574885e5f8891a5c6246a5d1b788f4202b + pristine_git_object: e6d44a7a8772aa2fb4978555fa75e69b95570618 src/models/toolresponsemessage.ts: id: 1122bbfb530b last_write_checksum: sha1:81695fbc02de3945d966a1f7de981c58bee89773 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f27b66b8..90623aa7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: preApplyUnionDiscriminators: true versioningStrategy: automatic typescript: - version: 0.8.0 + version: 0.9.3 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index cc8e6171..f864de72 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -3574,6 +3574,7 @@ components: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -4094,6 +4095,25 @@ components: 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: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: + nullable: true + description: >- + 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. description: Request schema for Responses endpoint example: model: anthropic/claude-4.5-sonnet-20250929 @@ -7191,6 +7211,25 @@ components: 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: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: + nullable: true + description: >- + 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. models: type: array items: @@ -7507,7 +7546,6 @@ components: required: - prompt - completion - additionalProperties: false description: Pricing information for the model example: prompt: '0.00003' @@ -8015,7 +8053,6 @@ components: required: - prompt - completion - additionalProperties: false provider_name: $ref: '#/components/schemas/ProviderName' tag: @@ -8350,6 +8387,7 @@ components: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -8532,6 +8570,20 @@ components: type: string maxLength: 128 __schema19: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: {} + __schema20: oneOf: - type: object properties: @@ -8541,9 +8593,9 @@ components: summary: type: string id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: @@ -8557,9 +8609,9 @@ components: data: type: string id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: @@ -8579,19 +8631,19 @@ components: - type: string - type: 'null' id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: - type type: object - __schema20: + __schema21: anyOf: - type: string - type: 'null' - __schema21: + __schema22: anyOf: - type: string enum: @@ -8602,7 +8654,7 @@ components: - anthropic-claude-v1 - google-gemini-v1 - type: 'null' - __schema25: + __schema26: anyOf: - $ref: '#/components/schemas/ChatCompletionFinishReason' - type: 'null' @@ -8978,7 +9030,7 @@ components: reasoning_details: type: array items: - $ref: '#/components/schemas/__schema19' + $ref: '#/components/schemas/__schema20' images: type: array items: @@ -9054,6 +9106,8 @@ components: - type: 'null' required: - name + cache_control: + $ref: '#/components/schemas/ChatMessageContentItemCacheControl' required: - type - function @@ -9111,6 +9165,12 @@ components: observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters. $ref: '#/components/schemas/__schema18' + trace: + description: >- + 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. + $ref: '#/components/schemas/__schema19' messages: minItems: 1 type: array @@ -9241,6 +9301,10 @@ components: minimum: 0 maximum: 2 - type: 'null' + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' tool_choice: $ref: '#/components/schemas/ToolChoiceOption' tools: @@ -9286,7 +9350,7 @@ components: type: object properties: finish_reason: - $ref: '#/components/schemas/__schema25' + $ref: '#/components/schemas/__schema26' index: type: number message: @@ -9344,14 +9408,14 @@ components: reasoning_details: type: array items: - $ref: '#/components/schemas/__schema19' + $ref: '#/components/schemas/__schema20' ChatStreamingChoice: type: object properties: delta: $ref: '#/components/schemas/ChatStreamingMessageChunk' finish_reason: - $ref: '#/components/schemas/__schema25' + $ref: '#/components/schemas/__schema26' index: type: number logprobs: @@ -10558,6 +10622,7 @@ paths: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -13710,6 +13775,19 @@ paths: nullable: true format: date-time description: Optional expiration time for the API key to be created + key_label: + type: string + maxLength: 100 + description: Optional custom label for the API key. Defaults to the app name if not provided. + example: My Custom Key + usage_limit_type: + type: string + enum: + - daily + - weekly + - monthly + description: Optional credit limit reset interval. When set, the credit limit resets on this interval. + example: monthly required: - callback_url example: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index a8742654..69b720f8 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -3593,6 +3593,7 @@ components: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -4097,6 +4098,23 @@ components: maxLength: 128 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. + trace: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: + nullable: true + description: >- + 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. description: Request schema for Responses endpoint example: model: anthropic/claude-4.5-sonnet-20250929 @@ -7209,6 +7227,23 @@ components: maxLength: 128 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. + trace: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: + nullable: true + description: >- + 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. models: type: array items: @@ -7517,7 +7552,6 @@ components: required: - prompt - completion - additionalProperties: false description: Pricing information for the model example: prompt: '0.00003' @@ -8031,7 +8065,6 @@ components: required: - prompt - completion - additionalProperties: false provider_name: $ref: '#/components/schemas/ProviderName' tag: @@ -8350,6 +8383,7 @@ components: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -8536,6 +8570,20 @@ components: type: string maxLength: 128 __schema19: + type: object + properties: + trace_id: + type: string + trace_name: + type: string + span_name: + type: string + generation_name: + type: string + parent_span_id: + type: string + additionalProperties: {} + __schema20: oneOf: - type: object properties: @@ -8545,9 +8593,9 @@ components: summary: type: string id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: @@ -8561,9 +8609,9 @@ components: data: type: string id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: @@ -8583,19 +8631,19 @@ components: - type: string - type: 'null' id: - $ref: '#/components/schemas/__schema20' - format: $ref: '#/components/schemas/__schema21' + format: + $ref: '#/components/schemas/__schema22' index: $ref: '#/components/schemas/__schema11' required: - type type: object - __schema20: + __schema21: anyOf: - type: string - type: 'null' - __schema21: + __schema22: anyOf: - type: string enum: @@ -8607,7 +8655,7 @@ components: - google-gemini-v1 x-speakeasy-unknown-values: allow - type: 'null' - __schema25: + __schema26: anyOf: - $ref: '#/components/schemas/ChatCompletionFinishReason' - type: 'null' @@ -8986,7 +9034,7 @@ components: reasoning_details: type: array items: - $ref: '#/components/schemas/__schema19' + $ref: '#/components/schemas/__schema20' images: type: array items: @@ -9062,6 +9110,8 @@ components: - type: 'null' required: - name + cache_control: + $ref: '#/components/schemas/ChatMessageContentItemCacheControl' required: - type - function @@ -9118,6 +9168,10 @@ components: 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. $ref: '#/components/schemas/__schema18' + trace: + description: >- + 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. + $ref: '#/components/schemas/__schema19' messages: minItems: 1 type: array @@ -9249,6 +9303,10 @@ components: minimum: 0 maximum: 2 - type: 'null' + parallel_tool_calls: + anyOf: + - type: boolean + - type: 'null' tool_choice: $ref: '#/components/schemas/ToolChoiceOption' tools: @@ -9295,7 +9353,7 @@ components: type: object properties: finish_reason: - $ref: '#/components/schemas/__schema25' + $ref: '#/components/schemas/__schema26' index: type: number message: @@ -9353,14 +9411,14 @@ components: reasoning_details: type: array items: - $ref: '#/components/schemas/__schema19' + $ref: '#/components/schemas/__schema20' ChatStreamingChoice: type: object properties: delta: $ref: '#/components/schemas/ChatStreamingMessageChunk' finish_reason: - $ref: '#/components/schemas/__schema25' + $ref: '#/components/schemas/__schema26' index: type: number logprobs: @@ -10602,6 +10660,7 @@ paths: - Inceptron - InferenceNet - Infermatic + - Io Net - Inflection - Liquid - Mara @@ -13790,6 +13849,20 @@ paths: nullable: true format: date-time description: Optional expiration time for the API key to be created + key_label: + type: string + maxLength: 100 + description: Optional custom label for the API key. Defaults to the app name if not provided. + example: My Custom Key + usage_limit_type: + type: string + enum: + - daily + - weekly + - monthly + description: Optional credit limit reset interval. When set, the credit limit resets on this interval. + example: monthly + x-speakeasy-unknown-values: allow required: - callback_url example: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index cc4a5d99..27249a83 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.680.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:270250dd1c0a82a50bdbdbd9bcc22d6b7c859aa05de55451931cd7b7d1e89373 - sourceBlobDigest: sha256:92b2bc8a211cdec86645642bf778db7ba41ae73cee2d1fc0671b7057f45d0203 + sourceRevisionDigest: sha256:d71ef76568e142b39063450ca51629eb64c314036fe63617744d9447338403f4 + sourceBlobDigest: sha256:74492c89926adbd29550ffd40d46ea9ba9bf9aa5912e699cd46bae509e737eb5 tags: - latest - main @@ -12,8 +12,8 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:270250dd1c0a82a50bdbdbd9bcc22d6b7c859aa05de55451931cd7b7d1e89373 - sourceBlobDigest: sha256:92b2bc8a211cdec86645642bf778db7ba41ae73cee2d1fc0671b7057f45d0203 + sourceRevisionDigest: sha256:d71ef76568e142b39063450ca51629eb64c314036fe63617744d9447338403f4 + sourceBlobDigest: sha256:74492c89926adbd29550ffd40d46ea9ba9bf9aa5912e699cd46bae509e737eb5 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.680.0 diff --git a/docs/models/assistantmessage.md b/docs/models/assistantmessage.md index 76711bea..115600ea 100644 --- a/docs/models/assistantmessage.md +++ b/docs/models/assistantmessage.md @@ -20,5 +20,5 @@ let value: AssistantMessage = { | `toolCalls` | [models.ChatMessageToolCall](../models/chatmessagetoolcall.md)[] | :heavy_minus_sign: | N/A | | `refusal` | *string* | :heavy_minus_sign: | N/A | | `reasoning` | *string* | :heavy_minus_sign: | N/A | -| `reasoningDetails` | *models.Schema19*[] | :heavy_minus_sign: | N/A | +| `reasoningDetails` | *models.Schema20*[] | :heavy_minus_sign: | N/A | | `images` | [models.Image](../models/image.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatgenerationparams.md b/docs/models/chatgenerationparams.md index c5802561..0363ffc8 100644 --- a/docs/models/chatgenerationparams.md +++ b/docs/models/chatgenerationparams.md @@ -24,6 +24,7 @@ let value: ChatGenerationParams = { | `route` | [models.Route](../models/route.md) | :heavy_minus_sign: | N/A | | `user` | *string* | :heavy_minus_sign: | N/A | | `sessionId` | *string* | :heavy_minus_sign: | N/A | +| `trace` | [models.Schema19](../models/schema19.md) | :heavy_minus_sign: | N/A | | `messages` | *models.Message*[] | :heavy_check_mark: | N/A | | `model` | *string* | :heavy_minus_sign: | N/A | | `models` | *string*[] | :heavy_minus_sign: | N/A | @@ -42,6 +43,7 @@ let value: ChatGenerationParams = { | `stream` | *boolean* | :heavy_minus_sign: | N/A | | `streamOptions` | [models.ChatStreamOptions](../models/chatstreamoptions.md) | :heavy_minus_sign: | N/A | | `temperature` | *number* | :heavy_minus_sign: | N/A | +| `parallelToolCalls` | *boolean* | :heavy_minus_sign: | N/A | | `toolChoice` | *any* | :heavy_minus_sign: | N/A | | `tools` | [models.ToolDefinitionJson](../models/tooldefinitionjson.md)[] | :heavy_minus_sign: | N/A | | `topP` | *number* | :heavy_minus_sign: | N/A | diff --git a/docs/models/chatstreamingmessagechunk.md b/docs/models/chatstreamingmessagechunk.md index 09d63c5b..e8433361 100644 --- a/docs/models/chatstreamingmessagechunk.md +++ b/docs/models/chatstreamingmessagechunk.md @@ -17,4 +17,4 @@ let value: ChatStreamingMessageChunk = {}; | `reasoning` | *string* | :heavy_minus_sign: | N/A | | `refusal` | *string* | :heavy_minus_sign: | N/A | | `toolCalls` | [models.ChatStreamingMessageToolCall](../models/chatstreamingmessagetoolcall.md)[] | :heavy_minus_sign: | N/A | -| `reasoningDetails` | *models.Schema19*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `reasoningDetails` | *models.Schema20*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/openresponsesrequest.md b/docs/models/openresponsesrequest.md index 15c30012..b6770d89 100644 --- a/docs/models/openresponsesrequest.md +++ b/docs/models/openresponsesrequest.md @@ -47,4 +47,5 @@ let value: OpenResponsesRequest = {}; | `provider` | [models.Provider](../models/provider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | | | `plugins` | *models.Plugin*[] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | | | `user` | *string* | :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. | | -| `sessionId` | *string* | :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. | | \ No newline at end of file +| `sessionId` | *string* | :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` | [models.Trace](../models/trace.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. | | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscoderequestbody.md b/docs/models/operations/createauthkeyscoderequestbody.md index dbb3cde4..9e51f134 100644 --- a/docs/models/operations/createauthkeyscoderequestbody.md +++ b/docs/models/operations/createauthkeyscoderequestbody.md @@ -18,4 +18,6 @@ let value: CreateAuthKeysCodeRequestBody = { | `codeChallenge` | *string* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | | `codeChallengeMethod` | [operations.CreateAuthKeysCodeCodeChallengeMethod](../../models/operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | -| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | \ No newline at end of file +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Optional expiration time for the API key to be created | | +| `keyLabel` | *string* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key | +| `usageLimitType` | [operations.UsageLimitType](../../models/operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly | \ No newline at end of file diff --git a/docs/models/operations/providername.md b/docs/models/operations/providername.md index 0bf0432a..b2bfaaf5 100644 --- a/docs/models/operations/providername.md +++ b/docs/models/operations/providername.md @@ -13,5 +13,5 @@ let value: ProviderName = "Lambda"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AnyScale" | "Atoma" | "Cent-ML" | "CrofAI" | "Enfer" | "GoPomelo" | "HuggingFace" | "Hyperbolic 2" | "InoCloud" | "Kluster" | "Lambda" | "Lepton" | "Lynn 2" | "Lynn" | "Mancer" | "Meta" | "Modal" | "Nineteen" | "OctoAI" | "Recursal" | "Reflection" | "Replicate" | "SambaNova 2" | "SF Compute" | "Targon" | "Together 2" | "Ubicloud" | "01.AI" | "AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Infermatic" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"AnyScale" | "Atoma" | "Cent-ML" | "CrofAI" | "Enfer" | "GoPomelo" | "HuggingFace" | "Hyperbolic 2" | "InoCloud" | "Kluster" | "Lambda" | "Lepton" | "Lynn 2" | "Lynn" | "Mancer" | "Meta" | "Modal" | "Nineteen" | "OctoAI" | "Recursal" | "Reflection" | "Replicate" | "SambaNova 2" | "SF Compute" | "Targon" | "Together 2" | "Ubicloud" | "01.AI" | "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" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/operations/usagelimittype.md b/docs/models/operations/usagelimittype.md new file mode 100644 index 00000000..d408cad7 --- /dev/null +++ b/docs/models/operations/usagelimittype.md @@ -0,0 +1,19 @@ +# UsageLimitType + +Optional credit limit reset interval. When set, the credit limit resets on this interval. + +## Example Usage + +```typescript +import { UsageLimitType } from "@openrouter/sdk/models/operations"; + +let value: UsageLimitType = "monthly"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"daily" | "weekly" | "monthly" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/providername.md b/docs/models/providername.md index 0483a53e..0e34e26b 100644 --- a/docs/models/providername.md +++ b/docs/models/providername.md @@ -13,5 +13,5 @@ let value: ProviderName = "OpenAI"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Infermatic" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"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" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/schema19.md b/docs/models/schema19.md index aa2d2931..ea7933fb 100644 --- a/docs/models/schema19.md +++ b/docs/models/schema19.md @@ -1,31 +1,20 @@ # Schema19 - -## Supported Types - -### `models.Schema19ReasoningSummary` +## Example Usage ```typescript -const value: models.Schema19ReasoningSummary = { - type: "reasoning.summary", - summary: "", -}; -``` - -### `models.Schema19ReasoningEncrypted` +import { Schema19 } from "@openrouter/sdk/models"; -```typescript -const value: models.Schema19ReasoningEncrypted = { - type: "reasoning.encrypted", - data: "", -}; +let value: Schema19 = {}; ``` -### `models.Schema19ReasoningText` - -```typescript -const value: models.Schema19ReasoningText = { - type: "reasoning.text", -}; -``` +## Fields +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `traceId` | *string* | :heavy_minus_sign: | N/A | +| `traceName` | *string* | :heavy_minus_sign: | N/A | +| `spanName` | *string* | :heavy_minus_sign: | N/A | +| `generationName` | *string* | :heavy_minus_sign: | N/A | +| `parentSpanId` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/schema20.md b/docs/models/schema20.md new file mode 100644 index 00000000..67c0f777 --- /dev/null +++ b/docs/models/schema20.md @@ -0,0 +1,31 @@ +# Schema20 + + +## Supported Types + +### `models.Schema20ReasoningSummary` + +```typescript +const value: models.Schema20ReasoningSummary = { + type: "reasoning.summary", + summary: "", +}; +``` + +### `models.Schema20ReasoningEncrypted` + +```typescript +const value: models.Schema20ReasoningEncrypted = { + type: "reasoning.encrypted", + data: "", +}; +``` + +### `models.Schema20ReasoningText` + +```typescript +const value: models.Schema20ReasoningText = { + type: "reasoning.text", +}; +``` + diff --git a/docs/models/schema19reasoningencrypted.md b/docs/models/schema20reasoningencrypted.md similarity index 81% rename from docs/models/schema19reasoningencrypted.md rename to docs/models/schema20reasoningencrypted.md index 2ef1668e..d7bb3852 100644 --- a/docs/models/schema19reasoningencrypted.md +++ b/docs/models/schema20reasoningencrypted.md @@ -1,11 +1,11 @@ -# Schema19ReasoningEncrypted +# Schema20ReasoningEncrypted ## Example Usage ```typescript -import { Schema19ReasoningEncrypted } from "@openrouter/sdk/models"; +import { Schema20ReasoningEncrypted } from "@openrouter/sdk/models"; -let value: Schema19ReasoningEncrypted = { +let value: Schema20ReasoningEncrypted = { type: "reasoning.encrypted", data: "", }; @@ -18,5 +18,5 @@ let value: Schema19ReasoningEncrypted = { | `type` | *"reasoning.encrypted"* | :heavy_check_mark: | N/A | | `data` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.Schema21](../models/schema21.md) | :heavy_minus_sign: | N/A | +| `format` | [models.Schema22](../models/schema22.md) | :heavy_minus_sign: | N/A | | `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/schema19reasoningsummary.md b/docs/models/schema20reasoningsummary.md similarity index 82% rename from docs/models/schema19reasoningsummary.md rename to docs/models/schema20reasoningsummary.md index 9595a9de..2b2babaa 100644 --- a/docs/models/schema19reasoningsummary.md +++ b/docs/models/schema20reasoningsummary.md @@ -1,11 +1,11 @@ -# Schema19ReasoningSummary +# Schema20ReasoningSummary ## Example Usage ```typescript -import { Schema19ReasoningSummary } from "@openrouter/sdk/models"; +import { Schema20ReasoningSummary } from "@openrouter/sdk/models"; -let value: Schema19ReasoningSummary = { +let value: Schema20ReasoningSummary = { type: "reasoning.summary", summary: "", }; @@ -18,5 +18,5 @@ let value: Schema19ReasoningSummary = { | `type` | *"reasoning.summary"* | :heavy_check_mark: | N/A | | `summary` | *string* | :heavy_check_mark: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.Schema21](../models/schema21.md) | :heavy_minus_sign: | N/A | +| `format` | [models.Schema22](../models/schema22.md) | :heavy_minus_sign: | N/A | | `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/schema19reasoningtext.md b/docs/models/schema20reasoningtext.md similarity index 84% rename from docs/models/schema19reasoningtext.md rename to docs/models/schema20reasoningtext.md index d9fbcced..2ea49313 100644 --- a/docs/models/schema19reasoningtext.md +++ b/docs/models/schema20reasoningtext.md @@ -1,11 +1,11 @@ -# Schema19ReasoningText +# Schema20ReasoningText ## Example Usage ```typescript -import { Schema19ReasoningText } from "@openrouter/sdk/models"; +import { Schema20ReasoningText } from "@openrouter/sdk/models"; -let value: Schema19ReasoningText = { +let value: Schema20ReasoningText = { type: "reasoning.text", }; ``` @@ -18,5 +18,5 @@ let value: Schema19ReasoningText = { | `text` | *string* | :heavy_minus_sign: | N/A | | `signature` | *string* | :heavy_minus_sign: | N/A | | `id` | *string* | :heavy_minus_sign: | N/A | -| `format` | [models.Schema21](../models/schema21.md) | :heavy_minus_sign: | N/A | +| `format` | [models.Schema22](../models/schema22.md) | :heavy_minus_sign: | N/A | | `index` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/schema21.md b/docs/models/schema22.md similarity index 75% rename from docs/models/schema21.md rename to docs/models/schema22.md index 7cddb122..da4b1a0d 100644 --- a/docs/models/schema21.md +++ b/docs/models/schema22.md @@ -1,11 +1,11 @@ -# Schema21 +# Schema22 ## Example Usage ```typescript -import { Schema21 } from "@openrouter/sdk/models"; +import { Schema22 } from "@openrouter/sdk/models"; -let value: Schema21 = "openai-responses-v1"; +let value: Schema22 = "unknown"; ``` ## Values diff --git a/docs/models/schema5enum.md b/docs/models/schema5enum.md index cd07a0e9..4b5639cc 100644 --- a/docs/models/schema5enum.md +++ b/docs/models/schema5enum.md @@ -13,5 +13,5 @@ let value: Schema5Enum = "Xiaomi"; This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. ```typescript -"AI21" | "AionLabs" | "Alibaba" | "Ambient" | "Amazon Bedrock" | "Amazon Nova" | "Anthropic" | "Arcee AI" | "AtlasCloud" | "Avian" | "Azure" | "BaseTen" | "BytePlus" | "Black Forest Labs" | "Cerebras" | "Chutes" | "Cirrascale" | "Clarifai" | "Cloudflare" | "Cohere" | "Crusoe" | "DeepInfra" | "DeepSeek" | "Featherless" | "Fireworks" | "Friendli" | "GMICloud" | "Google" | "Google AI Studio" | "Groq" | "Hyperbolic" | "Inception" | "Inceptron" | "InferenceNet" | "Infermatic" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized +"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" | "Infermatic" | "Io Net" | "Inflection" | "Liquid" | "Mara" | "Mancer 2" | "Minimax" | "ModelRun" | "Mistral" | "Modular" | "Moonshot AI" | "Morph" | "NCompass" | "Nebius" | "NextBit" | "Novita" | "Nvidia" | "OpenAI" | "OpenInference" | "Parasail" | "Perplexity" | "Phala" | "Relace" | "SambaNova" | "Seed" | "SiliconFlow" | "Sourceful" | "StepFun" | "Stealth" | "StreamLake" | "Switchpoint" | "Together" | "Upstage" | "Venice" | "WandB" | "Xiaomi" | "xAI" | "Z.AI" | "FakeProvider" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/tooldefinitionjson.md b/docs/models/tooldefinitionjson.md index d8993e62..469f0f24 100644 --- a/docs/models/tooldefinitionjson.md +++ b/docs/models/tooldefinitionjson.md @@ -15,7 +15,8 @@ let value: ToolDefinitionJson = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *"function"* | :heavy_check_mark: | N/A | -| `function` | [models.ToolDefinitionJsonFunction](../models/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `type` | *"function"* | :heavy_check_mark: | N/A | +| `function` | [models.ToolDefinitionJsonFunction](../models/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A | +| `cacheControl` | [models.ChatMessageContentItemCacheControl](../models/chatmessagecontentitemcachecontrol.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/trace.md b/docs/models/trace.md new file mode 100644 index 00000000..6b561815 --- /dev/null +++ b/docs/models/trace.md @@ -0,0 +1,22 @@ +# 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. + +## Example Usage + +```typescript +import { Trace } from "@openrouter/sdk/models"; + +let value: Trace = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `traceId` | *string* | :heavy_minus_sign: | N/A | +| `traceName` | *string* | :heavy_minus_sign: | N/A | +| `spanName` | *string* | :heavy_minus_sign: | N/A | +| `generationName` | *string* | :heavy_minus_sign: | N/A | +| `parentSpanId` | *string* | :heavy_minus_sign: | N/A | +| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/examples/nextjs-example/package.json b/examples/nextjs-example/package.json index d3c89874..c19ed544 100644 --- a/examples/nextjs-example/package.json +++ b/examples/nextjs-example/package.json @@ -16,7 +16,7 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.544.0", - "next": "15.5.9", + "next": "15.5.10", "react": "19.1.0", "react-dom": "19.1.0", "tailwind-merge": "^3.3.1", @@ -29,7 +29,7 @@ "@types/react": "^19", "@types/react-dom": "^19", "eslint": "^9", - "eslint-config-next": "15.5.9", + "eslint-config-next": "15.5.10", "tailwindcss": "^4", "tw-animate-css": "^1.4.0", "typescript": "^5" diff --git a/jsr.json b/jsr.json index 2d1f7055..4f282001 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.8.0", + "version": "0.9.3", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index be1abdf1..dcb91e5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.8.0", + "version": "0.9.3", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.", "keywords": [ diff --git a/src/lib/config.ts b/src/lib/config.ts index d6c3be8e..273fba65 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -76,7 +76,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.8.0", + sdkVersion: "0.9.3", genVersion: "2.788.4", - userAgent: "speakeasy-sdk/typescript 0.8.0 2.788.4 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 0.9.3 2.788.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/assistantmessage.ts b/src/models/assistantmessage.ts index 81ba1846..e869a89b 100644 --- a/src/models/assistantmessage.ts +++ b/src/models/assistantmessage.ts @@ -21,11 +21,11 @@ import { } from "./chatmessagetoolcall.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { - Schema19, - Schema19$inboundSchema, - Schema19$Outbound, - Schema19$outboundSchema, -} from "./schema19.js"; + Schema20, + Schema20$inboundSchema, + Schema20$Outbound, + Schema20$outboundSchema, +} from "./schema20.js"; export type AssistantMessageContent = string | Array; @@ -44,7 +44,7 @@ export type AssistantMessage = { toolCalls?: Array | undefined; refusal?: string | null | undefined; reasoning?: string | null | undefined; - reasoningDetails?: Array | undefined; + reasoningDetails?: Array | undefined; images?: Array | undefined; }; @@ -166,7 +166,7 @@ export const AssistantMessage$inboundSchema: z.ZodType< tool_calls: z.array(ChatMessageToolCall$inboundSchema).optional(), refusal: z.nullable(z.string()).optional(), reasoning: z.nullable(z.string()).optional(), - reasoning_details: z.array(Schema19$inboundSchema).optional(), + reasoning_details: z.array(Schema20$inboundSchema).optional(), images: z.array(z.lazy(() => Image$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { @@ -182,7 +182,7 @@ export type AssistantMessage$Outbound = { tool_calls?: Array | undefined; refusal?: string | null | undefined; reasoning?: string | null | undefined; - reasoning_details?: Array | undefined; + reasoning_details?: Array | undefined; images?: Array | undefined; }; @@ -199,7 +199,7 @@ export const AssistantMessage$outboundSchema: z.ZodType< toolCalls: z.array(ChatMessageToolCall$outboundSchema).optional(), refusal: z.nullable(z.string()).optional(), reasoning: z.nullable(z.string()).optional(), - reasoningDetails: z.array(Schema19$outboundSchema).optional(), + reasoningDetails: z.array(Schema20$outboundSchema).optional(), images: z.array(z.lazy(() => Image$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/chatgenerationparams.ts b/src/models/chatgenerationparams.ts index 5de6d658..452ddf8d 100644 --- a/src/models/chatgenerationparams.ts +++ b/src/models/chatgenerationparams.ts @@ -46,6 +46,11 @@ import { Schema17$Outbound, Schema17$outboundSchema, } from "./schema17.js"; +import { + Schema19, + Schema19$Outbound, + Schema19$outboundSchema, +} from "./schema19.js"; import { Schema5, Schema5$Outbound, @@ -161,6 +166,7 @@ export type ChatGenerationParams = { route?: Route | null | undefined; user?: string | undefined; sessionId?: string | undefined; + trace?: Schema19 | undefined; messages: Array; model?: string | undefined; models?: Array | undefined; @@ -185,6 +191,7 @@ export type ChatGenerationParams = { stream?: boolean | undefined; streamOptions?: ChatStreamOptions | null | undefined; temperature?: number | null | undefined; + parallelToolCalls?: boolean | null | undefined; toolChoice?: any | undefined; tools?: Array | undefined; topP?: number | null | undefined; @@ -466,6 +473,7 @@ export type ChatGenerationParams$Outbound = { route?: string | null | undefined; user?: string | undefined; session_id?: string | undefined; + trace?: Schema19$Outbound | undefined; messages: Array; model?: string | undefined; models?: Array | undefined; @@ -490,6 +498,7 @@ export type ChatGenerationParams$Outbound = { stream: boolean; stream_options?: ChatStreamOptions$Outbound | null | undefined; temperature?: number | null | undefined; + parallel_tool_calls?: boolean | null | undefined; tool_choice?: any | undefined; tools?: Array | undefined; top_p?: number | null | undefined; @@ -508,6 +517,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< route: z.nullable(Route$outboundSchema).optional(), user: z.string().optional(), sessionId: z.string().optional(), + trace: Schema19$outboundSchema.optional(), messages: z.array(Message$outboundSchema), model: z.string().optional(), models: z.array(z.string()).optional(), @@ -532,6 +542,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< stream: z.boolean().default(false), streamOptions: z.nullable(ChatStreamOptions$outboundSchema).optional(), temperature: z.nullable(z.number()).optional(), + parallelToolCalls: z.nullable(z.boolean()).optional(), toolChoice: z.any().optional(), tools: z.array(ToolDefinitionJson$outboundSchema).optional(), topP: z.nullable(z.number()).optional(), @@ -552,6 +563,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< presencePenalty: "presence_penalty", responseFormat: "response_format", streamOptions: "stream_options", + parallelToolCalls: "parallel_tool_calls", toolChoice: "tool_choice", topP: "top_p", imageConfig: "image_config", diff --git a/src/models/chatstreamingmessagechunk.ts b/src/models/chatstreamingmessagechunk.ts index fb1171fa..05646953 100644 --- a/src/models/chatstreamingmessagechunk.ts +++ b/src/models/chatstreamingmessagechunk.ts @@ -13,7 +13,7 @@ import { ChatStreamingMessageToolCall$inboundSchema, } from "./chatstreamingmessagetoolcall.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { Schema19, Schema19$inboundSchema } from "./schema19.js"; +import { Schema20, Schema20$inboundSchema } from "./schema20.js"; export const ChatStreamingMessageChunkRole = { Assistant: "assistant", @@ -28,7 +28,7 @@ export type ChatStreamingMessageChunk = { reasoning?: string | null | undefined; refusal?: string | null | undefined; toolCalls?: Array | undefined; - reasoningDetails?: Array | undefined; + reasoningDetails?: Array | undefined; }; /** @internal */ @@ -46,7 +46,7 @@ export const ChatStreamingMessageChunk$inboundSchema: z.ZodType< reasoning: z.nullable(z.string()).optional(), refusal: z.nullable(z.string()).optional(), tool_calls: z.array(ChatStreamingMessageToolCall$inboundSchema).optional(), - reasoning_details: z.array(Schema19$inboundSchema).optional(), + reasoning_details: z.array(Schema20$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "tool_calls": "toolCalls", diff --git a/src/models/index.ts b/src/models/index.ts index 47bb140b..a10b3471 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -145,6 +145,7 @@ export * from "./schema10.js"; export * from "./schema14.js"; export * from "./schema17.js"; export * from "./schema19.js"; +export * from "./schema20.js"; export * from "./schema5.js"; export * from "./security.js"; export * from "./serviceunavailableresponseerrordata.js"; diff --git a/src/models/openresponsesrequest.ts b/src/models/openresponsesrequest.ts index dae7dabb..c974c8e9 100644 --- a/src/models/openresponsesrequest.ts +++ b/src/models/openresponsesrequest.ts @@ -272,6 +272,18 @@ export type Plugin = | PluginFileParser | PluginResponseHealing; +/** + * 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. + */ +export type Trace = { + traceId?: string | undefined; + traceName?: string | undefined; + spanName?: string | undefined; + generationName?: string | undefined; + parentSpanId?: string | undefined; + additionalProperties?: { [k: string]: any | null } | undefined; +}; + /** * Request schema for Responses endpoint */ @@ -356,6 +368,10 @@ export type OpenResponsesRequest = { * 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. */ sessionId?: string | undefined; + /** + * 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?: Trace | undefined; }; /** @internal */ @@ -767,6 +783,42 @@ export function pluginToJSON(plugin: Plugin): string { return JSON.stringify(Plugin$outboundSchema.parse(plugin)); } +/** @internal */ +export type Trace$Outbound = { + trace_id?: string | undefined; + trace_name?: string | undefined; + span_name?: string | undefined; + generation_name?: string | undefined; + parent_span_id?: string | undefined; + [additionalProperties: string]: unknown; +}; + +/** @internal */ +export const Trace$outboundSchema: z.ZodType = z.object({ + traceId: z.string().optional(), + traceName: z.string().optional(), + spanName: z.string().optional(), + generationName: z.string().optional(), + parentSpanId: z.string().optional(), + additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + traceId: "trace_id", + traceName: "trace_name", + spanName: "span_name", + generationName: "generation_name", + parentSpanId: "parent_span_id", + additionalProperties: null, + }), + }; +}); + +export function traceToJSON(trace: Trace): string { + return JSON.stringify(Trace$outboundSchema.parse(trace)); +} + /** @internal */ export type OpenResponsesRequest$Outbound = { input?: OpenResponsesInput$Outbound | undefined; @@ -819,6 +871,7 @@ export type OpenResponsesRequest$Outbound = { | undefined; user?: string | undefined; session_id?: string | undefined; + trace?: Trace$Outbound | undefined; }; /** @internal */ @@ -878,6 +931,7 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< ).optional(), user: z.string().optional(), sessionId: z.string().optional(), + trace: z.lazy(() => Trace$outboundSchema).optional(), }).transform((v) => { return remap$(v, { toolChoice: "tool_choice", diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts index d12a0b23..8979e7af 100644 --- a/src/models/operations/createauthkeyscode.ts +++ b/src/models/operations/createauthkeyscode.ts @@ -41,6 +41,19 @@ export type CreateAuthKeysCodeCodeChallengeMethod = OpenEnum< typeof CreateAuthKeysCodeCodeChallengeMethod >; +/** + * Optional credit limit reset interval. When set, the credit limit resets on this interval. + */ +export const UsageLimitType = { + Daily: "daily", + Weekly: "weekly", + Monthly: "monthly", +} as const; +/** + * Optional credit limit reset interval. When set, the credit limit resets on this interval. + */ +export type UsageLimitType = OpenEnum; + export type CreateAuthKeysCodeRequestBody = { /** * The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. @@ -62,6 +75,14 @@ export type CreateAuthKeysCodeRequestBody = { * Optional expiration time for the API key to be created */ expiresAt?: Date | null | undefined; + /** + * Optional custom label for the API key. Defaults to the app name if not provided. + */ + keyLabel?: string | undefined; + /** + * Optional credit limit reset interval. When set, the credit limit resets on this interval. + */ + usageLimitType?: UsageLimitType | undefined; }; export type CreateAuthKeysCodeRequest = { @@ -115,6 +136,10 @@ export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType< CreateAuthKeysCodeCodeChallengeMethod > = openEnums.outboundSchema(CreateAuthKeysCodeCodeChallengeMethod); +/** @internal */ +export const UsageLimitType$outboundSchema: z.ZodType = + openEnums.outboundSchema(UsageLimitType); + /** @internal */ export type CreateAuthKeysCodeRequestBody$Outbound = { callback_url: string; @@ -122,6 +147,8 @@ export type CreateAuthKeysCodeRequestBody$Outbound = { code_challenge_method?: string | undefined; limit?: number | undefined; expires_at?: string | null | undefined; + key_label?: string | undefined; + usage_limit_type?: string | undefined; }; /** @internal */ @@ -135,12 +162,16 @@ export const CreateAuthKeysCodeRequestBody$outboundSchema: z.ZodType< .optional(), limit: z.number().optional(), expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + keyLabel: z.string().optional(), + usageLimitType: UsageLimitType$outboundSchema.optional(), }).transform((v) => { return remap$(v, { callbackUrl: "callback_url", codeChallenge: "code_challenge", codeChallengeMethod: "code_challenge_method", expiresAt: "expires_at", + keyLabel: "key_label", + usageLimitType: "usage_limit_type", }); }); diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index f32739a9..98798dd9 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -120,6 +120,7 @@ export const ProviderName = { Inceptron: "Inceptron", InferenceNet: "InferenceNet", Infermatic: "Infermatic", + IoNet: "Io Net", Inflection: "Inflection", Liquid: "Liquid", Mara: "Mara", diff --git a/src/models/providername.ts b/src/models/providername.ts index 41aa063b..eca31616 100644 --- a/src/models/providername.ts +++ b/src/models/providername.ts @@ -43,6 +43,7 @@ export const ProviderName = { Inceptron: "Inceptron", InferenceNet: "InferenceNet", Infermatic: "Infermatic", + IoNet: "Io Net", Inflection: "Inflection", Liquid: "Liquid", Mara: "Mara", diff --git a/src/models/schema19.ts b/src/models/schema19.ts index 15e01a96..4c8e8938 100644 --- a/src/models/schema19.ts +++ b/src/models/schema19.ts @@ -4,238 +4,50 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import * as openEnums from "../types/enums.js"; -import { OpenEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export const Schema21 = { - Unknown: "unknown", - OpenaiResponsesV1: "openai-responses-v1", - AzureOpenaiResponsesV1: "azure-openai-responses-v1", - XaiResponsesV1: "xai-responses-v1", - AnthropicClaudeV1: "anthropic-claude-v1", - GoogleGeminiV1: "google-gemini-v1", -} as const; -export type Schema21 = OpenEnum; - -export type Schema19ReasoningText = { - type: "reasoning.text"; - text?: string | null | undefined; - signature?: string | null | undefined; - id?: string | null | undefined; - format?: Schema21 | null | undefined; - index?: number | undefined; -}; - -export type Schema19ReasoningEncrypted = { - type: "reasoning.encrypted"; - data: string; - id?: string | null | undefined; - format?: Schema21 | null | undefined; - index?: number | undefined; -}; - -export type Schema19ReasoningSummary = { - type: "reasoning.summary"; - summary: string; - id?: string | null | undefined; - format?: Schema21 | null | undefined; - index?: number | undefined; -}; - -export type Schema19 = - | Schema19ReasoningSummary - | Schema19ReasoningEncrypted - | Schema19ReasoningText; - -/** @internal */ -export const Schema21$inboundSchema: z.ZodType = openEnums - .inboundSchema(Schema21); -/** @internal */ -export const Schema21$outboundSchema: z.ZodType = openEnums - .outboundSchema(Schema21); - -/** @internal */ -export const Schema19ReasoningText$inboundSchema: z.ZodType< - Schema19ReasoningText, - unknown -> = z.object({ - type: z.literal("reasoning.text"), - text: z.nullable(z.string()).optional(), - signature: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$inboundSchema).optional(), - index: z.number().optional(), -}); -/** @internal */ -export type Schema19ReasoningText$Outbound = { - type: "reasoning.text"; - text?: string | null | undefined; - signature?: string | null | undefined; - id?: string | null | undefined; - format?: string | null | undefined; - index?: number | undefined; -}; - -/** @internal */ -export const Schema19ReasoningText$outboundSchema: z.ZodType< - Schema19ReasoningText$Outbound, - Schema19ReasoningText -> = z.object({ - type: z.literal("reasoning.text"), - text: z.nullable(z.string()).optional(), - signature: z.nullable(z.string()).optional(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$outboundSchema).optional(), - index: z.number().optional(), -}); - -export function schema19ReasoningTextToJSON( - schema19ReasoningText: Schema19ReasoningText, -): string { - return JSON.stringify( - Schema19ReasoningText$outboundSchema.parse(schema19ReasoningText), - ); -} -export function schema19ReasoningTextFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Schema19ReasoningText$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Schema19ReasoningText' from JSON`, - ); -} - -/** @internal */ -export const Schema19ReasoningEncrypted$inboundSchema: z.ZodType< - Schema19ReasoningEncrypted, - unknown -> = z.object({ - type: z.literal("reasoning.encrypted"), - data: z.string(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$inboundSchema).optional(), - index: z.number().optional(), -}); -/** @internal */ -export type Schema19ReasoningEncrypted$Outbound = { - type: "reasoning.encrypted"; - data: string; - id?: string | null | undefined; - format?: string | null | undefined; - index?: number | undefined; +import { remap as remap$ } from "../lib/primitives.js"; + +export type Schema19 = { + traceId?: string | undefined; + traceName?: string | undefined; + spanName?: string | undefined; + generationName?: string | undefined; + parentSpanId?: string | undefined; + additionalProperties?: { [k: string]: any } | undefined; }; /** @internal */ -export const Schema19ReasoningEncrypted$outboundSchema: z.ZodType< - Schema19ReasoningEncrypted$Outbound, - Schema19ReasoningEncrypted -> = z.object({ - type: z.literal("reasoning.encrypted"), - data: z.string(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$outboundSchema).optional(), - index: z.number().optional(), -}); - -export function schema19ReasoningEncryptedToJSON( - schema19ReasoningEncrypted: Schema19ReasoningEncrypted, -): string { - return JSON.stringify( - Schema19ReasoningEncrypted$outboundSchema.parse(schema19ReasoningEncrypted), - ); -} -export function schema19ReasoningEncryptedFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Schema19ReasoningEncrypted$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Schema19ReasoningEncrypted' from JSON`, - ); -} - -/** @internal */ -export const Schema19ReasoningSummary$inboundSchema: z.ZodType< - Schema19ReasoningSummary, - unknown -> = z.object({ - type: z.literal("reasoning.summary"), - summary: z.string(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$inboundSchema).optional(), - index: z.number().optional(), -}); -/** @internal */ -export type Schema19ReasoningSummary$Outbound = { - type: "reasoning.summary"; - summary: string; - id?: string | null | undefined; - format?: string | null | undefined; - index?: number | undefined; +export type Schema19$Outbound = { + trace_id?: string | undefined; + trace_name?: string | undefined; + span_name?: string | undefined; + generation_name?: string | undefined; + parent_span_id?: string | undefined; + [additionalProperties: string]: unknown; }; -/** @internal */ -export const Schema19ReasoningSummary$outboundSchema: z.ZodType< - Schema19ReasoningSummary$Outbound, - Schema19ReasoningSummary -> = z.object({ - type: z.literal("reasoning.summary"), - summary: z.string(), - id: z.nullable(z.string()).optional(), - format: z.nullable(Schema21$outboundSchema).optional(), - index: z.number().optional(), -}); - -export function schema19ReasoningSummaryToJSON( - schema19ReasoningSummary: Schema19ReasoningSummary, -): string { - return JSON.stringify( - Schema19ReasoningSummary$outboundSchema.parse(schema19ReasoningSummary), - ); -} -export function schema19ReasoningSummaryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Schema19ReasoningSummary$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Schema19ReasoningSummary' from JSON`, - ); -} - -/** @internal */ -export const Schema19$inboundSchema: z.ZodType = z.union([ - z.lazy(() => Schema19ReasoningSummary$inboundSchema), - z.lazy(() => Schema19ReasoningEncrypted$inboundSchema), - z.lazy(() => Schema19ReasoningText$inboundSchema), -]); -/** @internal */ -export type Schema19$Outbound = - | Schema19ReasoningSummary$Outbound - | Schema19ReasoningEncrypted$Outbound - | Schema19ReasoningText$Outbound; - /** @internal */ export const Schema19$outboundSchema: z.ZodType = z - .union([ - z.lazy(() => Schema19ReasoningSummary$outboundSchema), - z.lazy(() => Schema19ReasoningEncrypted$outboundSchema), - z.lazy(() => Schema19ReasoningText$outboundSchema), - ]); + .object({ + traceId: z.string().optional(), + traceName: z.string().optional(), + spanName: z.string().optional(), + generationName: z.string().optional(), + parentSpanId: z.string().optional(), + additionalProperties: z.record(z.string(), z.any()).optional(), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + traceId: "trace_id", + traceName: "trace_name", + spanName: "span_name", + generationName: "generation_name", + parentSpanId: "parent_span_id", + additionalProperties: null, + }), + }; + }); export function schema19ToJSON(schema19: Schema19): string { return JSON.stringify(Schema19$outboundSchema.parse(schema19)); } -export function schema19FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Schema19$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Schema19' from JSON`, - ); -} diff --git a/src/models/schema20.ts b/src/models/schema20.ts new file mode 100644 index 00000000..78505c82 --- /dev/null +++ b/src/models/schema20.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b4e6707353ea + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export const Schema22 = { + Unknown: "unknown", + OpenaiResponsesV1: "openai-responses-v1", + AzureOpenaiResponsesV1: "azure-openai-responses-v1", + XaiResponsesV1: "xai-responses-v1", + AnthropicClaudeV1: "anthropic-claude-v1", + GoogleGeminiV1: "google-gemini-v1", +} as const; +export type Schema22 = OpenEnum; + +export type Schema20ReasoningText = { + type: "reasoning.text"; + text?: string | null | undefined; + signature?: string | null | undefined; + id?: string | null | undefined; + format?: Schema22 | null | undefined; + index?: number | undefined; +}; + +export type Schema20ReasoningEncrypted = { + type: "reasoning.encrypted"; + data: string; + id?: string | null | undefined; + format?: Schema22 | null | undefined; + index?: number | undefined; +}; + +export type Schema20ReasoningSummary = { + type: "reasoning.summary"; + summary: string; + id?: string | null | undefined; + format?: Schema22 | null | undefined; + index?: number | undefined; +}; + +export type Schema20 = + | Schema20ReasoningSummary + | Schema20ReasoningEncrypted + | Schema20ReasoningText; + +/** @internal */ +export const Schema22$inboundSchema: z.ZodType = openEnums + .inboundSchema(Schema22); +/** @internal */ +export const Schema22$outboundSchema: z.ZodType = openEnums + .outboundSchema(Schema22); + +/** @internal */ +export const Schema20ReasoningText$inboundSchema: z.ZodType< + Schema20ReasoningText, + unknown +> = z.object({ + type: z.literal("reasoning.text"), + text: z.nullable(z.string()).optional(), + signature: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$inboundSchema).optional(), + index: z.number().optional(), +}); +/** @internal */ +export type Schema20ReasoningText$Outbound = { + type: "reasoning.text"; + text?: string | null | undefined; + signature?: string | null | undefined; + id?: string | null | undefined; + format?: string | null | undefined; + index?: number | undefined; +}; + +/** @internal */ +export const Schema20ReasoningText$outboundSchema: z.ZodType< + Schema20ReasoningText$Outbound, + Schema20ReasoningText +> = z.object({ + type: z.literal("reasoning.text"), + text: z.nullable(z.string()).optional(), + signature: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$outboundSchema).optional(), + index: z.number().optional(), +}); + +export function schema20ReasoningTextToJSON( + schema20ReasoningText: Schema20ReasoningText, +): string { + return JSON.stringify( + Schema20ReasoningText$outboundSchema.parse(schema20ReasoningText), + ); +} +export function schema20ReasoningTextFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Schema20ReasoningText$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Schema20ReasoningText' from JSON`, + ); +} + +/** @internal */ +export const Schema20ReasoningEncrypted$inboundSchema: z.ZodType< + Schema20ReasoningEncrypted, + unknown +> = z.object({ + type: z.literal("reasoning.encrypted"), + data: z.string(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$inboundSchema).optional(), + index: z.number().optional(), +}); +/** @internal */ +export type Schema20ReasoningEncrypted$Outbound = { + type: "reasoning.encrypted"; + data: string; + id?: string | null | undefined; + format?: string | null | undefined; + index?: number | undefined; +}; + +/** @internal */ +export const Schema20ReasoningEncrypted$outboundSchema: z.ZodType< + Schema20ReasoningEncrypted$Outbound, + Schema20ReasoningEncrypted +> = z.object({ + type: z.literal("reasoning.encrypted"), + data: z.string(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$outboundSchema).optional(), + index: z.number().optional(), +}); + +export function schema20ReasoningEncryptedToJSON( + schema20ReasoningEncrypted: Schema20ReasoningEncrypted, +): string { + return JSON.stringify( + Schema20ReasoningEncrypted$outboundSchema.parse(schema20ReasoningEncrypted), + ); +} +export function schema20ReasoningEncryptedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Schema20ReasoningEncrypted$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Schema20ReasoningEncrypted' from JSON`, + ); +} + +/** @internal */ +export const Schema20ReasoningSummary$inboundSchema: z.ZodType< + Schema20ReasoningSummary, + unknown +> = z.object({ + type: z.literal("reasoning.summary"), + summary: z.string(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$inboundSchema).optional(), + index: z.number().optional(), +}); +/** @internal */ +export type Schema20ReasoningSummary$Outbound = { + type: "reasoning.summary"; + summary: string; + id?: string | null | undefined; + format?: string | null | undefined; + index?: number | undefined; +}; + +/** @internal */ +export const Schema20ReasoningSummary$outboundSchema: z.ZodType< + Schema20ReasoningSummary$Outbound, + Schema20ReasoningSummary +> = z.object({ + type: z.literal("reasoning.summary"), + summary: z.string(), + id: z.nullable(z.string()).optional(), + format: z.nullable(Schema22$outboundSchema).optional(), + index: z.number().optional(), +}); + +export function schema20ReasoningSummaryToJSON( + schema20ReasoningSummary: Schema20ReasoningSummary, +): string { + return JSON.stringify( + Schema20ReasoningSummary$outboundSchema.parse(schema20ReasoningSummary), + ); +} +export function schema20ReasoningSummaryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Schema20ReasoningSummary$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Schema20ReasoningSummary' from JSON`, + ); +} + +/** @internal */ +export const Schema20$inboundSchema: z.ZodType = z.union([ + z.lazy(() => Schema20ReasoningSummary$inboundSchema), + z.lazy(() => Schema20ReasoningEncrypted$inboundSchema), + z.lazy(() => Schema20ReasoningText$inboundSchema), +]); +/** @internal */ +export type Schema20$Outbound = + | Schema20ReasoningSummary$Outbound + | Schema20ReasoningEncrypted$Outbound + | Schema20ReasoningText$Outbound; + +/** @internal */ +export const Schema20$outboundSchema: z.ZodType = z + .union([ + z.lazy(() => Schema20ReasoningSummary$outboundSchema), + z.lazy(() => Schema20ReasoningEncrypted$outboundSchema), + z.lazy(() => Schema20ReasoningText$outboundSchema), + ]); + +export function schema20ToJSON(schema20: Schema20): string { + return JSON.stringify(Schema20$outboundSchema.parse(schema20)); +} +export function schema20FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Schema20$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Schema20' from JSON`, + ); +} diff --git a/src/models/schema5.ts b/src/models/schema5.ts index 6b140f2a..1bd4edd9 100644 --- a/src/models/schema5.ts +++ b/src/models/schema5.ts @@ -43,6 +43,7 @@ export const Schema5Enum = { Inceptron: "Inceptron", InferenceNet: "InferenceNet", Infermatic: "Infermatic", + IoNet: "Io Net", Inflection: "Inflection", Liquid: "Liquid", Mara: "Mara", diff --git a/src/models/tooldefinitionjson.ts b/src/models/tooldefinitionjson.ts index 8456579f..e6d44a7a 100644 --- a/src/models/tooldefinitionjson.ts +++ b/src/models/tooldefinitionjson.ts @@ -4,6 +4,12 @@ */ import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + ChatMessageContentItemCacheControl, + ChatMessageContentItemCacheControl$Outbound, + ChatMessageContentItemCacheControl$outboundSchema, +} from "./chatmessagecontentitemcachecontrol.js"; export type ToolDefinitionJsonFunction = { name: string; @@ -15,6 +21,7 @@ export type ToolDefinitionJsonFunction = { export type ToolDefinitionJson = { type: "function"; function: ToolDefinitionJsonFunction; + cacheControl?: ChatMessageContentItemCacheControl | undefined; }; /** @internal */ @@ -48,6 +55,7 @@ export function toolDefinitionJsonFunctionToJSON( export type ToolDefinitionJson$Outbound = { type: "function"; function: ToolDefinitionJsonFunction$Outbound; + cache_control?: ChatMessageContentItemCacheControl$Outbound | undefined; }; /** @internal */ @@ -57,6 +65,11 @@ export const ToolDefinitionJson$outboundSchema: z.ZodType< > = z.object({ type: z.literal("function"), function: z.lazy(() => ToolDefinitionJsonFunction$outboundSchema), + cacheControl: ChatMessageContentItemCacheControl$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + cacheControl: "cache_control", + }); }); export function toolDefinitionJsonToJSON(