diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 82477beec..f44b85249 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: c50675834ba68b9b33387ef1ce2ac885 + docChecksum: c9f890b0cf83340464ac12ed871d03b5 docVersion: 1.0.0 speakeasyVersion: 1.802.0 generationVersion: 2.948.4 - releaseVersion: 1.5.11 - configChecksum: 71dbdbbc0c73c344889dfc7b26beacd1 + releaseVersion: 1.5.12 + configChecksum: 14b7c6753aa315d1e6a9f04fedb04ba7 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: 48b64290-6c87-4bf8-9bde-c693d193a5ca - pristine_commit_hash: 25418d5266f7c34d87fa4167fe2e54db72c22e45 - pristine_tree_hash: f7aca77e9fb8b026d16886e84d13b63b0a3c9633 + generation_id: c5d90c2a-d4e9-4f07-a447-8087768c074c + pristine_commit_hash: fd3edf69f3e77e8052d9e9c52d4bf5f88c3bc04b + pristine_tree_hash: 538f1ee5b939c8d040881e2f8877aeff9363ee4a features: typescript: acceptHeaders: 2.81.2 @@ -4034,8 +4034,8 @@ trackedFiles: pristine_git_object: 46b03035e9c38d2918f8328a4dbac45fba45d50d docs/models/createprivateendpointrequest.mdx: id: faedff659c73 - last_write_checksum: sha1:7fcf0b54ae1f6e06c812de5384559202c328b184 - pristine_git_object: 5941f3a7dc1d6d3f63d0f696faf1f00f0454abb0 + last_write_checksum: sha1:1f2b8d64bcb5448ed274c1543c47ad18e00be09b + pristine_git_object: bb52c61b822f5fe0c95e6fb08a59258194d5eeb5 docs/models/createprivateendpointrequestdeclaredregion.mdx: id: 39d200d93a78 last_write_checksum: sha1:3ffb0e7b17d45cb95a223dfb87f315a683580100 @@ -6690,8 +6690,8 @@ trackedFiles: pristine_git_object: 26972043bc4ea8ab9d4c07501985f0245c97ddf1 docs/models/managedprivateendpoint.mdx: id: fdba71af7e3e - last_write_checksum: sha1:ff3352e48be50a80c918d8ff30848b31671f0920 - pristine_git_object: 735013d44b2ae39b3640ab436472903449770d8c + last_write_checksum: sha1:e94ee852fefbd99a658f169cd1aefbe338bf705d + pristine_git_object: 53ad0d824dfbb09109943f7e84cb2981f1445012 docs/models/managedprivateendpointresponse.mdx: id: f859daf863bc last_write_checksum: sha1:ddbbf7f13598d43b599db7e7f7902b279c58dbaa @@ -8616,8 +8616,8 @@ trackedFiles: pristine_git_object: c8250647bc652439dbe66ba0fd4df3a7ab29c144 docs/models/operations/createprivateendpointrequest.mdx: id: 875d7a8b2217 - last_write_checksum: sha1:5f7f2cc297f752c8a72ae0139e068f22f67fbc1d - pristine_git_object: c6e0c83390732e2f517e251ab6300a67208239bf + last_write_checksum: sha1:7945d48a503c0a11da5573a8ffb03c41c8b75633 + pristine_git_object: 72b21f2f98ded7d20767b1e35322a4812e9ab81c docs/models/operations/creatererankglobals.md: id: a69e0c2ebb3a last_write_checksum: sha1:81de6495768fe15d967381108daa6e453e868ea8 @@ -10619,6 +10619,14 @@ trackedFiles: id: 9ce285727649 last_write_checksum: sha1:07c53cdce3df693857b404fa373a6ad6bae13802 pristine_git_object: b392a0a6dd17a5795ad752f913a26978caa9bef3 + docs/models/operations/updateprivateendpointparametersglobals.mdx: + id: 79dde04e5337 + last_write_checksum: sha1:52907e90e9c8f25cb1cfe2ba1a37ed469a5b3efc + pristine_git_object: 6e2eeb5b48096ad129d4296d5b5bf2e4ab38394f + docs/models/operations/updateprivateendpointparametersrequest.mdx: + id: e4c20c38b57e + last_write_checksum: sha1:9c754ffb7df54633002e85954813ca42f171b324 + pristine_git_object: 5e9809e1e8de51d34a1f888dc5b04a8f939f20de docs/models/operations/updateprivateendpointpricingglobals.mdx: id: e343848bf2b2 last_write_checksum: sha1:e0ab731038d18216eda3ce78a39047d15c49576e @@ -12183,8 +12191,8 @@ trackedFiles: pristine_git_object: a16979519e2cb8f7542be8885266eacfb4aa17e2 docs/models/privateendpoint.mdx: id: d14587778779 - last_write_checksum: sha1:ac5ab848f69dbb2f20577b75e4ae3999e708f573 - pristine_git_object: 86da7af8ec4961af59aca9aeab735cdb33e6c932 + last_write_checksum: sha1:c9469ac1fa551aa3dfcb8d17dd246a03f087e659 + pristine_git_object: 1854213f9b92f8dd313ab8e1356699110337f335 docs/models/privateendpointactivation.mdx: id: 2ba1d446dd2a last_write_checksum: sha1:7ade513846c30bcf90ddaa3eb1cbb0a9d09eb609 @@ -12197,18 +12205,26 @@ trackedFiles: id: efb417c042b5 last_write_checksum: sha1:8dcdb63f8ec9ff45e9317139a765faad2864f76c pristine_git_object: a358e2ec078afa8a4366d37a1bdee2e6366caf83 + docs/models/privateendpointdeclaredparameter.mdx: + id: e65402502a23 + last_write_checksum: sha1:85f52a5690eff139804fa02cc5f1e4df4627d0cb + pristine_git_object: faabd99bcd208c9593f8ddc5a659c855fe14caed docs/models/privateendpointdeclaredregion.mdx: id: f0bd5726115e last_write_checksum: sha1:91ea39293d33d68034afef546ba990b12714feae pristine_git_object: 454128f02c166d034d115ffd2ad0c1c60b83d6a1 + docs/models/privateendpointparametercheck.mdx: + id: 63a26bc1e2ff + last_write_checksum: sha1:c50546368879793ebedeca8e39dd248b90809278 + pristine_git_object: 96916f6183d0ed10054a2fc1f53895c4fd376222 docs/models/privateendpointpricing.mdx: id: 064406fd1903 last_write_checksum: sha1:fa01b99c78549cececd0372b44cb4c3c155e1091 pristine_git_object: eedb7e5b3563312f44cca7b0cfab01427d0b95d8 docs/models/privateendpointresponse.mdx: id: 860e4fb87f5b - last_write_checksum: sha1:f0a8bbb593eab9015b37435fba324a885783bafc - pristine_git_object: a3c28ae2a11f5d45c66eb6aea4e40dc5b6016006 + last_write_checksum: sha1:d054ecf09d5424acaa9ee4d8e9c04cdd43a14478 + pristine_git_object: e4f366e92d0140b634ef2a167f929e7f46062c13 docs/models/privateendpointstatus.mdx: id: f193a97a0b0e last_write_checksum: sha1:6172fb914807fbd7de9f70c23f1126263a5de9fa @@ -12219,12 +12235,12 @@ trackedFiles: pristine_git_object: 7c5e7b6eaeda2ac63343fb16d52b94af78f1b0c2 docs/models/privateendpointvalidation.mdx: id: b9f64d74b3fa - last_write_checksum: sha1:a3a3e3b3e5383de80e17e513f3327703725dc309 - pristine_git_object: 50535fb6d2e41dbf220cdb243d8097d2922e5d2d + last_write_checksum: sha1:57135d505f163bb101e9b553ed97e863187b7a9e + pristine_git_object: f3296ba51dc0ec04511db3ad1b090fe5aa0c6cc1 docs/models/privateendpointvalidationnullable.mdx: id: b6c1f7af4aad - last_write_checksum: sha1:45088bf35f710ad859fec99b7f37f144275f1337 - pristine_git_object: ad513fb884578f9c91eb6c7ab4c70f67636322f1 + last_write_checksum: sha1:a2ab670c26e827f017202278b0678d9c27e8609d + pristine_git_object: c155ae7cc46673e30fd81dcb2856a7783ff65fc8 docs/models/privateendpointvalidationresponse.mdx: id: a225cbca85ce last_write_checksum: sha1:c7e158334a8e2c6c47d578294b97bbd9c82398ee @@ -14566,6 +14582,10 @@ trackedFiles: id: c3c58be302ec last_write_checksum: sha1:f54fd96ef7c858984a11eeb7938e347bcaff1cbb pristine_git_object: 2109a1862722e927cb5c54b8247be042cc432c35 + docs/models/updateprivateendpointparametersrequest.mdx: + id: 0e14877cf701 + last_write_checksum: sha1:21c6fe6aeefe4bdabb1d7540bb16aff91957b7e2 + pristine_git_object: 834ff8436b5ec448bb0f961504b88617a4246bba docs/models/updateprivateendpointpricingrequest.mdx: id: c6aa3a0ee6af last_write_checksum: sha1:699cee5bb457094ebbaf6db92118dc625f8185f0 @@ -15298,8 +15318,8 @@ trackedFiles: pristine_git_object: d55ffc103678c62503718b980a7e55150b155b44 docs/sdks/privateendpoints/README.mdx: id: 54dee70b8cc7 - last_write_checksum: sha1:2819035fff59570f2f76f23f329f5ae941236220 - pristine_git_object: 408fae12c5807a20f3b98536494a25b8f32b817c + last_write_checksum: sha1:7293579a3f750975a6b25f026456945650b7d3e1 + pristine_git_object: 1b10540a3fed59863e68d7263f565cbeb4e402ca docs/sdks/providers/README.mdx: id: 5ea9af111324 last_write_checksum: sha1:ed0bbf33de3a54702215fdcc22498ce262d70489 @@ -15395,12 +15415,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:82508dd97ccde762dabfd40267b3e347d2bb627b - pristine_git_object: ed30116eafc84a99991f14e84c25a285d4a0ec1c + last_write_checksum: sha1:3addaa8d37fde13bb3e5fe68a9456d680f028c67 + pristine_git_object: 5ac64d087b27896e6dcd049f776a0d05ecb9de88 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:6dad27213859ca7ad1a8164736fe48a3f58f1c26 - pristine_git_object: eee076b16355336842a72ef5fc8dc7a1395a6a39 + last_write_checksum: sha1:c0abec4cb17b9275f02c645ab5dd7ceb6dfef3b3 + pristine_git_object: 6f41328bb4dbb21edd963e4d33049e4f01024a6d src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -15781,6 +15801,10 @@ trackedFiles: id: a2d429fd280a last_write_checksum: sha1:8fa90f11080bb4164f1f1314161c767dbc30a777 pristine_git_object: 47d10883d630763c8f55c9ff8f2b2f1ed193f45b + src/funcs/privateEndpointsUpdateParameters.ts: + id: a541ac958e3d + last_write_checksum: sha1:daf68b5ca7794cda511d14b80e4478220f248052 + pristine_git_object: f389094bc6a52c1e1469fec2da8f062ad7da84e3 src/funcs/privateEndpointsUpdatePricing.ts: id: 5824e06c594a last_write_checksum: sha1:c6332ef07e1fa122106bd10105f1dafcc291d60e @@ -15979,8 +16003,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:7146e15c1b75f65358325d4925ea38bbd1bdb2aa - pristine_git_object: 3aee651fd39e09aa2b271dd3cc3c77535c7daa52 + last_write_checksum: sha1:6f4d5cd561eea73b02525ea35db19a73f593ed90 + pristine_git_object: 87d344092d5769f8a81d20fae1ac613fc0148288 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -17153,8 +17177,8 @@ trackedFiles: pristine_git_object: 1bd2a805f55379a24b45aa945dd7ca50a88796b1 src/models/createprivateendpointrequest.ts: id: 466afc9b7d23 - last_write_checksum: sha1:cbcc72b93a8485fdc6c144ba92a3701cdb962571 - pristine_git_object: 0c397ca5d153898daf375f36c276b59d2ea1ec0a + last_write_checksum: sha1:79b5b08d63e88393b2a2ecb04b94a4ea803f31d3 + pristine_git_object: 9fbb483c5d63b884fb99ab254a58cee44ed9e2ce src/models/createprivateendpointvalidationfailedresponseerror.ts: id: 4e00bbe15ec8 last_write_checksum: sha1:1a72c5005700e70699edcefcdbfff0ef659a6b8c @@ -17801,8 +17825,8 @@ trackedFiles: pristine_git_object: 7abdfe096d3adff317db6837dc689c69db92e127 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:f268d5c25af8eaba2f681311ab9eca6209d64e65 - pristine_git_object: b6ea892ffc1a40b357969a08df6137d38dc3c019 + last_write_checksum: sha1:a7c971745d17a86e55d430cb3b18773dd050c31d + pristine_git_object: fbc5712cfd7e1ce7b4c449851dcef64836d60567 src/models/inputaudio.ts: id: 9bdc14c7565f last_write_checksum: sha1:2f8dc4c1d6a9c2927d9eb186e0ecedf7b81838e6 @@ -17949,8 +17973,8 @@ trackedFiles: pristine_git_object: 6a847d2e295237f3f3f7448d65f44105863421bf src/models/managedprivateendpoint.ts: id: aa79ac02afd9 - last_write_checksum: sha1:c36709febff88e015ad426566ac1fa1c5ab028a4 - pristine_git_object: fa5c1e732723468dc2e0dee95041652ba31650ba + last_write_checksum: sha1:f814251ad7c572533dcdbd49cc4f0fd723f4dbe2 + pristine_git_object: 9b666d33a5f7a1706c7cecef67f61c73002e5d72 src/models/managedprivateendpointresponse.ts: id: 24ff2f9760bd last_write_checksum: sha1:81ae5630f0bf617c10d5e341dd76d39ebcd2546f @@ -18393,8 +18417,8 @@ trackedFiles: pristine_git_object: f9b360bb3d14c0200ed02833f77c61ef5f525690 src/models/operations/createprivateendpoint.ts: id: 469b6f483a53 - last_write_checksum: sha1:fc6f9dceaf0c144addcc405fc7733c6015099e1f - pristine_git_object: c263f7e660954f6c8da7f8f780ab074ceb5b02d2 + last_write_checksum: sha1:c382c5e8bb640e37daae8df0cf2b08b08124bc89 + pristine_git_object: e6b2d5c1723d1af8414e99b35bb728bc911bc760 src/models/operations/creatererank.ts: id: e1de55b94363 last_write_checksum: sha1:eb3f551d0b5421fcff5fb638ecb08054cf84f977 @@ -18617,8 +18641,8 @@ trackedFiles: pristine_git_object: a052ed42bd123e79be1f05dc823c808f8c32b383 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:571ac0ead9729381d47f9aa86d936f13568c46fc - pristine_git_object: d52057092721a447a3b84de3013f1fb4f1397cd3 + last_write_checksum: sha1:77d8fd6f47907ce3645b299d726cc8dee9e31d1b + pristine_git_object: 11a41a01d0c21022002552b3ec44c376082dffd7 src/models/operations/list.ts: id: ce11386ad30f last_write_checksum: sha1:538b86fd8e5c673750fc206984ab142a8492bcda @@ -18823,6 +18847,10 @@ trackedFiles: id: 05253f9e2009 last_write_checksum: sha1:37f9ad769e6e5e8eb280d747ecf5919aa50e9701 pristine_git_object: b97e901df4551b27a6cabb864f6b7857fdac971e + src/models/operations/updateprivateendpointparameters.ts: + id: 7665d9dbe783 + last_write_checksum: sha1:4a677bc752c94c65e33518dc16cf370bebeea40f + pristine_git_object: f06703a9a427b0f3f5e58b3614d572606b9516a6 src/models/operations/updateprivateendpointpricing.ts: id: 412bca3c778f last_write_checksum: sha1:1b900196c41dd361ba6118bbc2d6c757e8101eab @@ -19161,8 +19189,8 @@ trackedFiles: pristine_git_object: cb35565ab92c961fdea95cadc07a5135203f4ea7 src/models/privateendpoint.ts: id: facf19d1d363 - last_write_checksum: sha1:a225f97905763c265660af26f73874d9841c7540 - pristine_git_object: 436826c72671f846730565eb2f099d376d9db6d8 + last_write_checksum: sha1:ca61b90217ed22e7154f8162d8518de5e439ba9c + pristine_git_object: ac64b920c9ca0e53a80b772308e8bccf7d829270 src/models/privateendpointactivation.ts: id: 1cd601dfa05c last_write_checksum: sha1:40032e5c5e4b2f96403f1837a3ed1dc99b3824ee @@ -19175,10 +19203,18 @@ trackedFiles: id: 5d4379eaa453 last_write_checksum: sha1:c1a01c95a323c7cd390982439ab823ac37f61917 pristine_git_object: b01a8ad4ffc46fb69e9c4bdd8888e1618ace4575 + src/models/privateendpointdeclaredparameter.ts: + id: 590fecd9a965 + last_write_checksum: sha1:4f00dc0227d6ef57141eb0b248ec8151b35e5d98 + pristine_git_object: 7f64541b4cb055c7b5f1012c18b37293cf8bef87 src/models/privateendpointdeclaredregion.ts: id: e91a7cba073a last_write_checksum: sha1:f06e4d0bd39d1e44067a56c776efd0838372f0cb pristine_git_object: 19644f7c06bbf8a6920dc5206312fb4be5878ede + src/models/privateendpointparametercheck.ts: + id: 8f6f1479ff31 + last_write_checksum: sha1:5199ab6ece0885b06020d9b43337496a0bb291f6 + pristine_git_object: 640f4888ec2029750e14c2be640e20d746f157bb src/models/privateendpointpricing.ts: id: c780fa3f1dc9 last_write_checksum: sha1:b0ee0c8fedde5f44b98d46def8033a8bb6d319fe @@ -19197,12 +19233,12 @@ trackedFiles: pristine_git_object: 5bc7b9dcbe19ddf7d2d9bd4983a590e1d0ab490d src/models/privateendpointvalidation.ts: id: c29e1f33143e - last_write_checksum: sha1:594da53aee22f941e46ffc2b3c42cb37c6593643 - pristine_git_object: 23d5992f571419c0fc63796d803e7adf30850d53 + last_write_checksum: sha1:d3da8904e7819c962fcd5f54889b0088ed0935a6 + pristine_git_object: 067c7f12bd680e507e5f850f2b28c9dd1c3e2f00 src/models/privateendpointvalidationnullable.ts: id: cf4aae30836f - last_write_checksum: sha1:1a3d1cfcd456ac798c2b4eff2dc34d09b93dbd2b - pristine_git_object: 2ea8fa8b15edd5e718306ab63f15308322a03be8 + last_write_checksum: sha1:7a57da4b8f8c95d158a4ed11a502d4e40814388a + pristine_git_object: d95693555ef437e818c95737fd94917e9609e95e src/models/privateendpointvalidationresponse.ts: id: a3a95aa177a5 last_write_checksum: sha1:471d50712b382a2c76f46bd6bcd0885cb8c90eaf @@ -19839,6 +19875,10 @@ trackedFiles: id: 0eff61f1211f last_write_checksum: sha1:b8577d1cd35e660f0fcbd64c28a28355ab972375 pristine_git_object: a11a782ac86440f41d8c7341e8146a81605bb169 + src/models/updateprivateendpointparametersrequest.ts: + id: 07aff12e19d4 + last_write_checksum: sha1:a6292438a0aefe88e51a43e1c1871f2adb2a7ddf + pristine_git_object: 7f5726418d6a94210d41be6a544a614acd3eed01 src/models/updateprivateendpointpricingrequest.ts: id: af98cc8bf348 last_write_checksum: sha1:c237baf2102cf9fd6afaa2c7a02de97fb8b865f4 @@ -20145,8 +20185,8 @@ trackedFiles: pristine_git_object: 954592d2ab2afdd31bf5f55458672a787a1a767b src/sdk/privateendpoints.ts: id: ed31ec182fa7 - last_write_checksum: sha1:cc7d15fdfd9f1cb7eb85fe193b19a2a1c950d65e - pristine_git_object: 5f1dc984d98be58ba1ffbeda95f4f5ed6a28d5b5 + last_write_checksum: sha1:b4fc5ea21167400218bc812b30daa277f86a3b2c + pristine_git_object: 22d4fd61356ff8d8c388a49fbe5adb7f0aa21deb src/sdk/providers.ts: id: fb8faa7013d0 last_write_checksum: sha1:80c337cdcdfb182fcaa124dd2e1c62947faf74cf @@ -23867,7 +23907,7 @@ examples: id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" responses: "200": - application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_parameters": ["temperature", "seed"], "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "tested_parameters": ["tools", "tool_choice", "response_format"], "upstream_model_id": "gpt-4o-prod"}} "401": application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} "403": @@ -23887,7 +23927,7 @@ examples: application/json: {"upstream_model_id": "gpt-4o-prod"} responses: "200": - application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_parameters": ["temperature", "seed"], "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "tested_parameters": ["tools", "tool_choice", "response_format"], "upstream_model_id": "gpt-4o-prod"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -23993,7 +24033,7 @@ examples: application/json: {"pricing": {"completion": "0.00001", "prompt": "0.0000025"}} responses: "200": - application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_parameters": ["temperature", "seed"], "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "tested_parameters": ["tools", "tool_choice", "response_format"], "upstream_model_id": "gpt-4o-prod"}} "400": application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} "401": @@ -24628,15 +24668,33 @@ examples: application/json: {"error": {"code": 404, "message": "Intern not found"}} "500": application/json: {"error": {"code": 404, "message": "Intern not found"}} + updatePrivateEndpointParameters: + speakeasy-default-update-private-endpoint-parameters: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + requestBody: + application/json: {"declared_parameters": ["temperature", "seed"]} + responses: + "200": + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_parameters": ["temperature", "seed"], "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "tested_parameters": ["tools", "tool_choice", "response_format"], "upstream_model_id": "gpt-4o-prod"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Typescript SDK Changes: - * `openrouter.endpoints.listZdrEndpoints()`: `error.status[503]` **Added** - * `openrouter.endpoints.list()`: `error.status[503]` **Added** - * `openrouter.generations.submitFeedback()`: `error` **Changed** - * `openrouter.models.list()`: `error.status[503]` **Added** - * `openrouter.models.listForUser()`: `error.status[503]` **Added** - * `openrouter.presets.list()`: `error.status[503]` **Added** - * `openrouter.presets.get()`: `error.status[503]` **Added** - * `openrouter.presets.listVersions()`: `error.status[503]` **Added** - * `openrouter.presets.getVersion()`: `error.status[503]` **Added** +releaseNotes: "## Typescript SDK Changes:\n* `openrouter.privateEndpoints.updateParameters()`: **Added**\n* `openrouter.privateEndpoints.create()`: \n * `request.createPrivateEndpointRequest` **Changed**\n * `response.data.maxCompletionTokens` **Added**\n * `error.union(CreatePrivateEndpointValidationFailedResponse).data` **Changed**\n* `openrouter.privateEndpoints.get()`: `response.data` **Changed**\n* `openrouter.privateEndpoints.update()`: `response.data` **Changed**\n* `openrouter.privateEndpoints.activate()`: `response.data.maxCompletionTokens` **Added**\n* `openrouter.privateEndpoints.disable()`: `response.data.maxCompletionTokens` **Added**\n* `openrouter.privateEndpoints.enable()`: `response.data.maxCompletionTokens` **Added**\n* `openrouter.privateEndpoints.updatePricing()`: `response.data` **Changed**\n* `openrouter.privateEndpoints.validate()`: `response.data.parameters` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 90da43d39..8acf43219 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.5.11 + version: 1.5.12 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 38ea34496..3d66a2e57 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -10402,6 +10402,15 @@ components: example: 'https://contoso.openai.azure.com' minLength: 1 type: 'string' + declared_parameters: + description: 'Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared.' + example: + - 'temperature' + - 'seed' + items: + $ref: '#/components/schemas/PrivateEndpointDeclaredParameter' + maxItems: 25 + type: 'array' declared_region: description: 'Attest where this deployment processes data.' enum: @@ -10419,6 +10428,12 @@ components: type: - 'boolean' - 'null' + max_completion_tokens: + description: 'Cap on completion tokens per request. Requests asking for more skip this endpoint, and the default output length stays within it. When omitted, the cap is copied from the public endpoint for the same model and provider, if there is one.' + example: 131072 + maximum: 2147483647 + minimum: 1 + type: 'integer' model_permaslug: description: 'Permanent slug of the model this endpoint serves.' example: 'openai/gpt-4o-2024-08-06' @@ -16192,6 +16207,12 @@ components: type: - 'boolean' - 'null' + max_completion_tokens: + description: 'Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length.' + example: 131072 + type: + - 'integer' + - 'null' required: - 'declared_zdr' - 'declared_region' @@ -25600,9 +25621,13 @@ components: PrivateEndpoint: example: base_url: 'https://contoso.openai.azure.com' + declared_parameters: + - 'temperature' + - 'seed' declared_region: 'us' declared_zdr: true id: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + max_completion_tokens: 131072 model_name: 'OpenAI: GPT-4o' model_permaslug: 'openai/gpt-4o-2024-08-06' model_slug: 'openai/gpt-4o' @@ -25614,6 +25639,10 @@ components: provider_name: 'Azure' provider_slug: 'azure' status: 'active' + tested_parameters: + - 'tools' + - 'tool_choice' + - 'response_format' upstream_model_id: 'gpt-4o-prod' properties: base_url: @@ -25622,6 +25651,14 @@ components: type: - 'string' - 'null' + declared_parameters: + description: 'Parameters you declared the upstream supports. Requests that use a parameter only route to this endpoint when it is tested or declared.' + example: + - 'temperature' + - 'seed' + items: + type: 'string' + type: 'array' declared_region: $ref: '#/components/schemas/PrivateEndpointDeclaredRegion' declared_zdr: @@ -25635,6 +25672,12 @@ components: example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' format: 'uuid' type: 'string' + max_completion_tokens: + description: 'Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length.' + example: 131072 + type: + - 'integer' + - 'null' model_name: description: 'Display name of the model, or `null` when the model is no longer listed.' example: 'OpenAI: GPT-4o' @@ -25665,6 +25708,15 @@ components: - 'null' status: $ref: '#/components/schemas/PrivateEndpointStatus' + tested_parameters: + description: 'Parameters a validation run proved the upstream honors (`tools`, `tool_choice`, `response_format`, `structured_outputs`, `stop`). Read-only; cleared when the upstream configuration changes.' + example: + - 'tools' + - 'tool_choice' + - 'response_format' + items: + type: 'string' + type: 'array' upstream_model_id: description: 'Model or deployment identifier sent to the upstream provider.' example: 'gpt-4o-prod' @@ -25682,6 +25734,8 @@ components: - 'declared_zdr' - 'declared_region' - 'pricing' + - 'tested_parameters' + - 'declared_parameters' type: 'object' PrivateEndpointActivation: description: 'Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again.' @@ -25750,6 +25804,37 @@ components: example: 'no_byok_key' type: 'string' x-speakeasy-unknown-values: allow + PrivateEndpointDeclaredParameter: + description: 'A chat request parameter the endpoint accepts.' + enum: + - 'temperature' + - 'top_p' + - 'top_k' + - 'min_p' + - 'top_a' + - 'frequency_penalty' + - 'presence_penalty' + - 'repetition_penalty' + - 'max_tokens' + - 'max_completion_tokens' + - 'logit_bias' + - 'logprobs' + - 'top_logprobs' + - 'prediction' + - 'seed' + - 'response_format' + - 'structured_outputs' + - 'stop' + - 'tools' + - 'tool_choice' + - 'parallel_tool_calls' + - 'reasoning' + - 'reasoning_effort' + - 'web_search_options' + - 'verbosity' + example: 'seed' + type: 'string' + x-speakeasy-unknown-values: allow PrivateEndpointDeclaredRegion: description: 'Where you attest this deployment processes data. `global` means not regional; `null` means undeclared.' enum: @@ -25762,6 +25847,20 @@ components: - 'string' - 'null' x-speakeasy-unknown-values: allow + PrivateEndpointParameterCheck: + example: + parameter: 'response_format' + supported: true + properties: + parameter: + example: 'response_format' + type: 'string' + supported: + type: 'boolean' + required: + - 'parameter' + - 'supported' + type: 'object' PrivateEndpointPricing: description: 'Negotiated per-token rates reported for requests routed to this endpoint.' example: @@ -25858,6 +25957,11 @@ components: items: $ref: '#/components/schemas/PrivateEndpointCheck' type: 'array' + parameters: + description: 'Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven.' + items: + $ref: '#/components/schemas/PrivateEndpointParameterCheck' + type: 'array' passed: description: 'Whether every check passed.' example: true @@ -25872,6 +25976,11 @@ components: items: $ref: '#/components/schemas/PrivateEndpointCheck' type: 'array' + parameters: + description: 'Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven.' + items: + $ref: '#/components/schemas/PrivateEndpointParameterCheck' + type: 'array' passed: description: 'Whether every check passed.' example: true @@ -32221,6 +32330,20 @@ components: required: - 'is_filtered_model_catalog_enabled' type: 'object' + UpdatePrivateEndpointParametersRequest: + properties: + declared_parameters: + description: 'Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared.' + example: + - 'temperature' + - 'seed' + items: + $ref: '#/components/schemas/PrivateEndpointDeclaredParameter' + maxItems: 25 + type: 'array' + required: + - 'declared_parameters' + type: 'object' UpdatePrivateEndpointPricingRequest: properties: pricing: @@ -46659,12 +46782,12 @@ paths: description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'createPrivateEndpoint' parameters: - - description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison.' + - description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `max_completion_tokens` are not compared, and later edits to the endpoint do not affect the comparison.' in: 'header' name: 'idempotency-key' required: false schema: - description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison.' + description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `max_completion_tokens` are not compared, and later edits to the endpoint do not affect the comparison.' example: 'wayfair-gpt-4o-eastus-2026-09' maxLength: 255 minLength: 1 @@ -47451,6 +47574,131 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/parameters: + put: + description: 'Declare which request parameters the upstream supports beyond the ones validation proved. Applies to drafts and active endpoints; routing picks the change up for subsequent requests. The body replaces the earlier declaration and is read as a set: order and repeated names do not matter, but the list holds at most as many entries as there are declarable parameters, repeats included. `tested_parameters` stay. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools` being tested or declared. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'updatePrivateEndpointParameters' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePrivateEndpointParametersRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateEndpointResponse' + description: 'The endpoint with its new declared parameters' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Set private endpoint supported parameters' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'updateParameters' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /private-endpoints/{id}/pricing: put: description: 'Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. The body replaces the whole pricing object: omitting `cache_read` or `cache_write` reverts that rate to the provider pricing strategy''s default, even if it was set before. [Management key](/docs/guides/overview/auth/management-api-keys) required.' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0072df59f..da1766e4b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.802.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:e49464260af4f90616e9227f4060d9c6b8898738a641a3401250921f0ce81e5d - sourceBlobDigest: sha256:c8afbb14725733235a984476ea18ba92438f309dd3581cb8104501ed2faaee8f + sourceRevisionDigest: sha256:b0a0d63fb8ba2a606815d85a30f7a026ce28f24c8c0056d2e9b399ceb6aed6a6 + sourceBlobDigest: sha256:f08a5534613374830d1f780269f0fcecc7bb95c0ffd70cb69f7a2c1957cd606b tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:e49464260af4f90616e9227f4060d9c6b8898738a641a3401250921f0ce81e5d - sourceBlobDigest: sha256:c8afbb14725733235a984476ea18ba92438f309dd3581cb8104501ed2faaee8f + sourceRevisionDigest: sha256:b0a0d63fb8ba2a606815d85a30f7a026ce28f24c8c0056d2e9b399ceb6aed6a6 + sourceBlobDigest: sha256:f08a5534613374830d1f780269f0fcecc7bb95c0ffd70cb69f7a2c1957cd606b codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:0765fc4f8cf28a174a54898f0904c36a6ed52fa7a5f1d653587dbd5616e003eb + codeSamplesRevisionDigest: sha256:9ac7de60c171070e85329ede46debecc99ce11c9e61ee09354fbdffe4be4ee91 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.802.0 diff --git a/RELEASES.md b/RELEASES.md index 0ff609685..902727ac6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4496,4 +4496,14 @@ Based on: ### Generated - [typescript v1.5.11] . ### Releases -- [NPM v1.5.11] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.11 - . \ No newline at end of file +- [NPM v1.5.11] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.11 - . + +## 2026-10-27 13:51:20 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.802.0 (2.948.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.5.12] . +### Releases +- [NPM v1.5.12] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.12 - . \ No newline at end of file diff --git a/docs/models/createprivateendpointrequest.mdx b/docs/models/createprivateendpointrequest.mdx index 5941f3a7d..bb52c61b8 100644 --- a/docs/models/createprivateendpointrequest.mdx +++ b/docs/models/createprivateendpointrequest.mdx @@ -16,13 +16,15 @@ let value: CreatePrivateEndpointRequest = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `activate` | [models.PrivateEndpointActivation](../models/privateendpointactivation.mdx) | ➖ | Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. | \{
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
} | -| `baseUrl` | *string* | ➖ | HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | -| `declaredRegion` | [models.CreatePrivateEndpointRequestDeclaredRegion](../models/createprivateendpointrequestdeclaredregion.mdx) | ➖ | Attest where this deployment processes data. | us | -| `declaredZdr` | *boolean* | ➖ | Attest that this deployment retains no prompt or completion data. | | -| `modelPermaslug` | *string* | ✔️ | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | -| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | ➖ | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
} | -| `providerSlug` | *string* | ✔️ | Slug of the upstream provider. | azure | -| `upstreamModelId` | *string* | ✔️ | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `activate` | [models.PrivateEndpointActivation](../models/privateendpointactivation.mdx) | ➖ | Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. | \{
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
} | +| `baseUrl` | *string* | ➖ | HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | +| `declaredParameters` | [models.PrivateEndpointDeclaredParameter](../models/privateendpointdeclaredparameter.mdx)[] | ➖ | Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared. | [
"temperature",
"seed"
] | +| `declaredRegion` | [models.CreatePrivateEndpointRequestDeclaredRegion](../models/createprivateendpointrequestdeclaredregion.mdx) | ➖ | Attest where this deployment processes data. | us | +| `declaredZdr` | *boolean* | ➖ | Attest that this deployment retains no prompt or completion data. | | +| `maxCompletionTokens` | *number* | ➖ | Cap on completion tokens per request. Requests asking for more skip this endpoint, and the default output length stays within it. When omitted, the cap is copied from the public endpoint for the same model and provider, if there is one. | 131072 | +| `modelPermaslug` | *string* | ✔️ | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | ➖ | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
} | +| `providerSlug` | *string* | ✔️ | Slug of the upstream provider. | azure | +| `upstreamModelId` | *string* | ✔️ | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file diff --git a/docs/models/managedprivateendpoint.mdx b/docs/models/managedprivateendpoint.mdx index 735013d44..53ad0d824 100644 --- a/docs/models/managedprivateendpoint.mdx +++ b/docs/models/managedprivateendpoint.mdx @@ -32,4 +32,5 @@ let value: ManagedPrivateEndpoint = { | `providerName` | *string* | ✔️ | Display name of the upstream provider. | Azure | | `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | ✔️ | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | | `declaredRegion` | [models.PrivateEndpointDeclaredRegion](../models/privateendpointdeclaredregion.mdx) | ✔️ | Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. | us | -| `declaredZdr` | *boolean* | ✔️ | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | \ No newline at end of file +| `declaredZdr` | *boolean* | ✔️ | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | +| `maxCompletionTokens` | *number* | ➖ | Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length. | 131072 | \ No newline at end of file diff --git a/docs/models/operations/createprivateendpointrequest.mdx b/docs/models/operations/createprivateendpointrequest.mdx index c6e0c8339..72b21f2f9 100644 --- a/docs/models/operations/createprivateendpointrequest.mdx +++ b/docs/models/operations/createprivateendpointrequest.mdx @@ -18,10 +18,10 @@ let value: CreatePrivateEndpointRequest = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `httpReferer` | *string* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `appTitle` | *string* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `appCategories` | *string* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `idempotencyKey` | *string* | ➖ | Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison. | wayfair-gpt-4o-eastus-2026-09 | -| `createPrivateEndpointRequest` | [models.CreatePrivateEndpointRequest](../../models/createprivateendpointrequest.mdx) | ✔️ | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `httpReferer` | *string* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `idempotencyKey` | *string* | ➖ | Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `max_completion_tokens` are not compared, and later edits to the endpoint do not affect the comparison. | wayfair-gpt-4o-eastus-2026-09 | +| `createPrivateEndpointRequest` | [models.CreatePrivateEndpointRequest](../../models/createprivateendpointrequest.mdx) | ✔️ | N/A | | \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointparametersglobals.mdx b/docs/models/operations/updateprivateendpointparametersglobals.mdx new file mode 100644 index 000000000..6e2eeb5b4 --- /dev/null +++ b/docs/models/operations/updateprivateendpointparametersglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "UpdatePrivateEndpointParametersGlobals" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointParametersGlobals } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointParametersGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointparametersrequest.mdx b/docs/models/operations/updateprivateendpointparametersrequest.mdx new file mode 100644 index 000000000..5e9809e1e --- /dev/null +++ b/docs/models/operations/updateprivateendpointparametersrequest.mdx @@ -0,0 +1,29 @@ +--- +title: "UpdatePrivateEndpointParametersRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointParametersRequest } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointParametersRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointParametersRequest: { + declaredParameters: [ + "temperature", + "seed", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | ➖ | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | ➖ | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | ➖ | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | ✔️ | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `updatePrivateEndpointParametersRequest` | [models.UpdatePrivateEndpointParametersRequest](../../models/updateprivateendpointparametersrequest.mdx) | ✔️ | N/A | | \ No newline at end of file diff --git a/docs/models/privateendpoint.mdx b/docs/models/privateendpoint.mdx index 86da7af8e..1854213f9 100644 --- a/docs/models/privateendpoint.mdx +++ b/docs/models/privateendpoint.mdx @@ -9,6 +9,10 @@ import { PrivateEndpoint } from "@openrouter/sdk/models"; let value: PrivateEndpoint = { baseUrl: "https://contoso.openai.azure.com", + declaredParameters: [ + "temperature", + "seed", + ], declaredRegion: "us", declaredZdr: true, id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", @@ -22,23 +26,31 @@ let value: PrivateEndpoint = { providerName: "Azure", providerSlug: "azure", status: "active", + testedParameters: [ + "tools", + "tool_choice", + "response_format", + ], upstreamModelId: "gpt-4o-prod", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| `baseUrl` | *string* | ✔️ | HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | -| `declaredRegion` | [models.PrivateEndpointDeclaredRegion](../models/privateendpointdeclaredregion.mdx) | ✔️ | Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. | us | -| `declaredZdr` | *boolean* | ✔️ | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | -| `id` | *string* | ✔️ | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | -| `modelName` | *string* | ✔️ | Display name of the model, or `null` when the model is no longer listed. | OpenAI: GPT-4o | -| `modelPermaslug` | *string* | ✔️ | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | -| `modelSlug` | *string* | ✔️ | Public model slug, or `null` when the model is no longer listed. | openai/gpt-4o | -| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | ✔️ | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
} | -| `providerName` | *string* | ✔️ | Display name of the upstream provider. | Azure | -| `providerSlug` | *string* | ✔️ | Slug of the upstream provider, or `null` when the provider is no longer listed. | azure | -| `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | ✔️ | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | -| `upstreamModelId` | *string* | ✔️ | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `baseUrl` | *string* | ✔️ | HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | +| `declaredParameters` | *string*[] | ✔️ | Parameters you declared the upstream supports. Requests that use a parameter only route to this endpoint when it is tested or declared. | [
"temperature",
"seed"
] | +| `declaredRegion` | [models.PrivateEndpointDeclaredRegion](../models/privateendpointdeclaredregion.mdx) | ✔️ | Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. | us | +| `declaredZdr` | *boolean* | ✔️ | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | +| `id` | *string* | ✔️ | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `maxCompletionTokens` | *number* | ➖ | Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length. | 131072 | +| `modelName` | *string* | ✔️ | Display name of the model, or `null` when the model is no longer listed. | OpenAI: GPT-4o | +| `modelPermaslug` | *string* | ✔️ | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `modelSlug` | *string* | ✔️ | Public model slug, or `null` when the model is no longer listed. | openai/gpt-4o | +| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | ✔️ | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
} | +| `providerName` | *string* | ✔️ | Display name of the upstream provider. | Azure | +| `providerSlug` | *string* | ✔️ | Slug of the upstream provider, or `null` when the provider is no longer listed. | azure | +| `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | ✔️ | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | +| `testedParameters` | *string*[] | ✔️ | Parameters a validation run proved the upstream honors (`tools`, `tool_choice`, `response_format`, `structured_outputs`, `stop`). Read-only; cleared when the upstream configuration changes. | [
"tools",
"tool_choice",
"response_format"
] | +| `upstreamModelId` | *string* | ✔️ | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file diff --git a/docs/models/privateendpointdeclaredparameter.mdx b/docs/models/privateendpointdeclaredparameter.mdx new file mode 100644 index 000000000..faabd99bc --- /dev/null +++ b/docs/models/privateendpointdeclaredparameter.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointDeclaredParameter" +--- + +A chat request parameter the endpoint accepts. + +## Example Usage + +```typescript +import { PrivateEndpointDeclaredParameter } from "@openrouter/sdk/models"; + +let value: PrivateEndpointDeclaredParameter = "seed"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"temperature" | "top_p" | "top_k" | "min_p" | "top_a" | "frequency_penalty" | "presence_penalty" | "repetition_penalty" | "max_tokens" | "max_completion_tokens" | "logit_bias" | "logprobs" | "top_logprobs" | "prediction" | "seed" | "response_format" | "structured_outputs" | "stop" | "tools" | "tool_choice" | "parallel_tool_calls" | "reasoning" | "reasoning_effort" | "web_search_options" | "verbosity" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/privateendpointparametercheck.mdx b/docs/models/privateendpointparametercheck.mdx new file mode 100644 index 000000000..96916f618 --- /dev/null +++ b/docs/models/privateendpointparametercheck.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointParameterCheck" +--- + +## Example Usage + +```typescript +import { PrivateEndpointParameterCheck } from "@openrouter/sdk/models"; + +let value: PrivateEndpointParameterCheck = { + parameter: "response_format", + supported: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `parameter` | *string* | ✔️ | N/A | response_format | +| `supported` | *boolean* | ✔️ | N/A | | \ No newline at end of file diff --git a/docs/models/privateendpointresponse.mdx b/docs/models/privateendpointresponse.mdx index a3c28ae2a..e4f366e92 100644 --- a/docs/models/privateendpointresponse.mdx +++ b/docs/models/privateendpointresponse.mdx @@ -10,6 +10,10 @@ import { PrivateEndpointResponse } from "@openrouter/sdk/models"; let value: PrivateEndpointResponse = { data: { baseUrl: "https://contoso.openai.azure.com", + declaredParameters: [ + "temperature", + "seed", + ], declaredRegion: "us", declaredZdr: true, id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", @@ -23,6 +27,11 @@ let value: PrivateEndpointResponse = { providerName: "Azure", providerSlug: "azure", status: "active", + testedParameters: [ + "tools", + "tool_choice", + "response_format", + ], upstreamModelId: "gpt-4o-prod", }, }; @@ -30,6 +39,6 @@ let value: PrivateEndpointResponse = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `data` | [models.PrivateEndpoint](../models/privateendpoint.mdx) | ✔️ | N/A | \{
"base_url": "https://contoso.openai.azure.com",
"declared_region": "us",
"declared_zdr": true,
"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11",
"model_name": "OpenAI: GPT-4o",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"model_slug": "openai/gpt-4o",
"pricing": \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
},
"provider_name": "Azure",
"provider_slug": "azure",
"status": "active",
"upstream_model_id": "gpt-4o-prod"
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.PrivateEndpoint](../models/privateendpoint.mdx) | ✔️ | N/A | \{
"base_url": "https://contoso.openai.azure.com",
"declared_parameters": [
"temperature",
"seed"
],
"declared_region": "us",
"declared_zdr": true,
"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11",
"max_completion_tokens": 131072,
"model_name": "OpenAI: GPT-4o",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"model_slug": "openai/gpt-4o",
"pricing": \{
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
},
"provider_name": "Azure",
"provider_slug": "azure",
"status": "active",
"tested_parameters": [
"tools",
"tool_choice",
"response_format"
],
"upstream_model_id": "gpt-4o-prod"
} | \ No newline at end of file diff --git a/docs/models/privateendpointvalidation.mdx b/docs/models/privateendpointvalidation.mdx index 50535fb6d..f3296ba51 100644 --- a/docs/models/privateendpointvalidation.mdx +++ b/docs/models/privateendpointvalidation.mdx @@ -20,7 +20,8 @@ let value: PrivateEndpointValidation = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | ✔️ | N/A | | -| `passed` | *boolean* | ✔️ | Whether every check passed. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | ✔️ | N/A | | +| `parameters` | [models.PrivateEndpointParameterCheck](../models/privateendpointparametercheck.mdx)[] | ➖ | Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven. | | +| `passed` | *boolean* | ✔️ | Whether every check passed. | true | \ No newline at end of file diff --git a/docs/models/privateendpointvalidationnullable.mdx b/docs/models/privateendpointvalidationnullable.mdx index ad513fb88..c155ae7cc 100644 --- a/docs/models/privateendpointvalidationnullable.mdx +++ b/docs/models/privateendpointvalidationnullable.mdx @@ -20,7 +20,8 @@ let value: PrivateEndpointValidationNullable = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | ✔️ | N/A | | -| `passed` | *boolean* | ✔️ | Whether every check passed. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | ✔️ | N/A | | +| `parameters` | [models.PrivateEndpointParameterCheck](../models/privateendpointparametercheck.mdx)[] | ➖ | Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven. | | +| `passed` | *boolean* | ✔️ | Whether every check passed. | true | \ No newline at end of file diff --git a/docs/models/updateprivateendpointparametersrequest.mdx b/docs/models/updateprivateendpointparametersrequest.mdx new file mode 100644 index 000000000..834ff8436 --- /dev/null +++ b/docs/models/updateprivateendpointparametersrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "UpdatePrivateEndpointParametersRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointParametersRequest } from "@openrouter/sdk/models"; + +let value: UpdatePrivateEndpointParametersRequest = { + declaredParameters: [ + "temperature", + "seed", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `declaredParameters` | [models.PrivateEndpointDeclaredParameter](../models/privateendpointdeclaredparameter.mdx)[] | ✔️ | Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared. | [
"temperature",
"seed"
] | \ No newline at end of file diff --git a/docs/sdks/privateendpoints/README.mdx b/docs/sdks/privateendpoints/README.mdx index 408fae12c..1b10540a3 100644 --- a/docs/sdks/privateendpoints/README.mdx +++ b/docs/sdks/privateendpoints/README.mdx @@ -17,6 +17,7 @@ Private Endpoints endpoints * [activate](#activate) - Activate a validated private endpoint * [disable](#disable) - Disable a private endpoint * [enable](#enable) - Enable a private endpoint +* [updateParameters](#updateparameters) - Set private endpoint supported parameters * [updatePricing](#updatepricing) - Set private endpoint pricing * [validate](#validate) - Validate a draft private endpoint @@ -722,6 +723,105 @@ run(); | errors.BadGatewayResponseError | 502 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | +## updateParameters + +Declare which request parameters the upstream supports beyond the ones validation proved. Applies to drafts and active endpoints; routing picks the change up for subsequent requests. The body replaces the earlier declaration and is read as a set: order and repeated names do not matter, but the list holds at most as many entries as there are declarable parameters, repeats included. `tested_parameters` stay. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools` being tested or declared. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.updateParameters({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointParametersRequest: { + declaredParameters: [ + "temperature", + "seed", + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsUpdateParameters } from "@openrouter/sdk/funcs/privateEndpointsUpdateParameters.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsUpdateParameters(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointParametersRequest: { + declaredParameters: [ + "temperature", + "seed", + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsUpdateParameters failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePrivateEndpointParametersRequest](../../models/operations/updateprivateendpointparametersrequest.mdx) | ✔️ | The request object to use for the request. | +| `options` | RequestOptions | ➖ | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | ➖ | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PrivateEndpointResponse](../../models/privateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + ## updatePricing Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. The body replaces the whole pricing object: omitting `cache_read` or `cache_write` reverts that rate to the provider pricing strategy's default, even if it was set before. [Management key](/docs/guides/overview/auth/management-api-keys) required. diff --git a/jsr.json b/jsr.json index ed30116ea..5ac64d087 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.5.11", + "version": "1.5.12", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index eee076b16..6f41328bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.5.11", + "version": "1.5.12", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -21,8 +21,8 @@ "license": "Apache-2.0", "packageManager": "pnpm@10.22.0", "publishConfig": { - "access": "public", - "provenance": true + "provenance": true, + "access": "public" }, "type": "module", "main": "./esm/index.js", @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc && node scripts/unbarrel-imports.js", "prepublishOnly": "npm run build", - "prepare": "npm run build", - "test": "vitest --run --project unit", + "postinstall": "node scripts/check-types.js || true", "test:e2e": "vitest --run --project e2e", "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0", "compile": "tsc && node scripts/unbarrel-imports.js", - "postinstall": "node scripts/check-types.js || true", - "test:transit": "exit 0" + "prepare": "npm run build", + "test": "vitest --run --project unit", + "test:transit": "exit 0", + "typecheck:transit": "exit 0" }, "peerDependencies": { diff --git a/src/funcs/privateEndpointsUpdateParameters.ts b/src/funcs/privateEndpointsUpdateParameters.ts new file mode 100644 index 000000000..f389094bc --- /dev/null +++ b/src/funcs/privateEndpointsUpdateParameters.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a541ac958e3d + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Set private endpoint supported parameters + * + * @remarks + * Declare which request parameters the upstream supports beyond the ones validation proved. Applies to drafts and active endpoints; routing picks the change up for subsequent requests. The body replaces the earlier declaration and is read as a set: order and repeated names do not matter, but the list holds at most as many entries as there are declarable parameters, repeats included. `tested_parameters` stay. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools` being tested or declared. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsUpdateParameters( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointParametersRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointParametersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePrivateEndpointParametersRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON( + "body", + payload.UpdatePrivateEndpointParametersRequest, + { explode: true }, + ); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/parameters")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updatePrivateEndpointParameters", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.PrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index 3942e7c6b..8b12aba89 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.5.11", + sdkVersion: "1.5.12", genVersion: "2.948.4", - userAgent: "speakeasy-sdk/typescript 1.5.11 2.948.4 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.5.12 2.948.4 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/createprivateendpointrequest.ts b/src/models/createprivateendpointrequest.ts index 0c397ca5d..9fbb483c5 100644 --- a/src/models/createprivateendpointrequest.ts +++ b/src/models/createprivateendpointrequest.ts @@ -12,6 +12,10 @@ import { PrivateEndpointActivation$Outbound, PrivateEndpointActivation$outboundSchema, } from "./privateendpointactivation.js"; +import { + PrivateEndpointDeclaredParameter, + PrivateEndpointDeclaredParameter$outboundSchema, +} from "./privateendpointdeclaredparameter.js"; import { PrivateEndpointPricing, PrivateEndpointPricing$Outbound, @@ -42,6 +46,10 @@ export type CreatePrivateEndpointRequest = { * HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). */ baseUrl?: string | undefined; + /** + * Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared. + */ + declaredParameters?: Array | undefined; /** * Attest where this deployment processes data. */ @@ -53,6 +61,10 @@ export type CreatePrivateEndpointRequest = { * Attest that this deployment retains no prompt or completion data. */ declaredZdr?: boolean | null | undefined; + /** + * Cap on completion tokens per request. Requests asking for more skip this endpoint, and the default output length stays within it. When omitted, the cap is copied from the public endpoint for the same model and provider, if there is one. + */ + maxCompletionTokens?: number | undefined; /** * Permanent slug of the model this endpoint serves. */ @@ -80,8 +92,10 @@ export const CreatePrivateEndpointRequestDeclaredRegion$outboundSchema: export type CreatePrivateEndpointRequest$Outbound = { activate?: PrivateEndpointActivation$Outbound | undefined; base_url?: string | undefined; + declared_parameters?: Array | undefined; declared_region?: string | null | undefined; declared_zdr?: boolean | null | undefined; + max_completion_tokens?: number | undefined; model_permaslug: string; pricing?: PrivateEndpointPricing$Outbound | undefined; provider_slug: string; @@ -95,10 +109,13 @@ export const CreatePrivateEndpointRequest$outboundSchema: z.ZodType< > = z.object({ activate: PrivateEndpointActivation$outboundSchema.optional(), baseUrl: z.string().optional(), + declaredParameters: z.array(PrivateEndpointDeclaredParameter$outboundSchema) + .optional(), declaredRegion: z.nullable( CreatePrivateEndpointRequestDeclaredRegion$outboundSchema, ).optional(), declaredZdr: z.nullable(z.boolean()).optional(), + maxCompletionTokens: z.int().optional(), modelPermaslug: z.string(), pricing: PrivateEndpointPricing$outboundSchema.optional(), providerSlug: z.string(), @@ -106,8 +123,10 @@ export const CreatePrivateEndpointRequest$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { baseUrl: "base_url", + declaredParameters: "declared_parameters", declaredRegion: "declared_region", declaredZdr: "declared_zdr", + maxCompletionTokens: "max_completion_tokens", modelPermaslug: "model_permaslug", providerSlug: "provider_slug", upstreamModelId: "upstream_model_id", diff --git a/src/models/index.ts b/src/models/index.ts index b6ea892ff..fbc5712cf 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -617,7 +617,9 @@ export * from "./privateendpoint.js"; export * from "./privateendpointactivation.js"; export * from "./privateendpointcheck.js"; export * from "./privateendpointcheckreason.js"; +export * from "./privateendpointdeclaredparameter.js"; export * from "./privateendpointdeclaredregion.js"; +export * from "./privateendpointparametercheck.js"; export * from "./privateendpointpricing.js"; export * from "./privateendpointresponse.js"; export * from "./privateendpointstatus.js"; @@ -783,6 +785,7 @@ export * from "./updateguardrailresponse.js"; export * from "./updateobservabilitydestinationrequest.js"; export * from "./updateobservabilitydestinationresponse.js"; export * from "./updateorganizationsettingsrequest.js"; +export * from "./updateprivateendpointparametersrequest.js"; export * from "./updateprivateendpointpricingrequest.js"; export * from "./updateprivateendpointrequest.js"; export * from "./updatescimgroupmappingrequest.js"; diff --git a/src/models/managedprivateendpoint.ts b/src/models/managedprivateendpoint.ts index fa5c1e732..9b666d33a 100644 --- a/src/models/managedprivateendpoint.ts +++ b/src/models/managedprivateendpoint.ts @@ -54,6 +54,10 @@ export type ManagedPrivateEndpoint = { * Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. */ declaredZdr: boolean | null; + /** + * Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length. + */ + maxCompletionTokens?: number | null | undefined; }; /** @internal */ @@ -70,6 +74,7 @@ export const ManagedPrivateEndpoint$inboundSchema: z.ZodType< status: PrivateEndpointStatus$inboundSchema, declared_region: z.nullable(PrivateEndpointDeclaredRegion$inboundSchema), declared_zdr: z.nullable(z.boolean()), + max_completion_tokens: z.nullable(z.int()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -79,6 +84,7 @@ export const ManagedPrivateEndpoint$inboundSchema: z.ZodType< "provider_name": "providerName", "declared_region": "declaredRegion", "declared_zdr": "declaredZdr", + "max_completion_tokens": "maxCompletionTokens", }); }); diff --git a/src/models/operations/createprivateendpoint.ts b/src/models/operations/createprivateendpoint.ts index c263f7e66..e6b2d5c17 100644 --- a/src/models/operations/createprivateendpoint.ts +++ b/src/models/operations/createprivateendpoint.ts @@ -50,7 +50,7 @@ export type CreatePrivateEndpointRequest = { */ appCategories?: string | undefined; /** - * Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison. + * Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, pricing, or declared parameters) is rejected with 422 `idempotency_key_reused`. Declared parameters are compared as a set, so a retry that reorders or repeats a name replays the endpoint. `activate` and `max_completion_tokens` are not compared, and later edits to the endpoint do not affect the comparison. */ idempotencyKey?: string | undefined; createPrivateEndpointRequest: models.CreatePrivateEndpointRequest; diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index d52057092..11a41a01d 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -135,6 +135,7 @@ export * from "./updatekeys.js"; export * from "./updateobservabilitydestination.js"; export * from "./updateorganizationsettings.js"; export * from "./updateprivateendpoint.js"; +export * from "./updateprivateendpointparameters.js"; export * from "./updateprivateendpointpricing.js"; export * from "./updatescimgroupmapping.js"; export * from "./updateworkspace.js"; diff --git a/src/models/operations/updateprivateendpointparameters.ts b/src/models/operations/updateprivateendpointparameters.ts new file mode 100644 index 000000000..f06703a9a --- /dev/null +++ b/src/models/operations/updateprivateendpointparameters.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7665d9dbe783 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type UpdatePrivateEndpointParametersGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type UpdatePrivateEndpointParametersRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; + updatePrivateEndpointParametersRequest: + models.UpdatePrivateEndpointParametersRequest; +}; + +/** @internal */ +export type UpdatePrivateEndpointParametersRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; + UpdatePrivateEndpointParametersRequest: + models.UpdatePrivateEndpointParametersRequest$Outbound; +}; + +/** @internal */ +export const UpdatePrivateEndpointParametersRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointParametersRequest$Outbound, + UpdatePrivateEndpointParametersRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), + updatePrivateEndpointParametersRequest: + models.UpdatePrivateEndpointParametersRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + updatePrivateEndpointParametersRequest: + "UpdatePrivateEndpointParametersRequest", + }); +}); + +export function updatePrivateEndpointParametersRequestToJSON( + updatePrivateEndpointParametersRequest: + UpdatePrivateEndpointParametersRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointParametersRequest$outboundSchema.parse( + updatePrivateEndpointParametersRequest, + ), + ); +} diff --git a/src/models/privateendpoint.ts b/src/models/privateendpoint.ts index 436826c72..ac64b920c 100644 --- a/src/models/privateendpoint.ts +++ b/src/models/privateendpoint.ts @@ -26,6 +26,10 @@ export type PrivateEndpoint = { * HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). */ baseUrl: string | null; + /** + * Parameters you declared the upstream supports. Requests that use a parameter only route to this endpoint when it is tested or declared. + */ + declaredParameters: Array; /** * Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. */ @@ -38,6 +42,10 @@ export type PrivateEndpoint = { * Stable identifier of the private endpoint. */ id: string; + /** + * Most completion tokens a request routed to this endpoint can produce, or `null` when the endpoint sets no cap beyond the model context length. + */ + maxCompletionTokens?: number | null | undefined; /** * Display name of the model, or `null` when the model is no longer listed. */ @@ -66,6 +74,10 @@ export type PrivateEndpoint = { * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. */ status: PrivateEndpointStatus; + /** + * Parameters a validation run proved the upstream honors (`tools`, `tool_choice`, `response_format`, `structured_outputs`, `stop`). Read-only; cleared when the upstream configuration changes. + */ + testedParameters: Array; /** * Model or deployment identifier sent to the upstream provider. */ @@ -78,9 +90,11 @@ export const PrivateEndpoint$inboundSchema: z.ZodType< unknown > = z.object({ base_url: z.nullable(z.string()), + declared_parameters: z.array(z.string()), declared_region: z.nullable(PrivateEndpointDeclaredRegion$inboundSchema), declared_zdr: z.nullable(z.boolean()), id: z.string(), + max_completion_tokens: z.nullable(z.int()).optional(), model_name: z.nullable(z.string()), model_permaslug: z.string(), model_slug: z.nullable(z.string()), @@ -88,17 +102,21 @@ export const PrivateEndpoint$inboundSchema: z.ZodType< provider_name: z.string(), provider_slug: z.nullable(z.string()), status: PrivateEndpointStatus$inboundSchema, + tested_parameters: z.array(z.string()), upstream_model_id: z.string(), }).transform((v) => { return remap$(v, { "base_url": "baseUrl", + "declared_parameters": "declaredParameters", "declared_region": "declaredRegion", "declared_zdr": "declaredZdr", + "max_completion_tokens": "maxCompletionTokens", "model_name": "modelName", "model_permaslug": "modelPermaslug", "model_slug": "modelSlug", "provider_name": "providerName", "provider_slug": "providerSlug", + "tested_parameters": "testedParameters", "upstream_model_id": "upstreamModelId", }); }); diff --git a/src/models/privateendpointdeclaredparameter.ts b/src/models/privateendpointdeclaredparameter.ts new file mode 100644 index 000000000..7f64541b4 --- /dev/null +++ b/src/models/privateendpointdeclaredparameter.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 590fecd9a965 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * A chat request parameter the endpoint accepts. + */ +export const PrivateEndpointDeclaredParameter = { + Temperature: "temperature", + TopP: "top_p", + TopK: "top_k", + MinP: "min_p", + TopA: "top_a", + FrequencyPenalty: "frequency_penalty", + PresencePenalty: "presence_penalty", + RepetitionPenalty: "repetition_penalty", + MaxTokens: "max_tokens", + MaxCompletionTokens: "max_completion_tokens", + LogitBias: "logit_bias", + Logprobs: "logprobs", + TopLogprobs: "top_logprobs", + Prediction: "prediction", + Seed: "seed", + ResponseFormat: "response_format", + StructuredOutputs: "structured_outputs", + Stop: "stop", + Tools: "tools", + ToolChoice: "tool_choice", + ParallelToolCalls: "parallel_tool_calls", + Reasoning: "reasoning", + ReasoningEffort: "reasoning_effort", + WebSearchOptions: "web_search_options", + Verbosity: "verbosity", +} as const; +/** + * A chat request parameter the endpoint accepts. + */ +export type PrivateEndpointDeclaredParameter = OpenEnum< + typeof PrivateEndpointDeclaredParameter +>; + +/** @internal */ +export const PrivateEndpointDeclaredParameter$outboundSchema: z.ZodType< + string, + PrivateEndpointDeclaredParameter +> = openEnums.outboundSchema(PrivateEndpointDeclaredParameter); diff --git a/src/models/privateendpointparametercheck.ts b/src/models/privateendpointparametercheck.ts new file mode 100644 index 000000000..640f4888e --- /dev/null +++ b/src/models/privateendpointparametercheck.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8f6f1479ff31 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type PrivateEndpointParameterCheck = { + parameter: string; + supported: boolean; +}; + +/** @internal */ +export const PrivateEndpointParameterCheck$inboundSchema: z.ZodType< + PrivateEndpointParameterCheck, + unknown +> = z.object({ + parameter: z.string(), + supported: z.boolean(), +}); + +export function privateEndpointParameterCheckFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointParameterCheck$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointParameterCheck' from JSON`, + ); +} diff --git a/src/models/privateendpointvalidation.ts b/src/models/privateendpointvalidation.ts index 23d5992f5..067c7f12b 100644 --- a/src/models/privateendpointvalidation.ts +++ b/src/models/privateendpointvalidation.ts @@ -11,9 +11,17 @@ import { PrivateEndpointCheck, PrivateEndpointCheck$inboundSchema, } from "./privateendpointcheck.js"; +import { + PrivateEndpointParameterCheck, + PrivateEndpointParameterCheck$inboundSchema, +} from "./privateendpointparametercheck.js"; export type PrivateEndpointValidation = { checks: Array; + /** + * Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven. + */ + parameters?: Array | undefined; /** * Whether every check passed. */ @@ -26,6 +34,7 @@ export const PrivateEndpointValidation$inboundSchema: z.ZodType< unknown > = z.object({ checks: z.array(PrivateEndpointCheck$inboundSchema), + parameters: z.array(PrivateEndpointParameterCheck$inboundSchema).optional(), passed: z.boolean(), }); diff --git a/src/models/privateendpointvalidationnullable.ts b/src/models/privateendpointvalidationnullable.ts index 2ea8fa8b1..d95693555 100644 --- a/src/models/privateendpointvalidationnullable.ts +++ b/src/models/privateendpointvalidationnullable.ts @@ -11,9 +11,17 @@ import { PrivateEndpointCheck, PrivateEndpointCheck$inboundSchema, } from "./privateendpointcheck.js"; +import { + PrivateEndpointParameterCheck, + PrivateEndpointParameterCheck$inboundSchema, +} from "./privateendpointparametercheck.js"; export type PrivateEndpointValidationNullable = { checks: Array; + /** + * Request parameters probed after the checks passed, each with whether the upstream honored it. Supported ones are recorded in `tested_parameters`. Absent on a failed run and for providers that run no parameter probes; empty when every probe group was already proven. + */ + parameters?: Array | undefined; /** * Whether every check passed. */ @@ -26,6 +34,7 @@ export const PrivateEndpointValidationNullable$inboundSchema: z.ZodType< unknown > = z.object({ checks: z.array(PrivateEndpointCheck$inboundSchema), + parameters: z.array(PrivateEndpointParameterCheck$inboundSchema).optional(), passed: z.boolean(), }); diff --git a/src/models/updateprivateendpointparametersrequest.ts b/src/models/updateprivateendpointparametersrequest.ts new file mode 100644 index 000000000..7f5726418 --- /dev/null +++ b/src/models/updateprivateendpointparametersrequest.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 07aff12e19d4 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { + PrivateEndpointDeclaredParameter, + PrivateEndpointDeclaredParameter$outboundSchema, +} from "./privateendpointdeclaredparameter.js"; + +export type UpdatePrivateEndpointParametersRequest = { + /** + * Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. `tool_choice` requires `tools` to be tested or declared. + */ + declaredParameters: Array; +}; + +/** @internal */ +export type UpdatePrivateEndpointParametersRequest$Outbound = { + declared_parameters: Array; +}; + +/** @internal */ +export const UpdatePrivateEndpointParametersRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointParametersRequest$Outbound, + UpdatePrivateEndpointParametersRequest +> = z.object({ + declaredParameters: z.array(PrivateEndpointDeclaredParameter$outboundSchema), +}).transform((v) => { + return remap$(v, { + declaredParameters: "declared_parameters", + }); +}); + +export function updatePrivateEndpointParametersRequestToJSON( + updatePrivateEndpointParametersRequest: + UpdatePrivateEndpointParametersRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointParametersRequest$outboundSchema.parse( + updatePrivateEndpointParametersRequest, + ), + ); +} diff --git a/src/sdk/privateendpoints.ts b/src/sdk/privateendpoints.ts index 5f1dc984d..22d4fd613 100644 --- a/src/sdk/privateendpoints.ts +++ b/src/sdk/privateendpoints.ts @@ -11,6 +11,7 @@ import { privateEndpointsEnable } from "../funcs/privateEndpointsEnable.js"; import { privateEndpointsGet } from "../funcs/privateEndpointsGet.js"; import { privateEndpointsList } from "../funcs/privateEndpointsList.js"; import { privateEndpointsUpdate } from "../funcs/privateEndpointsUpdate.js"; +import { privateEndpointsUpdateParameters } from "../funcs/privateEndpointsUpdateParameters.js"; import { privateEndpointsUpdatePricing } from "../funcs/privateEndpointsUpdatePricing.js"; import { privateEndpointsValidate } from "../funcs/privateEndpointsValidate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; @@ -155,6 +156,23 @@ export class PrivateEndpoints extends ClientSDK { )); } + /** + * Set private endpoint supported parameters + * + * @remarks + * Declare which request parameters the upstream supports beyond the ones validation proved. Applies to drafts and active endpoints; routing picks the change up for subsequent requests. The body replaces the earlier declaration and is read as a set: order and repeated names do not matter, but the list holds at most as many entries as there are declarable parameters, repeats included. `tested_parameters` stay. Returns 400 `parameters_invalid` when `tool_choice` is declared without `tools` being tested or declared. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async updateParameters( + request: operations.UpdatePrivateEndpointParametersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsUpdateParameters( + this, + request, + options, + )); + } + /** * Set private endpoint pricing *