diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9e1ba85..43a3bad 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,22 +1,22 @@ lockVersion: 2.0.0 id: 7fd487cb-2a73-459e-99e5-2c4e6547175f management: - docChecksum: 4ca2e5a38cd1267ee6f3904ffb919fe6 + docChecksum: 14c0f8258b04f1907dbbac7fbb324846 docVersion: 2.0.0 - speakeasyVersion: 1.680.11 - generationVersion: 2.788.15 - releaseVersion: 3.4.1 - configChecksum: 2505d61983a54516502c3199a3877c7c + speakeasyVersion: 1.697.5 + generationVersion: 2.799.0 + releaseVersion: 3.4.2 + configChecksum: 57b4a05d11d9ccc65deb1163f7a56009 persistentEdits: - generation_id: c243171f-defa-4e30-9fef-03726035f93a - pristine_commit_hash: acd0fa57347a4055ff5a89cf590b5de329234259 - pristine_tree_hash: afc296ed1d811aa5354b5065995ab67b4ba15949 + generation_id: 09ac0a84-f6be-4b94-94cf-f736891d70b0 + pristine_commit_hash: 95628947cce8ee0f1b12ffcc46f07a078d4c1a7e + pristine_tree_hash: ee7bb8f361447a7cdba10d9a10508be29259843b features: typescript: additionalDependencies: 0.1.0 - additionalProperties: 0.1.2 + additionalProperties: 0.1.3 constsAndDefaults: 0.1.12 - core: 3.26.17 + core: 3.26.22 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.1 @@ -82,10 +82,6 @@ trackedFiles: id: 3a73378fa514 last_write_checksum: sha1:4f40d5985f539b0ecedcc5c59d1929a5a229830c pristine_git_object: 30c80ed6f9deb72d25ba1914aa65970a1e8e8750 - docs/models/appapipublicv2functioncallcallfunctionrequest.md: - id: 9cf1fdcedc3a - last_write_checksum: sha1:ff18b7f39d61ab6f8e0983fed58249a369f440ce - pristine_git_object: 01d2aa9691c85c520a676d2b65485be4d79cdbd1 docs/models/appapipublicv2functioncallcallfunctionresponse.md: id: 428a6cce6b14 last_write_checksum: sha1:a51c7a09d03d54f4e4bf299fc1290c01873882d2 @@ -94,10 +90,6 @@ trackedFiles: id: e9f082ece3bc last_write_checksum: sha1:abb193368ce7bef80a85a16a6173aa9b5b25966b pristine_git_object: 09740231dbb24d729909e9495389e6b579d469f1 - docs/models/appapipublicv2functionscallfunctionresponse.md: - id: 062b4a4a392e - last_write_checksum: sha1:62bfae090d4e163dcecf416d30650058f9327a3c - pristine_git_object: 67b1ba857adfe53c2753c822cffe894667c237de docs/models/audio.md: id: 197ec2b1424a last_write_checksum: sha1:00b68653717a326ce7f94d71265af195b5067474 @@ -110,6 +102,14 @@ trackedFiles: id: 89cc22c950cb last_write_checksum: sha1:6917e6b053b1d43dd2392837acd793b3d65a36ea pristine_git_object: 61f52a3a329d9de087d65cff600d713d7c00f11f + docs/models/callfunctionrequest.md: + id: 6e402141eaaf + last_write_checksum: sha1:e2a29261c1baa39a8a8af476e778769097c5d593 + pristine_git_object: 3e14b6af37b47f1639155ffcd7fcbe1a604ce721 + docs/models/callfunctionresponse.md: + id: 7edcead03403 + last_write_checksum: sha1:262206159387d63431939611d28a387d08062790 + pristine_git_object: 47ef292421b0d25b71d4b444d8c77377c12f7ecd docs/models/chatcompletion.md: id: 7087ed1b2694 last_write_checksum: sha1:bb6e9c542aa316ae5a0214b3651c2675025c8300 @@ -620,8 +620,8 @@ trackedFiles: pristine_git_object: 1fd4fcf2071ab7c78ef13d1ce8953cf888ed1d8e docs/models/input.md: id: 5cbc446a3956 - last_write_checksum: sha1:5e7b69efdd322a3808f933c06f698d0289269513 - pristine_git_object: c73264481890bf7ad5220296da71cb666195d5d1 + last_write_checksum: sha1:3f36c4796fe8b3b67eaab6b9c9cafa41c5f3e3d6 + pristine_git_object: c5b0cb4c0e55539d8dd9349ba4bf47b46511eec2 docs/models/inputaudio.md: id: cf8d2935b1e7 last_write_checksum: sha1:efaaf4f285b8164a2a3e5e07eda51701af60b1b8 @@ -632,8 +632,8 @@ trackedFiles: pristine_git_object: 8f4be0ec1080259bd5f365b36fbab400d30f48e4 docs/models/jsonpayload.md: id: aee262eb3554 - last_write_checksum: sha1:a0068cc3b68f763ae7eaaf2c34229a8d8d6daaf3 - pristine_git_object: 88bb7e79a21fc65823af0e6d25bfc356c9e22e63 + last_write_checksum: sha1:c8b33df0f0e64ea0d0cdee237d1320ea6f9b5b17 + pristine_git_object: bf534e13d0ca499e0f5d72eef6dc4d8b78809cdc docs/models/jsonschema.md: id: a6b15ed6fac8 last_write_checksum: sha1:20051409db5a492d3b2468e8254aa691cbcf2fb1 @@ -816,8 +816,8 @@ trackedFiles: pristine_git_object: b7b8ffa8cf18103974a987cae5ea76f281d22ef4 docs/models/operations/delta.md: id: f7eb7cd6d812 - last_write_checksum: sha1:12a41ef89844cf8428555cbbf1eb45de354e7936 - pristine_git_object: c60cf6c3d9a5d8f63c11bccac122a7904a23ec48 + last_write_checksum: sha1:0a17d39e88bac60d3858b2fef4e0ffc6d7f00201 + pristine_git_object: b7352e286aa8cf5bd546ac598d9d5be6cf39bffb docs/models/operations/functionstreamcallstreampostresponse.md: id: 3f8e26f8f20d last_write_checksum: sha1:0a093a2c741a2bcc2970add003ad2167dc490b8c @@ -1012,8 +1012,8 @@ trackedFiles: pristine_git_object: b91b7fbdba7b1d4a82692d7b29f9cd3f9f890170 docs/models/operations/updatespanspansspanidpatchrequest.md: id: 3807d912b962 - last_write_checksum: sha1:3832cb1143b4a8ea9dcb0809b032942d8e720def - pristine_git_object: 0da6d5c0bf13d7af9b4bb7603a9693bc60f33d61 + last_write_checksum: sha1:e66f65ee7c7dc1549d4da5d07f477a8763569d54 + pristine_git_object: 3f3410fb647ede80162f49e6be82562d0e7b0c8a docs/models/operations/uploadfileknowledgeknowledgebaseiduploadpostrequest.md: id: 660a4bf8bd1e last_write_checksum: sha1:d3db44f9870a08cad951ee61a78ef0c1f9d9f8b5 @@ -1228,8 +1228,8 @@ trackedFiles: pristine_git_object: 475ebf38d243b062fd2522c7848c7c5136d47ec0 docs/models/updatespanrequest.md: id: 0cc273f44164 - last_write_checksum: sha1:b19db8375d6f1b813bd81d5c810fdc29a64cc863 - pristine_git_object: f2a8f24129932c94124888a5c80a493c564823ec + last_write_checksum: sha1:9923c14b9045f26e0215da32f3c5f5d6e9c385e8 + pristine_git_object: fcab8db07469a11f155944da67817d03240de998 docs/models/updatespanresponse.md: id: 163e62c13f3d last_write_checksum: sha1:0f1aa3c4814eb509f0fa5f0ba8f6cb9e51542a76 @@ -1244,8 +1244,8 @@ trackedFiles: pristine_git_object: f65d35b31b21a815e5f64ef7c7d691616a73ed5e docs/models/value2.md: id: 4eceb26154e6 - last_write_checksum: sha1:a013299bcce3d7ed2a7806abc83ca5d827335b82 - pristine_git_object: 5922b98610d9999f3cabce4c2fe294df3cb76df0 + last_write_checksum: sha1:69ac57c059160b4ccc17a9f73cc84e54ccc0c2f1 + pristine_git_object: 21c866c85a52548aa7d03c95957b00f150817290 docs/models/voice.md: id: f73e25e55a5a last_write_checksum: sha1:019a12acdca992e3e341f25396cd2ee66d72ac35 @@ -1284,12 +1284,12 @@ trackedFiles: pristine_git_object: fe49b0d036cb4737c253de7bdd79294bb45c2890 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:a32844da90a797c5ecd7aedc7aca129389648baf - pristine_git_object: 029e1aba29ef99d1b6bc463c75dd5a67073e318f + last_write_checksum: sha1:cee2848ee04ac72ef57a913c033725171aeed352 + pristine_git_object: 09e1d27fd104a000ed55ae5f90285d05985d21b3 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:5e9dc44d73656fa94a07bbd579d7258fd8613481 - pristine_git_object: dbe4d6769292c1dcc94898c4d5ced43ee83894ee + last_write_checksum: sha1:ca883751c58afad524136f169e5bc92a40c57101 + pristine_git_object: 29d5c2ab9493f09d589af5475c7b188ec5672642 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:7fe1d083a687c984082d7324a6c70efa04ac3019 @@ -1300,8 +1300,8 @@ trackedFiles: pristine_git_object: 1b6c999e1fb3bf64003026e9d624ebaa7d9f2544 src/funcs/call.ts: id: 4e1ce51400a7 - last_write_checksum: sha1:4d376fa7c3f8fd1256ef4916035a421afe5ca13e - pristine_git_object: 068898d82c97b65e58cb8c21e9f9dfb917eb4c92 + last_write_checksum: sha1:ff23607b37b4501adf9b8d2e5fd81c330cb5f678 + pristine_git_object: 55936dfdebff4a3163216d490488b582c3bd63d5 src/funcs/datasetsCreateEntry.ts: id: 0f3184b43501 last_write_checksum: sha1:b4e714c80a3f3ff5b6f10e398308053f6324bcb5 @@ -1332,12 +1332,12 @@ trackedFiles: pristine_git_object: 3b63c19c4761dfe8c5ee625686c6d079d0d28a21 src/funcs/functionsCall.ts: id: b6629434e293 - last_write_checksum: sha1:fea43d3940547c5c77b85b89880c836e6403731a - pristine_git_object: 7e4d888fbf386b9cb0201d402d3a9492fb3b5bc0 + last_write_checksum: sha1:9e6c80d36546501083ef238af745f5faf5ab9977 + pristine_git_object: e89217adab275eaefc95ed63e0a2c609c8b16384 src/funcs/functionsCallRevision.ts: id: 796938f8e8aa - last_write_checksum: sha1:1e409d439de18183e3bb3f47d83796a19df9f6c3 - pristine_git_object: 64d2c5540c66df206d01f81c51b71c0e2467e35b + last_write_checksum: sha1:f36c19b9c8775de85b59e7da04e34a386d4976d9 + pristine_git_object: d2d7dce874ac384460d8950df3c6795f5ecf98df src/funcs/functionsCreate.ts: id: aef7bf511c25 last_write_checksum: sha1:801c9b52ca76bbd84b95e02b64afa56cd467fa89 @@ -1556,8 +1556,8 @@ trackedFiles: pristine_git_object: f1f86b5b0869d96055fd6ce5340f690128fe1441 src/funcs/stream.ts: id: cbe6de6fe85b - last_write_checksum: sha1:171e09db7c1ede33922eb41d95026627610e4d0e - pristine_git_object: 20697093db8ee682747ff005e6d5d1679acafac1 + last_write_checksum: sha1:2b4cb2f70afea96aab418cc8e98ac9868d6ce3ed + pristine_git_object: 1b162cb6db79b2bcb6ff18bbbe10a9a724579fca src/funcs/tracesGet.ts: id: f68b9e361165 last_write_checksum: sha1:385ebf632a53f39082bd4d879307302221ba7643 @@ -1588,8 +1588,8 @@ trackedFiles: pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:6db96ee9f023e595f0af87d37558c21faa713794 - pristine_git_object: 7d8478ec487b3d2f106dafd22c85cf72246ab426 + last_write_checksum: sha1:8ca23a3f70de0bfd60292b589b7b2cc0e3228d43 + pristine_git_object: 06dca8fb0aec7d55a5934c086cae2031797792bd src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 @@ -1640,8 +1640,8 @@ trackedFiles: pristine_git_object: 47edb9725c2482c667e2ddc8a56b1fec4285c492 src/lib/sdks.ts: id: 8a6d91f1218d - last_write_checksum: sha1:f7db2d55ac9f5280a24b1b242779b6a231602289 - pristine_git_object: e90348cc7f8959614e2f0e67e89740d9f1415727 + last_write_checksum: sha1:bfcd51a60e2c11e03aeb8ce0772a2b3d34b191a7 + pristine_git_object: f96b5799df1b2450c894d2f2287d3f1eca5467e8 src/lib/security.ts: id: 0502afa7922e last_write_checksum: sha1:119ceae76323648a76e7e78c3a7cdbeaf9c1ccfd @@ -1676,8 +1676,8 @@ trackedFiles: pristine_git_object: 0955a573c2ce989d63c737410ab8cc28706d9f74 src/mcp-server/mcp-server.ts: id: aabbc4ab07c1 - last_write_checksum: sha1:630b11682e88bac36bbc88ec0ebb43823518b683 - pristine_git_object: 8df222da77bfab5b06933a886c14f53bae5dfbba + last_write_checksum: sha1:c22a980ca9d795c6ae4794939aa6c20c863594c7 + pristine_git_object: ed9ca8f4611ed0609bdef4ef55d572c506e5024f src/mcp-server/prompts.ts: id: 26f3d73cbf31 last_write_checksum: sha1:aab17727e4e0e625fffd088ba2943d9700e6c049 @@ -1692,8 +1692,8 @@ trackedFiles: pristine_git_object: c25696d4c4f70e081fa5d87ad6891874c509a577 src/mcp-server/server.ts: id: 2784dd48e82a - last_write_checksum: sha1:3ff63519ef2de8f1ea71a2a8d4d8e9ddb43d4e5f - pristine_git_object: 4513112dfd7a8da6011287fa82d88b03ab44943c + last_write_checksum: sha1:78fb732c2f1005f3b043592fba3e0b2b39a5166e + pristine_git_object: e3308bfa9ad2483f79e6a186ff6b6a5283c7ff9e src/mcp-server/shared.ts: id: 074e80d4be1e last_write_checksum: sha1:56c73d4429691516e35541825e759a0285747a2b @@ -1708,8 +1708,8 @@ trackedFiles: pristine_git_object: 2154577ceb7e8d9cff281b922d22a1c5329dfd11 src/mcp-server/tools/call.ts: id: 7ab1495f591e - last_write_checksum: sha1:5f17448fa1c0960e93a93a6cddd39a170cc8d418 - pristine_git_object: ac818fd9563d74fd472fe2162a8857872d0fa8b5 + last_write_checksum: sha1:c93d981e4090b9580ff33623f3914938129aa4d4 + pristine_git_object: 2c0c83b9db128949b11b348b8c7a01eb92e17c7b src/mcp-server/tools/datasetsCreateEntry.ts: id: af7e31bf7e49 last_write_checksum: sha1:43fc1bff69df0ee90d724097bd0545ca9c5e0fad @@ -1964,8 +1964,8 @@ trackedFiles: pristine_git_object: b868ca9dc8d19581bdb5263c95695e448e7866e4 src/mcp-server/tools/stream.ts: id: 3ca601f0e9ed - last_write_checksum: sha1:8db1e89337d01f1994af7dc4f5a73aeb478a3df1 - pristine_git_object: ee7c1e002f8d7d1ff6e77a5cce3ea23a28f6b036 + last_write_checksum: sha1:5c9b2e638289df82131b777c904ea42d49ec262a + pristine_git_object: d83d11c01a9b449d32946cce9621cf80f3dc7dd5 src/mcp-server/tools/tracesGet.ts: id: 42492f3ff12c last_write_checksum: sha1:fe0a6928963e4962e1f456a462686f299ef0db93 @@ -1986,10 +1986,6 @@ trackedFiles: id: 895bf7dfa898 last_write_checksum: sha1:f99500a572eeb48526b1b696941eb8362ae90c86 pristine_git_object: f60420de3f08bdc90eae584fae28fbda93a7e3d0 - src/models/appapipublicv2functioncallcallfunctionrequest.ts: - id: b2209fa1addc - last_write_checksum: sha1:f7336623a39952be54505834e5302db55df856d6 - pristine_git_object: 90e2bf0a4494b6fc3834a608cce0beaaf56b49e5 src/models/appapipublicv2functioncallcallfunctionresponse.ts: id: bc9b70199c5a last_write_checksum: sha1:bc89171dc945ade15b64b261d963bfcdfbda75a2 @@ -1998,10 +1994,6 @@ trackedFiles: id: cfc6ca65127c last_write_checksum: sha1:21a85c34b00e3a3568d368314efbdbbf9f98d039 pristine_git_object: eb1583acd9cdac04e5022ea123bbe05dd5fac927 - src/models/appapipublicv2functionscallfunctionresponse.ts: - id: 7dad677b6ebe - last_write_checksum: sha1:540a57a92ba4e7d628507aa252d4c44fcbb228f5 - pristine_git_object: bdc3b95d9a0b50ce240e5f28e73bc8b54adfadc3 src/models/audio.ts: id: 4b0a8214f90e last_write_checksum: sha1:ab7ccb9e3da028e8d174b677c5cd5b495c933265 @@ -2010,6 +2002,14 @@ trackedFiles: id: 16bf9a5901fb last_write_checksum: sha1:7ab25367090caeb3260862b5e2a3067dee8a17e8 pristine_git_object: 07a13149845ba2a8e85708661cfe2776757c4928 + src/models/callfunctionrequest.ts: + id: e0432cc8379c + last_write_checksum: sha1:c792e47172cb7c2095d580e0cfecc4b0236ecb75 + pristine_git_object: 8d377adf69e5ee0c3aa2b68251c51aa58bde050a + src/models/callfunctionresponse.ts: + id: 9c7a1c14567a + last_write_checksum: sha1:98de4926405be66a9f276b31710d4680bd7e0322 + pristine_git_object: d161c2961d8c4c2e2aa8e7f6823cbf8eb471f0f6 src/models/chatcompletion.ts: id: 92c8e8bb5ac2 last_write_checksum: sha1:afd602d8f1b3a3d8c78dd639f84634b775c807dd @@ -2388,8 +2388,8 @@ trackedFiles: pristine_git_object: 61690cc62ba68deb1c15e548bf466dbf815de24b src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:c26720b1ea4b6e33fc06e2a35d62aed2d25e5a81 - pristine_git_object: 60b3a6acc6559d117716f6b57946a04be5657c68 + last_write_checksum: sha1:e5b932b915339feb9f88b8d5243b6c8fadb9e0cd + pristine_git_object: 70b96401875b480c4c64b76f0bd1c59a8d4eb4c8 src/models/inputaudio.ts: id: 9bdc14c7565f last_write_checksum: sha1:cbdd2b85ee862c49ab572f2a402be112b7d21c0a @@ -2980,8 +2980,8 @@ trackedFiles: pristine_git_object: 37c2f97fe32b9eec41886eb3e8f157d482339e1d src/sdk/functions.ts: id: cbc1d38a7d46 - last_write_checksum: sha1:92fb1021fbe6c93c21f0642aaf9099d94c58dfed - pristine_git_object: 062812a1a0ca8f1225a42cd86cfce49d449f35d4 + last_write_checksum: sha1:6bf3e36d721fa621ee00942cbc9df6e217f3d409 + pristine_git_object: 22218d7dcdfa1c64c63a218ba2c490c0825ec03a src/sdk/index.ts: id: a857902a703f last_write_checksum: sha1:ed6d64f2a6135349aa8498b8d8cff9ba85c7fb8f @@ -3012,8 +3012,8 @@ trackedFiles: pristine_git_object: 5869bac1e088a87e0e332d7062fbf06c50dee14d src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:74b472a6339a54d166ebb3ae3cd21fa14f907739 - pristine_git_object: 92bc74075d36a8694e762a7fd3d7dc406b95551c + last_write_checksum: sha1:c35f18f2330cb30e7243a9a5df23ae1b65db8640 + pristine_git_object: 4df5818e26effacf19db1db2400734b79462a4a5 src/sdk/spanmetrics.ts: id: 273ced1995d4 last_write_checksum: sha1:591300ee66cfb61b181225004ccfa68ddbb05ff6 @@ -3348,7 +3348,7 @@ examples: path: span_id: "77b258a2-45c1-4b87-a50c-9116bc8ed1d6" requestBody: - application/json: {"name": "my span", "start_time": "2026-01-02T11:36:47.278310Z", "type": "email_tool", "end_time": "2026-01-02T11:36:47.278372Z", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} + application/json: {"name": "my span", "start_time": "2026-01-26T08:06:02.750273Z", "type": "email_tool", "end_time": "2026-01-26T08:06:02.750336Z", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} responses: "200": application/json: {"name": "my span", "start_time": "2024-03-20T10:00:00+00:00", "id": "84d9ffc8-336c-4953-b92f-fe05d5405951", "trace_id": "123e4567-e89b-12d3-a456-426614174000", "parent_id": "123e4567-e89b-12d3-a456-426614174000", "type": "email_tool", "end_time": "2024-03-20T10:00:10+00:00", "input": "Hello, world!", "output": "Hello, world!", "error": "Exception: This is an error message", "meta": {"key": "value"}, "score": 10} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5de72b5..61c73df 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,6 +16,7 @@ generation: requestResponseComponentNamesFeb2024: true securityFeb2025: true sharedErrorComponentsApr2025: true + sharedNestedComponentsJan2026: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true @@ -30,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 3.4.1 + version: 3.4.2 acceptHeaderEnum: true additionalDependencies: dependencies: {} @@ -53,6 +54,7 @@ typescript: enumFormat: union envVarPrefix: OPPER exportZodModelNamespace: false + flatAdditionalProperties: false flattenGlobalSecurity: true flatteningOrder: parameters-first formStringArrayEncodeMode: encoded-string @@ -79,6 +81,7 @@ typescript: outputModelSuffix: output packageName: opperai preApplyUnionDiscriminators: true + preserveModelFieldNames: false responseFormat: flat sseFlatResponse: false templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 40af9e3..d24f047 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.680.11 +speakeasyVersion: 1.697.5 sources: FastAPI: sourceNamespace: fast-api - sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602 - sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009 + sourceRevisionDigest: sha256:cb6fa3655089c62f4710392601a2e49c0b674e1e51a04a41f06cae165667f1e5 + sourceBlobDigest: sha256:ca51b6dbcfb34da1b9e1c62dc1bb74a1c1e3e12b0fc6e44793750ede85628249 tags: - latest - main @@ -12,10 +12,10 @@ targets: opper: source: FastAPI sourceNamespace: fast-api - sourceRevisionDigest: sha256:68b0cbe004a918df9af2bdb9f14fb8603d166eee2514fe752773b87a0b06a602 - sourceBlobDigest: sha256:9a8a62a66b7d61f0a406be7b4c63c1b2d555b9ce44d9e3f998d10c31df1d5009 + sourceRevisionDigest: sha256:cb6fa3655089c62f4710392601a2e49c0b674e1e51a04a41f06cae165667f1e5 + sourceBlobDigest: sha256:ca51b6dbcfb34da1b9e1c62dc1bb74a1c1e3e12b0fc6e44793750ede85628249 codeSamplesNamespace: fast-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:5c5b7fb4892a2ddb5a8cf1e04b161f2742e976efee6a8b613f3d666aa8474a96 + codeSamplesRevisionDigest: sha256:b2c86da7d09061f8c244d6ba6a337d4abbef18299b2007fd46ca6a29da7275f9 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/models/appapipublicv2functioncallcallfunctionrequest.md b/docs/models/callfunctionrequest.md similarity index 99% rename from docs/models/appapipublicv2functioncallcallfunctionrequest.md rename to docs/models/callfunctionrequest.md index 01d2aa9..3e14b6a 100644 --- a/docs/models/appapipublicv2functioncallcallfunctionrequest.md +++ b/docs/models/callfunctionrequest.md @@ -1,11 +1,11 @@ -# AppApiPublicV2FunctionCallCallFunctionRequest +# CallFunctionRequest ## Example Usage ```typescript -import { AppApiPublicV2FunctionCallCallFunctionRequest } from "opperai/models"; +import { CallFunctionRequest } from "opperai/models"; -let value: AppApiPublicV2FunctionCallCallFunctionRequest = { +let value: CallFunctionRequest = { name: "add_numbers", instructions: "Calculate the sum of two numbers", inputSchema: { diff --git a/docs/models/appapipublicv2functionscallfunctionresponse.md b/docs/models/callfunctionresponse.md similarity index 98% rename from docs/models/appapipublicv2functionscallfunctionresponse.md rename to docs/models/callfunctionresponse.md index 67b1ba8..47ef292 100644 --- a/docs/models/appapipublicv2functionscallfunctionresponse.md +++ b/docs/models/callfunctionresponse.md @@ -1,12 +1,12 @@ -# AppApiPublicV2FunctionsCallFunctionResponse +# CallFunctionResponse ## Example Usage ```typescript -import { AppApiPublicV2FunctionsCallFunctionResponse } from "opperai/models"; +import { CallFunctionResponse } from "opperai/models"; -let value: AppApiPublicV2FunctionsCallFunctionResponse = { - spanId: "a81c6454-5ac4-4060-a3f1-5a2d8f1af4cc", +let value: CallFunctionResponse = { + spanId: "e9cdfdda-24c9-49c9-b80b-1a2728c3f909", message: "The sum of 1 and 3 is 4", jsonPayload: { "sum": 4, diff --git a/docs/models/input.md b/docs/models/input.md index c732644..c5b0cb4 100644 --- a/docs/models/input.md +++ b/docs/models/input.md @@ -16,6 +16,7 @@ const value: string = "Hello, world!"; ```typescript const value: string[] = [ "Hello, world!", + "Hello, world!", ]; ``` diff --git a/docs/models/jsonpayload.md b/docs/models/jsonpayload.md index 88bb7e7..bf534e1 100644 --- a/docs/models/jsonpayload.md +++ b/docs/models/jsonpayload.md @@ -17,9 +17,9 @@ const value: { [k: string]: any } = { ```typescript const value: any[] = [ - { - "sum": 4, - }, + "", + "", + "", ]; ``` diff --git a/docs/models/operations/delta.md b/docs/models/operations/delta.md index c60cf6c..b7352e2 100644 --- a/docs/models/operations/delta.md +++ b/docs/models/operations/delta.md @@ -14,13 +14,13 @@ const value: string = "Hello"; ### `number` ```typescript -const value: number = NaN; +const value: number = 42; ``` ### `number` ```typescript -const value: number = NaN; +const value: number = 42; ``` ### `boolean` diff --git a/docs/models/operations/updatespanspansspanidpatchrequest.md b/docs/models/operations/updatespanspansspanidpatchrequest.md index 0da6d5c..3f3410f 100644 --- a/docs/models/operations/updatespanspansspanidpatchrequest.md +++ b/docs/models/operations/updatespanspansspanidpatchrequest.md @@ -9,9 +9,9 @@ let value: UpdateSpanSpansSpanIdPatchRequest = { spanId: "c4686ca8-5f9f-483e-8cc2-e12731bcf9e5", updateSpanRequest: { name: "my span", - startTime: new Date("2026-01-02T11:36:47.278310Z"), + startTime: new Date("2026-01-26T08:06:02.750273Z"), type: "email_tool", - endTime: new Date("2026-01-02T11:36:47.278372Z"), + endTime: new Date("2026-01-26T08:06:02.750336Z"), input: "Hello, world!", output: "Hello, world!", error: "Exception: This is an error message", diff --git a/docs/models/updatespanrequest.md b/docs/models/updatespanrequest.md index f2a8f24..fcab8db 100644 --- a/docs/models/updatespanrequest.md +++ b/docs/models/updatespanrequest.md @@ -7,9 +7,9 @@ import { UpdateSpanRequest } from "opperai/models"; let value: UpdateSpanRequest = { name: "my span", - startTime: new Date("2026-01-02T11:36:47.278310Z"), + startTime: new Date("2026-01-26T08:06:02.750273Z"), type: "email_tool", - endTime: new Date("2026-01-02T11:36:47.278372Z"), + endTime: new Date("2026-01-26T08:06:02.750336Z"), input: "Hello, world!", output: "Hello, world!", error: "Exception: This is an error message", @@ -25,9 +25,9 @@ let value: UpdateSpanRequest = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `name` | *string* | :heavy_minus_sign: | The name of the span, something descriptive about the span that will be used to identify it when querying | my span | -| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-02T11:36:47.278310Z | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start time of the span in UTC | 2026-01-26T08:06:02.750273Z | | `type` | *string* | :heavy_minus_sign: | The type of the span | email_tool | -| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-02T11:36:47.278372Z | +| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end time of the span in UTC | 2026-01-26T08:06:02.750336Z | | `input` | *string* | :heavy_minus_sign: | The input of the span | Hello, world! | | `output` | *string* | :heavy_minus_sign: | The output of the span | Hello, world! | | `error` | *string* | :heavy_minus_sign: | In case of an error, the error message | Exception: This is an error message | diff --git a/docs/models/value2.md b/docs/models/value2.md index 5922b98..21c866c 100644 --- a/docs/models/value2.md +++ b/docs/models/value2.md @@ -14,20 +14,18 @@ const value: string = "product"; ### `number` ```typescript -const value: number = NaN; +const value: number = 128403; ``` ### `number` ```typescript -const value: number = NaN; +const value: number = 1284.03; ``` ### `models.Value1[]` ```typescript -const value: models.Value1[] = [ - "product", -]; +const value: models.Value1[] = []; ``` diff --git a/examples/package-lock.json b/examples/package-lock.json index 044e782..a734c98 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,9 +18,9 @@ }, "..": { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "dependencies": { - "@modelcontextprotocol/sdk": "^1.24.0", + "@modelcontextprotocol/sdk": "^1.25.2", "zod": "^3.25.0 || ^4.0.0" }, "bin": { diff --git a/jsr.json b/jsr.json index 029e1ab..09e1d27 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index d0b969c..92c856e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "dependencies": { - "@modelcontextprotocol/sdk": "^1.24.0", + "@modelcontextprotocol/sdk": "^1.25.2", "zod": "^3.25.0 || ^4.0.0" }, "bin": { @@ -183,9 +183,9 @@ } }, "node_modules/@hono/node-server": { - "version": "1.19.7", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.7.tgz", - "integrity": "sha512-vUcD0uauS7EU2caukW8z5lJKtoGMokxNbJtBiwHgpqxEXokaHCBkQUmCHhjFB1VUTWdqj25QoMkMKzgjq+uhrw==", + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", "license": "MIT", "engines": { "node": ">=18.14.1" @@ -279,12 +279,12 @@ } }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.1.tgz", - "integrity": "sha512-yO28oVFFC7EBoiKdAn+VqRm+plcfv4v0xp6osG/VsCB0NlPZWi87ajbCZZ8f/RvOFLEu7//rSRmuZZ7lMoe3gQ==", + "version": "1.25.3", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.3.tgz", + "integrity": "sha512-vsAMBMERybvYgKbg/l4L1rhS7VXV1c0CtyJg72vwxONVX0l4ZfKVAnZEWTQixJGTzKnELjQ59e4NbdFDALRiAQ==", "license": "MIT", "dependencies": { - "@hono/node-server": "^1.19.7", + "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", @@ -2454,9 +2454,9 @@ } }, "node_modules/hono": { - "version": "4.11.3", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.3.tgz", - "integrity": "sha512-PmQi306+M/ct/m5s66Hrg+adPnkD5jiO6IjA7WhWw0gSBSo1EcRegwuI1deZ+wd5pzCGynCcn2DprnE4/yEV4w==", + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.5.tgz", + "integrity": "sha512-WemPi9/WfyMwZs+ZUXdiwcCh9Y+m7L+8vki9MzDw3jJ+W9Lc+12HGsd368Qc1vZi1xwW8BWMMsnK5efYKPdt4g==", "license": "MIT", "peer": true, "engines": { diff --git a/package.json b/package.json index dbe4d67..29d5c2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opperai", - "version": "3.4.1", + "version": "3.4.2", "author": "Speakeasy", "repository": { "type": "git", @@ -47,7 +47,7 @@ "typescript-eslint": "^8.26.0" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.24.0", + "@modelcontextprotocol/sdk": "^1.25.2", "zod": "^3.25.0 || ^4.0.0" }, "exports": { diff --git a/src/funcs/call.ts b/src/funcs/call.ts index 068898d..55936df 100644 --- a/src/funcs/call.ts +++ b/src/funcs/call.ts @@ -34,7 +34,7 @@ import { Result } from "../types/fp.js"; */ export function call( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): APIPromise< Result< @@ -62,7 +62,7 @@ export function call( async function $do( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise< [ @@ -86,10 +86,7 @@ async function $do( > { const parsed = safeParse( request, - (value) => - models.AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - value, - ), + (value) => models.CallFunctionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { diff --git a/src/funcs/functionsCall.ts b/src/funcs/functionsCall.ts index 7e4d888..e89217a 100644 --- a/src/funcs/functionsCall.ts +++ b/src/funcs/functionsCall.ts @@ -40,7 +40,7 @@ export function functionsCall( options?: RequestOptions, ): APIPromise< Result< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -72,7 +72,7 @@ async function $do( ): Promise< [ Result< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -176,7 +176,7 @@ async function $do( }; const [result] = await M.match< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -190,10 +190,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json( - 200, - models.AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema, - ), + M.json(200, models.CallFunctionResponse$inboundSchema), M.jsonErr(400, errors.BadRequestError$inboundSchema), M.jsonErr(401, errors.UnauthorizedError$inboundSchema), M.jsonErr(404, errors.NotFoundError$inboundSchema), diff --git a/src/funcs/functionsCallRevision.ts b/src/funcs/functionsCallRevision.ts index 64d2c55..d2d7dce 100644 --- a/src/funcs/functionsCallRevision.ts +++ b/src/funcs/functionsCallRevision.ts @@ -41,7 +41,7 @@ export function functionsCallRevision( options?: RequestOptions, ): APIPromise< Result< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -75,7 +75,7 @@ async function $do( ): Promise< [ Result< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -190,7 +190,7 @@ async function $do( }; const [result] = await M.match< - models.AppApiPublicV2FunctionsCallFunctionResponse, + models.CallFunctionResponse, | errors.BadRequestError | errors.UnauthorizedError | errors.NotFoundError @@ -204,10 +204,7 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json( - 200, - models.AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema, - ), + M.json(200, models.CallFunctionResponse$inboundSchema), M.jsonErr(400, errors.BadRequestError$inboundSchema), M.jsonErr(401, errors.UnauthorizedError$inboundSchema), M.jsonErr(404, errors.NotFoundError$inboundSchema), diff --git a/src/funcs/stream.ts b/src/funcs/stream.ts index 2069709..1b162cb 100644 --- a/src/funcs/stream.ts +++ b/src/funcs/stream.ts @@ -101,7 +101,7 @@ import { Result } from "../types/fp.js"; */ export function stream( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): APIPromise< Result< @@ -129,7 +129,7 @@ export function stream( async function $do( client: OpperCore, - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise< [ @@ -153,10 +153,7 @@ async function $do( > { const parsed = safeParse( request, - (value) => - models.AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - value, - ), + (value) => models.CallFunctionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { diff --git a/src/lib/config.ts b/src/lib/config.ts index 7d8478e..06dca8f 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "2.0.0", - sdkVersion: "3.4.1", - genVersion: "2.788.15", - userAgent: "speakeasy-sdk/typescript 3.4.1 2.788.15 2.0.0 opperai", + sdkVersion: "3.4.2", + genVersion: "2.799.0", + userAgent: "speakeasy-sdk/typescript 3.4.2 2.799.0 2.0.0 opperai", } as const; diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index e90348c..f96b579 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -307,9 +307,9 @@ export class ClientSDK { } } -const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/; +const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/; const jsonlLikeContentTypeRE = - /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/; + /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/; async function logRequest(logger: Logger | undefined, req: Request) { if (!logger) { return; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index 8df222d..ed9ca8f 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "3.4.1", + currentVersion: "3.4.2", }, }); diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 4513112..e3308bf 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -92,7 +92,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Opper", - version: "3.4.1", + version: "3.4.2", }); const client = new OpperCore({ diff --git a/src/mcp-server/tools/call.ts b/src/mcp-server/tools/call.ts index ac818fd..2c0c83b 100644 --- a/src/mcp-server/tools/call.ts +++ b/src/mcp-server/tools/call.ts @@ -7,7 +7,7 @@ import * as models from "../../models/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: models.AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema, + request: models.CallFunctionRequest$inboundSchema, }; export const tool$call: ToolDefinition = { diff --git a/src/mcp-server/tools/stream.ts b/src/mcp-server/tools/stream.ts index ee7c1e0..d83d11c 100644 --- a/src/mcp-server/tools/stream.ts +++ b/src/mcp-server/tools/stream.ts @@ -7,7 +7,7 @@ import * as models from "../../models/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: models.AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema, + request: models.CallFunctionRequest$inboundSchema, }; export const tool$stream: ToolDefinition = { diff --git a/src/models/appapipublicv2functionscallfunctionresponse.ts b/src/models/appapipublicv2functionscallfunctionresponse.ts deleted file mode 100644 index bdc3b95..0000000 --- a/src/models/appapipublicv2functionscallfunctionresponse.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export type AppApiPublicV2FunctionsCallFunctionResponse = { - /** - * The ID of the span of the call - */ - spanId: string; - /** - * Result of the task if the call does not use an output schema - */ - message?: string | null | undefined; - /** - * Result of the task if the call uses an output schema - */ - jsonPayload?: any | null | undefined; - /** - * True if the result was returned from a cached results - */ - cached?: boolean | undefined; - /** - * The images generated by the call. Only available for image models. Depending on the configuration, the response can either be a list of image urls or a base64 encoded images. - */ - images?: Array | null | undefined; - /** - * The usage of the call split into input and output tokens as well as the total tokens and an optional breakdown of the input and output tokens.The input tokens are the tokens sent to the model and the output tokens are the tokens received from the model. The total tokens is the sum of input and output tokens. - */ - usage?: { [k: string]: any } | null | undefined; - /** - * The cost in USD of the call split into total, generation and platform costs where total is the sum of generation and platform costs - */ - cost?: { [k: string]: any } | null | undefined; -}; - -/** @internal */ -export const AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema: - z.ZodType< - AppApiPublicV2FunctionsCallFunctionResponse, - z.ZodTypeDef, - unknown - > = z.object({ - span_id: z.string(), - message: z.nullable(z.string()).optional(), - json_payload: z.nullable(z.any()).optional(), - cached: z.boolean().default(false), - images: z.nullable(z.array(z.string())).optional(), - usage: z.nullable(z.record(z.any())).optional(), - cost: z.nullable(z.record(z.any())).optional(), - }).transform((v) => { - return remap$(v, { - "span_id": "spanId", - "json_payload": "jsonPayload", - }); - }); -/** @internal */ -export type AppApiPublicV2FunctionsCallFunctionResponse$Outbound = { - span_id: string; - message?: string | null | undefined; - json_payload?: any | null | undefined; - cached: boolean; - images?: Array | null | undefined; - usage?: { [k: string]: any } | null | undefined; - cost?: { [k: string]: any } | null | undefined; -}; - -/** @internal */ -export const AppApiPublicV2FunctionsCallFunctionResponse$outboundSchema: - z.ZodType< - AppApiPublicV2FunctionsCallFunctionResponse$Outbound, - z.ZodTypeDef, - AppApiPublicV2FunctionsCallFunctionResponse - > = z.object({ - spanId: z.string(), - message: z.nullable(z.string()).optional(), - jsonPayload: z.nullable(z.any()).optional(), - cached: z.boolean().default(false), - images: z.nullable(z.array(z.string())).optional(), - usage: z.nullable(z.record(z.any())).optional(), - cost: z.nullable(z.record(z.any())).optional(), - }).transform((v) => { - return remap$(v, { - spanId: "span_id", - jsonPayload: "json_payload", - }); - }); - -export function appApiPublicV2FunctionsCallFunctionResponseToJSON( - appApiPublicV2FunctionsCallFunctionResponse: - AppApiPublicV2FunctionsCallFunctionResponse, -): string { - return JSON.stringify( - AppApiPublicV2FunctionsCallFunctionResponse$outboundSchema.parse( - appApiPublicV2FunctionsCallFunctionResponse, - ), - ); -} -export function appApiPublicV2FunctionsCallFunctionResponseFromJSON( - jsonString: string, -): SafeParseResult< - AppApiPublicV2FunctionsCallFunctionResponse, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - AppApiPublicV2FunctionsCallFunctionResponse$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AppApiPublicV2FunctionsCallFunctionResponse' from JSON`, - ); -} diff --git a/src/models/appapipublicv2functioncallcallfunctionrequest.ts b/src/models/callfunctionrequest.ts similarity index 60% rename from src/models/appapipublicv2functioncallcallfunctionrequest.ts rename to src/models/callfunctionrequest.ts index 90e2bf0..8d377ad 100644 --- a/src/models/appapipublicv2functioncallcallfunctionrequest.ts +++ b/src/models/callfunctionrequest.ts @@ -26,7 +26,7 @@ import { TModel$outboundSchema, } from "./tmodel.js"; -export type AppApiPublicV2FunctionCallCallFunctionRequest = { +export type CallFunctionRequest = { /** * Provide a unique name of the task. A function with this name will be created in the project. Functions configuration is overridden by the request parameters. */ @@ -71,32 +71,31 @@ export type AppApiPublicV2FunctionCallCallFunctionRequest = { }; /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionRequest, - z.ZodTypeDef, - unknown - > = z.object({ - name: z.string(), - instructions: z.nullable(z.string()).optional(), - input_schema: z.nullable(z.record(z.any())).optional(), - output_schema: z.nullable(z.record(z.any())).optional(), - input: z.nullable(z.any()).optional(), - model: TModel$inboundSchema.optional(), - examples: z.nullable(z.array(Example$inboundSchema)).optional(), - parent_span_id: z.nullable(z.string()).optional(), - tags: z.nullable(z.record(z.string())).optional(), - configuration: z.nullable(FunctionCallConfigurationInput$inboundSchema) - .optional(), - }).transform((v) => { - return remap$(v, { - "input_schema": "inputSchema", - "output_schema": "outputSchema", - "parent_span_id": "parentSpanId", - }); +export const CallFunctionRequest$inboundSchema: z.ZodType< + CallFunctionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + instructions: z.nullable(z.string()).optional(), + input_schema: z.nullable(z.record(z.any())).optional(), + output_schema: z.nullable(z.record(z.any())).optional(), + input: z.nullable(z.any()).optional(), + model: TModel$inboundSchema.optional(), + examples: z.nullable(z.array(Example$inboundSchema)).optional(), + parent_span_id: z.nullable(z.string()).optional(), + tags: z.nullable(z.record(z.string())).optional(), + configuration: z.nullable(FunctionCallConfigurationInput$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "input_schema": "inputSchema", + "output_schema": "outputSchema", + "parent_span_id": "parentSpanId", }); +}); /** @internal */ -export type AppApiPublicV2FunctionCallCallFunctionRequest$Outbound = { +export type CallFunctionRequest$Outbound = { name: string; instructions?: string | null | undefined; input_schema?: { [k: string]: any } | null | undefined; @@ -110,53 +109,43 @@ export type AppApiPublicV2FunctionCallCallFunctionRequest$Outbound = { }; /** @internal */ -export const AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema: - z.ZodType< - AppApiPublicV2FunctionCallCallFunctionRequest$Outbound, - z.ZodTypeDef, - AppApiPublicV2FunctionCallCallFunctionRequest - > = z.object({ - name: z.string(), - instructions: z.nullable(z.string()).optional(), - inputSchema: z.nullable(z.record(z.any())).optional(), - outputSchema: z.nullable(z.record(z.any())).optional(), - input: z.nullable(z.any()).optional(), - model: TModel$outboundSchema.optional(), - examples: z.nullable(z.array(Example$outboundSchema)).optional(), - parentSpanId: z.nullable(z.string()).optional(), - tags: z.nullable(z.record(z.string())).optional(), - configuration: z.nullable(FunctionCallConfigurationInput$outboundSchema) - .optional(), - }).transform((v) => { - return remap$(v, { - inputSchema: "input_schema", - outputSchema: "output_schema", - parentSpanId: "parent_span_id", - }); +export const CallFunctionRequest$outboundSchema: z.ZodType< + CallFunctionRequest$Outbound, + z.ZodTypeDef, + CallFunctionRequest +> = z.object({ + name: z.string(), + instructions: z.nullable(z.string()).optional(), + inputSchema: z.nullable(z.record(z.any())).optional(), + outputSchema: z.nullable(z.record(z.any())).optional(), + input: z.nullable(z.any()).optional(), + model: TModel$outboundSchema.optional(), + examples: z.nullable(z.array(Example$outboundSchema)).optional(), + parentSpanId: z.nullable(z.string()).optional(), + tags: z.nullable(z.record(z.string())).optional(), + configuration: z.nullable(FunctionCallConfigurationInput$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + inputSchema: "input_schema", + outputSchema: "output_schema", + parentSpanId: "parent_span_id", }); +}); -export function appApiPublicV2FunctionCallCallFunctionRequestToJSON( - appApiPublicV2FunctionCallCallFunctionRequest: - AppApiPublicV2FunctionCallCallFunctionRequest, +export function callFunctionRequestToJSON( + callFunctionRequest: CallFunctionRequest, ): string { return JSON.stringify( - AppApiPublicV2FunctionCallCallFunctionRequest$outboundSchema.parse( - appApiPublicV2FunctionCallCallFunctionRequest, - ), + CallFunctionRequest$outboundSchema.parse(callFunctionRequest), ); } -export function appApiPublicV2FunctionCallCallFunctionRequestFromJSON( +export function callFunctionRequestFromJSON( jsonString: string, -): SafeParseResult< - AppApiPublicV2FunctionCallCallFunctionRequest, - SDKValidationError -> { +): SafeParseResult { return safeParse( jsonString, - (x) => - AppApiPublicV2FunctionCallCallFunctionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'AppApiPublicV2FunctionCallCallFunctionRequest' from JSON`, + (x) => CallFunctionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CallFunctionRequest' from JSON`, ); } diff --git a/src/models/callfunctionresponse.ts b/src/models/callfunctionresponse.ts new file mode 100644 index 0000000..d161c29 --- /dev/null +++ b/src/models/callfunctionresponse.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type CallFunctionResponse = { + /** + * The ID of the span of the call + */ + spanId: string; + /** + * Result of the task if the call does not use an output schema + */ + message?: string | null | undefined; + /** + * Result of the task if the call uses an output schema + */ + jsonPayload?: any | null | undefined; + /** + * True if the result was returned from a cached results + */ + cached?: boolean | undefined; + /** + * The images generated by the call. Only available for image models. Depending on the configuration, the response can either be a list of image urls or a base64 encoded images. + */ + images?: Array | null | undefined; + /** + * The usage of the call split into input and output tokens as well as the total tokens and an optional breakdown of the input and output tokens.The input tokens are the tokens sent to the model and the output tokens are the tokens received from the model. The total tokens is the sum of input and output tokens. + */ + usage?: { [k: string]: any } | null | undefined; + /** + * The cost in USD of the call split into total, generation and platform costs where total is the sum of generation and platform costs + */ + cost?: { [k: string]: any } | null | undefined; +}; + +/** @internal */ +export const CallFunctionResponse$inboundSchema: z.ZodType< + CallFunctionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + span_id: z.string(), + message: z.nullable(z.string()).optional(), + json_payload: z.nullable(z.any()).optional(), + cached: z.boolean().default(false), + images: z.nullable(z.array(z.string())).optional(), + usage: z.nullable(z.record(z.any())).optional(), + cost: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + "span_id": "spanId", + "json_payload": "jsonPayload", + }); +}); +/** @internal */ +export type CallFunctionResponse$Outbound = { + span_id: string; + message?: string | null | undefined; + json_payload?: any | null | undefined; + cached: boolean; + images?: Array | null | undefined; + usage?: { [k: string]: any } | null | undefined; + cost?: { [k: string]: any } | null | undefined; +}; + +/** @internal */ +export const CallFunctionResponse$outboundSchema: z.ZodType< + CallFunctionResponse$Outbound, + z.ZodTypeDef, + CallFunctionResponse +> = z.object({ + spanId: z.string(), + message: z.nullable(z.string()).optional(), + jsonPayload: z.nullable(z.any()).optional(), + cached: z.boolean().default(false), + images: z.nullable(z.array(z.string())).optional(), + usage: z.nullable(z.record(z.any())).optional(), + cost: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + spanId: "span_id", + jsonPayload: "json_payload", + }); +}); + +export function callFunctionResponseToJSON( + callFunctionResponse: CallFunctionResponse, +): string { + return JSON.stringify( + CallFunctionResponse$outboundSchema.parse(callFunctionResponse), + ); +} +export function callFunctionResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CallFunctionResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CallFunctionResponse' from JSON`, + ); +} diff --git a/src/models/index.ts b/src/models/index.ts index 60b3a6a..70b9640 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -5,12 +5,12 @@ export * from "./addrequest.js"; export * from "./annotation.js"; export * from "./annotationurlcitation.js"; -export * from "./appapipublicv2functioncallcallfunctionrequest.js"; export * from "./appapipublicv2functioncallcallfunctionresponse.js"; export * from "./appapipublicv2functionscallfunctionrequest.js"; -export * from "./appapipublicv2functionscallfunctionresponse.js"; export * from "./audio.js"; export * from "./bodyuploadfileknowledgeknowledgebaseiduploadpost.js"; +export * from "./callfunctionrequest.js"; +export * from "./callfunctionresponse.js"; export * from "./chatcompletion.js"; export * from "./chatcompletionallowedtoolchoiceparam.js"; export * from "./chatcompletionallowedtoolsparam.js"; diff --git a/src/sdk/functions.ts b/src/sdk/functions.ts index 062812a..22218d7 100644 --- a/src/sdk/functions.ts +++ b/src/sdk/functions.ts @@ -165,7 +165,7 @@ export class Functions extends ClientSDK { appApiPublicV2FunctionsCallFunctionRequest: models.AppApiPublicV2FunctionsCallFunctionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(functionsCall( this, functionId, @@ -222,7 +222,7 @@ export class Functions extends ClientSDK { appApiPublicV2FunctionsCallFunctionRequest: models.AppApiPublicV2FunctionsCallFunctionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(functionsCallRevision( this, functionId, diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 92bc740..4df5818 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -90,7 +90,7 @@ export class Opper extends ClientSDK { * It is a declarative interface with input and output schemas that supports text, image, audio inputs and outputs and is highly model agnostic. */ async call( - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(call( @@ -174,7 +174,7 @@ export class Opper extends ClientSDK { * ``` */ async stream( - request: models.AppApiPublicV2FunctionCallCallFunctionRequest, + request: models.CallFunctionRequest, options?: RequestOptions, ): Promise { return unwrapAsync(stream(