From db342532ebb55c9c0ff49ab724a17a6a1514752e Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 12 Nov 2026 22:24:45 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[].union(openrouter:web_fetch).retrieved_at` **Added** * `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[].union(openrouter:web_fetch).retrieved_at` **Added** * `open_router.presets.create_presets_responses()`: * `request.input.union(Array<>)[].union(OutputWebFetchServerToolItem).retrieved_at` **Added** --- .speakeasy/gen.lock | 43 ++++++++----------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 4 ++ .speakeasy/workflow.lock | 10 ++--- RELEASES.md | 12 +++++- .../outputwebfetchservertoolitem.mdx | 1 + pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- src/openrouter/components/inputs_union.py | 4 +- src/openrouter/components/outputitems.py | 12 +++--- .../outputwebfetchservertoolitem.py | 9 +++- uv.lock | 2 +- 12 files changed, 61 insertions(+), 44 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index eda56587e..8e0ac73c1 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: 0b6a4f9f718f46a6b9f1c42f66c7c30d + docChecksum: 0e1fabf2c30c9f54a340f2447063dceb docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.172 - configChecksum: 96e13e4cf0f1fa887bacdd39a5d0d076 + releaseVersion: 1.3.173 + configChecksum: 4bb368da7e1df14f3800ae26851e3274 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 44a2bbd7-6f29-454d-bccc-fedc6448e62e - pristine_commit_hash: 630e03187bf7df7f5e8d5d6160ec96523df8ccf0 - pristine_tree_hash: b0db7e32f346d6660cf37c9ce78472d7711f6af8 + generation_id: 53663775-4c34-42d3-b5b0-8dca0e1d1c0c + pristine_commit_hash: c0c18828d88982022dd2c8bad26bab02da527167 + pristine_tree_hash: 6135a60193bc1956199150528b823bda30d35e72 features: python: acceptHeaders: 3.0.0 @@ -6992,8 +6992,8 @@ trackedFiles: pristine_git_object: 49c6685751d4ebd497b66734c421f906862d9f57 docs/components/outputwebfetchservertoolitem.mdx: id: a13b752a8d99 - last_write_checksum: sha1:d3535f841c7f23b6ae5db0fea9f7445554807aea - pristine_git_object: 9224ab7cfe55dc3ef4d3db3a04e922decb5c8369 + last_write_checksum: sha1:e330e8db293f61b2306301b93407a59065ac4765 + pristine_git_object: c9812f3958fe88b64b106cc64c2554585efe1bab docs/components/outputwebfetchservertoolitemtype.mdx: id: 9ba9db22a4d3 last_write_checksum: sha1:ab7d41e97f1e83f69ea312673ad23a09255dca7c @@ -11636,8 +11636,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:bae5be3f485ba7126e93649fc8ca83d9c76b96a8 - pristine_git_object: 10294129d7ad0e29ff4ec5c11700dd0b91104ece + last_write_checksum: sha1:1bb0564d42e0e94ee4586650474554e91e55eee8 + pristine_git_object: e59d19d3b8e8b71149c22dba20bcefad42bc4570 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11664,8 +11664,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:cc55eb6ad7c80e6c3d3a905686f96ad39415d077 - pristine_git_object: 3a4ea3ee2c7b9e6290ea23ddfd3a3e51dfcc3d24 + last_write_checksum: sha1:c97143447a05904bd3175aa882ece8c76de58752 + pristine_git_object: 0a73b37da38c198fc124b832ee094cd707a4acd9 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -13640,8 +13640,8 @@ trackedFiles: pristine_git_object: f499cbbb546232f5cfbfe2c44fb41aefb306c87f src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:b01abadae0cb5a540783a46739c38c06185377e5 - pristine_git_object: 6325458c261665ab39eaa8a83f0cce1333d8038e + last_write_checksum: sha1:3c2703629e16d3d83d6bfe0102e427c1c5e7f76f + pristine_git_object: 0e6d8b25caede2dd86be8d7bb427878eace14443 src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:94c720a449e0d5a3f23ee7195f648422f61ac114 @@ -14380,8 +14380,8 @@ trackedFiles: pristine_git_object: 616b0f5112e106777b4c096aeea6fef58ff32020 src/openrouter/components/outputitems.py: id: 90f107de3116 - last_write_checksum: sha1:c1175a76eefa7cee18379c7af6bffb7f8de2aecd - pristine_git_object: b9bd8442c9f14f506b421573ffe47210e079414e + last_write_checksum: sha1:d7dafe97dc6bf6a0de62084afa54ff14d74b5b94 + pristine_git_object: 909f7601f58c6d208b37e7a5e7665eedbbda4b5c src/openrouter/components/outputitemwebsearchcall.py: id: bac8732aecb9 last_write_checksum: sha1:00d5b67226d6ff2c6a5497e6e01c764aeede496e @@ -14444,8 +14444,8 @@ trackedFiles: pristine_git_object: cbecff6e9cdfa7834bcbb232dc71ef36398fa993 src/openrouter/components/outputwebfetchservertoolitem.py: id: 2b12eb287cdf - last_write_checksum: sha1:60ec6ef59d691699c092120ea7dffed824197872 - pristine_git_object: 9b139a07d00c0fdee897f87e2336838f3a4130bd + last_write_checksum: sha1:34ade65a8bfc2345b6098c9331c881e991bc5a22 + pristine_git_object: 5294cc54a9f99a98031029773753e8f66b3a5b9c src/openrouter/components/outputwebsearchcallitem.py: id: 8c94cd441023 last_write_checksum: sha1:2589da4a4c3d7788906538b8e1cc0cdf8368b726 @@ -21649,9 +21649,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.guardrails.list()`: `response.data[].content_filters[].is_enforced` **Added** - * `open_router.guardrails.create()`: `response.data.content_filters[].is_enforced` **Added** - * `open_router.guardrails.get()`: `response.data.content_filters[].is_enforced` **Added** - * `open_router.guardrails.update()`: `response.data.content_filters[].is_enforced` **Added** +releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[].union(openrouter:web_fetch).retrieved_at` **Added**\n* `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).output[].union(openrouter:web_fetch).retrieved_at` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(OutputWebFetchServerToolItem).retrieved_at` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index bc373b831..6da26bc54 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.172 + version: 1.3.173 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 2160b4f76..18fbdb7c4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -28997,6 +28997,10 @@ components: type: 'integer' id: type: 'string' + retrieved_at: + description: 'The time the content was fetched, as an ISO 8601 timestamp.' + example: '2026-11-12T05:27:43.000Z' + type: 'string' status: $ref: '#/components/schemas/ToolCallStatus' title: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4741b64d9..f906135ab 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.803.2 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:aaea7962bb250e48c30aef0665e01972f79cf4b7b5f808aafca88ea64dae0b64 - sourceBlobDigest: sha256:22a0a735520200446a3deb7951eedee023d6bf24365011fd80670fa3b6cad6bb + sourceRevisionDigest: sha256:4100c04773812225ff2a16b50da56fd1c8f7429c2113fb26f45000a777a5ad1d + sourceBlobDigest: sha256:157c2988d2ec07340dcc3c2aad865382d0bd1692432d82b712928c6efc6ba4bb tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:aaea7962bb250e48c30aef0665e01972f79cf4b7b5f808aafca88ea64dae0b64 - sourceBlobDigest: sha256:22a0a735520200446a3deb7951eedee023d6bf24365011fd80670fa3b6cad6bb + sourceRevisionDigest: sha256:4100c04773812225ff2a16b50da56fd1c8f7429c2113fb26f45000a777a5ad1d + sourceBlobDigest: sha256:157c2988d2ec07340dcc3c2aad865382d0bd1692432d82b712928c6efc6ba4bb codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:302a2a067b3442735f68158a236dc28ac6b70785bb6560e902e620641c91eeb1 + codeSamplesRevisionDigest: sha256:76b299f5f1bc5cdb7980e207dad7b5507f940a2bc978001220b94f61c8230718 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 5074b4c3a..7c01e0962 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4489,4 +4489,14 @@ Based on: ### Generated - [python v1.3.172] . ### Releases -- [PyPI v1.3.172] https://pypi.org/project/openrouter/1.3.172 - . \ No newline at end of file +- [PyPI v1.3.172] https://pypi.org/project/openrouter/1.3.172 - . + +## 2026-11-12 22:22:10 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.173] . +### Releases +- [PyPI v1.3.173] https://pypi.org/project/openrouter/1.3.173 - . \ No newline at end of file diff --git a/docs/components/outputwebfetchservertoolitem.mdx b/docs/components/outputwebfetchservertoolitem.mdx index 9224ab7cf..c9812f395 100644 --- a/docs/components/outputwebfetchservertoolitem.mdx +++ b/docs/components/outputwebfetchservertoolitem.mdx @@ -13,6 +13,7 @@ An openrouter:web_fetch server tool output item | `error` | *Optional[str]* | ➖ | The error message if the fetch failed. | | | `http_status` | *Optional[int]* | ➖ | The HTTP status code returned by the upstream URL fetch. | | | `id` | *Optional[str]* | ➖ | N/A | | +| `retrieved_at` | *Optional[str]* | ➖ | The time the content was fetched, as an ISO 8601 timestamp. | 2026-11-12T05:27:43.000Z | | `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | ✔️ | N/A | completed | | `title` | *Optional[str]* | ➖ | N/A | | | `type` | [components.OutputWebFetchServerToolItemType](../components/outputwebfetchservertoolitemtype.mdx) | ✔️ | N/A | | diff --git a/pyproject.toml b/pyproject.toml index 10294129d..e59d19d3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.172" +version = "1.3.173" 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 3a4ea3ee2..0a73b37da 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.172" +__version__: str = "1.3.173" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.172 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.173 2.950.13 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 6325458c2..0e6d8b25c 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -415,13 +415,13 @@ def serialize_model(self, handler): OutputCodeInterpreterCallItemTypedDict, ReasoningItemTypedDict, CustomToolCallItemTypedDict, - OutputWebFetchServerToolItemTypedDict, OutputAdvisorServerToolItemTypedDict, InputsReasoningTypedDict, OutputCodeInterpreterServerToolItemTypedDict, McpCallItemTypedDict, ShellCallOutputItemTypedDict, OutputImageGenerationServerToolItemTypedDict, + OutputWebFetchServerToolItemTypedDict, OutputFusionServerToolItemTypedDict, OutputArmorBlockedItemTypedDict, OutputShellServerToolItemTypedDict, @@ -474,13 +474,13 @@ def serialize_model(self, handler): OutputCodeInterpreterCallItem, ReasoningItem, CustomToolCallItem, - OutputWebFetchServerToolItem, OutputAdvisorServerToolItem, InputsReasoning, OutputCodeInterpreterServerToolItem, McpCallItem, ShellCallOutputItem, OutputImageGenerationServerToolItem, + OutputWebFetchServerToolItem, OutputFusionServerToolItem, OutputArmorBlockedItem, OutputShellServerToolItem, diff --git a/src/openrouter/components/outputitems.py b/src/openrouter/components/outputitems.py index b9bd8442c..909f7601f 100644 --- a/src/openrouter/components/outputitems.py +++ b/src/openrouter/components/outputitems.py @@ -142,27 +142,27 @@ OutputWebSearchServerToolItemTypedDict, OutputBrowserUseServerToolItemTypedDict, OutputImageGenerationCallItemTypedDict, + McpListToolsItemTypedDict, McpApprovalRequestItemTypedDict, OutputWebSearchCallItemTypedDict, OutputApplyPatchCallItemTypedDict, - McpListToolsItemTypedDict, OutputTextEditorServerToolItemTypedDict, OutputMessageItemTypedDict, - OutputSearchModelsServerToolItemTypedDict, OutputToolSearchCallItemTypedDict, - OutputMemoryServerToolItemTypedDict, OutputApplyPatchServerToolItemTypedDict, + OutputMemoryServerToolItemTypedDict, OutputDatetimeItemTypedDict, + OutputSearchModelsServerToolItemTypedDict, OutputShellCallItemTypedDict, OutputComputerCallItemTypedDict, OutputCodeInterpreterCallItemTypedDict, - OutputCodeInterpreterServerToolItemTypedDict, - OutputReasoningItemTypedDict, - OutputWebFetchServerToolItemTypedDict, OutputCustomToolCallItemTypedDict, OutputAdvisorServerToolItemTypedDict, + OutputCodeInterpreterServerToolItemTypedDict, + OutputReasoningItemTypedDict, OutputImageGenerationServerToolItemTypedDict, McpCallItemTypedDict, + OutputWebFetchServerToolItemTypedDict, OutputShellCallOutputItemTypedDict, OutputFusionServerToolItemTypedDict, OutputArmorBlockedItemTypedDict, diff --git a/src/openrouter/components/outputwebfetchservertoolitem.py b/src/openrouter/components/outputwebfetchservertoolitem.py index 9b139a07d..5294cc54a 100644 --- a/src/openrouter/components/outputwebfetchservertoolitem.py +++ b/src/openrouter/components/outputwebfetchservertoolitem.py @@ -23,6 +23,8 @@ class OutputWebFetchServerToolItemTypedDict(TypedDict): http_status: NotRequired[int] r"""The HTTP status code returned by the upstream URL fetch.""" id: NotRequired[str] + retrieved_at: NotRequired[str] + r"""The time the content was fetched, as an ISO 8601 timestamp.""" title: NotRequired[str] url: NotRequired[str] @@ -44,13 +46,18 @@ class OutputWebFetchServerToolItem(BaseModel): id: Optional[str] = None + retrieved_at: Optional[str] = None + r"""The time the content was fetched, as an ISO 8601 timestamp.""" + title: Optional[str] = None url: Optional[str] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["content", "error", "httpStatus", "id", "title", "url"]) + optional_fields = set( + ["content", "error", "httpStatus", "id", "retrieved_at", "title", "url"] + ) serialized = handler(self) m = {} diff --git a/uv.lock b/uv.lock index ffd45e16f..4e4def99c 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.172" +version = "1.3.173" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 5f09252ec69feb9e1ee7c5f4ba537faddce5987c Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 22:24:53 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow