diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c1109989..260182f2 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: de45ec3d05629f0ee5c14f9985e9d2f3 + docChecksum: 0e4089c3ee0487407460fb15d2de8cb2 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.48 - configChecksum: f29569ee6a6d978ffa9c88376fb6a627 + releaseVersion: 1.1.49 + configChecksum: b6fa1bdede75022d704e0eed5a39d54f repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 6c917133-20b9-4379-a293-08ba3fd0cd87 - pristine_commit_hash: 03bc2bc3c6bbff018dde3977d9c8d9f6de23a53f - pristine_tree_hash: 650c68749f114493ae1060ee575875c157d494a6 + generation_id: 5f71a04f-f018-4a06-bd14-0802c3e597a1 + pristine_commit_hash: f744573be1b70bf1fe63c71c9fa4cd90e604b54d + pristine_tree_hash: 1dae52a10738aa268bc2d9c1b5381825d92c338d features: python: acceptHeaders: 3.0.0 @@ -6142,8 +6142,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:4f9b53b1fa46519f53e9559223533692c8de4480 + pristine_git_object: cc9d4416873fe746dd63f2832af6ecb256170975 docs/operations/dimension.mdx: id: b487fdd43b73 last_write_checksum: sha1:eb74d7de28b0132eb9599a10b080291e8f81d4c0 @@ -7190,16 +7190,16 @@ trackedFiles: pristine_git_object: 3ea6c23aa5715eac2c8d2e0a3d385cbaf12ad979 docs/sdks/workspaces/README.mdx: id: 0c75d023ef6b - last_write_checksum: sha1:7c5a7d137506704b9afa3d0b93323c0998df5cda - pristine_git_object: 9a25256ed9125277444c2d762415eab9a430f1c6 + last_write_checksum: sha1:647c33858f05da6d34f3bfabe1b72cacc2a307ae + pristine_git_object: 4e623ef27c5a49e8175c4862a56b07dc8af369e9 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:451d551ba79b7e7e69014f0fab5cd800f3f6c728 - pristine_git_object: 05aaf122207fd17364eaac5ab567b2fd9b8665d0 + last_write_checksum: sha1:f2dfd308858eaad1971f10de6edcdd91d672d0f3 + pristine_git_object: 8feb96e7c3197e4d02defc99c811ebe12dc01ce3 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7226,8 +7226,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:e863da2adeb266b6e4cea5abb0be36304ffc3925 - pristine_git_object: 07752096775a210757357863f9960628572d9952 + last_write_checksum: sha1:7712e65eb5296def159efebc89fa565db4e4d77a + pristine_git_object: 9c36c309cc613438f636181b3e07ff9f527d77b8 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:3ea0f1c73fb9c101b7bc5719da4dd7bf62ff469a @@ -9970,8 +9970,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:16e1162c55855645fad2a3a06549bd77eddb3a6c + pristine_git_object: d6003d891c2a894880ea3e1262c665cebe9434dc src/openrouter/operations/deleteworkspacebudget.py: id: 4043f35925db last_write_checksum: sha1:1b6fd5acfd6b53525c8dcff26148535d5acf0401 @@ -10366,8 +10366,8 @@ trackedFiles: pristine_git_object: 34a2f1e5eb9526f692341b5efa393b2b58fb7a57 src/openrouter/workspaces.py: id: cd6c533b1802 - last_write_checksum: sha1:273ca910cf9ea52419cfc681410fbf00b47adbd8 - pristine_git_object: d302cb5a478a949511c6de8bbf4260a3d0cfd536 + last_write_checksum: sha1:71305961ecafbe8abace45f9c734da6e583e599b + pristine_git_object: bd71763eb04430ae68f6dab0a45d64a2f7515f71 examples: createResponses: speakeasy-default-create-responses: @@ -12084,4 +12084,4 @@ examples: examplesVersion: 1.0.2 releaseNotes: | ## Python SDK Changes: - * `open_router.models.list()`: `request.region` **Changed** + * `open_router.workspaces.delete()`: `request.confirm_default_settings_deletion` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b97dc70e..5e98c0a0 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.48 + version: 1.1.49 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 8629e22e..ed82a15a 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -38208,7 +38208,7 @@ paths: - $ref: "#/components/parameters/AppCategories" /workspaces/{id}: delete: - description: 'Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'deleteWorkspace' parameters: - description: 'The workspace ID (UUID) or slug' @@ -38220,6 +38220,19 @@ paths: example: 'production' minLength: 1 type: 'string' + - description: 'Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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_settings_deletion' + required: false + schema: + description: 'Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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 504b2de4..6114cd67 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:ee0873fba86a92da10ea118772666f49f2ac91a4ef4ca243616fbe16937b3306 - sourceBlobDigest: sha256:3ecd4350bed468122b29e34887de6823569ed281c01d34e2d056b06399ce2eb4 + sourceRevisionDigest: sha256:a68f0ac37d057a36bc53f9fdb997d966a6e32a8254c2f77476265dc5e4a46678 + sourceBlobDigest: sha256:55f0c37a738f069ca8c2327e71ed1eeed0df0d3041d5d4e059d0dc80961cd8c3 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:ee0873fba86a92da10ea118772666f49f2ac91a4ef4ca243616fbe16937b3306 - sourceBlobDigest: sha256:3ecd4350bed468122b29e34887de6823569ed281c01d34e2d056b06399ce2eb4 + sourceRevisionDigest: sha256:a68f0ac37d057a36bc53f9fdb997d966a6e32a8254c2f77476265dc5e4a46678 + sourceBlobDigest: sha256:55f0c37a738f069ca8c2327e71ed1eeed0df0d3041d5d4e059d0dc80961cd8c3 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:33e889aae8ffe6b3f22610e5bf04e55e8b4868a22a606acfa280186afc671925 + codeSamplesRevisionDigest: sha256:9a756237d69d864f6b8d2df77cd51d19d9442fe75ce096bdc8ad791e8d1868c9 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index b40527b0..f6a16964 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1269,4 +1269,14 @@ Based on: ### Generated - [python v1.1.48] . ### Releases -- [PyPI v1.1.48] https://pypi.org/project/openrouter/1.1.48 - . \ No newline at end of file +- [PyPI v1.1.48] https://pypi.org/project/openrouter/1.1.48 - . + +## 2026-08-12 18:48:29 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.49] . +### Releases +- [PyPI v1.1.49] https://pypi.org/project/openrouter/1.1.49 - . \ No newline at end of file diff --git a/docs/operations/deleteworkspacerequest.mdx b/docs/operations/deleteworkspacerequest.mdx index ba1a6161..cc9d4416 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_settings_deletion` | *Optional[bool]* | :heavy_minus_sign: | Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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 9a25256e..4e623ef2 100644 --- a/docs/sdks/workspaces/README.mdx +++ b/docs/sdks/workspaces/README.mdx @@ -133,7 +133,7 @@ with OpenRouter( ## delete -Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage @@ -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_settings_deletion` | *Optional[bool]* | :heavy_minus_sign: | Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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 05aaf122..8feb96e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.48" +version = "1.1.49" 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 07752096..9c36c309 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.48" +__version__: str = "1.1.49" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.48 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.49 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..d6003d89 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_settings_deletion: NotRequired[bool] + r"""Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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_settings_deletion: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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_settings_deletion", + ] ) serialized = handler(self) m = {} diff --git a/src/openrouter/workspaces.py b/src/openrouter/workspaces.py index d302cb5a..bd71763e 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_settings_deletion: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -694,7 +695,7 @@ def delete( ) -> components.DeleteWorkspaceResponse: r"""Delete a workspace - Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required. + Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required. :param id: The workspace ID (UUID) or slug :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -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_settings_deletion: Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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_settings_deletion=confirm_default_settings_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_settings_deletion: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -832,7 +836,7 @@ async def delete_async( ) -> components.DeleteWorkspaceResponse: r"""Delete a workspace - Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required. + Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required. :param id: The workspace ID (UUID) or slug :param http_referer: The app identifier should be your app's URL and is used as the primary identifier for rankings. @@ -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_settings_deletion: Required to delete the default workspace (currently limited to internal OpenRouter administrators while the capability rolls out). 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_settings_deletion=confirm_default_settings_deletion, ) req = self._build_request_async( diff --git a/uv.lock b/uv.lock index c1c563d9..8563b94c 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.48" +version = "1.1.49" source = { editable = "." } dependencies = [ { name = "httpcore" },