diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 15caf42d..a6204805 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: c48cf606-fb42-4a45-9c23-8f0555307828 management: - docChecksum: 8096d9b7f5871c9137b4ebcd2cd8970f + docChecksum: 74c0bf30bff3fde3c6830e3f608d065e docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.75 - configChecksum: 80430cc7e9cd260533f3d6554dd73c49 + releaseVersion: 1.1.76 + configChecksum: c282f0cacbf8f58a58799ae5e22760ca repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 766187d4-2e93-4aae-8175-5fdfdbb5ff78 - pristine_commit_hash: 942ad6ab28dcb8f92462dc9e2f2648a6d001d333 - pristine_tree_hash: adce8e873a0cad4602ba69bc37add3a3dc405b94 + generation_id: 1e1e5fdc-52d4-4884-b0a8-02708bf27e41 + pristine_commit_hash: cc998fb17a324275bcb922aad20aac8b6eaedc60 + pristine_tree_hash: 16561d398379783b95c2157b86604e2536ee1f90 features: python: acceptHeaders: 3.0.0 @@ -886,8 +886,12 @@ trackedFiles: pristine_git_object: 71ebbaf86ee2982b6d2e2d1061f6fc26a144b7c0 docs/components/chatcontentfile.mdx: id: d8848251040e - last_write_checksum: sha1:79363873860e9454bb96fc3e09ebba1944b26fa4 - pristine_git_object: ae0bb19c659e2efc3d430b7432f07ec291925f29 + last_write_checksum: sha1:5010b96bca15042b5e4476adad7134a767e233d7 + pristine_git_object: 6be5dcf7867ac8e75223b096ce731f0928ff1c79 + docs/components/chatcontentfilefile.mdx: + id: e7a407967ba4 + last_write_checksum: sha1:1f16c43ba85ae040b00aa8799c154f5d13daf13d + pristine_git_object: 8db78d18ee1fdc16279578410d3e27cc8773ad89 docs/components/chatcontentfiletype.mdx: id: 4f4228795d0d last_write_checksum: sha1:f38c6ca62a813bf688a607ee41576bf19be5d74d @@ -1362,8 +1366,8 @@ trackedFiles: pristine_git_object: 1c99ecd1ca87bb0ff50f541f157ab9c1db071372 docs/components/containerfile.mdx: id: 293da6a8ffaf - last_write_checksum: sha1:952b39aaf049938a8c08167687287f763afe77b5 - pristine_git_object: 7afa4e43e6e82ab7b84a89840d1137ef5b47e0da + last_write_checksum: sha1:06154f5a4aa8577a21bd4e11c1da7e991e09edbd + pristine_git_object: 63e4189bba46c38e97e0ec81edb9949a088438b3 docs/components/containerfilelistresponse.mdx: id: 1e09ddf3473c last_write_checksum: sha1:efcc514ed1a2090ed2c7c1a383fa8949fe87e412 @@ -1382,8 +1386,8 @@ trackedFiles: pristine_git_object: d202c01bb7fea9b2ccc19803a9c36ed5e3354930 docs/components/containerreferenceenvironment.mdx: id: 80d581804fd7 - last_write_checksum: sha1:525283f0d016b0385786264f87e2a1257c53b9a9 - pristine_git_object: 28843b0f3f7515a773906b34f3a50db189e5f74f + last_write_checksum: sha1:36ffda3a629e12783433f0ab5ec923626ea9cb8f + pristine_git_object: b950cbb6097f05ae389b152519e50e807904dd25 docs/components/containerreferenceenvironmenttype.mdx: id: 3baa9f801f17 last_write_checksum: sha1:e41a1c97b5ed7ef5e404bff0f2a7a65bd262ac17 @@ -1880,10 +1884,6 @@ trackedFiles: id: e7b48abef959 last_write_checksum: sha1:e535734499fa6e4afcc05ba296d0c54f49b2388b pristine_git_object: a021f257ecd8e43605e8559dd69c0c8a4fed4c99 - docs/components/file.mdx: - id: d4f9d0d9fbd0 - last_write_checksum: sha1:73520bf00e1d5f1ee3830178b1c2e6ba35d95db2 - pristine_git_object: d332b47b59ec1d41ff24e24ff7206a58797c07b1 docs/components/filecitation.mdx: id: 857aa356ad65 last_write_checksum: sha1:2a8a17ea6253fe54b63918b3a6f2b0206432191c @@ -2906,12 +2906,16 @@ trackedFiles: pristine_git_object: e15e5c95e01572a3fc7d59ff16dc4bcc5d695447 docs/components/messagesbashtoolresultblock.mdx: id: da1ca4f7868f - last_write_checksum: sha1:d86505a856c17af875cfea2372c7e3ea9b6ae148 - pristine_git_object: 83608b14e277f5f17c73c2a57cee08066ecf5517 - docs/components/messagesbashtoolresultblocktype.mdx: - id: 8610a5472116 - last_write_checksum: sha1:8f04039e6ce081ab86230109b2c491222a68647b - pristine_git_object: 3d6b381bf96eec7bb9feed4e176ee1f13599f3ee + last_write_checksum: sha1:e89d8964fde12e1686313d307fafaad3c3efdb41 + pristine_git_object: 34a24b71ecab7ab0d7d57d625e2bbb335fddbf1f + docs/components/messagesbashtoolresultblockfile.mdx: + id: 64a09154d386 + last_write_checksum: sha1:6dcd5e97efd97cd39b13daff665d4d7a380322a9 + pristine_git_object: 74a698936df18c8ce23f92e32c2c6a8cb8a7eee3 + docs/components/messagesbashtoolresultblocktypecontainerfilecitation.mdx: + id: 8251757b7bd9 + last_write_checksum: sha1:ea4a33f0c080cfd10bcfa15c417ee9d4eb700868 + pristine_git_object: a02ac9087f8a079ec7f8a7a3f47ac9fda295ebe7 docs/components/messagesfallbackparam.mdx: id: d7e026fed5f2 last_write_checksum: sha1:3f1e346696d37529787d1d9f85a1efc8e7162bea @@ -2998,12 +3002,16 @@ trackedFiles: pristine_git_object: 52ce907478e961eb90e709fca118e6d0631883d2 docs/components/messagesshelltoolresultblock.mdx: id: 0a41992a115c - last_write_checksum: sha1:d5e49fce544520f435e7493bc624a43e5c3979ef - pristine_git_object: 7b7b68f75ad30d01248a25387b4370ef74da954c - docs/components/messagesshelltoolresultblocktype.mdx: - id: 8b423fb3b1f7 - last_write_checksum: sha1:e8870b5a6c2a534856d6cee62b092c620b1c2821 - pristine_git_object: ccf32fe5f5786cdd793550c67a3aa0792edf559a + last_write_checksum: sha1:bfab01b3dcc371e80b822306ee94948a999359c7 + pristine_git_object: 7c48f8d3ca7545e66aa868c1d3df4e96efd6a195 + docs/components/messagesshelltoolresultblockfile.mdx: + id: f5636e687109 + last_write_checksum: sha1:bfa340819f542b081f14cdbf99f05ba6f0ce3c0b + pristine_git_object: e659a859d77ac12a91caf74550ba53b28a6856ff + docs/components/messagesshelltoolresultblocktypecontainerfilecitation.mdx: + id: c7d3ab58bb30 + last_write_checksum: sha1:cc1ad66544846224014149467b47165d781e73a3 + pristine_git_object: 9c83ecd83a7ad435aac6486e39a9f0a4cdc3d16d docs/components/messagestooladditionblock.mdx: id: ee6e08ccc2ae last_write_checksum: sha1:b56dd3ae6d6e105c57162a705794a799ffd65533 @@ -3738,12 +3746,20 @@ trackedFiles: pristine_git_object: ad79a325e74efc6cc08ad7ffc794cecd0e7eaa15 docs/components/outputbashservertoolitem.mdx: id: c17c44c991b5 - last_write_checksum: sha1:00018a05919a43ae978a47975d643c7011046eef - pristine_git_object: bbd5a88a48589e639709e0ed88080980035308f9 - docs/components/outputbashservertoolitemtype.mdx: - id: 584dd317e6ab - last_write_checksum: sha1:558e35bae6619f511da32758b7642bc6f000c95e - pristine_git_object: 801e62ba5508c0ca6915d95de6c39fd51c0209fc + last_write_checksum: sha1:65baf7afddeaabb578df6ae8406d8f0326ef2c7e + pristine_git_object: 6ff6c14ce85629b46168629812a835ec517aea03 + docs/components/outputbashservertoolitemfile.mdx: + id: 537681b5270f + last_write_checksum: sha1:3faf3a55cd42f4d71ad977dcccf657763954f6d8 + pristine_git_object: 9e4f74c6cee2a7bfdef3a39ac06bb11501d5628c + docs/components/outputbashservertoolitemtypecontainerfilecitation.mdx: + id: 03ad9edf1153 + last_write_checksum: sha1:4fab0390091c8b39840ff137875ee7d7bf2f8f46 + pristine_git_object: e6299e3cc4f9c83a126dc5daae9b8380ddc559a3 + docs/components/outputbashservertoolitemtypeopenrouterbash.mdx: + id: a559a9951a1d + last_write_checksum: sha1:41e9a25522b9ee4259787504bb450f5d692e6180 + pristine_git_object: 5326078f5c9a6068c2c7d721714abed3bf107035 docs/components/outputbrowseruseservertoolitem.mdx: id: f95c82cbb289 last_write_checksum: sha1:e0ebc47c8389fff3978ad2a175e24bffb988592f @@ -4050,24 +4066,40 @@ trackedFiles: pristine_git_object: 6e25f4cdd42f706845c834921a44a7198a09c2f3 docs/components/outputshellcalloutputitem.mdx: id: 2ce46fbb594f - last_write_checksum: sha1:543303f3914a65c38ca292556ddaaa05dff4a191 - pristine_git_object: cf531ef21c79f71170cb0e7711d95841770c7e90 - docs/components/outputshellcalloutputitemtype.mdx: - id: 5d7cecdae902 - last_write_checksum: sha1:c3fc1a2b39289ebf639abd09e22349ba9b204b68 - pristine_git_object: a75efc131736760666676258245184917964077d + last_write_checksum: sha1:c373870ee2998807367558586b2132926b61b45d + pristine_git_object: 4dde43d162f95d8778284257d8114b09980f5866 + docs/components/outputshellcalloutputitemfile.mdx: + id: 8e0e3a901867 + last_write_checksum: sha1:f431a7f969c50f1b07943b578a3f13838d008444 + pristine_git_object: 5abec493324e59b1112f43ff3676897959162d7d + docs/components/outputshellcalloutputitemtypecontainerfilecitation.mdx: + id: 56cc928b7f3a + last_write_checksum: sha1:707cdc151ec347427d0729663441aceeae4821ac + pristine_git_object: 85f0f6d5e8a13b069368f04c4a8dde29d71b0537 + docs/components/outputshellcalloutputitemtypeshellcalloutput.mdx: + id: b3771721488e + last_write_checksum: sha1:a2f348d70becceafa08d4d0ebd5dabe7a0395e3d + pristine_git_object: 2bfc5b85b0a0962d951930f1fd22bf3fb230750a docs/components/outputshellservertoolitem.mdx: id: d505095331df - last_write_checksum: sha1:ef276a16d376220f72271338ac73283c832bc9fb - pristine_git_object: 70d446926468e3f7c85edecf44639c14555167d3 + last_write_checksum: sha1:27326dbaf7c83e737c10ff8a44ce8e19a0ac45c8 + pristine_git_object: 8452882aeb372cbca64ac88bc782be8ef466c34e docs/components/outputshellservertoolitemaction.mdx: id: 0f70af617523 last_write_checksum: sha1:77a1972b2435a12de88ac334bf73996a8277cac8 pristine_git_object: 56f9a9add18a5cf8ecf657295e083956b2f2a548 - docs/components/outputshellservertoolitemtype.mdx: - id: 6ba3a70cfee4 - last_write_checksum: sha1:cf54c37351d4bbef3be6b7a6eae983790d19fa3c - pristine_git_object: 216dd4e765339e50595aa8ccd68a1b4f94e943b5 + docs/components/outputshellservertoolitemfile.mdx: + id: a13147a636f5 + last_write_checksum: sha1:be13221ef74b529c06d4bb47fecc1ce18b09fabe + pristine_git_object: 699a1317860708787288f23b7a2c7cca548cd21e + docs/components/outputshellservertoolitemtypecontainerfilecitation.mdx: + id: 6a610698961b + last_write_checksum: sha1:fbddef57ff8ba0903f4cd8319ff52f6c6558ebf0 + pristine_git_object: afc64051492e130074f72e6cb71abfe2489cf235 + docs/components/outputshellservertoolitemtypeopenroutershell.mdx: + id: df7c2f463218 + last_write_checksum: sha1:6fe12012e19fa9dd1532c2a4831d5939b90f5d8b + pristine_git_object: 713c380a3c99fd311394db6f6892711a32da9ff5 docs/components/outputsubagentservertoolitem.mdx: id: afeb6acde438 last_write_checksum: sha1:258b0b86d146f4eed0b7e6082ff992d31e96c701 @@ -5340,6 +5372,14 @@ trackedFiles: id: 89a2b0de24a1 last_write_checksum: sha1:1cc4fa33245f661d60f3f84b69fd7e520efc916f pristine_git_object: e7e1d470ec3543c8c3a962bf9067d0b2f9e95f7f + docs/components/typeopenrouterbashtoolresult.mdx: + id: 25eff7c126c4 + last_write_checksum: sha1:c831674fcf9df1c4d4096f3ecf5a0fc7e6072e56 + pristine_git_object: ea0d4fae2a60839ea493078431a2d2c92b1eb0db + docs/components/typeopenroutershelltoolresult.mdx: + id: 6d0414416b3a + last_write_checksum: sha1:d7c3c5b17390ee75e36c9902c922f0f8121276a7 + pristine_git_object: 76a4069957faaf646163d761bd0616a51145a744 docs/components/typeredactedthinking.mdx: id: 04adae6db206 last_write_checksum: sha1:3cbe8cf0cc55f1f67b552fa99c959e6d8b3ef577 @@ -6254,8 +6294,8 @@ trackedFiles: pristine_git_object: 630f5406beadd34b2e97bb5272a8206b6af22d99 docs/operations/downloadcontainerfilecontentrequest.mdx: id: b2a618019b09 - last_write_checksum: sha1:5d4c014cc84471e0911cb6e889a505f019fc124d - pristine_git_object: 2ea989b85476b58f816a01ca0e828deb8a5e5400 + last_write_checksum: sha1:0593d0cb21718fed77aecd57bfdbfc808fc27d8f + pristine_git_object: 19374f28df2daa2253cf8b39704b341e37222ed6 docs/operations/downloadfilecontentglobals.mdx: id: 0ada32f1640c last_write_checksum: sha1:ed4bbd8ccded9c65480b84fdfb54582b5e606516 @@ -6354,8 +6394,8 @@ trackedFiles: pristine_git_object: 8343594f88ed238341e618f3d6bace3b3141411e docs/operations/getcontainerfilerequest.mdx: id: 727fad4bbdcd - last_write_checksum: sha1:d5d464622f343f774282862e9514e151726f25b8 - pristine_git_object: 1fba45782a76236212195b32a6ba8e82a46d2d54 + last_write_checksum: sha1:d2d6dc6e25d630b8a24910dd9e07a83acc4b692c + pristine_git_object: 1529bd94e4409e4225a2cd33613c9758223c25c5 docs/operations/getcreditsdata.mdx: id: 24936b7229aa last_write_checksum: sha1:04c170b75b9f943bcf4143ff49bffbace613744b @@ -6610,8 +6650,8 @@ trackedFiles: pristine_git_object: 3bd312de040f562fc4b66811f89db0b06483ec1d docs/operations/listcontainerfilesrequest.mdx: id: 54073da72503 - last_write_checksum: sha1:7159b36d582af022a0f183dace41a4fb4b7a4103 - pristine_git_object: 560e080fb596ac66029dfb7937c55b638e89ed5d + last_write_checksum: sha1:f9626b9daf076c5d121827e028328bce2266b49e + pristine_git_object: 1b42a2f26306208c8c700bcd256f31edaf443b74 docs/operations/listdata.mdx: id: 949d8d9f5ac7 last_write_checksum: sha1:5f8b3da3cfe52a23525dd37725dcec786a295704 @@ -7222,8 +7262,8 @@ trackedFiles: pristine_git_object: bed5f74e5e8269cbba66943524ffa5206c933de3 docs/sdks/containers/README.mdx: id: cc963972ad75 - last_write_checksum: sha1:e869aab492e8f05097531617fc0a03c5bb157f0e - pristine_git_object: 2d69e9d1da84deabd7f2e51df92cdf95476bc236 + last_write_checksum: sha1:b5c29b6c94661027e661293829ccfe541f56ab5b + pristine_git_object: c2d0f3257e6f5876adb5bd4c32a8ea9ce1b8e5b8 docs/sdks/credits/README.mdx: id: 2ba51de8de3f last_write_checksum: sha1:08de2963f78b645eaa14fa8511552bae2ddccd75 @@ -7314,8 +7354,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:65253019d332e7c935f904d79e5c22e372596110 - pristine_git_object: 13a459680e6ee996aa7899b36bdd4fb3aabfaa6b + last_write_checksum: sha1:106ec011c72b0b8e0f336c1e628e3f9664aa29e5 + pristine_git_object: 6d77f0fc48caedbbe5c0a4abff409bdfc7e769c3 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7342,8 +7382,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:2c1d87963e0158700d5fec4670a083f2a7d21742 - pristine_git_object: 1fb15c54a812778b6ba8556f2fbf4a7d163b38ec + last_write_checksum: sha1:e2caf13be4cb8b4f3c6055f0f45384eb9f1d40b2 + pristine_git_object: ba614265f77e96a5b108051c122c5c7d0c4ec15c src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9 @@ -7382,8 +7422,8 @@ trackedFiles: pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:1731a042a9572abd629db06f85f5318e89cd4893 - pristine_git_object: 3be5de516ae707b3e739e702bf2749b6c5f7dcc3 + last_write_checksum: sha1:d888cd088a96b318e3627db8b63566b319bd7ac9 + pristine_git_object: a83396ab5dadab0e7dc11e20256867d319c7b9d4 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c @@ -7774,8 +7814,8 @@ trackedFiles: pristine_git_object: d60c7b13de35893537d9c6867c1e51a888dcc72d src/openrouter/components/chatcontentfile.py: id: 2a747b8033b8 - last_write_checksum: sha1:1203efad65c0e72e18fa600bd8ebbc72a82340fa - pristine_git_object: 07d3d043d87c42754ae89493b4cd6f91c43967c6 + last_write_checksum: sha1:f79c9de8435768e6f816052d44db862fdd2dc378 + pristine_git_object: 0d6f482a5147be36313e5231a77ad0545a5fb198 src/openrouter/components/chatcontentimage.py: id: 6897abcd5da0 last_write_checksum: sha1:e511b166d8568787289e53486fef5faad6462a4c @@ -7986,16 +8026,16 @@ trackedFiles: pristine_git_object: 78d8937bcdaf636d1df431e7fe868ae820b5f40c src/openrouter/components/containerfile.py: id: 2dc442adcee4 - last_write_checksum: sha1:b342aec85fee498ad94a63b71e5580e2a2d67d3c - pristine_git_object: ea5d9eb47b93a7a81ea02edb9a226b51acf9436f + last_write_checksum: sha1:ab38fa64e20369568413f106c30aa7ae60de692a + pristine_git_object: f9011f64bbd23aea72fa4d9a72bce9095da6c1c9 src/openrouter/components/containerfilelistresponse.py: id: f1d494b9a4e9 last_write_checksum: sha1:cfcee9763748a5ad9ea44d0da222e2ecca8635b5 pristine_git_object: a2593a4d8fab2fda41f2476015a4f60f9898da2f src/openrouter/components/containerreferenceenvironment.py: id: deb4c42c7020 - last_write_checksum: sha1:4436d0c57e31a64e27e5fae97702c16b355ecfca - pristine_git_object: 30240faf4ac0c14701e9c0216960898351affa4f + last_write_checksum: sha1:23898392d6671cfb7ed9270778801922eef203b6 + pristine_git_object: 4a9d2ebeabd4a7bb04eca94744a005c2c234f5f0 src/openrouter/components/contentfilteraction.py: id: 55792ae75016 last_write_checksum: sha1:cba4f155efe30819eea009eaf90bdbf0a497b7b0 @@ -8542,8 +8582,8 @@ trackedFiles: pristine_git_object: f499cbbb546232f5cfbfe2c44fb41aefb306c87f src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:1f30b36e8a9e9eee741841ef65ad7bed03851961 - pristine_git_object: df51270a7f1e393f827486475e5c359cc7f1c2a5 + last_write_checksum: sha1:9913cb32b518a68233f2594f03e48b0ff9828479 + pristine_git_object: 150d3821033192f2315208032019174641f9d8c4 src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:2da9ff645acc96772701908830151c5a707ed021 @@ -8670,16 +8710,16 @@ trackedFiles: pristine_git_object: 67ae6d5bdce0be9ac88b3f6295e8947962d9c9e2 src/openrouter/components/messagesbashtoolresultblock.py: id: 7f2f763d5dd7 - last_write_checksum: sha1:d869858b82b874e1d0ca538086632f916e94c8eb - pristine_git_object: edc95f4891f7d6a68fdf53c5c1741c0bc40ad18a + last_write_checksum: sha1:8f33e6f3bd83d3bf1c3d8c93dbd3e9aae63a0912 + pristine_git_object: 23d014f0beff7d60807c09537283fddde45bc721 src/openrouter/components/messagesfallbackparam.py: id: 53ba6717a4cc last_write_checksum: sha1:e1e75026fb625426f7cd1702cd3136dcf3ccaf79 pristine_git_object: 9026664fa77c678a7a5f2b317b511ad93445cff7 src/openrouter/components/messagesmessageparam.py: id: ed8bbab6720d - last_write_checksum: sha1:e2c29af9656da421ad301e55ee7164780126a673 - pristine_git_object: e7d23e1aeece83189a7bfff9f0381c494df2ffe6 + last_write_checksum: sha1:9722d10eceda49888b23026b55c0675905ef6f2b + pristine_git_object: 95b630216d9628cbb35aa15d0b7f732fa335c127 src/openrouter/components/messagesoutputconfig.py: id: 54d1e297f740 last_write_checksum: sha1:478d9f534254d60225ac89bd21ddc49d18329297 @@ -8694,8 +8734,8 @@ trackedFiles: pristine_git_object: d101995fd27b0bccbac266805caba629039c5f93 src/openrouter/components/messagesshelltoolresultblock.py: id: a11af1c6ce03 - last_write_checksum: sha1:c923ef2afbecd6d45d8ce9cbee1e2948e810e323 - pristine_git_object: 9cb0636d2e99bb22e3c0fc26db51e8e9eca6f57b + last_write_checksum: sha1:dd91c3a9b6c705cb53c036b152b2fa0bba1caa18 + pristine_git_object: d228d7634f1287b060bb5b77bc79c2e2ed39f1ae src/openrouter/components/messagestooladditionblock.py: id: 3fc00d28b82d last_write_checksum: sha1:9d58d3e11b4260f7d00efcf0630fe4186b5d01a1 @@ -8950,8 +8990,8 @@ trackedFiles: pristine_git_object: 919f2bb6ec91d62dcb223c15e2a25d2830b75ac9 src/openrouter/components/outputbashservertoolitem.py: id: 39d03767e214 - last_write_checksum: sha1:4b61effcebc1cfcbc29342cc6ac4cb5da68dcc1c - pristine_git_object: 58a109b4e1dc863ce5db689b2154451bcd4d20e4 + last_write_checksum: sha1:fc21a24c4c97caedbd794f053754bdde5045d402 + pristine_git_object: 3a5673e35129f474981659ef4f57625214d6f218 src/openrouter/components/outputbrowseruseservertoolitem.py: id: 73bff94d7284 last_write_checksum: sha1:6835f17b73a909e8a49ce9ba1257d43c62eeb690 @@ -9010,8 +9050,8 @@ trackedFiles: pristine_git_object: 94af810bbdb87fb8c6800645354f7ec4dd067e7f src/openrouter/components/outputitems.py: id: 90f107de3116 - last_write_checksum: sha1:fb51f8c5bdd13cc301d85d6d54f7937c50ca6c8b - pristine_git_object: fe6ee4f108a8c06baa786175bb2ee3c357987211 + last_write_checksum: sha1:58306697134736b149a3e118e808331406afc9a6 + pristine_git_object: 04dbfe6d12959070dd2b95b90789960458d98271 src/openrouter/components/outputmcpservertoolitem.py: id: bb8c2536a58e last_write_checksum: sha1:28d33c9226ff4ce6871457fa1fae384b590f676c @@ -9050,12 +9090,12 @@ trackedFiles: pristine_git_object: 23aa9caf8b965f08e7e4acbe6a2e7830b89e3661 src/openrouter/components/outputshellcalloutputitem.py: id: 9962f4d291a9 - last_write_checksum: sha1:e7bbbbd92cfa0e6386ca03661fb5d7703252bd50 - pristine_git_object: 40507fc7afc6ba3c8f2964491d09cd317826b514 + last_write_checksum: sha1:4cd139e1adb507afda92a8c783b8946f3e902212 + pristine_git_object: b8e130eea920c82ce6b147e264b6728cb8939959 src/openrouter/components/outputshellservertoolitem.py: id: 3c1670e937ec - last_write_checksum: sha1:28dfa5e62cb418222770eb5d9906068073cc3398 - pristine_git_object: 16e5a50c79f6aae945327efbabd50e5c17ffec6f + last_write_checksum: sha1:bf69e5714feee1957679c9be52c43013171c10f8 + pristine_git_object: bcd24666288f0cf369bc527b56df261d65d94ccf src/openrouter/components/outputsubagentservertoolitem.py: id: 7480e835aa08 last_write_checksum: sha1:6588b208a06fc0e1485c7952636b81bd28d04234 @@ -9854,8 +9894,8 @@ trackedFiles: pristine_git_object: ad78361d147d2edb7b5772c14501d9c25a2000b0 src/openrouter/containers.py: id: 5edae5db57e9 - last_write_checksum: sha1:81138d9e61f2745d59485fcc12558e6abae657df - pristine_git_object: e6907e07b5b5583694d57773adbb7f76ef0c6202 + last_write_checksum: sha1:4228e5d7fd7634b5e9c53afe0fb5ec0cacf89fa1 + pristine_git_object: d26eef63014e92380c21e5a132d7e683bd0a3858 src/openrouter/credits.py: id: cdc961937101 last_write_checksum: sha1:7ac37671d3de537eb98f15239d531e3ab3928a59 @@ -10130,8 +10170,8 @@ trackedFiles: pristine_git_object: b61191d8c3c9ab9da453e46c871231bda0e2628c src/openrouter/operations/downloadcontainerfilecontent.py: id: 6cbf0cdcba2b - last_write_checksum: sha1:f230411229419fb32eeec926132fb1af4d5cb887 - pristine_git_object: ca3b009ceb0d29e95e1ba5a73f97682d8f798a17 + last_write_checksum: sha1:1f0e09b71d4e72178c2fec233beb56b86b6357df + pristine_git_object: c0c31d78455272e41c9d4e98d587190d2f28fb3c src/openrouter/operations/downloadfilecontent.py: id: 6ff3d391a23f last_write_checksum: sha1:a1152e6af4d5a47bdaaab7ef35dfed739f1abff4 @@ -10158,8 +10198,8 @@ trackedFiles: pristine_git_object: 6021faa4de45bfaf200eca955b62f4b5b3113804 src/openrouter/operations/getcontainerfile.py: id: 7b8249f30861 - last_write_checksum: sha1:7e6d37e9f52c7a5e4f6bfcec9a18c989827d0862 - pristine_git_object: 953ef093e4a803543295ed83b2500d30b202bbe1 + last_write_checksum: sha1:d0993761976ab52e86456926d0823e7a9585af5a + pristine_git_object: 2457627bcc5a9871b202cabfdf98d24711db1032 src/openrouter/operations/getcredits.py: id: 83155df53da5 last_write_checksum: sha1:89afe99cd26e560d8dabb211bfe37f97e0f80f45 @@ -10246,8 +10286,8 @@ trackedFiles: pristine_git_object: 5f14df3f94fc6e57cfcc2ff5514dca5a835de897 src/openrouter/operations/listcontainerfiles.py: id: 7a30b9291c76 - last_write_checksum: sha1:409c7d73b6de34dd6b9c554d6cf028539bf02916 - pristine_git_object: 9aff2f128db9f4150ca53904d87f2d02aa2de29c + last_write_checksum: sha1:82f933f8c2581d5f92db7312335ee3eacb23b12d + pristine_git_object: 07682b2f93dabf60639454d4969ed0fc9843af44 src/openrouter/operations/listembeddingsmodels.py: id: bf749a1f23d6 last_write_checksum: sha1:938440c9b9df0c3d8430792f262bffced0207d13 @@ -12275,6 +12315,7 @@ examples: parameters: path: session_id: "sess-abc123" + container_id: "sess_abc123" query: limit: 100 responses: @@ -12298,6 +12339,7 @@ examples: path: session_id: "sess-abc123" file_id: "cfile_b3V0L3JlcG9ydC5jc3Y" + container_id: "sess_abc123" responses: "200": application/json: {"bytes": 123, "container_id": "sess-abc123", "created_at": 1755640000, "id": "cfile_b3V0L3JlcG9ydC5jc3Y", "object": "container.file", "path": "out/report.csv", "source": "assistant"} @@ -12321,6 +12363,7 @@ examples: path: session_id: "sess-abc123" file_id: "cfile_b3V0L3JlcG9ydC5jc3Y" + container_id: "sess_abc123" responses: "200": application/octet-stream: "x-file: example.file" @@ -12339,8 +12382,4 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.containers.list_container_files()`: **Added** - * `open_router.containers.get_container_file()`: **Added** - * `open_router.containers.download_container_file_content()`: **Added** +releaseNotes: "## Python SDK Changes:\n* `open_router.containers.list_container_files()`: `request` **Changed** (Breaking ⚠️)\n* `open_router.containers.get_container_file()`: `request` **Changed** (Breaking ⚠️)\n* `open_router.containers.download_container_file_content()`: `request` **Changed** (Breaking ⚠️)\n* `open_router.presets.create_presets_messages()`: \n * `request.messages[].content.union(Array<>)[]` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[]` **Changed**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[]` **Changed**\n * `response` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[]` **Changed**\n * `response` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1e29b068..cb75312c 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.75 + version: 1.1.76 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index d7a0e9db..0c92cdd4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -6638,8 +6638,8 @@ components: example: 123 type: 'integer' container_id: - description: 'The container the file belongs to — echoes the `session_id` path parameter (OpenAI field name).' - example: 'sess-abc123' + description: 'The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name).' + example: 'sess_abc123' type: 'string' created_at: description: 'Unix timestamp (seconds) when the file was last synced.' @@ -6655,7 +6655,7 @@ components: example: 'container.file' type: 'string' path: - description: 'Session-relative file path inside the container.' + description: 'Container-relative file path.' example: 'out/report.csv' type: 'string' source: @@ -6706,15 +6706,15 @@ components: - 'has_more' type: 'object' ContainerReferenceEnvironment: - description: 'Reference to a previously created container to reuse.' + description: 'Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.' example: - container_id: 'cntr_abc123' + container_id: 'sess_abc123' type: 'container_reference' properties: container_id: - description: 'Identifier of an existing container to reuse (max 20 characters).' - example: 'cntr_abc123' - maxLength: 20 + description: 'Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace.' + example: 'sess_abc123' + maxLength: 40 minLength: 1 pattern: '^[\w-]+$' type: 'string' @@ -12597,9 +12597,39 @@ components: tool_use_id: 'srvtoolu_01abc' type: 'openrouter_bash_tool_result' properties: + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' content: additionalProperties: {} type: 'object' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' tool_use_id: type: 'string' type: @@ -13750,9 +13780,39 @@ components: tool_use_id: 'srvtoolu_01abc' type: 'openrouter_shell_tool_result' properties: + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' content: additionalProperties: {} type: 'object' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' tool_use_id: type: 'string' type: @@ -18109,9 +18169,39 @@ components: tool_use_id: 'srvtoolu_01abc' type: 'openrouter_bash_tool_result' properties: + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' content: additionalProperties: {} type: 'object' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' tool_use_id: type: 'string' type: @@ -18216,9 +18306,39 @@ components: tool_use_id: 'srvtoolu_01abc' type: 'openrouter_shell_tool_result' properties: + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' content: additionalProperties: {} type: 'object' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' tool_use_id: type: 'string' type: @@ -18362,8 +18482,38 @@ components: - 'null' command: type: 'string' + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' exitCode: type: 'integer' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' id: type: 'string' status: @@ -19558,6 +19708,36 @@ components: properties: call_id: type: 'string' + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' id: type: 'string' max_output_length: @@ -19627,6 +19807,36 @@ components: type: - 'string' - 'null' + container_id: + description: 'The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.' + type: 'string' + files: + description: 'Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.' + items: + properties: + container_id: + type: 'string' + end_index: + type: 'integer' + file_id: + type: 'string' + filename: + type: 'string' + start_index: + type: 'integer' + type: + enum: + - 'container_file_citation' + type: 'string' + required: + - 'type' + - 'container_id' + - 'file_id' + - 'filename' + - 'start_index' + - 'end_index' + type: 'object' + type: 'array' id: type: 'string' output: @@ -29031,18 +29241,18 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /containers/{session_id}/files: + /containers/{container_id}/files: get: - description: 'Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.' + description: 'Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.' operationId: 'listContainerFiles' parameters: - - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + - description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' in: 'path' - name: 'session_id' + name: 'container_id' required: true schema: - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' - example: 'sess-abc123' + description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' + example: 'sess_abc123' type: 'string' - description: 'Maximum number of files to return (1-1000). Defaults to 100 when absent.' in: 'query' @@ -29070,7 +29280,7 @@ paths: example: data: - bytes: 123 - container_id: 'sess-abc123' + container_id: 'sess_abc123' created_at: 1755640000 id: 'cfile_b3V0L3JlcG9ydC5jc3Y' object: 'container.file' @@ -29151,18 +29361,18 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /containers/{session_id}/files/{file_id}: + /containers/{container_id}/files/{file_id}: get: - description: 'Returns the metadata of a single file under a sandbox session prefix.' + description: 'Returns the metadata of a single file in a container.' operationId: 'getContainerFile' parameters: - - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + - description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' in: 'path' - name: 'session_id' + name: 'container_id' required: true schema: - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' - example: 'sess-abc123' + description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' + example: 'sess_abc123' type: 'string' - description: 'Container file id (`cfile_` + base64url of the file path).' in: 'path' @@ -29178,7 +29388,7 @@ paths: application/json: example: bytes: 123 - container_id: 'sess-abc123' + container_id: 'sess_abc123' created_at: 1755640000 id: 'cfile_b3V0L3JlcG9ydC5jc3Y' object: 'container.file' @@ -29265,18 +29475,18 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" - /containers/{session_id}/files/{file_id}/content: + /containers/{container_id}/files/{file_id}/content: get: - description: 'Streams the raw bytes of a file under a sandbox session prefix.' + description: 'Streams the raw bytes of a file in a container.' operationId: 'downloadContainerFileContent' parameters: - - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + - description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' in: 'path' - name: 'session_id' + name: 'container_id' required: true schema: - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' - example: 'sess-abc123' + description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.' + example: 'sess_abc123' type: 'string' - description: 'Container file id (`cfile_` + base64url of the file path).' in: 'path' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 63ba6607..3a64ab77 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:bf5cb8b155fdc50b0699b68828ae28f42a757dfb66ad956275d2706fdecff569 - sourceBlobDigest: sha256:2a524a9436cc91ff2c06c562f6971a7c638a48881611d7d8627bb0a075e17745 + sourceRevisionDigest: sha256:7b4e8be79ce173cf2faa1976c20c00950860794151e639da897ccbdc572931ac + sourceBlobDigest: sha256:e03d85f26ff90565812046a26f9039130ee61f109a1294e40c69b05df64d6955 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:bf5cb8b155fdc50b0699b68828ae28f42a757dfb66ad956275d2706fdecff569 - sourceBlobDigest: sha256:2a524a9436cc91ff2c06c562f6971a7c638a48881611d7d8627bb0a075e17745 + sourceRevisionDigest: sha256:7b4e8be79ce173cf2faa1976c20c00950860794151e639da897ccbdc572931ac + sourceBlobDigest: sha256:e03d85f26ff90565812046a26f9039130ee61f109a1294e40c69b05df64d6955 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:98396f67aa7e2da3e21791589b6c51c4e487c0eab41f9602228ad155140eb808 + codeSamplesRevisionDigest: sha256:b7825e3933569aeb010f4102dfba37d87abee17e7ba96ef800f8c3c411172d81 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 8b4df116..f23d61a3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1539,4 +1539,14 @@ Based on: ### Generated - [python v1.1.75] . ### Releases -- [PyPI v1.1.75] https://pypi.org/project/openrouter/1.1.75 - . \ No newline at end of file +- [PyPI v1.1.75] https://pypi.org/project/openrouter/1.1.75 - . + +## 2026-08-24 04:07:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.76] . +### Releases +- [PyPI v1.1.76] https://pypi.org/project/openrouter/1.1.76 - . \ No newline at end of file diff --git a/docs/components/chatcontentfile.mdx b/docs/components/chatcontentfile.mdx index ae0bb19c..6be5dcf7 100644 --- a/docs/components/chatcontentfile.mdx +++ b/docs/components/chatcontentfile.mdx @@ -9,5 +9,5 @@ File content part for document processing | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `file` | [components.File](../components/file.mdx) | :heavy_check_mark: | N/A | +| `file` | [components.ChatContentFileFile](../components/chatcontentfilefile.mdx) | :heavy_check_mark: | N/A | | `type` | [components.ChatContentFileType](../components/chatcontentfiletype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/file.mdx b/docs/components/chatcontentfilefile.mdx similarity index 96% rename from docs/components/file.mdx rename to docs/components/chatcontentfilefile.mdx index d332b47b..8db78d18 100644 --- a/docs/components/file.mdx +++ b/docs/components/chatcontentfilefile.mdx @@ -1,5 +1,5 @@ --- -title: "File" +title: "ChatContentFileFile" --- ## Fields diff --git a/docs/components/containerfile.mdx b/docs/components/containerfile.mdx index 7afa4e43..63e4189b 100644 --- a/docs/components/containerfile.mdx +++ b/docs/components/containerfile.mdx @@ -4,12 +4,12 @@ title: "ContainerFile" ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `bytes_` | *int* | :heavy_check_mark: | File size in bytes. | 123 | -| `container_id` | *str* | :heavy_check_mark: | The container the file belongs to — echoes the `session_id` path parameter (OpenAI field name). | sess-abc123 | -| `created_at` | *int* | :heavy_check_mark: | Unix timestamp (seconds) when the file was last synced. | 1755640000 | -| `id` | *str* | :heavy_check_mark: | Container file id: `cfile_` + base64url of the file path. | cfile_b3V0L3JlcG9ydC5jc3Y | -| `object` | [components.ContainerFileObject](../components/containerfileobject.mdx) | :heavy_check_mark: | N/A | container.file | -| `path` | *str* | :heavy_check_mark: | Session-relative file path inside the container. | out/report.csv | -| `source` | [components.ContainerFileSource](../components/containerfilesource.mdx) | :heavy_check_mark: | Container files are always produced by the assistant sandbox. | assistant | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `bytes_` | *int* | :heavy_check_mark: | File size in bytes. | 123 | +| `container_id` | *str* | :heavy_check_mark: | The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name). | sess_abc123 | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp (seconds) when the file was last synced. | 1755640000 | +| `id` | *str* | :heavy_check_mark: | Container file id: `cfile_` + base64url of the file path. | cfile_b3V0L3JlcG9ydC5jc3Y | +| `object` | [components.ContainerFileObject](../components/containerfileobject.mdx) | :heavy_check_mark: | N/A | container.file | +| `path` | *str* | :heavy_check_mark: | Container-relative file path. | out/report.csv | +| `source` | [components.ContainerFileSource](../components/containerfilesource.mdx) | :heavy_check_mark: | Container files are always produced by the assistant sandbox. | assistant | \ No newline at end of file diff --git a/docs/components/containerreferenceenvironment.mdx b/docs/components/containerreferenceenvironment.mdx index 28843b0f..b950cbb6 100644 --- a/docs/components/containerreferenceenvironment.mdx +++ b/docs/components/containerreferenceenvironment.mdx @@ -2,12 +2,12 @@ title: "ContainerReferenceEnvironment" --- -Reference to a previously created container to reuse. +Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container. ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `container_id` | *str* | :heavy_check_mark: | Identifier of an existing container to reuse (max 20 characters). | cntr_abc123 | -| `type` | [components.ContainerReferenceEnvironmentType](../components/containerreferenceenvironmenttype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace. | sess_abc123 | +| `type` | [components.ContainerReferenceEnvironmentType](../components/containerreferenceenvironmenttype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/messagesbashtoolresultblock.mdx b/docs/components/messagesbashtoolresultblock.mdx index 83608b14..34a24b71 100644 --- a/docs/components/messagesbashtoolresultblock.mdx +++ b/docs/components/messagesbashtoolresultblock.mdx @@ -7,8 +7,10 @@ Output of a sandbox-executed `openrouter:bash` call from a prior assistant turn. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `content` | Dict[str, *Any*] | :heavy_check_mark: | N/A | -| `tool_use_id` | *str* | :heavy_check_mark: | N/A | -| `type` | [components.MessagesBashToolResultBlockType](../components/messagesbashtoolresultblocktype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *Optional[str]* | :heavy_minus_sign: | The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. | +| `content` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `files` | List[[components.MessagesBashToolResultBlockFile](../components/messagesbashtoolresultblockfile.mdx)] | :heavy_minus_sign: | Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. | +| `tool_use_id` | *str* | :heavy_check_mark: | N/A | +| `type` | [components.TypeOpenrouterBashToolResult](../components/typeopenrouterbashtoolresult.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/messagesbashtoolresultblockfile.mdx b/docs/components/messagesbashtoolresultblockfile.mdx new file mode 100644 index 00000000..74a69893 --- /dev/null +++ b/docs/components/messagesbashtoolresultblockfile.mdx @@ -0,0 +1,14 @@ +--- +title: "MessagesBashToolResultBlockFile" +--- + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | N/A | +| `end_index` | *int* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | N/A | +| `start_index` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.MessagesBashToolResultBlockTypeContainerFileCitation](../components/messagesbashtoolresultblocktypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/messagesbashtoolresultblocktype.mdx b/docs/components/messagesbashtoolresultblocktype.mdx deleted file mode 100644 index 3d6b381b..00000000 --- a/docs/components/messagesbashtoolresultblocktype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MessagesBashToolResultBlockType" ---- - -## Example Usage - -```python -from openrouter.components import MessagesBashToolResultBlockType -value: MessagesBashToolResultBlockType = "openrouter_bash_tool_result" -``` - - -## Values - -- `"openrouter_bash_tool_result"` diff --git a/docs/components/messagesbashtoolresultblocktypecontainerfilecitation.mdx b/docs/components/messagesbashtoolresultblocktypecontainerfilecitation.mdx new file mode 100644 index 00000000..a02ac908 --- /dev/null +++ b/docs/components/messagesbashtoolresultblocktypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "MessagesBashToolResultBlockTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import MessagesBashToolResultBlockTypeContainerFileCitation +value: MessagesBashToolResultBlockTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/messagesshelltoolresultblock.mdx b/docs/components/messagesshelltoolresultblock.mdx index 7b7b68f7..7c48f8d3 100644 --- a/docs/components/messagesshelltoolresultblock.mdx +++ b/docs/components/messagesshelltoolresultblock.mdx @@ -7,8 +7,10 @@ Output of an `openrouter:shell` call from a prior assistant turn. Accepted on re ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `content` | Dict[str, *Any*] | :heavy_check_mark: | N/A | -| `tool_use_id` | *str* | :heavy_check_mark: | N/A | -| `type` | [components.MessagesShellToolResultBlockType](../components/messagesshelltoolresultblocktype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *Optional[str]* | :heavy_minus_sign: | The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. | +| `content` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `files` | List[[components.MessagesShellToolResultBlockFile](../components/messagesshelltoolresultblockfile.mdx)] | :heavy_minus_sign: | Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. | +| `tool_use_id` | *str* | :heavy_check_mark: | N/A | +| `type` | [components.TypeOpenrouterShellToolResult](../components/typeopenroutershelltoolresult.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/messagesshelltoolresultblockfile.mdx b/docs/components/messagesshelltoolresultblockfile.mdx new file mode 100644 index 00000000..e659a859 --- /dev/null +++ b/docs/components/messagesshelltoolresultblockfile.mdx @@ -0,0 +1,14 @@ +--- +title: "MessagesShellToolResultBlockFile" +--- + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `container_id` | *str* | :heavy_check_mark: | N/A | +| `end_index` | *int* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | N/A | +| `start_index` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.MessagesShellToolResultBlockTypeContainerFileCitation](../components/messagesshelltoolresultblocktypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/messagesshelltoolresultblocktype.mdx b/docs/components/messagesshelltoolresultblocktype.mdx deleted file mode 100644 index ccf32fe5..00000000 --- a/docs/components/messagesshelltoolresultblocktype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MessagesShellToolResultBlockType" ---- - -## Example Usage - -```python -from openrouter.components import MessagesShellToolResultBlockType -value: MessagesShellToolResultBlockType = "openrouter_shell_tool_result" -``` - - -## Values - -- `"openrouter_shell_tool_result"` diff --git a/docs/components/messagesshelltoolresultblocktypecontainerfilecitation.mdx b/docs/components/messagesshelltoolresultblocktypecontainerfilecitation.mdx new file mode 100644 index 00000000..9c83ecd8 --- /dev/null +++ b/docs/components/messagesshelltoolresultblocktypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "MessagesShellToolResultBlockTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import MessagesShellToolResultBlockTypeContainerFileCitation +value: MessagesShellToolResultBlockTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/outputbashservertoolitem.mdx b/docs/components/outputbashservertoolitem.mdx index bbd5a88a..6ff6c14c 100644 --- a/docs/components/outputbashservertoolitem.mdx +++ b/docs/components/outputbashservertoolitem.mdx @@ -7,14 +7,16 @@ An openrouter:bash server tool output item ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `arguments` | *OptionalNullable[str]* | :heavy_minus_sign: | The raw tool-call arguments string as emitted by the model. | | -| `call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The model-generated tool call id from the originating turn. | | -| `command` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `exit_code` | *Optional[int]* | :heavy_minus_sign: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | :heavy_check_mark: | N/A | completed | -| `stderr` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `stdout` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `type` | [components.OutputBashServerToolItemType](../components/outputbashservertoolitemtype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `arguments` | *OptionalNullable[str]* | :heavy_minus_sign: | The raw tool-call arguments string as emitted by the model. | | +| `call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The model-generated tool call id from the originating turn. | | +| `command` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `container_id` | *Optional[str]* | :heavy_minus_sign: | The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. | | +| `exit_code` | *Optional[int]* | :heavy_minus_sign: | N/A | | +| `files` | List[[components.OutputBashServerToolItemFile](../components/outputbashservertoolitemfile.mdx)] | :heavy_minus_sign: | Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. | | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | :heavy_check_mark: | N/A | completed | +| `stderr` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `stdout` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `type` | [components.OutputBashServerToolItemTypeOpenrouterBash](../components/outputbashservertoolitemtypeopenrouterbash.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/outputbashservertoolitemfile.mdx b/docs/components/outputbashservertoolitemfile.mdx new file mode 100644 index 00000000..9e4f74c6 --- /dev/null +++ b/docs/components/outputbashservertoolitemfile.mdx @@ -0,0 +1,14 @@ +--- +title: "OutputBashServerToolItemFile" +--- + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | N/A | +| `end_index` | *int* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | N/A | +| `start_index` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.OutputBashServerToolItemTypeContainerFileCitation](../components/outputbashservertoolitemtypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/outputbashservertoolitemtype.mdx b/docs/components/outputbashservertoolitemtype.mdx deleted file mode 100644 index 801e62ba..00000000 --- a/docs/components/outputbashservertoolitemtype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "OutputBashServerToolItemType" ---- - -## Example Usage - -```python -from openrouter.components import OutputBashServerToolItemType -value: OutputBashServerToolItemType = "openrouter:bash" -``` - - -## Values - -- `"openrouter:bash"` diff --git a/docs/components/outputbashservertoolitemtypecontainerfilecitation.mdx b/docs/components/outputbashservertoolitemtypecontainerfilecitation.mdx new file mode 100644 index 00000000..e6299e3c --- /dev/null +++ b/docs/components/outputbashservertoolitemtypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputBashServerToolItemTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import OutputBashServerToolItemTypeContainerFileCitation +value: OutputBashServerToolItemTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/outputbashservertoolitemtypeopenrouterbash.mdx b/docs/components/outputbashservertoolitemtypeopenrouterbash.mdx new file mode 100644 index 00000000..5326078f --- /dev/null +++ b/docs/components/outputbashservertoolitemtypeopenrouterbash.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputBashServerToolItemTypeOpenrouterBash" +--- + +## Example Usage + +```python +from openrouter.components import OutputBashServerToolItemTypeOpenrouterBash +value: OutputBashServerToolItemTypeOpenrouterBash = "openrouter:bash" +``` + + +## Values + +- `"openrouter:bash"` diff --git a/docs/components/outputshellcalloutputitem.mdx b/docs/components/outputshellcalloutputitem.mdx index cf531ef2..4dde43d1 100644 --- a/docs/components/outputshellcalloutputitem.mdx +++ b/docs/components/outputshellcalloutputitem.mdx @@ -7,11 +7,13 @@ A native `shell_call_output` item matching OpenAI's Responses API shape. Carries ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `id` | *str* | :heavy_check_mark: | N/A | | -| `max_output_length` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `output` | List[[components.ShellCallOutputContent](../components/shellcalloutputcontent.mdx)] | :heavy_check_mark: | N/A | | -| `status` | [components.ShellCallStatus](../components/shellcallstatus.mdx) | :heavy_check_mark: | Status of a shell call or its output. | completed | -| `type` | [components.OutputShellCallOutputItemType](../components/outputshellcalloutputitemtype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `call_id` | *str* | :heavy_check_mark: | N/A | | +| `container_id` | *Optional[str]* | :heavy_minus_sign: | The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. | | +| `files` | List[[components.OutputShellCallOutputItemFile](../components/outputshellcalloutputitemfile.mdx)] | :heavy_minus_sign: | Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. | | +| `id` | *str* | :heavy_check_mark: | N/A | | +| `max_output_length` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `output` | List[[components.ShellCallOutputContent](../components/shellcalloutputcontent.mdx)] | :heavy_check_mark: | N/A | | +| `status` | [components.ShellCallStatus](../components/shellcallstatus.mdx) | :heavy_check_mark: | Status of a shell call or its output. | completed | +| `type` | [components.OutputShellCallOutputItemTypeShellCallOutput](../components/outputshellcalloutputitemtypeshellcalloutput.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/outputshellcalloutputitemfile.mdx b/docs/components/outputshellcalloutputitemfile.mdx new file mode 100644 index 00000000..5abec493 --- /dev/null +++ b/docs/components/outputshellcalloutputitemfile.mdx @@ -0,0 +1,14 @@ +--- +title: "OutputShellCallOutputItemFile" +--- + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `container_id` | *str* | :heavy_check_mark: | N/A | +| `end_index` | *int* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | N/A | +| `start_index` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.OutputShellCallOutputItemTypeContainerFileCitation](../components/outputshellcalloutputitemtypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/outputshellcalloutputitemtype.mdx b/docs/components/outputshellcalloutputitemtype.mdx deleted file mode 100644 index a75efc13..00000000 --- a/docs/components/outputshellcalloutputitemtype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "OutputShellCallOutputItemType" ---- - -## Example Usage - -```python -from openrouter.components import OutputShellCallOutputItemType -value: OutputShellCallOutputItemType = "shell_call_output" -``` - - -## Values - -- `"shell_call_output"` diff --git a/docs/components/outputshellcalloutputitemtypecontainerfilecitation.mdx b/docs/components/outputshellcalloutputitemtypecontainerfilecitation.mdx new file mode 100644 index 00000000..85f0f6d5 --- /dev/null +++ b/docs/components/outputshellcalloutputitemtypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputShellCallOutputItemTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import OutputShellCallOutputItemTypeContainerFileCitation +value: OutputShellCallOutputItemTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/outputshellcalloutputitemtypeshellcalloutput.mdx b/docs/components/outputshellcalloutputitemtypeshellcalloutput.mdx new file mode 100644 index 00000000..2bfc5b85 --- /dev/null +++ b/docs/components/outputshellcalloutputitemtypeshellcalloutput.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputShellCallOutputItemTypeShellCallOutput" +--- + +## Example Usage + +```python +from openrouter.components import OutputShellCallOutputItemTypeShellCallOutput +value: OutputShellCallOutputItemTypeShellCallOutput = "shell_call_output" +``` + + +## Values + +- `"shell_call_output"` diff --git a/docs/components/outputshellservertoolitem.mdx b/docs/components/outputshellservertoolitem.mdx index 70d44692..8452882a 100644 --- a/docs/components/outputshellservertoolitem.mdx +++ b/docs/components/outputshellservertoolitem.mdx @@ -7,12 +7,14 @@ An openrouter:shell server tool output item ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `action` | [Optional[components.OutputShellServerToolItemAction]](../components/outputshellservertoolitemaction.mdx) | :heavy_minus_sign: | N/A | | -| `arguments` | *OptionalNullable[str]* | :heavy_minus_sign: | The raw tool-call arguments string as emitted by the model. | | -| `call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The model-generated tool call id from the originating turn. | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `output` | List[[components.ShellCallOutputContent](../components/shellcalloutputcontent.mdx)] | :heavy_minus_sign: | N/A | | -| `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | :heavy_check_mark: | N/A | completed | -| `type` | [components.OutputShellServerToolItemType](../components/outputshellservertoolitemtype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `action` | [Optional[components.OutputShellServerToolItemAction]](../components/outputshellservertoolitemaction.mdx) | :heavy_minus_sign: | N/A | | +| `arguments` | *OptionalNullable[str]* | :heavy_minus_sign: | The raw tool-call arguments string as emitted by the model. | | +| `call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The model-generated tool call id from the originating turn. | | +| `container_id` | *Optional[str]* | :heavy_minus_sign: | The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. | | +| `files` | List[[components.OutputShellServerToolItemFile](../components/outputshellservertoolitemfile.mdx)] | :heavy_minus_sign: | Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. | | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `output` | List[[components.ShellCallOutputContent](../components/shellcalloutputcontent.mdx)] | :heavy_minus_sign: | N/A | | +| `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | :heavy_check_mark: | N/A | completed | +| `type` | [components.OutputShellServerToolItemTypeOpenrouterShell](../components/outputshellservertoolitemtypeopenroutershell.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/outputshellservertoolitemfile.mdx b/docs/components/outputshellservertoolitemfile.mdx new file mode 100644 index 00000000..699a1317 --- /dev/null +++ b/docs/components/outputshellservertoolitemfile.mdx @@ -0,0 +1,14 @@ +--- +title: "OutputShellServerToolItemFile" +--- + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `container_id` | *str* | :heavy_check_mark: | N/A | +| `end_index` | *int* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `filename` | *str* | :heavy_check_mark: | N/A | +| `start_index` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.OutputShellServerToolItemTypeContainerFileCitation](../components/outputshellservertoolitemtypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/outputshellservertoolitemtype.mdx b/docs/components/outputshellservertoolitemtype.mdx deleted file mode 100644 index 216dd4e7..00000000 --- a/docs/components/outputshellservertoolitemtype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "OutputShellServerToolItemType" ---- - -## Example Usage - -```python -from openrouter.components import OutputShellServerToolItemType -value: OutputShellServerToolItemType = "openrouter:shell" -``` - - -## Values - -- `"openrouter:shell"` diff --git a/docs/components/outputshellservertoolitemtypecontainerfilecitation.mdx b/docs/components/outputshellservertoolitemtypecontainerfilecitation.mdx new file mode 100644 index 00000000..afc64051 --- /dev/null +++ b/docs/components/outputshellservertoolitemtypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputShellServerToolItemTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import OutputShellServerToolItemTypeContainerFileCitation +value: OutputShellServerToolItemTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/outputshellservertoolitemtypeopenroutershell.mdx b/docs/components/outputshellservertoolitemtypeopenroutershell.mdx new file mode 100644 index 00000000..713c380a --- /dev/null +++ b/docs/components/outputshellservertoolitemtypeopenroutershell.mdx @@ -0,0 +1,15 @@ +--- +title: "OutputShellServerToolItemTypeOpenrouterShell" +--- + +## Example Usage + +```python +from openrouter.components import OutputShellServerToolItemTypeOpenrouterShell +value: OutputShellServerToolItemTypeOpenrouterShell = "openrouter:shell" +``` + + +## Values + +- `"openrouter:shell"` diff --git a/docs/components/typeopenrouterbashtoolresult.mdx b/docs/components/typeopenrouterbashtoolresult.mdx new file mode 100644 index 00000000..ea0d4fae --- /dev/null +++ b/docs/components/typeopenrouterbashtoolresult.mdx @@ -0,0 +1,15 @@ +--- +title: "TypeOpenrouterBashToolResult" +--- + +## Example Usage + +```python +from openrouter.components import TypeOpenrouterBashToolResult +value: TypeOpenrouterBashToolResult = "openrouter_bash_tool_result" +``` + + +## Values + +- `"openrouter_bash_tool_result"` diff --git a/docs/components/typeopenroutershelltoolresult.mdx b/docs/components/typeopenroutershelltoolresult.mdx new file mode 100644 index 00000000..76a40699 --- /dev/null +++ b/docs/components/typeopenroutershelltoolresult.mdx @@ -0,0 +1,15 @@ +--- +title: "TypeOpenrouterShellToolResult" +--- + +## Example Usage + +```python +from openrouter.components import TypeOpenrouterShellToolResult +value: TypeOpenrouterShellToolResult = "openrouter_shell_tool_result" +``` + + +## Values + +- `"openrouter_shell_tool_result"` diff --git a/docs/operations/downloadcontainerfilecontentrequest.mdx b/docs/operations/downloadcontainerfilecontentrequest.mdx index 2ea989b8..19374f28 100644 --- a/docs/operations/downloadcontainerfilecontentrequest.mdx +++ b/docs/operations/downloadcontainerfilecontentrequest.mdx @@ -4,10 +4,10 @@ title: "DownloadContainerFileContentRequest" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file diff --git a/docs/operations/getcontainerfilerequest.mdx b/docs/operations/getcontainerfilerequest.mdx index 1fba4578..1529bd94 100644 --- a/docs/operations/getcontainerfilerequest.mdx +++ b/docs/operations/getcontainerfilerequest.mdx @@ -4,10 +4,10 @@ title: "GetContainerFileRequest" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file diff --git a/docs/operations/listcontainerfilesrequest.mdx b/docs/operations/listcontainerfilesrequest.mdx index 560e080f..1b42a2f2 100644 --- a/docs/operations/listcontainerfilesrequest.mdx +++ b/docs/operations/listcontainerfilesrequest.mdx @@ -4,11 +4,11 @@ title: "ListContainerFilesRequest" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of files to return (1-1000). Defaults to 100 when absent. | 100 | -| `after` | *Optional[str]* | :heavy_minus_sign: | Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file. | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of files to return (1-1000). Defaults to 100 when absent. | 100 | +| `after` | *Optional[str]* | :heavy_minus_sign: | Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file. | cfile_b3V0L3JlcG9ydC5jc3Y | \ No newline at end of file diff --git a/docs/sdks/containers/README.mdx b/docs/sdks/containers/README.mdx index 2d69e9d1..c2d0f325 100644 --- a/docs/sdks/containers/README.mdx +++ b/docs/sdks/containers/README.mdx @@ -15,7 +15,7 @@ Containers endpoints ## list_container_files -Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. +Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. ### Example Usage @@ -31,7 +31,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.containers.list_container_files(session_id="sess-abc123", limit=100) + res = open_router.containers.list_container_files(container_id="sess_abc123", limit=100) # Handle response print(res) @@ -40,15 +40,15 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of files to return (1-1000). Defaults to 100 when absent. | 100 | -| `after` | *Optional[str]* | :heavy_minus_sign: | Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file. | cfile_b3V0L3JlcG9ydC5jc3Y | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of files to return (1-1000). Defaults to 100 when absent. | 100 | +| `after` | *Optional[str]* | :heavy_minus_sign: | Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file. | cfile_b3V0L3JlcG9ydC5jc3Y | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -68,7 +68,7 @@ with OpenRouter( ## get_container_file -Returns the metadata of a single file under a sandbox session prefix. +Returns the metadata of a single file in a container. ### Example Usage @@ -84,7 +84,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.containers.get_container_file(session_id="sess-abc123", file_id="cfile_b3V0L3JlcG9ydC5jc3Y") + res = open_router.containers.get_container_file(container_id="sess_abc123", file_id="cfile_b3V0L3JlcG9ydC5jc3Y") # Handle response print(res) @@ -93,14 +93,14 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -121,7 +121,7 @@ with OpenRouter( ## download_container_file_content -Streams the raw bytes of a file under a sandbox session prefix. +Streams the raw bytes of a file in a container. ### Example Usage @@ -137,7 +137,7 @@ with OpenRouter( api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: - res = open_router.containers.download_container_file_content(session_id="sess-abc123", file_id="cfile_b3V0L3JlcG9ydC5jc3Y") + res = open_router.containers.download_container_file_content(container_id="sess_abc123", file_id="cfile_b3V0L3JlcG9ydC5jc3Y") # Handle response print(res) @@ -146,14 +146,14 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `session_id` | *str* | :heavy_check_mark: | The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. | sess-abc123 | -| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | -| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | -| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | -| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container_id` | *str* | :heavy_check_mark: | The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. | sess_abc123 | +| `file_id` | *str* | :heavy_check_mark: | Container file id (`cfile_` + base64url of the file path). | cfile_b3V0L3JlcG9ydC5jc3Y | +| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.mdx) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/pyproject.toml b/pyproject.toml index 13a45968..6d77f0fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.75" +version = "1.1.76" description = "Official Python Client SDK for OpenRouter." authors = [{ name = "OpenRouter" },] readme = "README-PYPI.md" diff --git a/src/openrouter/_version.py b/src/openrouter/_version.py index 1fb15c54..ba614265 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.1.75" +__version__: str = "1.1.76" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.75 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.76 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index 3be5de51..a83396ab 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -463,10 +463,10 @@ ) from .chatcontentfile import ( ChatContentFile, + ChatContentFileFile, + ChatContentFileFileTypedDict, ChatContentFileType, ChatContentFileTypedDict, - File, - FileTypedDict, ) from .chatcontentimage import ( ChatContentImage, @@ -1592,8 +1592,11 @@ ) from .messagesbashtoolresultblock import ( MessagesBashToolResultBlock, - MessagesBashToolResultBlockType, + MessagesBashToolResultBlockFile, + MessagesBashToolResultBlockFileTypedDict, + MessagesBashToolResultBlockTypeContainerFileCitation, MessagesBashToolResultBlockTypedDict, + TypeOpenrouterBashToolResult, ) from .messagesfallbackparam import ( MessagesFallbackParam, @@ -1751,8 +1754,11 @@ ) from .messagesshelltoolresultblock import ( MessagesShellToolResultBlock, - MessagesShellToolResultBlockType, + MessagesShellToolResultBlockFile, + MessagesShellToolResultBlockFileTypedDict, + MessagesShellToolResultBlockTypeContainerFileCitation, MessagesShellToolResultBlockTypedDict, + TypeOpenrouterShellToolResult, ) from .messagestooladditionblock import ( MessagesToolAdditionBlock, @@ -2144,7 +2150,10 @@ ) from .outputbashservertoolitem import ( OutputBashServerToolItem, - OutputBashServerToolItemType, + OutputBashServerToolItemFile, + OutputBashServerToolItemFileTypedDict, + OutputBashServerToolItemTypeContainerFileCitation, + OutputBashServerToolItemTypeOpenrouterBash, OutputBashServerToolItemTypedDict, ) from .outputbrowseruseservertoolitem import ( @@ -2309,14 +2318,20 @@ ) from .outputshellcalloutputitem import ( OutputShellCallOutputItem, - OutputShellCallOutputItemType, + OutputShellCallOutputItemFile, + OutputShellCallOutputItemFileTypedDict, + OutputShellCallOutputItemTypeContainerFileCitation, + OutputShellCallOutputItemTypeShellCallOutput, OutputShellCallOutputItemTypedDict, ) from .outputshellservertoolitem import ( OutputShellServerToolItem, OutputShellServerToolItemAction, OutputShellServerToolItemActionTypedDict, - OutputShellServerToolItemType, + OutputShellServerToolItemFile, + OutputShellServerToolItemFileTypedDict, + OutputShellServerToolItemTypeContainerFileCitation, + OutputShellServerToolItemTypeOpenrouterShell, OutputShellServerToolItemTypedDict, ) from .outputsubagentservertoolitem import ( @@ -3457,6 +3472,8 @@ "ChatContentCacheControlType", "ChatContentCacheControlTypedDict", "ChatContentFile", + "ChatContentFileFile", + "ChatContentFileFileTypedDict", "ChatContentFileType", "ChatContentFileTypedDict", "ChatContentImage", @@ -3856,7 +3873,6 @@ "FailedModel", "FailedModelTypedDict", "FieldT", - "File", "FileCitation", "FileCitationType", "FileCitationTypedDict", @@ -3879,7 +3895,6 @@ "FileSearchServerToolValue1TypedDict", "FileSearchServerToolValue2", "FileSearchServerToolValue2TypedDict", - "FileTypedDict", "FilesServerTool", "FilesServerToolConfig", "FilesServerToolConfigTypedDict", @@ -4274,7 +4289,9 @@ "MessagesAdvisorToolResultBlockType", "MessagesAdvisorToolResultBlockTypedDict", "MessagesBashToolResultBlock", - "MessagesBashToolResultBlockType", + "MessagesBashToolResultBlockFile", + "MessagesBashToolResultBlockFileTypedDict", + "MessagesBashToolResultBlockTypeContainerFileCitation", "MessagesBashToolResultBlockTypedDict", "MessagesFallbackParam", "MessagesFallbackParamTypedDict", @@ -4313,7 +4330,9 @@ "MessagesSearchModelsServerToolType", "MessagesSearchModelsServerToolTypedDict", "MessagesShellToolResultBlock", - "MessagesShellToolResultBlockType", + "MessagesShellToolResultBlockFile", + "MessagesShellToolResultBlockFileTypedDict", + "MessagesShellToolResultBlockTypeContainerFileCitation", "MessagesShellToolResultBlockTypedDict", "MessagesToolAdditionBlock", "MessagesToolAdditionBlockToolMcpToolReference", @@ -4604,7 +4623,10 @@ "OutputApplyPatchServerToolItemType", "OutputApplyPatchServerToolItemTypedDict", "OutputBashServerToolItem", - "OutputBashServerToolItemType", + "OutputBashServerToolItemFile", + "OutputBashServerToolItemFileTypedDict", + "OutputBashServerToolItemTypeContainerFileCitation", + "OutputBashServerToolItemTypeOpenrouterBash", "OutputBashServerToolItemTypedDict", "OutputBrowserUseServerToolItem", "OutputBrowserUseServerToolItemType", @@ -4716,12 +4738,18 @@ "OutputShellCallItemType", "OutputShellCallItemTypedDict", "OutputShellCallOutputItem", - "OutputShellCallOutputItemType", + "OutputShellCallOutputItemFile", + "OutputShellCallOutputItemFileTypedDict", + "OutputShellCallOutputItemTypeContainerFileCitation", + "OutputShellCallOutputItemTypeShellCallOutput", "OutputShellCallOutputItemTypedDict", "OutputShellServerToolItem", "OutputShellServerToolItemAction", "OutputShellServerToolItemActionTypedDict", - "OutputShellServerToolItemType", + "OutputShellServerToolItemFile", + "OutputShellServerToolItemFileTypedDict", + "OutputShellServerToolItemTypeContainerFileCitation", + "OutputShellServerToolItemTypeOpenrouterShell", "OutputShellServerToolItemTypedDict", "OutputSubagentServerToolItem", "OutputSubagentServerToolItemType", @@ -5224,6 +5252,8 @@ "TypeLocalShellCall", "TypeNone", "TypeOpenPage", + "TypeOpenrouterBashToolResult", + "TypeOpenrouterShellToolResult", "TypeRedactedThinking", "TypeServerToolUse", "TypeTextEditor20250124", @@ -5727,10 +5757,10 @@ "ChatContentCacheControlType": ".chatcontentcachecontrol", "ChatContentCacheControlTypedDict": ".chatcontentcachecontrol", "ChatContentFile": ".chatcontentfile", + "ChatContentFileFile": ".chatcontentfile", + "ChatContentFileFileTypedDict": ".chatcontentfile", "ChatContentFileType": ".chatcontentfile", "ChatContentFileTypedDict": ".chatcontentfile", - "File": ".chatcontentfile", - "FileTypedDict": ".chatcontentfile", "ChatContentImage": ".chatcontentimage", "ChatContentImageDetail": ".chatcontentimage", "ChatContentImageImageURL": ".chatcontentimage", @@ -6548,8 +6578,11 @@ "MessagesAdvisorToolResultBlockType": ".messagesadvisortoolresultblock", "MessagesAdvisorToolResultBlockTypedDict": ".messagesadvisortoolresultblock", "MessagesBashToolResultBlock": ".messagesbashtoolresultblock", - "MessagesBashToolResultBlockType": ".messagesbashtoolresultblock", + "MessagesBashToolResultBlockFile": ".messagesbashtoolresultblock", + "MessagesBashToolResultBlockFileTypedDict": ".messagesbashtoolresultblock", + "MessagesBashToolResultBlockTypeContainerFileCitation": ".messagesbashtoolresultblock", "MessagesBashToolResultBlockTypedDict": ".messagesbashtoolresultblock", + "TypeOpenrouterBashToolResult": ".messagesbashtoolresultblock", "MessagesFallbackParam": ".messagesfallbackparam", "MessagesFallbackParamTypedDict": ".messagesfallbackparam", "ContentCompaction": ".messagesmessageparam", @@ -6695,8 +6728,11 @@ "MessagesSearchModelsServerToolType": ".messagessearchmodelsservertool", "MessagesSearchModelsServerToolTypedDict": ".messagessearchmodelsservertool", "MessagesShellToolResultBlock": ".messagesshelltoolresultblock", - "MessagesShellToolResultBlockType": ".messagesshelltoolresultblock", + "MessagesShellToolResultBlockFile": ".messagesshelltoolresultblock", + "MessagesShellToolResultBlockFileTypedDict": ".messagesshelltoolresultblock", + "MessagesShellToolResultBlockTypeContainerFileCitation": ".messagesshelltoolresultblock", "MessagesShellToolResultBlockTypedDict": ".messagesshelltoolresultblock", + "TypeOpenrouterShellToolResult": ".messagesshelltoolresultblock", "MessagesToolAdditionBlock": ".messagestooladditionblock", "MessagesToolAdditionBlockToolMcpToolReference": ".messagestooladditionblock", "MessagesToolAdditionBlockToolMcpToolReferenceTypedDict": ".messagestooladditionblock", @@ -6996,7 +7032,10 @@ "OutputApplyPatchServerToolItemType": ".outputapplypatchservertoolitem", "OutputApplyPatchServerToolItemTypedDict": ".outputapplypatchservertoolitem", "OutputBashServerToolItem": ".outputbashservertoolitem", - "OutputBashServerToolItemType": ".outputbashservertoolitem", + "OutputBashServerToolItemFile": ".outputbashservertoolitem", + "OutputBashServerToolItemFileTypedDict": ".outputbashservertoolitem", + "OutputBashServerToolItemTypeContainerFileCitation": ".outputbashservertoolitem", + "OutputBashServerToolItemTypeOpenrouterBash": ".outputbashservertoolitem", "OutputBashServerToolItemTypedDict": ".outputbashservertoolitem", "OutputBrowserUseServerToolItem": ".outputbrowseruseservertoolitem", "OutputBrowserUseServerToolItemType": ".outputbrowseruseservertoolitem", @@ -7119,12 +7158,18 @@ "OutputShellCallItemType": ".outputshellcallitem", "OutputShellCallItemTypedDict": ".outputshellcallitem", "OutputShellCallOutputItem": ".outputshellcalloutputitem", - "OutputShellCallOutputItemType": ".outputshellcalloutputitem", + "OutputShellCallOutputItemFile": ".outputshellcalloutputitem", + "OutputShellCallOutputItemFileTypedDict": ".outputshellcalloutputitem", + "OutputShellCallOutputItemTypeContainerFileCitation": ".outputshellcalloutputitem", + "OutputShellCallOutputItemTypeShellCallOutput": ".outputshellcalloutputitem", "OutputShellCallOutputItemTypedDict": ".outputshellcalloutputitem", "OutputShellServerToolItem": ".outputshellservertoolitem", "OutputShellServerToolItemAction": ".outputshellservertoolitem", "OutputShellServerToolItemActionTypedDict": ".outputshellservertoolitem", - "OutputShellServerToolItemType": ".outputshellservertoolitem", + "OutputShellServerToolItemFile": ".outputshellservertoolitem", + "OutputShellServerToolItemFileTypedDict": ".outputshellservertoolitem", + "OutputShellServerToolItemTypeContainerFileCitation": ".outputshellservertoolitem", + "OutputShellServerToolItemTypeOpenrouterShell": ".outputshellservertoolitem", "OutputShellServerToolItemTypedDict": ".outputshellservertoolitem", "OutputSubagentServerToolItem": ".outputsubagentservertoolitem", "OutputSubagentServerToolItemType": ".outputsubagentservertoolitem", diff --git a/src/openrouter/components/chatcontentfile.py b/src/openrouter/components/chatcontentfile.py index 07d3d043..0d6f482a 100644 --- a/src/openrouter/components/chatcontentfile.py +++ b/src/openrouter/components/chatcontentfile.py @@ -7,7 +7,7 @@ from typing_extensions import NotRequired, TypedDict -class FileTypedDict(TypedDict): +class ChatContentFileFileTypedDict(TypedDict): file_data: NotRequired[str] r"""File content as base64 data URL or URL""" file_id: NotRequired[str] @@ -16,7 +16,7 @@ class FileTypedDict(TypedDict): r"""Original filename""" -class File(BaseModel): +class ChatContentFileFile(BaseModel): file_data: Optional[str] = None r"""File content as base64 data URL or URL""" @@ -49,13 +49,13 @@ def serialize_model(self, handler): class ChatContentFileTypedDict(TypedDict): r"""File content part for document processing""" - file: FileTypedDict + file: ChatContentFileFileTypedDict type: ChatContentFileType class ChatContentFile(BaseModel): r"""File content part for document processing""" - file: File + file: ChatContentFileFile type: ChatContentFileType diff --git a/src/openrouter/components/containerfile.py b/src/openrouter/components/containerfile.py index ea5d9eb4..f9011f64 100644 --- a/src/openrouter/components/containerfile.py +++ b/src/openrouter/components/containerfile.py @@ -18,14 +18,14 @@ class ContainerFileTypedDict(TypedDict): bytes_: int r"""File size in bytes.""" container_id: str - r"""The container the file belongs to — echoes the `session_id` path parameter (OpenAI field name).""" + r"""The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name).""" created_at: int r"""Unix timestamp (seconds) when the file was last synced.""" id: str r"""Container file id: `cfile_` + base64url of the file path.""" object: ContainerFileObject path: str - r"""Session-relative file path inside the container.""" + r"""Container-relative file path.""" source: ContainerFileSource r"""Container files are always produced by the assistant sandbox.""" @@ -35,7 +35,7 @@ class ContainerFile(BaseModel): r"""File size in bytes.""" container_id: str - r"""The container the file belongs to — echoes the `session_id` path parameter (OpenAI field name).""" + r"""The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name).""" created_at: int r"""Unix timestamp (seconds) when the file was last synced.""" @@ -46,7 +46,7 @@ class ContainerFile(BaseModel): object: ContainerFileObject path: str - r"""Session-relative file path inside the container.""" + r"""Container-relative file path.""" source: ContainerFileSource r"""Container files are always produced by the assistant sandbox.""" diff --git a/src/openrouter/components/containerreferenceenvironment.py b/src/openrouter/components/containerreferenceenvironment.py index 30240faf..4a9d2ebe 100644 --- a/src/openrouter/components/containerreferenceenvironment.py +++ b/src/openrouter/components/containerreferenceenvironment.py @@ -10,17 +10,17 @@ class ContainerReferenceEnvironmentTypedDict(TypedDict): - r"""Reference to a previously created container to reuse.""" + r"""Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.""" container_id: str - r"""Identifier of an existing container to reuse (max 20 characters).""" + r"""Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace.""" type: ContainerReferenceEnvironmentType class ContainerReferenceEnvironment(BaseModel): - r"""Reference to a previously created container to reuse.""" + r"""Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.""" container_id: str - r"""Identifier of an existing container to reuse (max 20 characters).""" + r"""Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace.""" type: ContainerReferenceEnvironmentType diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py index df51270a..150d3821 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -393,8 +393,8 @@ def serialize_model(self, handler): OutputWebSearchServerToolItemTypedDict, OutputApplyPatchServerToolItemTypedDict, McpApprovalResponseItemTypedDict, - McpListToolsItemTypedDict, LocalShellCallItemTypedDict, + McpListToolsItemTypedDict, OutputDatetimeItemTypedDict, OutputWebSearchCallItemTypedDict, McpApprovalRequestItemTypedDict, @@ -409,26 +409,26 @@ def serialize_model(self, handler): OutputCustomToolCallItemTypedDict, OutputMemoryServerToolItemTypedDict, InputsMessageTypedDict, - ShellCallOutputItemTypedDict, OutputComputerCallItemTypedDict, + ShellCallOutputItemTypedDict, CustomToolCallItemTypedDict, McpCallItemTypedDict, + ShellCallItemTypedDict, AgentMessageItemTypedDict, - OutputShellServerToolItemTypedDict, OutputCodeInterpreterCallItemTypedDict, - ShellCallItemTypedDict, OutputAdvisorServerToolItemTypedDict, InputsReasoningTypedDict, OutputWebFetchServerToolItemTypedDict, ReasoningItemTypedDict, OutputImageGenerationServerToolItemTypedDict, OutputCodeInterpreterServerToolItemTypedDict, + OutputShellServerToolItemTypedDict, OutputFusionServerToolItemTypedDict, OutputFunctionCallItemTypedDict, - OutputBashServerToolItemTypedDict, FunctionCallItemTypedDict, OutputFilesServerToolItemTypedDict, OutputSubagentServerToolItemTypedDict, + OutputBashServerToolItemTypedDict, ], ) @@ -450,8 +450,8 @@ def serialize_model(self, handler): OutputWebSearchServerToolItem, OutputApplyPatchServerToolItem, McpApprovalResponseItem, - McpListToolsItem, LocalShellCallItem, + McpListToolsItem, OutputDatetimeItem, OutputWebSearchCallItem, McpApprovalRequestItem, @@ -466,26 +466,26 @@ def serialize_model(self, handler): OutputCustomToolCallItem, OutputMemoryServerToolItem, InputsMessage, - ShellCallOutputItem, OutputComputerCallItem, + ShellCallOutputItem, CustomToolCallItem, McpCallItem, + ShellCallItem, AgentMessageItem, - OutputShellServerToolItem, OutputCodeInterpreterCallItem, - ShellCallItem, OutputAdvisorServerToolItem, InputsReasoning, OutputWebFetchServerToolItem, ReasoningItem, OutputImageGenerationServerToolItem, OutputCodeInterpreterServerToolItem, + OutputShellServerToolItem, OutputFusionServerToolItem, OutputFunctionCallItem, - OutputBashServerToolItem, FunctionCallItem, OutputFilesServerToolItem, OutputSubagentServerToolItem, + OutputBashServerToolItem, ], ) diff --git a/src/openrouter/components/messagesbashtoolresultblock.py b/src/openrouter/components/messagesbashtoolresultblock.py index edc95f48..23d014f0 100644 --- a/src/openrouter/components/messagesbashtoolresultblock.py +++ b/src/openrouter/components/messagesbashtoolresultblock.py @@ -1,12 +1,41 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.types import BaseModel -from typing import Any, Dict, Literal -from typing_extensions import TypedDict +from openrouter.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict, List, Literal, Optional +from typing_extensions import NotRequired, TypedDict -MessagesBashToolResultBlockType = Literal["openrouter_bash_tool_result",] +MessagesBashToolResultBlockTypeContainerFileCitation = Literal[ + "container_file_citation", +] + + +class MessagesBashToolResultBlockFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: MessagesBashToolResultBlockTypeContainerFileCitation + + +class MessagesBashToolResultBlockFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: MessagesBashToolResultBlockTypeContainerFileCitation + + +TypeOpenrouterBashToolResult = Literal["openrouter_bash_tool_result",] class MessagesBashToolResultBlockTypedDict(TypedDict): @@ -14,7 +43,11 @@ class MessagesBashToolResultBlockTypedDict(TypedDict): content: Dict[str, Any] tool_use_id: str - type: MessagesBashToolResultBlockType + type: TypeOpenrouterBashToolResult + container_id: NotRequired[str] + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + files: NotRequired[List[MessagesBashToolResultBlockFileTypedDict]] + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" class MessagesBashToolResultBlock(BaseModel): @@ -24,4 +57,26 @@ class MessagesBashToolResultBlock(BaseModel): tool_use_id: str - type: MessagesBashToolResultBlockType + type: TypeOpenrouterBashToolResult + + container_id: Optional[str] = None + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + + files: Optional[List[MessagesBashToolResultBlockFile]] = None + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["container_id", "files"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/openrouter/components/messagesmessageparam.py b/src/openrouter/components/messagesmessageparam.py index e7d23e1a..95b63021 100644 --- a/src/openrouter/components/messagesmessageparam.py +++ b/src/openrouter/components/messagesmessageparam.py @@ -393,19 +393,19 @@ def serialize_model(self, handler): "MessagesMessageParamContentUnion4TypedDict", Union[ ContentRedactedThinkingTypedDict, - MessagesAdvisorToolResultBlockTypedDict, AnthropicImageBlockParamTypedDict, - MessagesBashToolResultBlockTypedDict, - MessagesShellToolResultBlockTypedDict, MessagesToolRemovalBlockTypedDict, - ContentThinkingTypedDict, MessagesToolAdditionBlockTypedDict, + MessagesAdvisorToolResultBlockTypedDict, + ContentThinkingTypedDict, ContentWebSearchToolResultTypedDict, - ContentCompactionTypedDict, AnthropicTextBlockParamTypedDict, + ContentCompactionTypedDict, ContentServerToolUseTypedDict, ContentToolResultTypedDict, ContentToolUseTypedDict, + MessagesShellToolResultBlockTypedDict, + MessagesBashToolResultBlockTypedDict, AnthropicSearchResultBlockParamTypedDict, AnthropicDocumentBlockParamTypedDict, ], diff --git a/src/openrouter/components/messagesshelltoolresultblock.py b/src/openrouter/components/messagesshelltoolresultblock.py index 9cb0636d..d228d763 100644 --- a/src/openrouter/components/messagesshelltoolresultblock.py +++ b/src/openrouter/components/messagesshelltoolresultblock.py @@ -1,12 +1,41 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from openrouter.types import BaseModel -from typing import Any, Dict, Literal -from typing_extensions import TypedDict +from openrouter.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict, List, Literal, Optional +from typing_extensions import NotRequired, TypedDict -MessagesShellToolResultBlockType = Literal["openrouter_shell_tool_result",] +MessagesShellToolResultBlockTypeContainerFileCitation = Literal[ + "container_file_citation", +] + + +class MessagesShellToolResultBlockFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: MessagesShellToolResultBlockTypeContainerFileCitation + + +class MessagesShellToolResultBlockFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: MessagesShellToolResultBlockTypeContainerFileCitation + + +TypeOpenrouterShellToolResult = Literal["openrouter_shell_tool_result",] class MessagesShellToolResultBlockTypedDict(TypedDict): @@ -14,7 +43,11 @@ class MessagesShellToolResultBlockTypedDict(TypedDict): content: Dict[str, Any] tool_use_id: str - type: MessagesShellToolResultBlockType + type: TypeOpenrouterShellToolResult + container_id: NotRequired[str] + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + files: NotRequired[List[MessagesShellToolResultBlockFileTypedDict]] + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" class MessagesShellToolResultBlock(BaseModel): @@ -24,4 +57,26 @@ class MessagesShellToolResultBlock(BaseModel): tool_use_id: str - type: MessagesShellToolResultBlockType + type: TypeOpenrouterShellToolResult + + container_id: Optional[str] = None + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + + files: Optional[List[MessagesShellToolResultBlockFile]] = None + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["container_id", "files"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/openrouter/components/outputbashservertoolitem.py b/src/openrouter/components/outputbashservertoolitem.py index 58a109b4..3a5673e3 100644 --- a/src/openrouter/components/outputbashservertoolitem.py +++ b/src/openrouter/components/outputbashservertoolitem.py @@ -11,24 +11,54 @@ ) import pydantic from pydantic import model_serializer -from typing import Literal, Optional +from typing import List, Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict -OutputBashServerToolItemType = Literal["openrouter:bash",] +OutputBashServerToolItemTypeContainerFileCitation = Literal["container_file_citation",] + + +class OutputBashServerToolItemFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: OutputBashServerToolItemTypeContainerFileCitation + + +class OutputBashServerToolItemFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: OutputBashServerToolItemTypeContainerFileCitation + + +OutputBashServerToolItemTypeOpenrouterBash = Literal["openrouter:bash",] class OutputBashServerToolItemTypedDict(TypedDict): r"""An openrouter:bash server tool output item""" status: ToolCallStatus - type: OutputBashServerToolItemType + type: OutputBashServerToolItemTypeOpenrouterBash arguments: NotRequired[Nullable[str]] r"""The raw tool-call arguments string as emitted by the model.""" call_id: NotRequired[Nullable[str]] r"""The model-generated tool call id from the originating turn.""" command: NotRequired[str] + container_id: NotRequired[str] + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" exit_code: NotRequired[int] + files: NotRequired[List[OutputBashServerToolItemFileTypedDict]] + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" id: NotRequired[str] stderr: NotRequired[str] stdout: NotRequired[str] @@ -39,7 +69,7 @@ class OutputBashServerToolItem(BaseModel): status: ToolCallStatus - type: OutputBashServerToolItemType + type: OutputBashServerToolItemTypeOpenrouterBash arguments: OptionalNullable[str] = UNSET r"""The raw tool-call arguments string as emitted by the model.""" @@ -49,8 +79,14 @@ class OutputBashServerToolItem(BaseModel): command: Optional[str] = None + container_id: Optional[str] = None + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + exit_code: Annotated[Optional[int], pydantic.Field(alias="exitCode")] = None + files: Optional[List[OutputBashServerToolItemFile]] = None + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" + id: Optional[str] = None stderr: Optional[str] = None @@ -60,7 +96,17 @@ class OutputBashServerToolItem(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["arguments", "call_id", "command", "exitCode", "id", "stderr", "stdout"] + [ + "arguments", + "call_id", + "command", + "container_id", + "exitCode", + "files", + "id", + "stderr", + "stdout", + ] ) nullable_fields = set(["arguments", "call_id"]) serialized = handler(self) diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py index fe6ee4f1..04dbfe6d 100644 --- a/src/openrouter/components/outputitems.py +++ b/src/openrouter/components/outputitems.py @@ -129,32 +129,32 @@ OutputToolSearchServerToolItemTypedDict, OutputFileSearchServerToolItemTypedDict, OutputWebSearchServerToolItemTypedDict, - OutputMcpServerToolItemTypedDict, + OutputDatetimeItemTypedDict, OutputBrowserUseServerToolItemTypedDict, OutputApplyPatchCallItemTypedDict, OutputApplyPatchServerToolItemTypedDict, - OutputDatetimeItemTypedDict, + OutputImageGenerationCallItemTypedDict, OutputWebSearchCallItemTypedDict, - OutputTextEditorServerToolItemTypedDict, + OutputMcpServerToolItemTypedDict, OutputSearchModelsServerToolItemTypedDict, - OutputImageGenerationCallItemTypedDict, - OutputMemoryServerToolItemTypedDict, - OutputCustomToolCallItemTypedDict, + OutputTextEditorServerToolItemTypedDict, OutputMessageItemTypedDict, + OutputCustomToolCallItemTypedDict, + OutputMemoryServerToolItemTypedDict, OutputComputerCallItemTypedDict, OutputShellCallItemTypedDict, - OutputShellCallOutputItemTypedDict, OutputCodeInterpreterCallItemTypedDict, - OutputShellServerToolItemTypedDict, OutputWebFetchServerToolItemTypedDict, + OutputShellCallOutputItemTypedDict, OutputImageGenerationServerToolItemTypedDict, OutputCodeInterpreterServerToolItemTypedDict, OutputAdvisorServerToolItemTypedDict, OutputReasoningItemTypedDict, - OutputBashServerToolItemTypedDict, + OutputShellServerToolItemTypedDict, OutputFunctionCallItemTypedDict, OutputFusionServerToolItemTypedDict, OutputFilesServerToolItemTypedDict, + OutputBashServerToolItemTypedDict, OutputSubagentServerToolItemTypedDict, ], ) diff --git a/src/openrouter/components/outputshellcalloutputitem.py b/src/openrouter/components/outputshellcalloutputitem.py index 40507fc7..b8e130ee 100644 --- a/src/openrouter/components/outputshellcalloutputitem.py +++ b/src/openrouter/components/outputshellcalloutputitem.py @@ -14,11 +14,37 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Literal +from typing import List, Literal, Optional from typing_extensions import NotRequired, TypedDict -OutputShellCallOutputItemType = Literal["shell_call_output",] +OutputShellCallOutputItemTypeContainerFileCitation = Literal["container_file_citation",] + + +class OutputShellCallOutputItemFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: OutputShellCallOutputItemTypeContainerFileCitation + + +class OutputShellCallOutputItemFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: OutputShellCallOutputItemTypeContainerFileCitation + + +OutputShellCallOutputItemTypeShellCallOutput = Literal["shell_call_output",] class OutputShellCallOutputItemTypedDict(TypedDict): @@ -29,7 +55,11 @@ class OutputShellCallOutputItemTypedDict(TypedDict): output: List[ShellCallOutputContentTypedDict] status: ShellCallStatus r"""Status of a shell call or its output.""" - type: OutputShellCallOutputItemType + type: OutputShellCallOutputItemTypeShellCallOutput + container_id: NotRequired[str] + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + files: NotRequired[List[OutputShellCallOutputItemFileTypedDict]] + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" max_output_length: NotRequired[Nullable[int]] @@ -45,13 +75,19 @@ class OutputShellCallOutputItem(BaseModel): status: ShellCallStatus r"""Status of a shell call or its output.""" - type: OutputShellCallOutputItemType + type: OutputShellCallOutputItemTypeShellCallOutput + + container_id: Optional[str] = None + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + + files: Optional[List[OutputShellCallOutputItemFile]] = None + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" max_output_length: OptionalNullable[int] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["max_output_length"]) + optional_fields = set(["container_id", "files", "max_output_length"]) nullable_fields = set(["max_output_length"]) serialized = handler(self) m = {} diff --git a/src/openrouter/components/outputshellservertoolitem.py b/src/openrouter/components/outputshellservertoolitem.py index 16e5a50c..bcd24666 100644 --- a/src/openrouter/components/outputshellservertoolitem.py +++ b/src/openrouter/components/outputshellservertoolitem.py @@ -57,19 +57,49 @@ def serialize_model(self, handler): return m -OutputShellServerToolItemType = Literal["openrouter:shell",] +OutputShellServerToolItemTypeContainerFileCitation = Literal["container_file_citation",] + + +class OutputShellServerToolItemFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: OutputShellServerToolItemTypeContainerFileCitation + + +class OutputShellServerToolItemFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: OutputShellServerToolItemTypeContainerFileCitation + + +OutputShellServerToolItemTypeOpenrouterShell = Literal["openrouter:shell",] class OutputShellServerToolItemTypedDict(TypedDict): r"""An openrouter:shell server tool output item""" status: ToolCallStatus - type: OutputShellServerToolItemType + type: OutputShellServerToolItemTypeOpenrouterShell action: NotRequired[OutputShellServerToolItemActionTypedDict] arguments: NotRequired[Nullable[str]] r"""The raw tool-call arguments string as emitted by the model.""" call_id: NotRequired[Nullable[str]] r"""The model-generated tool call id from the originating turn.""" + container_id: NotRequired[str] + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + files: NotRequired[List[OutputShellServerToolItemFileTypedDict]] + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" id: NotRequired[str] output: NotRequired[List[ShellCallOutputContentTypedDict]] @@ -79,7 +109,7 @@ class OutputShellServerToolItem(BaseModel): status: ToolCallStatus - type: OutputShellServerToolItemType + type: OutputShellServerToolItemTypeOpenrouterShell action: Optional[OutputShellServerToolItemAction] = None @@ -89,13 +119,21 @@ class OutputShellServerToolItem(BaseModel): call_id: OptionalNullable[str] = UNSET r"""The model-generated tool call id from the originating turn.""" + container_id: Optional[str] = None + r"""The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.""" + + files: Optional[List[OutputShellServerToolItemFile]] = None + r"""Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.""" + id: Optional[str] = None output: Optional[List[ShellCallOutputContent]] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["action", "arguments", "call_id", "id", "output"]) + optional_fields = set( + ["action", "arguments", "call_id", "container_id", "files", "id", "output"] + ) nullable_fields = set(["arguments", "call_id"]) serialized = handler(self) m = {} diff --git a/src/openrouter/containers.py b/src/openrouter/containers.py index e6907e07..d26eef63 100644 --- a/src/openrouter/containers.py +++ b/src/openrouter/containers.py @@ -16,7 +16,7 @@ class Containers(BaseSDK): def list_container_files( self, *, - session_id: str, + container_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, @@ -29,9 +29,9 @@ def list_container_files( ) -> components.ContainerFileListResponse: r"""List container files - Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. + Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -60,14 +60,14 @@ def list_container_files( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, limit=limit, after=after, ) req = self._build_request( method="GET", - path="/containers/{session_id}/files", + path="/containers/{container_id}/files", base_url=base_url, url_variables=url_variables, request=request, @@ -167,7 +167,7 @@ def list_container_files( async def list_container_files_async( self, *, - session_id: str, + container_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, @@ -180,9 +180,9 @@ async def list_container_files_async( ) -> components.ContainerFileListResponse: r"""List container files - Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. + Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -211,14 +211,14 @@ async def list_container_files_async( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, limit=limit, after=after, ) req = self._build_request_async( method="GET", - path="/containers/{session_id}/files", + path="/containers/{container_id}/files", base_url=base_url, url_variables=url_variables, request=request, @@ -318,7 +318,7 @@ async def list_container_files_async( def get_container_file( self, *, - session_id: str, + container_id: str, file_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, @@ -330,9 +330,9 @@ def get_container_file( ) -> components.ContainerFile: r"""Retrieve a container file - Returns the metadata of a single file under a sandbox session prefix. + Returns the metadata of a single file in a container. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param file_id: Container file id (`cfile_` + base64url of the file path). :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -360,13 +360,13 @@ def get_container_file( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, file_id=file_id, ) req = self._build_request( method="GET", - path="/containers/{session_id}/files/{file_id}", + path="/containers/{container_id}/files/{file_id}", base_url=base_url, url_variables=url_variables, request=request, @@ -469,7 +469,7 @@ def get_container_file( async def get_container_file_async( self, *, - session_id: str, + container_id: str, file_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, @@ -481,9 +481,9 @@ async def get_container_file_async( ) -> components.ContainerFile: r"""Retrieve a container file - Returns the metadata of a single file under a sandbox session prefix. + Returns the metadata of a single file in a container. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param file_id: Container file id (`cfile_` + base64url of the file path). :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -511,13 +511,13 @@ async def get_container_file_async( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, file_id=file_id, ) req = self._build_request_async( method="GET", - path="/containers/{session_id}/files/{file_id}", + path="/containers/{container_id}/files/{file_id}", base_url=base_url, url_variables=url_variables, request=request, @@ -620,7 +620,7 @@ async def get_container_file_async( def download_container_file_content( self, *, - session_id: str, + container_id: str, file_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, @@ -632,9 +632,9 @@ def download_container_file_content( ) -> httpx.Response: r"""Download container file content - Streams the raw bytes of a file under a sandbox session prefix. + Streams the raw bytes of a file in a container. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param file_id: Container file id (`cfile_` + base64url of the file path). :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -662,13 +662,13 @@ def download_container_file_content( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, file_id=file_id, ) req = self._build_request( method="GET", - path="/containers/{session_id}/files/{file_id}/content", + path="/containers/{container_id}/files/{file_id}/content", base_url=base_url, url_variables=url_variables, request=request, @@ -790,7 +790,7 @@ def download_container_file_content( async def download_container_file_content_async( self, *, - session_id: str, + container_id: str, file_id: str, http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, @@ -802,9 +802,9 @@ async def download_container_file_content_async( ) -> httpx.Response: r"""Download container file content - Streams the raw bytes of a file under a sandbox session prefix. + Streams the raw bytes of a file in a container. - :param session_id: The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id. + :param container_id: The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent. :param file_id: Container file id (`cfile_` + base64url of the file path). :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -832,13 +832,13 @@ async def download_container_file_content_async( http_referer=http_referer, x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, - session_id=session_id, + container_id=container_id, file_id=file_id, ) req = self._build_request_async( method="GET", - path="/containers/{session_id}/files/{file_id}/content", + path="/containers/{container_id}/files/{file_id}/content", base_url=base_url, url_variables=url_variables, request=request, diff --git a/src/openrouter/operations/downloadcontainerfilecontent.py b/src/openrouter/operations/downloadcontainerfilecontent.py index ca3b009c..c0c31d78 100644 --- a/src/openrouter/operations/downloadcontainerfilecontent.py +++ b/src/openrouter/operations/downloadcontainerfilecontent.py @@ -74,8 +74,8 @@ def serialize_model(self, handler): class DownloadContainerFileContentRequestTypedDict(TypedDict): - session_id: str - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + container_id: str + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" file_id: str r"""Container file id (`cfile_` + base64url of the file path).""" http_referer: NotRequired[str] @@ -94,10 +94,10 @@ class DownloadContainerFileContentRequestTypedDict(TypedDict): class DownloadContainerFileContentRequest(BaseModel): - session_id: Annotated[ + container_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" file_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) diff --git a/src/openrouter/operations/getcontainerfile.py b/src/openrouter/operations/getcontainerfile.py index 953ef093..2457627b 100644 --- a/src/openrouter/operations/getcontainerfile.py +++ b/src/openrouter/operations/getcontainerfile.py @@ -74,8 +74,8 @@ def serialize_model(self, handler): class GetContainerFileRequestTypedDict(TypedDict): - session_id: str - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + container_id: str + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" file_id: str r"""Container file id (`cfile_` + base64url of the file path).""" http_referer: NotRequired[str] @@ -94,10 +94,10 @@ class GetContainerFileRequestTypedDict(TypedDict): class GetContainerFileRequest(BaseModel): - session_id: Annotated[ + container_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" file_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) diff --git a/src/openrouter/operations/listcontainerfiles.py b/src/openrouter/operations/listcontainerfiles.py index 9aff2f12..07682b2f 100644 --- a/src/openrouter/operations/listcontainerfiles.py +++ b/src/openrouter/operations/listcontainerfiles.py @@ -79,8 +79,8 @@ def serialize_model(self, handler): class ListContainerFilesRequestTypedDict(TypedDict): - session_id: str - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + container_id: str + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" http_referer: NotRequired[str] r"""The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application. @@ -101,10 +101,10 @@ class ListContainerFilesRequestTypedDict(TypedDict): class ListContainerFilesRequest(BaseModel): - session_id: Annotated[ + container_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - r"""The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.""" + r"""The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.""" http_referer: Annotated[ Optional[str], diff --git a/uv.lock b/uv.lock index df512212..553872d2 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.75" +version = "1.1.76" source = { editable = "." } dependencies = [ { name = "httpcore" },