From 1dd2da989cfe984e4cf0e4d77e03b13b34041185 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 19 Nov 2026 20:27:33 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.video_generation.generate()`: `response` **Changed** * `open_router.video_generation.get_generation()`: `response` **Changed** --- .speakeasy/gen.lock | 40 ++++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 16 ++++++++ .speakeasy/workflow.lock | 10 ++--- RELEASES.md | 12 +++++- docs/components/statusdetail.mdx | 24 +++++++++++ docs/components/videogenerationresponse.mdx | 24 ++++++----- pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- src/openrouter/components/__init__.py | 3 ++ .../components/videogenerationresponse.py | 33 ++++++++++++++- uv.lock | 2 +- 12 files changed, 131 insertions(+), 41 deletions(-) create mode 100644 docs/components/statusdetail.mdx diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 9e5808794..bf832e5a8 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: 41d402151c64afa63371e5c2ef3d573b + docChecksum: 41a8a75014e44aa569adffd5080f2e22 docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.195 - configChecksum: 90d218c3bfee2162397b761f542cb95e + releaseVersion: 1.3.196 + configChecksum: 4a8eee36442c94702720302cabb66b9b repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 009b948e-a799-4e4e-bcb6-76a1b73451be - pristine_commit_hash: d1a5a3d7060477c1cabd81e7cc8780ea64e2319d - pristine_tree_hash: 82465578defaab6ded2569774b8a9b849f7602bd + generation_id: 582efff3-b3a2-4f2b-a31e-ba1ee3034af8 + pristine_commit_hash: 4e985f311f7e49a5a14e3b5dab599f154c5ddd25 + pristine_tree_hash: e79945f9672c586eaf149a8b84475367de41cd09 features: python: acceptHeaders: 3.0.0 @@ -8282,6 +8282,10 @@ trackedFiles: id: 5f13bb58ae41 last_write_checksum: sha1:3c1825cf0232520f8bf0a7d763391689c8ded8d0 pristine_git_object: 00263cb8d99a3b5fabd9154030b29959a2f66fef + docs/components/statusdetail.mdx: + id: 42734afd80ac + last_write_checksum: sha1:66c8f7c06df4bef36bfcc88b2d5726ef45307b43 + pristine_git_object: 0a5e29460aa77d9af78272a5f4b182d6b23fe3a9 docs/components/stopservertoolswhencondition.mdx: id: 5fdb9a5c17ee last_write_checksum: sha1:fd59b93bfdf655a268171fc4f35170cbffa72f47 @@ -9348,8 +9352,8 @@ trackedFiles: pristine_git_object: 050aab049bb847e511ea272a5d238d7e64e6f137 docs/components/videogenerationresponse.mdx: id: 3a932213188e - last_write_checksum: sha1:d9ffc2f662c2ee60cf58e933e999cf4ebbcde8d3 - pristine_git_object: 710dd6392bb92e456b4fb68feea44af30ff20bd7 + last_write_checksum: sha1:303c2be56f1091f577b090034b2da583b6e6607a + pristine_git_object: d3988005a00e52b40678840e60c0ec6c7182efb9 docs/components/videogenerationresponsestatus.mdx: id: 637442fde0ff last_write_checksum: sha1:9368ca45d569e511e5faf18118efd7e3341473a7 @@ -11824,8 +11828,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:294e7cefe0396a8cef9e5a7e2ec903b49845eba5 - pristine_git_object: 727db44388706e0efc292530827ea0b0209a228c + last_write_checksum: sha1:6ef85736698212323ea276dcd1e0f38813ca9196 + pristine_git_object: 5d9ddde21dd469d18659f66802e4d08c92f9390f scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11852,8 +11856,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:c8d57dc48762728c84f8c37c698a081d63c2616e - pristine_git_object: da165f5ad0843b54a96396a8c681c3dd2db6a5cc + last_write_checksum: sha1:691af069fa7966b0791d280f854a7eb50b992b72 + pristine_git_object: f5475508aa06b88acf03f1a2edc34a42d4699c69 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -11900,8 +11904,8 @@ trackedFiles: pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:dcde151db91a9baa7c7285a403a18e948935cad8 - pristine_git_object: fa9b11cb967ad7ed5c53f429979cd9fbcc52d57a + last_write_checksum: sha1:508175d36ccb705befd92e7c0f0876f7ebc621c1 + pristine_git_object: 09e3fe5cccbfe146c7826a9096b9c4dd18113f40 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 last_write_checksum: sha1:08125e1d60df82793e11e8aed6e3c9fdb7512ebb @@ -15680,8 +15684,8 @@ trackedFiles: pristine_git_object: f66f14a193c93748930655556df27b70f05eabbd src/openrouter/components/videogenerationresponse.py: id: 541f1321b072 - last_write_checksum: sha1:6ba68c4551af144f37be940f0222f434d156e275 - pristine_git_object: 867a1aa29de8df4c3dd67498b390a53985efcd5f + last_write_checksum: sha1:6b21b862a2da1009f5506144da69ecdbbd32fdf3 + pristine_git_object: bd252d41ed2c8206e95e8e3188d0c4db33020e9a src/openrouter/components/videogenerationusage.py: id: dded36eba597 last_write_checksum: sha1:a19d286bfda3ca9a373128c5118f3e6715060470 @@ -21957,5 +21961,5 @@ examples: examplesVersion: 1.0.2 releaseNotes: | ## Python SDK Changes: - * `open_router.tts.list_models()`: **Added** - * `open_router.tts.get_model()`: **Added** + * `open_router.video_generation.generate()`: `response` **Changed** + * `open_router.video_generation.get_generation()`: `response` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d0b4c7c41..1369925a8 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.195 + version: 1.3.196 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index ac3584c91..1b937bd57 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -39377,6 +39377,7 @@ components: id: 'gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt' polling_url: '/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt' status: 'pending' + status_detail: 'queued_at_provider' properties: error: type: 'string' @@ -39391,6 +39392,12 @@ components: type: 'string' polling_url: type: 'string' + progress: + description: 'Percent complete, from 0 to 100 and possibly fractional, reported by the provider while `status_detail` is `generating`. Present only for providers that report it, and absent once the job moves to `finalizing`.' + format: 'double' + maximum: 100 + minimum: 0 + type: 'number' status: enum: - 'pending' @@ -39401,6 +39408,15 @@ components: - 'expired' type: 'string' x-speakeasy-unknown-values: allow + status_detail: + description: 'The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.' + enum: + - 'submitting' + - 'queued_at_provider' + - 'generating' + - 'finalizing' + type: 'string' + x-speakeasy-unknown-values: allow unsigned_urls: description: 'OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.' items: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c11d31d71..33a77314f 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:258f3ac44b2bd0d5303c0deadf2467946a8b6ee58c650bbbb4db36f2b155cd4e - sourceBlobDigest: sha256:060309982caf29bc1bd15b6cc707a8a5f706137cc350c8cd1719c6081fc7c1a4 + sourceRevisionDigest: sha256:a11564c9cc0cceac5656ff546e7ed263929d4957d3cc68d6cc8fd1c9a008d0ed + sourceBlobDigest: sha256:365a03fda44f391e4d90b5c6cc18bf03ccfbb36a66e369e4bd1e788885c376ec tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:258f3ac44b2bd0d5303c0deadf2467946a8b6ee58c650bbbb4db36f2b155cd4e - sourceBlobDigest: sha256:060309982caf29bc1bd15b6cc707a8a5f706137cc350c8cd1719c6081fc7c1a4 + sourceRevisionDigest: sha256:a11564c9cc0cceac5656ff546e7ed263929d4957d3cc68d6cc8fd1c9a008d0ed + sourceBlobDigest: sha256:365a03fda44f391e4d90b5c6cc18bf03ccfbb36a66e369e4bd1e788885c376ec codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:d67e6c855983dac9e09ba28b99246da5a7c644ad388ff6f0f40f843397d19f64 + codeSamplesRevisionDigest: sha256:255eeb80112e61be86b07e1dc76f85cbfee26dba8bfa437c3545de54b4c09cc3 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 2ee3c8790..92b4296e7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4719,4 +4719,14 @@ Based on: ### Generated - [python v1.3.195] . ### Releases -- [PyPI v1.3.195] https://pypi.org/project/openrouter/1.3.195 - . \ No newline at end of file +- [PyPI v1.3.195] https://pypi.org/project/openrouter/1.3.195 - . + +## 2026-11-19 20:24:55 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.196] . +### Releases +- [PyPI v1.3.196] https://pypi.org/project/openrouter/1.3.196 - . \ No newline at end of file diff --git a/docs/components/statusdetail.mdx b/docs/components/statusdetail.mdx new file mode 100644 index 000000000..0a5e29460 --- /dev/null +++ b/docs/components/statusdetail.mdx @@ -0,0 +1,24 @@ +--- +title: "StatusDetail" +--- + +The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished. + +## Example Usage + +```python +from openrouter.components import StatusDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: StatusDetail = "submitting" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"submitting"` +- `"queued_at_provider"` +- `"generating"` +- `"finalizing"` diff --git a/docs/components/videogenerationresponse.mdx b/docs/components/videogenerationresponse.mdx index 710dd6392..d3988005a 100644 --- a/docs/components/videogenerationresponse.mdx +++ b/docs/components/videogenerationresponse.mdx @@ -4,14 +4,16 @@ title: "VideoGenerationResponse" ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `error` | *Optional[str]* | ➖ | N/A | | -| `expires_at` | *Optional[int]* | ➖ | Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. | | -| `generation_id` | *Optional[str]* | ➖ | The generation ID associated with this video generation job. Available once the job has been processed. | | -| `id` | *str* | ✔️ | The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. | | -| `polling_url` | *str* | ✔️ | N/A | | -| `status` | [components.VideoGenerationResponseStatus](../components/videogenerationresponsestatus.mdx) | ✔️ | N/A | | -| `unsigned_urls` | List[*str*] | ➖ | OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. | | -| `urls` | List[*str*] | ➖ | Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. | | -| `usage` | [Optional[components.VideoGenerationUsage]](../components/videogenerationusage.mdx) | ➖ | Usage and cost information for the video generation. Available once the job has completed. | \{
"cost": 0.5,
"is_byok": false
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `error` | *Optional[str]* | ➖ | N/A | | +| `expires_at` | *Optional[int]* | ➖ | Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. | | +| `generation_id` | *Optional[str]* | ➖ | The generation ID associated with this video generation job. Available once the job has been processed. | | +| `id` | *str* | ✔️ | The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. | | +| `polling_url` | *str* | ✔️ | N/A | | +| `progress` | *Optional[float]* | ➖ | Percent complete, from 0 to 100 and possibly fractional, reported by the provider while `status_detail` is `generating`. Present only for providers that report it, and absent once the job moves to `finalizing`. | | +| `status` | [components.VideoGenerationResponseStatus](../components/videogenerationresponsestatus.mdx) | ✔️ | N/A | | +| `status_detail` | [Optional[components.StatusDetail]](../components/statusdetail.mdx) | ➖ | The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished. | | +| `unsigned_urls` | List[*str*] | ➖ | OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. | | +| `urls` | List[*str*] | ➖ | Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. | | +| `usage` | [Optional[components.VideoGenerationUsage]](../components/videogenerationusage.mdx) | ➖ | Usage and cost information for the video generation. Available once the job has completed. | \{
"cost": 0.5,
"is_byok": false
} | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 727db4438..5d9ddde21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.195" +version = "1.3.196" 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 da165f5ad..f5475508a 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.195" +__version__: str = "1.3.196" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.195 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.196 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/__init__.py b/src/openrouter/components/__init__.py index fa9b11cb9..09e3fe5cc 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -5076,6 +5076,7 @@ VideoGenerationRequestTypedDict, ) from .videogenerationresponse import ( + StatusDetail, VideoGenerationResponse, VideoGenerationResponseStatus, VideoGenerationResponseTypedDict, @@ -8478,6 +8479,7 @@ "StanceTypedDict", "State", "StateTypedDict", + "StatusDetail", "StopServerToolsWhenCondition", "StopServerToolsWhenConditionTypedDict", "StopServerToolsWhenFinishReasonIs", @@ -12721,6 +12723,7 @@ "VideoGenerationRequestProviderTypedDict": ".videogenerationrequest", "VideoGenerationRequestResolution": ".videogenerationrequest", "VideoGenerationRequestTypedDict": ".videogenerationrequest", + "StatusDetail": ".videogenerationresponse", "VideoGenerationResponse": ".videogenerationresponse", "VideoGenerationResponseStatus": ".videogenerationresponse", "VideoGenerationResponseTypedDict": ".videogenerationresponse", diff --git a/src/openrouter/components/videogenerationresponse.py b/src/openrouter/components/videogenerationresponse.py index 867a1aa29..bd252d41e 100644 --- a/src/openrouter/components/videogenerationresponse.py +++ b/src/openrouter/components/videogenerationresponse.py @@ -21,6 +21,18 @@ ] +StatusDetail = Union[ + Literal[ + "submitting", + "queued_at_provider", + "generating", + "finalizing", + ], + UnrecognizedStr, +] +r"""The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.""" + + class VideoGenerationResponseTypedDict(TypedDict): id: str r"""The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation.""" @@ -31,6 +43,10 @@ class VideoGenerationResponseTypedDict(TypedDict): r"""Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists.""" generation_id: NotRequired[str] r"""The generation ID associated with this video generation job. Available once the job has been processed.""" + progress: NotRequired[float] + r"""Percent complete, from 0 to 100 and possibly fractional, reported by the provider while `status_detail` is `generating`. Present only for providers that report it, and absent once the job moves to `finalizing`.""" + status_detail: NotRequired[StatusDetail] + r"""The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.""" unsigned_urls: NotRequired[List[str]] r"""OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.""" urls: NotRequired[List[str]] @@ -55,6 +71,12 @@ class VideoGenerationResponse(BaseModel): generation_id: Optional[str] = None r"""The generation ID associated with this video generation job. Available once the job has been processed.""" + progress: Optional[float] = None + r"""Percent complete, from 0 to 100 and possibly fractional, reported by the provider while `status_detail` is `generating`. Present only for providers that report it, and absent once the job moves to `finalizing`.""" + + status_detail: Optional[StatusDetail] = None + r"""The step within `status` for a job that is not finished: `submitting` and `queued_at_provider` under `pending`, `generating` and `finalizing` under `in_progress`. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use `status` to tell whether the job is finished.""" + unsigned_urls: Optional[List[str]] = None r"""OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available.""" @@ -67,7 +89,16 @@ class VideoGenerationResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["error", "expires_at", "generation_id", "unsigned_urls", "urls", "usage"] + [ + "error", + "expires_at", + "generation_id", + "progress", + "status_detail", + "unsigned_urls", + "urls", + "usage", + ] ) serialized = handler(self) m = {} diff --git a/uv.lock b/uv.lock index 2556f736c..60887e602 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.195" +version = "1.3.196" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 4d162b16648a53daa28b082726bc4f52730a57fa Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2026 20:27:41 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow