diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4c3b457b..1c66a4b2 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: b32bef3109d51525efbbb750a22334cf + docChecksum: db5d524cd6a9068f0a4bd5adeba1bc2e docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.149 - configChecksum: 7bf826ad018ebcad3019cdf23933b7cb + releaseVersion: 1.1.150 + configChecksum: 8d0e1c2689c6b0fd4c00356d8784fe49 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: b18b0456-94cf-4dea-b8d2-8633e32dc7b4 - pristine_commit_hash: 6ab48e324e12298942a39cb079dcf66e4d0f9274 - pristine_tree_hash: f95688c8539ef9e6b108958d704ae2023d1c197d + generation_id: 4c389b20-bef3-48df-ad1b-3d4261978b3a + pristine_commit_hash: 5d417a3851d2696141d9f1db7dba59e69a764aa9 + pristine_tree_hash: 414995b1e076706db54e5e00a8454de384d0b260 features: python: acceptHeaders: 3.0.0 @@ -3918,8 +3918,8 @@ trackedFiles: pristine_git_object: ad79a325e74efc6cc08ad7ffc794cecd0e7eaa15 docs/components/outputbashservertoolitem.mdx: id: c17c44c991b5 - last_write_checksum: sha1:65baf7afddeaabb578df6ae8406d8f0326ef2c7e - pristine_git_object: 6ff6c14ce85629b46168629812a835ec517aea03 + last_write_checksum: sha1:cb74822abd8d623dbbd0baf12ab86b59d2f410f3 + pristine_git_object: 30a101b0ad9316a3416cbd1a2d9ea07696e6a028 docs/components/outputbashservertoolitemfile.mdx: id: 537681b5270f last_write_checksum: sha1:3faf3a55cd42f4d71ad977dcccf657763954f6d8 @@ -4242,8 +4242,8 @@ trackedFiles: pristine_git_object: 6e25f4cdd42f706845c834921a44a7198a09c2f3 docs/components/outputshellcalloutputitem.mdx: id: 2ce46fbb594f - last_write_checksum: sha1:c373870ee2998807367558586b2132926b61b45d - pristine_git_object: 4dde43d162f95d8778284257d8114b09980f5866 + last_write_checksum: sha1:e4a96fcf842b391e5e1e909043753b03046d09b2 + pristine_git_object: eb07476e34e86a7334feb208a4b34e6e5fcbd341 docs/components/outputshellcalloutputitemfile.mdx: id: 8e0e3a901867 last_write_checksum: sha1:f431a7f969c50f1b07943b578a3f13838d008444 @@ -4258,8 +4258,8 @@ trackedFiles: pristine_git_object: 2bfc5b85b0a0962d951930f1fd22bf3fb230750a docs/components/outputshellservertoolitem.mdx: id: d505095331df - last_write_checksum: sha1:27326dbaf7c83e737c10ff8a44ce8e19a0ac45c8 - pristine_git_object: 8452882aeb372cbca64ac88bc782be8ef466c34e + last_write_checksum: sha1:71cace000593bc949cb921b4bd3639e1280e3d31 + pristine_git_object: 0f0bbc33c75daba21e026822e64f1aa492dedfb2 docs/components/outputshellservertoolitemaction.mdx: id: 0f70af617523 last_write_checksum: sha1:77a1972b2435a12de88ac334bf73996a8277cac8 @@ -5026,8 +5026,8 @@ trackedFiles: pristine_git_object: 9aaa17fdf863725e77de2784a601626d0b82b7e0 docs/components/shellcalloutputitem.mdx: id: 3c692a7914b0 - last_write_checksum: sha1:981b180bd9743e32d3ba6e7d9cca4689d34565fd - pristine_git_object: 1e371836e23aa846ec9bfc0fecb19f06c6e705d7 + last_write_checksum: sha1:86651eecde4a76e5fb5783f1d9baf582d528a3ba + pristine_git_object: 05e53b1f66894e53700fc3e290ab26a3d0fbd524 docs/components/shellcalloutputitemfile.mdx: id: 729e48f10ec2 last_write_checksum: sha1:3ec7900022eab43f94f0afb7ba5bf8b43f55d370 @@ -7682,8 +7682,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:94a4fe94f9740931a09fb58b45416899b34d22f4 - pristine_git_object: 8b944528c888b3463c504fbfa79ef6abf204e217 + last_write_checksum: sha1:eb66ac7a0551fa632c5ca51153500eb0cb86e1ca + pristine_git_object: e2a708b87dd461387349f470f1b1107b345625e3 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7710,8 +7710,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:9507638df62443fff01b387213413255fa382672 - pristine_git_object: 2fbe0307c9d9c9614a9b906fa6ff3b3400c73103 + last_write_checksum: sha1:377f12b3bd5ffc075397d13fa3cc4219e5f17d60 + pristine_git_object: 3c41bc331eba1901a0d1c2289b732c809e5b16a7 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9 @@ -8962,8 +8962,8 @@ trackedFiles: pristine_git_object: f499cbbb546232f5cfbfe2c44fb41aefb306c87f src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:e20ff2a681f1111a77f409a80efbdb660acc79b7 - pristine_git_object: c27e4719f3ebcad14d2b9c82b94b8fc7f5dcfabc + last_write_checksum: sha1:2a0e9f681cd64913508e9cad82d2755eeb56cbca + pristine_git_object: 2bcad7f1f7081532ec62490519361777717fcc20 src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:2da9ff645acc96772701908830151c5a707ed021 @@ -9402,8 +9402,8 @@ trackedFiles: pristine_git_object: 919f2bb6ec91d62dcb223c15e2a25d2830b75ac9 src/openrouter/components/outputbashservertoolitem.py: id: 39d03767e214 - last_write_checksum: sha1:fc21a24c4c97caedbd794f053754bdde5045d402 - pristine_git_object: 3a5673e35129f474981659ef4f57625214d6f218 + last_write_checksum: sha1:4be4f57d65fc6954087c0fee1ccc22c8813084a0 + pristine_git_object: 3ae659f9f8c224b6459d778ada584e3f0f93b8cf src/openrouter/components/outputbrowseruseservertoolitem.py: id: 73bff94d7284 last_write_checksum: sha1:6835f17b73a909e8a49ce9ba1257d43c62eeb690 @@ -9462,8 +9462,8 @@ trackedFiles: pristine_git_object: 94af810bbdb87fb8c6800645354f7ec4dd067e7f src/openrouter/components/outputitems.py: id: 90f107de3116 - last_write_checksum: sha1:675d4501502721513ac4120e49878c055ea9065b - pristine_git_object: 3f80ccbb4e4a40ceb43ec6627f6417658750b756 + last_write_checksum: sha1:600acf9bb535c3568f9aa3e63c4e3a11f13c152c + pristine_git_object: b66de81d533aabb08ee0fc31ca2653fc59773bf2 src/openrouter/components/outputmcpservertoolitem.py: id: bb8c2536a58e last_write_checksum: sha1:28d33c9226ff4ce6871457fa1fae384b590f676c @@ -9502,12 +9502,12 @@ trackedFiles: pristine_git_object: 23aa9caf8b965f08e7e4acbe6a2e7830b89e3661 src/openrouter/components/outputshellcalloutputitem.py: id: 9962f4d291a9 - last_write_checksum: sha1:4cd139e1adb507afda92a8c783b8946f3e902212 - pristine_git_object: b8e130eea920c82ce6b147e264b6728cb8939959 + last_write_checksum: sha1:5356b8577865ed1e03f68e5fe9b863ea5a9d2392 + pristine_git_object: ca8a31a9a0f3b30757f6db8b28a0e34c5bd4b12e src/openrouter/components/outputshellservertoolitem.py: id: 3c1670e937ec - last_write_checksum: sha1:bf69e5714feee1957679c9be52c43013171c10f8 - pristine_git_object: bcd24666288f0cf369bc527b56df261d65d94ccf + last_write_checksum: sha1:8214004a78d6f23153f3c821ec4090bb6cf19ab6 + pristine_git_object: cd5026bf5413728bd5ee7792cc21a3fac846cda3 src/openrouter/components/outputsubagentservertoolitem.py: id: 7480e835aa08 last_write_checksum: sha1:6588b208a06fc0e1485c7952636b81bd28d04234 @@ -9882,8 +9882,8 @@ trackedFiles: pristine_git_object: 14d6df7ad9970385355b7c1d6752a270a8aa267b src/openrouter/components/shellcalloutputitem.py: id: 54409ebc9cdd - last_write_checksum: sha1:448ad68e1048026538d6603921a93374b3502814 - pristine_git_object: da1edfc54f0b1469f900ecffe77a6d844184533a + last_write_checksum: sha1:fe0ded309336531c31b91d2eedb9a6f9e698bc85 + pristine_git_object: 3dcca3f2d67ea47533f4e7cced98acae1b97dc53 src/openrouter/components/shellcallstatus.py: id: 3627230aad33 last_write_checksum: sha1:c026c8544f66c0ae9bdfa83b9d63502ee8f2907d @@ -12954,6 +12954,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.api_keys.get_current_key_metadata()`: `response.data.allowed_data_regions` **Added** +releaseNotes: "## Python SDK Changes:\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 b2ae7790..5700d0b1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.149 + version: 1.1.150 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 64a0db6b..8bb0de49 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -19349,6 +19349,9 @@ components: 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' + error: + description: 'The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: ''failed''`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure.' + type: 'string' exitCode: type: 'integer' files: @@ -19381,7 +19384,7 @@ components: id: type: 'string' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/FailableToolCallStatus' stderr: type: 'string' stdout: @@ -20585,7 +20588,7 @@ components: - 'status' type: 'object' OutputShellCallOutputItem: - description: 'A native `shell_call_output` item matching OpenAI''s Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.' + description: 'A native `shell_call_output` item matching OpenAI''s Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. A sandbox failure terminates the item as `incomplete` with `error` set.' example: call_id: 'call_abc123' id: 'sho_abc123' @@ -20603,6 +20606,9 @@ components: 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' + error: + description: 'The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: ''incomplete''` and an empty `output`; absent on a successful call.' + 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: @@ -20702,6 +20708,9 @@ components: 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' + error: + description: 'The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: ''failed''`; absent on a successful call. `output` is omitted when `error` is set.' + 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: @@ -20736,7 +20745,7 @@ components: $ref: '#/components/schemas/ShellCallOutputContent' type: 'array' status: - $ref: '#/components/schemas/ToolCallStatus' + $ref: '#/components/schemas/FailableToolCallStatus' type: enum: - 'openrouter:shell' @@ -24441,6 +24450,9 @@ components: 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' + error: + description: 'The error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission.' + 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: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index e42d549a..1c33ceab 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:a209927f7afd47c4f3d37916b9cb671f31128ef87f9162f1ace1b17ae7309a78 - sourceBlobDigest: sha256:07340d1e62f97a817461b6a8cb7d047dbca41926eb04b76a167492ac0dd36721 + sourceRevisionDigest: sha256:6ebcc679e84169af93fbe05f2d6314d4eedf46a65be547e2d8d8a6698c8392e7 + sourceBlobDigest: sha256:9aa47ddffc027bad6317842403deb6dd83cc76f0b5912c72b50b416b0d8fabc3 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:a209927f7afd47c4f3d37916b9cb671f31128ef87f9162f1ace1b17ae7309a78 - sourceBlobDigest: sha256:07340d1e62f97a817461b6a8cb7d047dbca41926eb04b76a167492ac0dd36721 + sourceRevisionDigest: sha256:6ebcc679e84169af93fbe05f2d6314d4eedf46a65be547e2d8d8a6698c8392e7 + sourceBlobDigest: sha256:9aa47ddffc027bad6317842403deb6dd83cc76f0b5912c72b50b416b0d8fabc3 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:38c22b3915cac11303f22f5de6ba74baccc294a9947b678f42b78d2222ef529c + codeSamplesRevisionDigest: sha256:0a646d375bf04645af361c6a6efa54ac7787ebe41ee5c512bc08dee7c6c808db workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 51730865..9f0eac12 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2279,4 +2279,14 @@ Based on: ### Generated - [python v1.1.149] . ### Releases -- [PyPI v1.1.149] https://pypi.org/project/openrouter/1.1.149 - . \ No newline at end of file +- [PyPI v1.1.149] https://pypi.org/project/openrouter/1.1.149 - . + +## 2026-09-16 16:51:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.150] . +### Releases +- [PyPI v1.1.150] https://pypi.org/project/openrouter/1.1.150 - . \ No newline at end of file diff --git a/docs/components/outputbashservertoolitem.mdx b/docs/components/outputbashservertoolitem.mdx index 6ff6c14c..30a101b0 100644 --- a/docs/components/outputbashservertoolitem.mdx +++ b/docs/components/outputbashservertoolitem.mdx @@ -7,16 +7,17 @@ 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 | | -| `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 +| 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. | | +| `error` | *Optional[str]* | :heavy_minus_sign: | The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure. | | +| `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.FailableToolCallStatus](../components/failabletoolcallstatus.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/outputshellcalloutputitem.mdx b/docs/components/outputshellcalloutputitem.mdx index 4dde43d1..eb07476e 100644 --- a/docs/components/outputshellcalloutputitem.mdx +++ b/docs/components/outputshellcalloutputitem.mdx @@ -2,7 +2,7 @@ title: "OutputShellCallOutputItem" --- -A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. +A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. A sandbox failure terminates the item as `incomplete` with `error` set. ## Fields @@ -11,6 +11,7 @@ A native `shell_call_output` item matching OpenAI's Responses API shape. Carries | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | | +| `error` | *Optional[str]* | :heavy_minus_sign: | The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'incomplete'` and an empty `output`; absent on a successful call. | | | `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 | | diff --git a/docs/components/outputshellservertoolitem.mdx b/docs/components/outputshellservertoolitem.mdx index 8452882a..0f0bbc33 100644 --- a/docs/components/outputshellservertoolitem.mdx +++ b/docs/components/outputshellservertoolitem.mdx @@ -7,14 +7,15 @@ 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. | | -| `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 +| 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. | | +| `error` | *Optional[str]* | :heavy_minus_sign: | The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. `output` is omitted when `error` is set. | | +| `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.FailableToolCallStatus](../components/failabletoolcallstatus.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/shellcalloutputitem.mdx b/docs/components/shellcalloutputitem.mdx index 1e371836..05e53b1f 100644 --- a/docs/components/shellcalloutputitem.mdx +++ b/docs/components/shellcalloutputitem.mdx @@ -11,6 +11,7 @@ Output from a shell command execution (newer variant) | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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. | | +| `error` | *Optional[str]* | :heavy_minus_sign: | The error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission. | | | `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 | | diff --git a/pyproject.toml b/pyproject.toml index 8b944528..e2a708b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.149" +version = "1.1.150" 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 2fbe0307..3c41bc33 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.149" +__version__: str = "1.1.150" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.149 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.150 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py index c27e4719..2bcad7f1 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -411,25 +411,25 @@ def serialize_model(self, handler): LocalShellCallItemTypedDict, OutputSearchModelsServerToolItemTypedDict, OutputMcpServerToolItemTypedDict, - OutputComputerCallItemTypedDict, InputsMessageTypedDict, + OutputComputerCallItemTypedDict, OutputMemoryServerToolItemTypedDict, - ShellCallItemTypedDict, - AgentMessageItemTypedDict, McpCallItemTypedDict, + AgentMessageItemTypedDict, OutputCodeInterpreterCallItemTypedDict, - CustomToolCallItemTypedDict, + ShellCallItemTypedDict, OutputAdvisorServerToolItemTypedDict, OutputWebFetchServerToolItemTypedDict, - ShellCallOutputItemTypedDict, - ReasoningItemTypedDict, - OutputCustomToolCallItemTypedDict, - OutputCodeInterpreterServerToolItemTypedDict, OutputImageGenerationServerToolItemTypedDict, + OutputCodeInterpreterServerToolItemTypedDict, + ReasoningItemTypedDict, InputsReasoningTypedDict, - OutputShellServerToolItemTypedDict, + CustomToolCallItemTypedDict, + OutputCustomToolCallItemTypedDict, + ShellCallOutputItemTypedDict, OutputFusionServerToolItemTypedDict, OutputFunctionCallItemTypedDict, + OutputShellServerToolItemTypedDict, OutputFilesServerToolItemTypedDict, FunctionCallItemTypedDict, OutputSubagentServerToolItemTypedDict, @@ -469,25 +469,25 @@ def serialize_model(self, handler): LocalShellCallItem, OutputSearchModelsServerToolItem, OutputMcpServerToolItem, - OutputComputerCallItem, InputsMessage, + OutputComputerCallItem, OutputMemoryServerToolItem, - ShellCallItem, - AgentMessageItem, McpCallItem, + AgentMessageItem, OutputCodeInterpreterCallItem, - CustomToolCallItem, + ShellCallItem, OutputAdvisorServerToolItem, OutputWebFetchServerToolItem, - ShellCallOutputItem, - ReasoningItem, - OutputCustomToolCallItem, - OutputCodeInterpreterServerToolItem, OutputImageGenerationServerToolItem, + OutputCodeInterpreterServerToolItem, + ReasoningItem, InputsReasoning, - OutputShellServerToolItem, + CustomToolCallItem, + OutputCustomToolCallItem, + ShellCallOutputItem, OutputFusionServerToolItem, OutputFunctionCallItem, + OutputShellServerToolItem, OutputFilesServerToolItem, FunctionCallItem, OutputSubagentServerToolItem, diff --git a/src/openrouter/components/outputbashservertoolitem.py b/src/openrouter/components/outputbashservertoolitem.py index 3a5673e3..3ae659f9 100644 --- a/src/openrouter/components/outputbashservertoolitem.py +++ b/src/openrouter/components/outputbashservertoolitem.py @@ -1,7 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .toolcallstatus import ToolCallStatus +from .failabletoolcallstatus import FailableToolCallStatus from openrouter.types import ( BaseModel, Nullable, @@ -47,7 +47,7 @@ class OutputBashServerToolItemFile(BaseModel): class OutputBashServerToolItemTypedDict(TypedDict): r"""An openrouter:bash server tool output item""" - status: ToolCallStatus + status: FailableToolCallStatus type: OutputBashServerToolItemTypeOpenrouterBash arguments: NotRequired[Nullable[str]] r"""The raw tool-call arguments string as emitted by the model.""" @@ -56,6 +56,8 @@ class OutputBashServerToolItemTypedDict(TypedDict): 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.""" + error: NotRequired[str] + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure.""" 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.""" @@ -67,7 +69,7 @@ class OutputBashServerToolItemTypedDict(TypedDict): class OutputBashServerToolItem(BaseModel): r"""An openrouter:bash server tool output item""" - status: ToolCallStatus + status: FailableToolCallStatus type: OutputBashServerToolItemTypeOpenrouterBash @@ -82,6 +84,9 @@ class OutputBashServerToolItem(BaseModel): 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.""" + error: Optional[str] = None + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure.""" + exit_code: Annotated[Optional[int], pydantic.Field(alias="exitCode")] = None files: Optional[List[OutputBashServerToolItemFile]] = None @@ -101,6 +106,7 @@ def serialize_model(self, handler): "call_id", "command", "container_id", + "error", "exitCode", "files", "id", diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py index 3f80ccbb..b66de81d 100644 --- a/src/openrouter/components/outputitems.py +++ b/src/openrouter/components/outputitems.py @@ -144,18 +144,18 @@ OutputComputerCallItemTypedDict, OutputCodeInterpreterCallItemTypedDict, OutputWebFetchServerToolItemTypedDict, - OutputShellCallOutputItemTypedDict, OutputImageGenerationServerToolItemTypedDict, OutputCodeInterpreterServerToolItemTypedDict, OutputReasoningItemTypedDict, OutputAdvisorServerToolItemTypedDict, OutputCustomToolCallItemTypedDict, - OutputShellServerToolItemTypedDict, + OutputShellCallOutputItemTypedDict, OutputFusionServerToolItemTypedDict, + OutputShellServerToolItemTypedDict, OutputFunctionCallItemTypedDict, OutputFilesServerToolItemTypedDict, - OutputBashServerToolItemTypedDict, OutputSubagentServerToolItemTypedDict, + OutputBashServerToolItemTypedDict, ], ) r"""An output item from the response""" diff --git a/src/openrouter/components/outputshellcalloutputitem.py b/src/openrouter/components/outputshellcalloutputitem.py index b8e130ee..ca8a31a9 100644 --- a/src/openrouter/components/outputshellcalloutputitem.py +++ b/src/openrouter/components/outputshellcalloutputitem.py @@ -48,7 +48,7 @@ class OutputShellCallOutputItemFile(BaseModel): class OutputShellCallOutputItemTypedDict(TypedDict): - r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.""" + r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. A sandbox failure terminates the item as `incomplete` with `error` set.""" call_id: str id: str @@ -58,13 +58,15 @@ class OutputShellCallOutputItemTypedDict(TypedDict): 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.""" + error: NotRequired[str] + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'incomplete'` and an empty `output`; absent on a successful call.""" 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]] class OutputShellCallOutputItem(BaseModel): - r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.""" + r"""A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. A sandbox failure terminates the item as `incomplete` with `error` set.""" call_id: str @@ -80,6 +82,9 @@ class OutputShellCallOutputItem(BaseModel): 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.""" + error: Optional[str] = None + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'incomplete'` and an empty `output`; absent on a successful call.""" + 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.""" @@ -87,7 +92,7 @@ class OutputShellCallOutputItem(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["container_id", "files", "max_output_length"]) + optional_fields = set(["container_id", "error", "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 bcd24666..cd5026bf 100644 --- a/src/openrouter/components/outputshellservertoolitem.py +++ b/src/openrouter/components/outputshellservertoolitem.py @@ -1,11 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .failabletoolcallstatus import FailableToolCallStatus from .shellcalloutputcontent import ( ShellCallOutputContent, ShellCallOutputContentTypedDict, ) -from .toolcallstatus import ToolCallStatus from openrouter.types import ( BaseModel, Nullable, @@ -89,7 +89,7 @@ class OutputShellServerToolItemFile(BaseModel): class OutputShellServerToolItemTypedDict(TypedDict): r"""An openrouter:shell server tool output item""" - status: ToolCallStatus + status: FailableToolCallStatus type: OutputShellServerToolItemTypeOpenrouterShell action: NotRequired[OutputShellServerToolItemActionTypedDict] arguments: NotRequired[Nullable[str]] @@ -98,6 +98,8 @@ class OutputShellServerToolItemTypedDict(TypedDict): 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.""" + error: NotRequired[str] + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. `output` is omitted when `error` is set.""" 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] @@ -107,7 +109,7 @@ class OutputShellServerToolItemTypedDict(TypedDict): class OutputShellServerToolItem(BaseModel): r"""An openrouter:shell server tool output item""" - status: ToolCallStatus + status: FailableToolCallStatus type: OutputShellServerToolItemTypeOpenrouterShell @@ -122,6 +124,9 @@ class OutputShellServerToolItem(BaseModel): 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.""" + error: Optional[str] = None + r"""The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. `output` is omitted when `error` is set.""" + 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.""" @@ -132,7 +137,16 @@ class OutputShellServerToolItem(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["action", "arguments", "call_id", "container_id", "files", "id", "output"] + [ + "action", + "arguments", + "call_id", + "container_id", + "error", + "files", + "id", + "output", + ] ) nullable_fields = set(["arguments", "call_id"]) serialized = handler(self) diff --git a/src/openrouter/components/shellcalloutputitem.py b/src/openrouter/components/shellcalloutputitem.py index da1edfc5..3dcca3f2 100644 --- a/src/openrouter/components/shellcalloutputitem.py +++ b/src/openrouter/components/shellcalloutputitem.py @@ -55,6 +55,8 @@ class ShellCallOutputItemTypedDict(TypedDict): 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.""" + error: NotRequired[str] + r"""The error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission.""" 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]] @@ -74,6 +76,9 @@ class ShellCallOutputItem(BaseModel): 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.""" + error: Optional[str] = None + r"""The error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission.""" + 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.""" @@ -86,7 +91,7 @@ class ShellCallOutputItem(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["container_id", "files", "id", "max_output_length", "status"] + ["container_id", "error", "files", "id", "max_output_length", "status"] ) nullable_fields = set(["id", "max_output_length", "status"]) serialized = handler(self) diff --git a/uv.lock b/uv.lock index 066d99dd..05f341b3 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.149" +version = "1.1.150" source = { editable = "." } dependencies = [ { name = "httpcore" },