From 53f3635f812e618edddf1e74ecf5b950dc7b33dd Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 2 Oct 2026 20:06:41 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.observability.list()`: `response.data[]` **Changed** * `open_router.observability.create()`: `response.data` **Changed** * `open_router.observability.get()`: `response.data` **Changed** * `open_router.observability.update()`: `response.data` **Changed** --- .speakeasy/gen.lock | 42 +++++++++++-------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 8 ++++ .speakeasy/workflow.lock | 10 ++--- RELEASES.md | 12 +++++- ...servabilityclickhousedestinationconfig.mdx | 17 ++++---- ...bservabilitysnowflakedestinationconfig.mdx | 19 +++++---- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- .../observabilityclickhousedestination.py | 18 +++++++- .../observabilitysnowflakedestination.py | 18 +++++++- uv.lock | 2 +- 12 files changed, 105 insertions(+), 49 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eb9bb953..bf97b34d 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: 8abe20dddae4e7b02440675388d04c93 + docChecksum: 760d004875633e6348b9bfb890c3bd8c docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.20 - configChecksum: b3a434d2fd3357e83a22f52cbc59acc9 + releaseVersion: 1.3.21 + configChecksum: 35810a7fae971b75e145e6ddf5b5f316 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 22a8d81b-6962-4a7a-879b-1df85c9aa529 - pristine_commit_hash: 63219bc8ba569212cd1e322f17d2b7c4191209fb - pristine_tree_hash: 429988f8c37e24ee27c671a01f27540041beeebc + generation_id: 6fec7917-f08d-434d-b959-507ed8cfe7cf + pristine_commit_hash: 85c0ac656b6f26377214e1c9ef35f34a15fed715 + pristine_tree_hash: b46ac90e077e5e8c6697a9ef837470606e04cd13 features: python: acceptHeaders: 3.0.0 @@ -4720,8 +4720,8 @@ trackedFiles: pristine_git_object: 06bb6951553af8e01844bcc1ab58d6788e18e88e docs/components/observabilityclickhousedestinationconfig.mdx: id: 31969c4f79e6 - last_write_checksum: sha1:581b45aab6174219694069db5d2dd187aa3c081f - pristine_git_object: 8135b0f9c2d554388911c676dda6267320a94a4d + last_write_checksum: sha1:31f6bab6a9f0425555fb5c1051e5e895a1e795de + pristine_git_object: 1eac658c872f9b45e51491109c5cd4c5db60c25c docs/components/observabilityclickhousedestinationtype.mdx: id: ec4a466d4fb8 last_write_checksum: sha1:ac8b55b98f1cad8f07f10bca277e6a0c8f40c1a0 @@ -4892,8 +4892,8 @@ trackedFiles: pristine_git_object: 712283b47b3463e807882274d9ed4e4b2963ab73 docs/components/observabilitysnowflakedestinationconfig.mdx: id: 61daa1944898 - last_write_checksum: sha1:aba368fd00883f348c77fcee080414ec433a6dfe - pristine_git_object: 5ad320cb4111244bdfffc9e1080c29f10b00fc8a + last_write_checksum: sha1:051783c3bcf38021a24d17169dc7b50c32ce1b95 + pristine_git_object: a7b7e4788fb3982661ecd0c47701172045ee06d5 docs/components/observabilitysnowflakedestinationtype.mdx: id: ce8232e3dcd7 last_write_checksum: sha1:1f91ffa3e55e4570d5eda35028be5c61c30cb44e @@ -9948,8 +9948,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:7e820afca065e42e75bc14668a7ec342fa6b70b4 - pristine_git_object: 50c7d881e250c4d86470d49dc2e1494313d79200 + last_write_checksum: sha1:b7e0b8d7420690eeb9bf098a294279645db0b65c + pristine_git_object: e3e7ae7f960e9d1baeab971bcade558710a80664 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -9976,8 +9976,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:76146d46cb3c9861b3bbdf6594d03159eda4d583 - pristine_git_object: b5d1b8b21c7fa1d8a11beca3ff1a5edce0aa29dd + last_write_checksum: sha1:194010eeca6ea4256079ef235ac549751778f5e3 + pristine_git_object: 23ec6d61b1489ced1f8f923a5f68a121dae58568 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a @@ -12048,8 +12048,8 @@ trackedFiles: pristine_git_object: 2a2090608a13fdccca9ae574ce769325cdaa8a4c src/openrouter/components/observabilityclickhousedestination.py: id: 0bafb43cfee3 - last_write_checksum: sha1:a8bbf5bbb2e00bbb88c17e94447e172737c5ef7c - pristine_git_object: 96995a35ce5992c1165b0773e453a20d22b74871 + last_write_checksum: sha1:0e5aab8c5d80956bd734ce88ded65ca5596e132f + pristine_git_object: 15bbbb625209e9622740ff21d0d86ec67ef4aff2 src/openrouter/components/observabilitydatadogdestination.py: id: 2b99c86aa089 last_write_checksum: sha1:b36d32cbaec5869c32993d3369a8bbf5f6b78090 @@ -12120,8 +12120,8 @@ trackedFiles: pristine_git_object: d399e852ca35e285dc2625907c935af1af75597c src/openrouter/components/observabilitysnowflakedestination.py: id: 4e4136c11a0f - last_write_checksum: sha1:db6593e37769502e38685fb3254f8308a8de9665 - pristine_git_object: 53b005e660d20b8097ba003275ecfd0373e80d11 + last_write_checksum: sha1:cf09566381c7160ce3e93655075d919325bfd9fb + pristine_git_object: c24acb2fd08fcfce196528f28904fa4a5ecd00f4 src/openrouter/components/observabilityweavedestination.py: id: 6ee5e9677e6c last_write_checksum: sha1:f89b6ca0e6f05bdcd84affb8500dcb085f3a2cae @@ -18242,3 +18242,9 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: | + ## Python SDK Changes: + * `open_router.observability.list()`: `response.data[]` **Changed** + * `open_router.observability.create()`: `response.data` **Changed** + * `open_router.observability.get()`: `response.data` **Changed** + * `open_router.observability.update()`: `response.data` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 3e64aa21..449570e6 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.20 + version: 1.3.21 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 9d527ef8..73933ccf 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -19217,6 +19217,10 @@ components: password: minLength: 1 type: 'string' + shouldIncludeCacheWriteTokens: + default: false + description: 'Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.' + type: 'boolean' table: default: 'OPENROUTER_TRACES' type: 'string' @@ -20984,6 +20988,10 @@ components: schema: default: 'PUBLIC' type: 'string' + shouldIncludeCacheWriteTokens: + default: false + description: 'Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.' + type: 'boolean' table: default: 'OPENROUTER_TRACES' type: 'string' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a9ccc209..71310725 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:3dec2b5f1acac204ff64c7bd26634f9f1b03a62474e19d14fbe6714b98c1f53d - sourceBlobDigest: sha256:c3a431c616fc16a80ae9538b53e9dddb19cb3157798c1a7bbd9a100d5d3ae3c8 + sourceRevisionDigest: sha256:7ecc59f8477c2a4dad600eb698d22e9107814a9062c15b48037813417d96855b + sourceBlobDigest: sha256:c5e595300f1ffcb043e161c34cb62f56f367dc8758066514fa1ae536bb1be990 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:3dec2b5f1acac204ff64c7bd26634f9f1b03a62474e19d14fbe6714b98c1f53d - sourceBlobDigest: sha256:c3a431c616fc16a80ae9538b53e9dddb19cb3157798c1a7bbd9a100d5d3ae3c8 + sourceRevisionDigest: sha256:7ecc59f8477c2a4dad600eb698d22e9107814a9062c15b48037813417d96855b + sourceBlobDigest: sha256:c5e595300f1ffcb043e161c34cb62f56f367dc8758066514fa1ae536bb1be990 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:8b140046fc668aad4514d69cb8cc5b3b7aeea981ae6f2a5c576cea73b87c5bf2 + codeSamplesRevisionDigest: sha256:647bd195e588b6bff60866f8bef70e7bf645e3fefd16af22ebdd7586a3fd9e66 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index e3b2af34..a9e4c1c5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2969,4 +2969,14 @@ Based on: ### Generated - [python v1.3.20] . ### Releases -- [PyPI v1.3.20] https://pypi.org/project/openrouter/1.3.20 - . \ No newline at end of file +- [PyPI v1.3.20] https://pypi.org/project/openrouter/1.3.20 - . + +## 2026-10-02 20:03:59 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.21] . +### Releases +- [PyPI v1.3.21] https://pypi.org/project/openrouter/1.3.21 - . \ No newline at end of file diff --git a/docs/components/observabilityclickhousedestinationconfig.mdx b/docs/components/observabilityclickhousedestinationconfig.mdx index 8135b0f9..1eac658c 100644 --- a/docs/components/observabilityclickhousedestinationconfig.mdx +++ b/docs/components/observabilityclickhousedestinationconfig.mdx @@ -4,11 +4,12 @@ title: "ObservabilityClickhouseDestinationConfig" ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `database` | *str* | :heavy_check_mark: | N/A | -| `headers` | Dict[str, *str*] | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | -| `host` | *str* | :heavy_check_mark: | N/A | -| `password` | *str* | :heavy_check_mark: | N/A | -| `table` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `username` | *str* | :heavy_check_mark: | If you have not set a specific username in ClickHouse, simply type in 'default' below. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `database` | *str* | :heavy_check_mark: | N/A | +| `headers` | Dict[str, *str*] | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | +| `host` | *str* | :heavy_check_mark: | N/A | +| `password` | *str* | :heavy_check_mark: | N/A | +| `should_include_cache_write_tokens` | *Optional[bool]* | :heavy_minus_sign: | Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. | +| `table` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `username` | *str* | :heavy_check_mark: | If you have not set a specific username in ClickHouse, simply type in 'default' below. | \ No newline at end of file diff --git a/docs/components/observabilitysnowflakedestinationconfig.mdx b/docs/components/observabilitysnowflakedestinationconfig.mdx index 5ad320cb..a7b7e478 100644 --- a/docs/components/observabilitysnowflakedestinationconfig.mdx +++ b/docs/components/observabilitysnowflakedestinationconfig.mdx @@ -4,12 +4,13 @@ title: "ObservabilitySnowflakeDestinationConfig" ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `account` | *str* | :heavy_check_mark: | N/A | -| `database` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `headers` | Dict[str, *str*] | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | -| `schema_` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `table` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `token` | *str* | :heavy_check_mark: | N/A | -| `warehouse` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `account` | *str* | :heavy_check_mark: | N/A | +| `database` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `headers` | Dict[str, *str*] | :heavy_minus_sign: | Custom HTTP headers to include in requests to this destination. | +| `schema_` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `should_include_cache_write_tokens` | *Optional[bool]* | :heavy_minus_sign: | Send the cache_write_tokens column (schema v2). Turn this on after the table has that column. | +| `table` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `token` | *str* | :heavy_check_mark: | N/A | +| `warehouse` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 50c7d881..e3e7ae7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.20" +version = "1.3.21" 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 b5d1b8b2..23ec6d61 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "1.3.20" +__version__: str = "1.3.21" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.3.20 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.21 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/observabilityclickhousedestination.py b/src/openrouter/components/observabilityclickhousedestination.py index 96995a35..15bbbb62 100644 --- a/src/openrouter/components/observabilityclickhousedestination.py +++ b/src/openrouter/components/observabilityclickhousedestination.py @@ -7,9 +7,10 @@ ObservabilityFilterRulesConfigTypedDict, ) from openrouter.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic from pydantic import model_serializer from typing import Dict, List, Literal, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class ObservabilityClickhouseDestinationConfigTypedDict(TypedDict): @@ -20,6 +21,8 @@ class ObservabilityClickhouseDestinationConfigTypedDict(TypedDict): r"""If you have not set a specific username in ClickHouse, simply type in 'default' below.""" headers: NotRequired[Dict[str, str]] r"""Custom HTTP headers to include in requests to this destination.""" + should_include_cache_write_tokens: NotRequired[bool] + r"""Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.""" table: NotRequired[str] @@ -36,11 +39,16 @@ class ObservabilityClickhouseDestinationConfig(BaseModel): headers: Optional[Dict[str, str]] = None r"""Custom HTTP headers to include in requests to this destination.""" + should_include_cache_write_tokens: Annotated[ + Optional[bool], pydantic.Field(alias="shouldIncludeCacheWriteTokens") + ] = False + r"""Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.""" + table: Optional[str] = "OPENROUTER_TRACES" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["headers", "table"]) + optional_fields = set(["headers", "shouldIncludeCacheWriteTokens", "table"]) serialized = handler(self) m = {} @@ -151,3 +159,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ObservabilityClickhouseDestinationConfig.model_rebuild() +except NameError: + pass diff --git a/src/openrouter/components/observabilitysnowflakedestination.py b/src/openrouter/components/observabilitysnowflakedestination.py index 53b005e6..c24acb2f 100644 --- a/src/openrouter/components/observabilitysnowflakedestination.py +++ b/src/openrouter/components/observabilitysnowflakedestination.py @@ -20,6 +20,8 @@ class ObservabilitySnowflakeDestinationConfigTypedDict(TypedDict): headers: NotRequired[Dict[str, str]] r"""Custom HTTP headers to include in requests to this destination.""" schema_: NotRequired[str] + should_include_cache_write_tokens: NotRequired[bool] + r"""Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.""" table: NotRequired[str] warehouse: NotRequired[str] @@ -36,13 +38,27 @@ class ObservabilitySnowflakeDestinationConfig(BaseModel): schema_: Annotated[Optional[str], pydantic.Field(alias="schema")] = "PUBLIC" + should_include_cache_write_tokens: Annotated[ + Optional[bool], pydantic.Field(alias="shouldIncludeCacheWriteTokens") + ] = False + r"""Send the cache_write_tokens column (schema v2). Turn this on after the table has that column.""" + table: Optional[str] = "OPENROUTER_TRACES" warehouse: Optional[str] = "COMPUTE_WH" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["database", "headers", "schema", "table", "warehouse"]) + optional_fields = set( + [ + "database", + "headers", + "schema", + "shouldIncludeCacheWriteTokens", + "table", + "warehouse", + ] + ) serialized = handler(self) m = {} diff --git a/uv.lock b/uv.lock index 6466ea16..fb12f003 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.20" +version = "1.3.21" source = { editable = "." } dependencies = [ { name = "httpcore" }, From edf580905b1cbaab839d6168fee6627e4c3bbe84 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 20:06:48 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow