diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4f1fd9ec..56ca0e28 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: 793bfcba8e4eca9881a65d3d1b871e87 + docChecksum: 027e403236028f961e921f46bd90bbcc docVersion: 1.0.0 speakeasyVersion: 1.803.2 generationVersion: 2.950.13 - releaseVersion: 1.3.153 - configChecksum: d9812d55ca2876f75f3a7f7bf20a8503 + releaseVersion: 1.3.154 + configChecksum: ae17741e99ae9e0ce507f21ecfb67f93 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: ab77b687-57fe-49a7-8340-d56673bc21f0 - pristine_commit_hash: c74f43a0c5ace00e7f78a1b53a0f9af333febf44 - pristine_tree_hash: 7279b6b781c512a84f72b9599df5388538a67d9e + generation_id: 097f8be6-fa34-49e0-98a9-e7db41b3fa50 + pristine_commit_hash: 7fc03154d584f1cd5a67e38b20d0295fbcb70b57 + pristine_tree_hash: 41f477d037cf8c6299a2fdfc91df102670c11f43 features: python: acceptHeaders: 3.0.0 @@ -3620,8 +3620,8 @@ trackedFiles: pristine_git_object: e971ec1fa26c3043eeef4862f105546922e4a7bd docs/components/extractionlistanswer.mdx: id: a2388a5a8321 - last_write_checksum: sha1:3426d41448b8c053f7736058d40fd1de43eb25aa - pristine_git_object: 3e064b846e9e7b0bfa6b830be13ce9acc8310c2e + last_write_checksum: sha1:c6ddd57bbe65fd30c77cd2229819f1181eb07189 + pristine_git_object: 6c314960c85f4fe8840994bf22546a8b945fc245 docs/components/extractionlistanswerguess.mdx: id: 3a1738d5a4b3 last_write_checksum: sha1:67f869f2bdbc3fe19e4c5ba0c48e0f7b0d1b3f91 @@ -11588,8 +11588,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:e379fbc71e26bd4b84097fcf5173696686122f4e - pristine_git_object: 1d4ec34f204bb2ca1690dd5f519a5a8c506575eb + last_write_checksum: sha1:c77f305aed276bcfa29c1b7f8450f1ff5a66ccf1 + pristine_git_object: dfc2e5deed08449f1a0490114120a7adbf8a1c01 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -11616,8 +11616,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:3a8273c43d94a8b30bf3c76889cca802957a68ca - pristine_git_object: 3ccca8b53fc52b34aae3ecda5ea43bfc08c35055 + last_write_checksum: sha1:bfc01f9185df178f388851445e0a2205dc5d69ee + pristine_git_object: 94ecda04c4208be7a2ef82de9213e26724ecfe02 src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:80cc0f39649445431cc2247ed0e0765438467766 @@ -13140,8 +13140,8 @@ trackedFiles: pristine_git_object: 47809e77d553ffe84129e51a757ba394c662929b src/openrouter/components/extractionlistanswer.py: id: c7aaa4f5afb4 - last_write_checksum: sha1:65ba10aada33f83fadb4ac26ffa65e0595e34b63 - pristine_git_object: b6d3fdd510e30f123b694566e7a3158a44fd5ac5 + last_write_checksum: sha1:abc9d5e9dce331fe65ab706d126b09de2dd91286 + pristine_git_object: ad234958c150abb0c3df9b1201d677beb315e93a src/openrouter/components/extractionlistfield.py: id: dab2a75a880d last_write_checksum: sha1:7c25db467c8f01cba924c3885ca3236e0e5cb358 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 062c82b6..9c874c2a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.153 + version: 1.3.154 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 51148457..7557ddc4 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -13291,13 +13291,16 @@ components: type: 'string' x-speakeasy-unknown-values: allow spans: + description: 'One span per item of `value`, in the same order; null for an item that has no offsets in the state text (read from an image or a document).' items: description: 'Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.' items: type: 'integer' maxItems: 2 minItems: 2 - type: 'array' + type: + - 'array' + - 'null' type: 'array' spell_confidence: description: 'Confidence in the spelling of text read from an image.' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ad916c35..900071f7 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:a4da6c300145abdd1d6e7320eae8786badcddc2783da4d0a52dd28ada2493050 - sourceBlobDigest: sha256:425ca8d485ce1e14998b2f7da0ae7342bf70b869fddae280056fc759f154295c + sourceRevisionDigest: sha256:1de9f848396cbae86294b2063975cf380ddb57dbcfbf2494731c9e7074559d1d + sourceBlobDigest: sha256:f3feb22229a9ad0712298febda7746fa201156c86b3af674e56f82222a354010 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:a4da6c300145abdd1d6e7320eae8786badcddc2783da4d0a52dd28ada2493050 - sourceBlobDigest: sha256:425ca8d485ce1e14998b2f7da0ae7342bf70b869fddae280056fc759f154295c + sourceRevisionDigest: sha256:1de9f848396cbae86294b2063975cf380ddb57dbcfbf2494731c9e7074559d1d + sourceBlobDigest: sha256:f3feb22229a9ad0712298febda7746fa201156c86b3af674e56f82222a354010 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:0c805b4f4e03c05f5661e3fa9fd81fbfad07e67332b211ac9e1ad223df4dd8da + codeSamplesRevisionDigest: sha256:63a335702137bcd547403f0e67cd33a2f44e5d14ca2090d76d0f50c1a70ebc73 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.803.2 diff --git a/RELEASES.md b/RELEASES.md index 79802737..5302c3dc 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4299,4 +4299,14 @@ Based on: ### Generated - [python v1.3.153] . ### Releases -- [PyPI v1.3.153] https://pypi.org/project/openrouter/1.3.153 - . \ No newline at end of file +- [PyPI v1.3.153] https://pypi.org/project/openrouter/1.3.153 - . + +## 2026-11-10 22:40:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.803.2 (2.950.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.154] . +### Releases +- [PyPI v1.3.154] https://pypi.org/project/openrouter/1.3.154 - . \ No newline at end of file diff --git a/docs/components/extractionlistanswer.mdx b/docs/components/extractionlistanswer.mdx index 3e064b84..6c314960 100644 --- a/docs/components/extractionlistanswer.mdx +++ b/docs/components/extractionlistanswer.mdx @@ -4,14 +4,14 @@ title: "ExtractionListAnswer" ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `confidence` | *Optional[float]* | ➖ | N/A | -| `confidences` | List[*float*] | ➖ | One confidence per item of `value`, in the same order. | -| `guess` | List[[components.ExtractionListAnswerGuess](../components/extractionlistanswerguess.mdx)] | ➖ | The most likely value even when `value` is null because `p_null` crossed the threshold. | -| `p_null` | *Optional[float]* | ➖ | Probability that the state contains nothing for this field. | -| `source` | [Optional[components.ExtractionListAnswerSource]](../components/extractionlistanswersource.mdx) | ➖ | Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text. | -| `spans` | List[List[*int*]] | ➖ | N/A | -| `spell_confidence` | *Optional[float]* | ➖ | Confidence in the spelling of text read from an image. | -| `type` | [components.ExtractionListAnswerType](../components/extractionlistanswertype.mdx) | ✔️ | N/A | -| `value` | List[[components.ExtractionListAnswerValue](../components/extractionlistanswervalue.mdx)] | ✔️ | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `confidence` | *Optional[float]* | ➖ | N/A | +| `confidences` | List[*float*] | ➖ | One confidence per item of `value`, in the same order. | +| `guess` | List[[components.ExtractionListAnswerGuess](../components/extractionlistanswerguess.mdx)] | ➖ | The most likely value even when `value` is null because `p_null` crossed the threshold. | +| `p_null` | *Optional[float]* | ➖ | Probability that the state contains nothing for this field. | +| `source` | [Optional[components.ExtractionListAnswerSource]](../components/extractionlistanswersource.mdx) | ➖ | Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text. | +| `spans` | List[List[*int*]] | ➖ | One span per item of `value`, in the same order; null for an item that has no offsets in the state text (read from an image or a document). | +| `spell_confidence` | *Optional[float]* | ➖ | Confidence in the spelling of text read from an image. | +| `type` | [components.ExtractionListAnswerType](../components/extractionlistanswertype.mdx) | ✔️ | N/A | +| `value` | List[[components.ExtractionListAnswerValue](../components/extractionlistanswervalue.mdx)] | ✔️ | N/A | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1d4ec34f..dfc2e5de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.153" +version = "1.3.154" 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 3ccca8b5..94ecda04 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.153" +__version__: str = "1.3.154" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.950.13" -__user_agent__: str = "speakeasy-sdk/python 1.3.153 2.950.13 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.154 2.950.13 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/extractionlistanswer.py b/src/openrouter/components/extractionlistanswer.py index b6d3fdd5..ad234958 100644 --- a/src/openrouter/components/extractionlistanswer.py +++ b/src/openrouter/components/extractionlistanswer.py @@ -53,7 +53,8 @@ class ExtractionListAnswerTypedDict(TypedDict): r"""Probability that the state contains nothing for this field.""" source: NotRequired[ExtractionListAnswerSource] r"""Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.""" - spans: NotRequired[List[List[int]]] + spans: NotRequired[List[Nullable[List[int]]]] + r"""One span per item of `value`, in the same order; null for an item that has no offsets in the state text (read from an image or a document).""" spell_confidence: NotRequired[float] r"""Confidence in the spelling of text read from an image.""" @@ -77,7 +78,8 @@ class ExtractionListAnswer(BaseModel): source: Optional[ExtractionListAnswerSource] = None r"""Set to `image` or `document` when the answer was read from an image or a PDF rather than the state text.""" - spans: Optional[List[List[int]]] = None + spans: Optional[List[Nullable[List[int]]]] = None + r"""One span per item of `value`, in the same order; null for an item that has no offsets in the state text (read from an image or a document).""" spell_confidence: Optional[float] = None r"""Confidence in the spelling of text read from an image.""" diff --git a/uv.lock b/uv.lock index d2e3ca9d..57482a82 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.153" +version = "1.3.154" source = { editable = "." } dependencies = [ { name = "httpcore" },