From 0fad2b22b12f150ab6bca29d33449a222385551a Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 26 Aug 2026 18:00:11 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.workspaces.delete()`: `request.confirm_default_workspace_deletion` **Added** --- .speakeasy/gen.lock | 39 +++++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 13 +++++++ .speakeasy/workflow.lock | 10 ++--- RELEASES.md | 12 +++++- docs/operations/deleteworkspacerequest.mdx | 13 ++++--- docs/sdks/workspaces/README.mdx | 15 ++++---- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- src/openrouter/operations/deleteworkspace.py | 22 ++++++++++- src/openrouter/workspaces.py | 6 +++ uv.lock | 2 +- 12 files changed, 96 insertions(+), 44 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8d5a4bb4..7acbbaef 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: 122db02bec7df15e85fc7562309e1d18 + docChecksum: f11d4c6cfe6b949e42b529edb05667b0 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.93 - configChecksum: 44b673603f1c475e839a1ed96a7784ca + releaseVersion: 1.1.94 + configChecksum: e1964393fe995aca63d38b9b8193505f repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: ea8e808b-cf7f-41b4-b274-0076065fc509 - pristine_commit_hash: c10ce5c071b9ba0c6d4bb0316f476e7ddd472a23 - pristine_tree_hash: fb3dcc0b69261d3e06a37def2016d08a5021ce03 + generation_id: 94b6e956-9153-4519-825b-12fbe9b5d850 + pristine_commit_hash: 1a1e80aa381e4c1499ef7200c5577fe2a533c58c + pristine_tree_hash: 92e09dd3e70b247f154a446c5636945505470b36 features: python: acceptHeaders: 3.0.0 @@ -6290,8 +6290,8 @@ trackedFiles: pristine_git_object: c7f6f46cb7fe3707737c51c7a1ddb435be7fec2b docs/operations/deleteworkspacerequest.mdx: id: 189f48e44c13 - last_write_checksum: sha1:c70339065b01a136e26e797e4778d36a535b91ed - pristine_git_object: ba1a6161de90b0ebcb0ce62f3a95deeb7b4f1e2a + last_write_checksum: sha1:dc9261d541b9429f0ad2b777445cfe3622512a90 + pristine_git_object: abd7fdefd9f3457b348ae8d829e7ea12887324df docs/operations/dimension.mdx: id: b487fdd43b73 last_write_checksum: sha1:eb74d7de28b0132eb9599a10b080291e8f81d4c0 @@ -7386,16 +7386,16 @@ trackedFiles: pristine_git_object: b8a724406e6cacb0ecfef890499e727808961000 docs/sdks/workspaces/README.mdx: id: 0c75d023ef6b - last_write_checksum: sha1:bd87783f3d54c5768bc47ba24bc10578b7ec39c3 - pristine_git_object: b97ae9d4fac980f1cab1db19c725ace8427b8e73 + last_write_checksum: sha1:ecfd85b34b7a3a24d10e2ac68938691d51c7dc25 + pristine_git_object: 494f903b621e626ef442ff83e4a8429692bf9c8c py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:e7f11b810acb218711005c3f6409383f2fcf0b96 - pristine_git_object: 2d003e3ce8333bf350fecd15592bfa86f9628065 + last_write_checksum: sha1:a14b28971dbef730b045cf72430d0da880797884 + pristine_git_object: d193f2266b13fc9b7c8a267907ee9f3b6a698389 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7422,8 +7422,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:10dccc3c5bc5c98686e3aa678aa1397dba476515 - pristine_git_object: 463fdf3f3d4f49c574d923700e2012c794090b7e + last_write_checksum: sha1:d16a90b3e1c53710e485d1c7e4dada80d4e8e626 + pristine_git_object: 300b51f04628eea29e5f666a30480f08d9e3ea85 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9 @@ -10206,8 +10206,8 @@ trackedFiles: pristine_git_object: fec5503fa15f0f9588686f364f2066bf55f3ea80 src/openrouter/operations/deleteworkspace.py: id: f92017ce65e8 - last_write_checksum: sha1:4ed5d02547fd400d801117e13ae108f6256fc591 - pristine_git_object: b27b1bcfab51efa2b5c42021ad5580b6cec06204 + last_write_checksum: sha1:17f00e42bab5a0356a1057f53f6840a3bd3685d2 + pristine_git_object: fbf3afd13c0aeeafadfc74be69707bab452cd9fe src/openrouter/operations/deleteworkspacebudget.py: id: 4043f35925db last_write_checksum: sha1:1b6fd5acfd6b53525c8dcff26148535d5acf0401 @@ -10622,8 +10622,8 @@ trackedFiles: pristine_git_object: d7a5997d75ebb156d61342c8cf55c00cee9e210d src/openrouter/workspaces.py: id: cd6c533b1802 - last_write_checksum: sha1:d816715530601b9de1e76a19cbfe689d7f7f2b75 - pristine_git_object: b7d4b4cb83068c1d53ca7391ad157d3dc955a657 + last_write_checksum: sha1:14ad98e8707e3e75185794b9a2f341ebc40b11c8 + pristine_git_object: 938fb55cbb131faf999457b1a8db936cac10c3b7 examples: createResponses: speakeasy-default-create-responses: @@ -12465,3 +12465,6 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 +releaseNotes: | + ## Python SDK Changes: + * `open_router.workspaces.delete()`: `request.confirm_default_workspace_deletion` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4b1ffcd0..507f12ac 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.93 + version: 1.1.94 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index bafb48f9..134732c7 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -39609,6 +39609,19 @@ paths: example: 'production' minLength: 1 type: 'string' + - description: 'Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.' + in: 'query' + name: 'confirm_default_workspace_deletion' + required: false + schema: + description: 'Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.' + enum: + - 'true' + - 'false' + example: 'false' + type: 'boolean' + x-openrouter-type: 'boolean' + x-speakeasy-unknown-values: allow responses: '200': content: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 188d385f..6a139004 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:3eef799c2f73ae373c9a2a72160190132f88e3939d983e57140f5d33fc611aa5 - sourceBlobDigest: sha256:b0f485494548fc18e35e59f3180cb21383b01816a867de4eed19342e00580414 + sourceRevisionDigest: sha256:c16b1ce6fe1fa8d7b52e656632d19c67875cdbcac0791174edf90b6100ebb5a4 + sourceBlobDigest: sha256:dd75ae1de777182fde22eb21575f530568ee0474066656902d079eb2a4694e04 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:3eef799c2f73ae373c9a2a72160190132f88e3939d983e57140f5d33fc611aa5 - sourceBlobDigest: sha256:b0f485494548fc18e35e59f3180cb21383b01816a867de4eed19342e00580414 + sourceRevisionDigest: sha256:c16b1ce6fe1fa8d7b52e656632d19c67875cdbcac0791174edf90b6100ebb5a4 + sourceBlobDigest: sha256:dd75ae1de777182fde22eb21575f530568ee0474066656902d079eb2a4694e04 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:7994cd38d2a3a7e3a6fc1e547eeaaec2109599dddb991fa7a9655fbe7d02b98a + codeSamplesRevisionDigest: sha256:06086592ea8fde432508fdaabc31303e3d6c5e3e5988ef75b373dd87443cc484 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index b46e9f05..f68b96a5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1719,4 +1719,14 @@ Based on: ### Generated - [python v1.1.93] . ### Releases -- [PyPI v1.1.93] https://pypi.org/project/openrouter/1.1.93 - . \ No newline at end of file +- [PyPI v1.1.93] https://pypi.org/project/openrouter/1.1.93 - . + +## 2026-08-26 17:58:09 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.94] . +### Releases +- [PyPI v1.1.94] https://pypi.org/project/openrouter/1.1.94 - . \ No newline at end of file diff --git a/docs/operations/deleteworkspacerequest.mdx b/docs/operations/deleteworkspacerequest.mdx index ba1a6161..abd7fdef 100644 --- a/docs/operations/deleteworkspacerequest.mdx +++ b/docs/operations/deleteworkspacerequest.mdx @@ -4,9 +4,10 @@ title: "DeleteWorkspaceRequest" ## 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.
| | -| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production | \ 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.
| | +| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production | +| `confirm_default_workspace_deletion` | *Optional[bool]* | :heavy_minus_sign: | Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces. | false | \ No newline at end of file diff --git a/docs/sdks/workspaces/README.mdx b/docs/sdks/workspaces/README.mdx index b97ae9d4..494f903b 100644 --- a/docs/sdks/workspaces/README.mdx +++ b/docs/sdks/workspaces/README.mdx @@ -158,13 +158,14 @@ with OpenRouter( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production | -| `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 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The workspace ID (UUID) or slug | production | +| `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.
| | +| `confirm_default_workspace_deletion` | *Optional[bool]* | :heavy_minus_sign: | Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces. | false | +| `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 2d003e3c..d193f226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.93" +version = "1.1.94" 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 463fdf3f..300b51f0 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.93" +__version__: str = "1.1.94" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.93 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.94 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/operations/deleteworkspace.py b/src/openrouter/operations/deleteworkspace.py index b27b1bcf..fbf3afd1 100644 --- a/src/openrouter/operations/deleteworkspace.py +++ b/src/openrouter/operations/deleteworkspace.py @@ -2,7 +2,12 @@ from __future__ import annotations from openrouter.types import BaseModel, UNSET_SENTINEL -from openrouter.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +from openrouter.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) import pydantic from pydantic import model_serializer from typing import Optional @@ -89,6 +94,8 @@ class DeleteWorkspaceRequestTypedDict(TypedDict): r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. """ + confirm_default_workspace_deletion: NotRequired[bool] + r"""Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.""" class DeleteWorkspaceRequest(BaseModel): @@ -125,10 +132,21 @@ class DeleteWorkspaceRequest(BaseModel): """ + confirm_default_workspace_deletion: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories"] + [ + "HTTP-Referer", + "X-OpenRouter-Title", + "X-OpenRouter-Categories", + "confirm_default_workspace_deletion", + ] ) serialized = handler(self) m = {} diff --git a/src/openrouter/workspaces.py b/src/openrouter/workspaces.py index b7d4b4cb..938fb55c 100644 --- a/src/openrouter/workspaces.py +++ b/src/openrouter/workspaces.py @@ -687,6 +687,7 @@ def delete( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + confirm_default_workspace_deletion: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -704,6 +705,7 @@ def delete( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param confirm_default_workspace_deletion: Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -724,6 +726,7 @@ def delete( x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, id=id, + confirm_default_workspace_deletion=confirm_default_workspace_deletion, ) req = self._build_request( @@ -825,6 +828,7 @@ async def delete_async( http_referer: Optional[str] = None, x_open_router_title: Optional[str] = None, x_open_router_categories: Optional[str] = None, + confirm_default_workspace_deletion: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -842,6 +846,7 @@ async def delete_async( :param x_open_router_categories: Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings. + :param confirm_default_workspace_deletion: Required to delete the default workspace. Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -862,6 +867,7 @@ async def delete_async( x_open_router_title=x_open_router_title, x_open_router_categories=x_open_router_categories, id=id, + confirm_default_workspace_deletion=confirm_default_workspace_deletion, ) req = self._build_request_async( diff --git a/uv.lock b/uv.lock index 2010ecb8..8c4082b6 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.93" +version = "1.1.94" source = { editable = "." } dependencies = [ { name = "httpcore" }, From cc065e9e67c7e3c0bd2ac6f21d4455f59992b826 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:00:19 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow