From 31b90593d497c4f96ac75d596747edca8c69202a Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 26 Aug 2026 14:17:11 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.presets.create_presets_responses()`: * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed** * `open_router.responses.send()`: * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed** * `open_router.beta.responses.send()`: * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed** --- .speakeasy/gen.lock | 64 ++++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 39 ++++++++--- .speakeasy/workflow.lock | 10 +-- RELEASES.md | 12 +++- docs/components/shellcalloutputitem.mdx | 18 +++--- docs/components/shellcalloutputitemfile.mdx | 14 ++++ docs/components/shellcalloutputitemtype.mdx | 15 ----- ...alloutputitemtypecontainerfilecitation.mdx | 15 +++++ ...shellcalloutputitemtypeshellcalloutput.mdx | 15 +++++ pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- src/openrouter/components/__init__.py | 15 ++++- src/openrouter/components/inputs_union.py | 32 +++++----- .../components/shellcalloutputitem.py | 48 ++++++++++++-- src/openrouter/containers.py | 16 ++--- src/openrouter/files.py | 20 +++--- uv.lock | 2 +- 18 files changed, 229 insertions(+), 114 deletions(-) create mode 100644 docs/components/shellcalloutputitemfile.mdx delete mode 100644 docs/components/shellcalloutputitemtype.mdx create mode 100644 docs/components/shellcalloutputitemtypecontainerfilecitation.mdx create mode 100644 docs/components/shellcalloutputitemtypeshellcalloutput.mdx diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 38cf1c35..9e42df73 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: e579a3223c8c1359c9769fb563fd61c3 + docChecksum: ab563d6fdecfbe13dcf3cbc9ab8dce66 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.91 - configChecksum: f97c74418c6b0f25b75cef735e391532 + releaseVersion: 1.1.92 + configChecksum: f59a826b09f2db942e036c9a34ba0335 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 67ff633e-56a1-487c-9420-ea3dd7375e13 - pristine_commit_hash: 68e70d8b342f15b30646a7e9ca417febb262a9aa - pristine_tree_hash: b77709400a7b144f5938fb98d30357edcc29645a + generation_id: 39a42826-0421-4da3-b325-b7f5e65099ba + pristine_commit_hash: a5143520b68e571cc440d714a7e21481fd52e5f3 + pristine_tree_hash: 29251443bc728b6079719a982962da5c2761319d features: python: acceptHeaders: 3.0.0 @@ -4838,12 +4838,20 @@ trackedFiles: pristine_git_object: 9aaa17fdf863725e77de2784a601626d0b82b7e0 docs/components/shellcalloutputitem.mdx: id: 3c692a7914b0 - last_write_checksum: sha1:6ad5b5863359ce5590ee5b0c2d047d2d7b41a021 - pristine_git_object: 7dcab460c00e513357a94c4c6d87826ec3b1eeae - docs/components/shellcalloutputitemtype.mdx: - id: 13012771fc34 - last_write_checksum: sha1:0bd6909e931eeb3ab3a22dd98b9a51c67f1d0dfa - pristine_git_object: 90b55526b1a545847174a6e147f8bbe91908d22c + last_write_checksum: sha1:981b180bd9743e32d3ba6e7d9cca4689d34565fd + pristine_git_object: 1e371836e23aa846ec9bfc0fecb19f06c6e705d7 + docs/components/shellcalloutputitemfile.mdx: + id: 729e48f10ec2 + last_write_checksum: sha1:3ec7900022eab43f94f0afb7ba5bf8b43f55d370 + pristine_git_object: e4a0c69ef04713724322961960b128589dad7686 + docs/components/shellcalloutputitemtypecontainerfilecitation.mdx: + id: 30497451caaa + last_write_checksum: sha1:6b3394517d15b8978fcf83762143aa5ef212c945 + pristine_git_object: b2bfe2ed3b86eb46cf7b1ca159ec77b25ccb0643 + docs/components/shellcalloutputitemtypeshellcalloutput.mdx: + id: 84b5ee94f75a + last_write_checksum: sha1:414b1d9c65daff4d821b062153dfb0971f624f01 + pristine_git_object: 23013a06aa82af4ba594d3e425b191ffaa438ed0 docs/components/shellcallstatus.mdx: id: d5afd9396cf7 last_write_checksum: sha1:146c3774e082cd8ca9c11aa97d22ed9de7ee2091 @@ -7386,8 +7394,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:02b518a5f9d31eee3c265939cfa6ff21bf5601b4 - pristine_git_object: 22a50bd359c07f5585397a8ccf921437481d0581 + last_write_checksum: sha1:7e14ad37d06c962176aa31c9ba27b223cebc8749 + pristine_git_object: f529fcb697a958f57c89c1eb669d55cd83f5abf9 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7414,8 +7422,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:92c89eb588563dfd3419095f7c578d5bb4a9d1e6 - pristine_git_object: 815f9ec5862ec99e6f9232f7821b3ccecf1c0977 + last_write_checksum: sha1:75965dae8cfe8e510c0ca59915c9ff8c915dee17 + pristine_git_object: 083b61e7cfdbde7e41c52ac9781814d426710b0f src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9 @@ -7454,8 +7462,8 @@ trackedFiles: pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:7d0f83beca07f6a7087127d97dcb4d27477c937d - pristine_git_object: 345c915e9f71f8a2e419341cec7101dfb1e27637 + last_write_checksum: sha1:f4c4bb5c830aba7e295ae9be7f4e28b8ae53e47b + pristine_git_object: 61b6c37c4e475bd7a390cd0f701dbe9efb397ca8 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c @@ -8618,8 +8626,8 @@ trackedFiles: pristine_git_object: f499cbbb546232f5cfbfe2c44fb41aefb306c87f src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:9913cb32b518a68233f2594f03e48b0ff9828479 - pristine_git_object: 150d3821033192f2315208032019174641f9d8c4 + last_write_checksum: sha1:0e31da13dda7b0f37fcdbed717756f8a1566eda7 + pristine_git_object: 083f6eb4b45c8ec0e4376dfde81613f5b92e32eb src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:2da9ff645acc96772701908830151c5a707ed021 @@ -9502,8 +9510,8 @@ trackedFiles: pristine_git_object: 14d6df7ad9970385355b7c1d6752a270a8aa267b src/openrouter/components/shellcalloutputitem.py: id: 54409ebc9cdd - last_write_checksum: sha1:34d015222a4f280c5dc8705cacfe70afd72de940 - pristine_git_object: 91d5927aa02a6671c2f62f902ae7db8a15153f05 + last_write_checksum: sha1:448ad68e1048026538d6603921a93374b3502814 + pristine_git_object: da1edfc54f0b1469f900ecffe77a6d844184533a src/openrouter/components/shellcallstatus.py: id: 3627230aad33 last_write_checksum: sha1:c026c8544f66c0ae9bdfa83b9d63502ee8f2907d @@ -9930,8 +9938,8 @@ trackedFiles: pristine_git_object: ad78361d147d2edb7b5772c14501d9c25a2000b0 src/openrouter/containers.py: id: 5edae5db57e9 - last_write_checksum: sha1:37d4af3253f0fc119cf2414d935dc7b7cf2d9244 - pristine_git_object: 8328666b72a7f3d0c6330f02ab0268dab64070d4 + last_write_checksum: sha1:dca529a8a49b60c94d59bc497423d9c983dcee95 + pristine_git_object: 40cf9e34645544968d4c84dddc659445c6528fd2 src/openrouter/credits.py: id: cdc961937101 last_write_checksum: sha1:7ac37671d3de537eb98f15239d531e3ab3928a59 @@ -10030,8 +10038,8 @@ trackedFiles: pristine_git_object: 51b56d9ca5e27c49a98d05f0414573ac5243c580 src/openrouter/files.py: id: 7baf7ee1f5b3 - last_write_checksum: sha1:2e69503c45aa248c029db25cc4d024d73621f573 - pristine_git_object: 268e617de41c88c6393b791a4c04048de4d7ce3c + last_write_checksum: sha1:6d6eb5262308cf78e7208aea1df5866befb3c880 + pristine_git_object: 1c30715cccc28393152c3b3152d144e57ca60df1 src/openrouter/generations.py: id: 70e1c21042bc last_write_checksum: sha1:a8679c263af864e94aa0b33e6a8505e66b4c4047 @@ -12457,6 +12465,4 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.images.generate()`: `request.user` **Added** +releaseNotes: "## Python SDK Changes:\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(ShellCallOutputItem)` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5b309b55..f56b7eb7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.91 + version: 1.1.92 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 631dc12b..69f03c46 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -23343,6 +23343,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' @@ -29454,7 +29484,6 @@ paths: summary: 'List container files' tags: - 'Containers' - x-hidden: true parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -29568,7 +29597,6 @@ paths: summary: 'Retrieve a container file' tags: - 'Containers' - x-hidden: true parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -29676,7 +29704,6 @@ paths: summary: 'Download container file content' tags: - 'Containers' - x-hidden: true parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -29801,7 +29828,6 @@ paths: summary: 'Promote a container file into workspace documents' tags: - 'Containers' - x-hidden: true parameters: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" @@ -31169,7 +31195,6 @@ paths: summary: 'List files' tags: - 'Files' - x-hidden: true x-speakeasy-name-override: 'list' x-speakeasy-pagination: inputs: @@ -31312,7 +31337,6 @@ paths: summary: 'Upload a file' tags: - 'Files' - x-hidden: true x-speakeasy-name-override: 'upload' parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -31428,7 +31452,6 @@ paths: summary: 'Delete a file' tags: - 'Files' - x-hidden: true x-speakeasy-name-override: 'delete' get: description: 'Retrieves metadata for a single file owned by the requesting workspace.' @@ -31544,7 +31567,6 @@ paths: summary: 'Get file metadata' tags: - 'Files' - x-hidden: true x-speakeasy-name-override: 'retrieve' parameters: - $ref: "#/components/parameters/AppIdentifier" @@ -31669,7 +31691,6 @@ paths: summary: 'Download file content' tags: - 'Files' - x-hidden: true x-speakeasy-name-override: 'download' parameters: - $ref: "#/components/parameters/AppIdentifier" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 191265d2..9f8e2130 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:0fca4fc755e3b2a2c6dd519faeb4112c9d3fa11e550bfb1bdb17bff7a0f6916b - sourceBlobDigest: sha256:e6a89329a7ffc8e70b19f15074c725d833ebc2d48b4f175292f3848d27fe4030 + sourceRevisionDigest: sha256:4969fdcceb23a0dfc67d4bf319c25082b63b909ca33eea71e08c616e4a79a9ee + sourceBlobDigest: sha256:745e1c7162567b2cce120234dd27b2346fc2eec7cb46136efba34339444d92de tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0fca4fc755e3b2a2c6dd519faeb4112c9d3fa11e550bfb1bdb17bff7a0f6916b - sourceBlobDigest: sha256:e6a89329a7ffc8e70b19f15074c725d833ebc2d48b4f175292f3848d27fe4030 + sourceRevisionDigest: sha256:4969fdcceb23a0dfc67d4bf319c25082b63b909ca33eea71e08c616e4a79a9ee + sourceBlobDigest: sha256:745e1c7162567b2cce120234dd27b2346fc2eec7cb46136efba34339444d92de codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:1c0fdec8655eadaad225ddec51c96f6218855f0e7c11c9463e181b1d50e7c6f3 + codeSamplesRevisionDigest: sha256:59956dcd61f241a327c04454891da937342198a557e89b3875c69840a72d754a workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 2c1c2405..e34a9901 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1699,4 +1699,14 @@ Based on: ### Generated - [python v1.1.91] . ### Releases -- [PyPI v1.1.91] https://pypi.org/project/openrouter/1.1.91 - . \ No newline at end of file +- [PyPI v1.1.91] https://pypi.org/project/openrouter/1.1.91 - . + +## 2026-08-26 14:15:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.92] . +### Releases +- [PyPI v1.1.92] https://pypi.org/project/openrouter/1.1.92 - . \ No newline at end of file diff --git a/docs/components/shellcalloutputitem.mdx b/docs/components/shellcalloutputitem.mdx index 7dcab460..1e371836 100644 --- a/docs/components/shellcalloutputitem.mdx +++ b/docs/components/shellcalloutputitem.mdx @@ -7,11 +7,13 @@ Output from a shell command execution (newer variant) ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `call_id` | *str* | :heavy_check_mark: | N/A | | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | 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` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.mdx) | :heavy_minus_sign: | N/A | completed | -| `type` | [components.ShellCallOutputItemType](../components/shellcalloutputitemtype.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.ShellCallOutputItemFile](../components/shellcalloutputitemfile.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` | *OptionalNullable[str]* | :heavy_minus_sign: | 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` | [OptionalNullable[components.ToolCallStatus]](../components/toolcallstatus.mdx) | :heavy_minus_sign: | N/A | completed | +| `type` | [components.ShellCallOutputItemTypeShellCallOutput](../components/shellcalloutputitemtypeshellcalloutput.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/shellcalloutputitemfile.mdx b/docs/components/shellcalloutputitemfile.mdx new file mode 100644 index 00000000..e4a0c69e --- /dev/null +++ b/docs/components/shellcalloutputitemfile.mdx @@ -0,0 +1,14 @@ +--- +title: "ShellCallOutputItemFile" +--- + +## 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.ShellCallOutputItemTypeContainerFileCitation](../components/shellcalloutputitemtypecontainerfilecitation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/shellcalloutputitemtype.mdx b/docs/components/shellcalloutputitemtype.mdx deleted file mode 100644 index 90b55526..00000000 --- a/docs/components/shellcalloutputitemtype.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ShellCallOutputItemType" ---- - -## Example Usage - -```python -from openrouter.components import ShellCallOutputItemType -value: ShellCallOutputItemType = "shell_call_output" -``` - - -## Values - -- `"shell_call_output"` diff --git a/docs/components/shellcalloutputitemtypecontainerfilecitation.mdx b/docs/components/shellcalloutputitemtypecontainerfilecitation.mdx new file mode 100644 index 00000000..b2bfe2ed --- /dev/null +++ b/docs/components/shellcalloutputitemtypecontainerfilecitation.mdx @@ -0,0 +1,15 @@ +--- +title: "ShellCallOutputItemTypeContainerFileCitation" +--- + +## Example Usage + +```python +from openrouter.components import ShellCallOutputItemTypeContainerFileCitation +value: ShellCallOutputItemTypeContainerFileCitation = "container_file_citation" +``` + + +## Values + +- `"container_file_citation"` diff --git a/docs/components/shellcalloutputitemtypeshellcalloutput.mdx b/docs/components/shellcalloutputitemtypeshellcalloutput.mdx new file mode 100644 index 00000000..23013a06 --- /dev/null +++ b/docs/components/shellcalloutputitemtypeshellcalloutput.mdx @@ -0,0 +1,15 @@ +--- +title: "ShellCallOutputItemTypeShellCallOutput" +--- + +## Example Usage + +```python +from openrouter.components import ShellCallOutputItemTypeShellCallOutput +value: ShellCallOutputItemTypeShellCallOutput = "shell_call_output" +``` + + +## Values + +- `"shell_call_output"` diff --git a/pyproject.toml b/pyproject.toml index 22a50bd3..f529fcb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.91" +version = "1.1.92" 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 815f9ec5..083b61e7 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.91" +__version__: str = "1.1.92" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.91 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.92 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 345c915e..61b6c37c 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -2728,7 +2728,10 @@ ) from .shellcalloutputitem import ( ShellCallOutputItem, - ShellCallOutputItemType, + ShellCallOutputItemFile, + ShellCallOutputItemFileTypedDict, + ShellCallOutputItemTypeContainerFileCitation, + ShellCallOutputItemTypeShellCallOutput, ShellCallOutputItemTypedDict, ) from .shellcallstatus import ShellCallStatus @@ -5070,7 +5073,10 @@ "ShellCallOutputContent", "ShellCallOutputContentTypedDict", "ShellCallOutputItem", - "ShellCallOutputItemType", + "ShellCallOutputItemFile", + "ShellCallOutputItemFileTypedDict", + "ShellCallOutputItemTypeContainerFileCitation", + "ShellCallOutputItemTypeShellCallOutput", "ShellCallOutputItemTypedDict", "ShellCallStatus", "ShellServerTool", @@ -7479,7 +7485,10 @@ "TypeTimeout": ".shellcalloutputcontent", "UnknownOutcome": ".shellcalloutputcontent", "ShellCallOutputItem": ".shellcalloutputitem", - "ShellCallOutputItemType": ".shellcalloutputitem", + "ShellCallOutputItemFile": ".shellcalloutputitem", + "ShellCallOutputItemFileTypedDict": ".shellcalloutputitem", + "ShellCallOutputItemTypeContainerFileCitation": ".shellcalloutputitem", + "ShellCallOutputItemTypeShellCallOutput": ".shellcalloutputitem", "ShellCallOutputItemTypedDict": ".shellcalloutputitem", "ShellCallStatus": ".shellcallstatus", "ShellServerTool": ".shellservertool", diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py index 150d3821..083f6eb4 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -392,13 +392,13 @@ def serialize_model(self, handler): OutputFileSearchServerToolItemTypedDict, OutputWebSearchServerToolItemTypedDict, OutputApplyPatchServerToolItemTypedDict, - McpApprovalResponseItemTypedDict, + OutputMcpServerToolItemTypedDict, LocalShellCallItemTypedDict, McpListToolsItemTypedDict, OutputDatetimeItemTypedDict, OutputWebSearchCallItemTypedDict, McpApprovalRequestItemTypedDict, - OutputMcpServerToolItemTypedDict, + McpApprovalResponseItemTypedDict, FunctionCallOutputItemTypedDict, OutputBrowserUseServerToolItemTypedDict, ApplyPatchCallItemTypedDict, @@ -406,29 +406,29 @@ def serialize_model(self, handler): ApplyPatchCallOutputItemTypedDict, OutputImageGenerationCallItemTypedDict, OutputSearchModelsServerToolItemTypedDict, - OutputCustomToolCallItemTypedDict, OutputMemoryServerToolItemTypedDict, InputsMessageTypedDict, + OutputCustomToolCallItemTypedDict, OutputComputerCallItemTypedDict, - ShellCallOutputItemTypedDict, + ShellCallItemTypedDict, CustomToolCallItemTypedDict, McpCallItemTypedDict, - ShellCallItemTypedDict, AgentMessageItemTypedDict, OutputCodeInterpreterCallItemTypedDict, OutputAdvisorServerToolItemTypedDict, + OutputImageGenerationServerToolItemTypedDict, + ShellCallOutputItemTypedDict, InputsReasoningTypedDict, + OutputCodeInterpreterServerToolItemTypedDict, OutputWebFetchServerToolItemTypedDict, ReasoningItemTypedDict, - OutputImageGenerationServerToolItemTypedDict, - OutputCodeInterpreterServerToolItemTypedDict, OutputShellServerToolItemTypedDict, OutputFusionServerToolItemTypedDict, OutputFunctionCallItemTypedDict, FunctionCallItemTypedDict, OutputFilesServerToolItemTypedDict, - OutputSubagentServerToolItemTypedDict, OutputBashServerToolItemTypedDict, + OutputSubagentServerToolItemTypedDict, ], ) @@ -449,13 +449,13 @@ def serialize_model(self, handler): OutputFileSearchServerToolItem, OutputWebSearchServerToolItem, OutputApplyPatchServerToolItem, - McpApprovalResponseItem, + OutputMcpServerToolItem, LocalShellCallItem, McpListToolsItem, OutputDatetimeItem, OutputWebSearchCallItem, McpApprovalRequestItem, - OutputMcpServerToolItem, + McpApprovalResponseItem, FunctionCallOutputItem, OutputBrowserUseServerToolItem, ApplyPatchCallItem, @@ -463,29 +463,29 @@ def serialize_model(self, handler): ApplyPatchCallOutputItem, OutputImageGenerationCallItem, OutputSearchModelsServerToolItem, - OutputCustomToolCallItem, OutputMemoryServerToolItem, InputsMessage, + OutputCustomToolCallItem, OutputComputerCallItem, - ShellCallOutputItem, + ShellCallItem, CustomToolCallItem, McpCallItem, - ShellCallItem, AgentMessageItem, OutputCodeInterpreterCallItem, OutputAdvisorServerToolItem, + OutputImageGenerationServerToolItem, + ShellCallOutputItem, InputsReasoning, + OutputCodeInterpreterServerToolItem, OutputWebFetchServerToolItem, ReasoningItem, - OutputImageGenerationServerToolItem, - OutputCodeInterpreterServerToolItem, OutputShellServerToolItem, OutputFusionServerToolItem, OutputFunctionCallItem, FunctionCallItem, OutputFilesServerToolItem, - OutputSubagentServerToolItem, OutputBashServerToolItem, + OutputSubagentServerToolItem, ], ) diff --git a/src/openrouter/components/shellcalloutputitem.py b/src/openrouter/components/shellcalloutputitem.py index 91d5927a..da1edfc5 100644 --- a/src/openrouter/components/shellcalloutputitem.py +++ b/src/openrouter/components/shellcalloutputitem.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 -ShellCallOutputItemType = Literal["shell_call_output",] +ShellCallOutputItemTypeContainerFileCitation = Literal["container_file_citation",] + + +class ShellCallOutputItemFileTypedDict(TypedDict): + container_id: str + end_index: int + file_id: str + filename: str + start_index: int + type: ShellCallOutputItemTypeContainerFileCitation + + +class ShellCallOutputItemFile(BaseModel): + container_id: str + + end_index: int + + file_id: str + + filename: str + + start_index: int + + type: ShellCallOutputItemTypeContainerFileCitation + + +ShellCallOutputItemTypeShellCallOutput = Literal["shell_call_output",] class ShellCallOutputItemTypedDict(TypedDict): @@ -26,7 +52,11 @@ class ShellCallOutputItemTypedDict(TypedDict): call_id: str output: List[ShellCallOutputContentTypedDict] - type: ShellCallOutputItemType + type: ShellCallOutputItemTypeShellCallOutput + 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[ShellCallOutputItemFileTypedDict]] + 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[Nullable[str]] max_output_length: NotRequired[Nullable[int]] status: NotRequired[Nullable[ToolCallStatus]] @@ -39,7 +69,13 @@ class ShellCallOutputItem(BaseModel): output: List[ShellCallOutputContent] - type: ShellCallOutputItemType + type: ShellCallOutputItemTypeShellCallOutput + + 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[ShellCallOutputItemFile]] = 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: OptionalNullable[str] = UNSET @@ -49,7 +85,9 @@ class ShellCallOutputItem(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["id", "max_output_length", "status"]) + optional_fields = set( + ["container_id", "files", "id", "max_output_length", "status"] + ) nullable_fields = set(["id", "max_output_length", "status"]) serialized = handler(self) m = {} diff --git a/src/openrouter/containers.py b/src/openrouter/containers.py index 8328666b..40cf9e34 100644 --- a/src/openrouter/containers.py +++ b/src/openrouter/containers.py @@ -109,7 +109,7 @@ def list_container_files( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -260,7 +260,7 @@ async def list_container_files_async( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -408,7 +408,7 @@ def get_container_file( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -559,7 +559,7 @@ async def get_container_file_async( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -710,7 +710,7 @@ def download_container_file_content( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -880,7 +880,7 @@ async def download_container_file_content_async( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1050,7 +1050,7 @@ def promote_container_file( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1206,7 +1206,7 @@ async def promote_container_file_async( self.sdk_configuration.security, components.Security ), tags=["Containers"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/src/openrouter/files.py b/src/openrouter/files.py index 268e617d..1c30715c 100644 --- a/src/openrouter/files.py +++ b/src/openrouter/files.py @@ -125,7 +125,7 @@ def list( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -330,7 +330,7 @@ async def list_async( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -532,7 +532,7 @@ def upload( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -700,7 +700,7 @@ async def upload_async( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -859,7 +859,7 @@ def delete( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1013,7 +1013,7 @@ async def delete_async( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1167,7 +1167,7 @@ def retrieve( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1321,7 +1321,7 @@ async def retrieve_async( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1475,7 +1475,7 @@ def download( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), @@ -1654,7 +1654,7 @@ async def download_async( self.sdk_configuration.security, components.Security ), tags=["Files"], - extensions={"x-hidden": True}, + extensions=None, ), request=req, is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), diff --git a/uv.lock b/uv.lock index 40e5e7a7..cb1a33e7 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.91" +version = "1.1.92" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 6c253c0bc56bfc301e30394b781ed0b3ef6df4f3 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:17:20 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow