diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 90fede05..25dba32a 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: 90c78b88e476abf5f4b3870ddd61c40a + docChecksum: 04bbc41078a88cc87386c416fa055e46 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.22 - configChecksum: 6b2b04df03e2efcd7624592d08e229ff + releaseVersion: 1.1.23 + configChecksum: e308e072d38ab25dfa082923cfcb6c37 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: c8f59c2a-0f97-463f-bb28-fb80519614fb - pristine_commit_hash: b3e6da353d33862f593e6fa510b0f70ee067771c - pristine_tree_hash: 2313476e0b12016b7267eb6f5999ea90ff0bb478 + generation_id: dfa4101d-8e6c-4dc0-982d-8c873b25d753 + pristine_commit_hash: 1a341267d787005b16c00ddb69db3ef06f07f0ba + pristine_tree_hash: 0a622c78755ce17894cd25e65a2450b671dc2602 features: python: acceptHeaders: 3.0.0 @@ -2514,8 +2514,8 @@ trackedFiles: pristine_git_object: ec384a2cd15b4af761c84955f7da3b98d2427564 docs/components/inputsmessage.mdx: id: 8187d4987ebd - last_write_checksum: sha1:cb5e14bd64190feae73408111aa97509c339da0b - pristine_git_object: 60f7bd2f3f71f659746917b9114c09fb3dbca65a + last_write_checksum: sha1:b8d394bd1a17a2123888433529516baf69ef079f + pristine_git_object: f64aa8de68d7d5d22df98a67a1554cbdab6f8d2e docs/components/inputsphasecommentary.mdx: id: 60d1aac83135 last_write_checksum: sha1:6876e0b49c7c8d92c4f56fcba61b511accf19a6a @@ -7046,8 +7046,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:96f56c4ebc0662d57384314110cdb48736b0a78c - pristine_git_object: 6aa687119319926b25536567b5513375f92e0c82 + last_write_checksum: sha1:8ad13a878e6b4cd386295697329733e9540a0fe5 + pristine_git_object: 59d8a340a085a79e82e7f8aee53e82a3529c2392 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7074,8 +7074,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:a1b545228fda90af86edd9df0f9b77372db5282a - pristine_git_object: b1afeb0e7bf2f79c8a19511285b06a43adf5d1ef + last_write_checksum: sha1:a1df53c12984d840da2d89f1bdcfe9e149c16935 + pristine_git_object: acc2a45cf40c9f459881a490afb4c5f3c59e92bb src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 @@ -8226,8 +8226,8 @@ trackedFiles: pristine_git_object: a3d84a96f4553a320f5eee5d63f6bc5c244ab446 src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:c321099e2c1ca483d570db734d9218fca60aa56c - pristine_git_object: fdb4f4d8726aaa4373e7b869359e24873609b052 + last_write_checksum: sha1:47b4138ee8bdcb0a779903f037d40f9ff777f00f + pristine_git_object: 636485dea6c14040b9357237b04489decc0d2b5a src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:2da9ff645acc96772701908830151c5a707ed021 @@ -11822,4 +11822,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.service_tier.enum(fast)` **Added**\n * `response` **Changed**\n* `open_router.chat.send()`: \n * `request.service_tier.enum(fast)` **Added**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.service_tier.enum(fast)` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.service_tier.enum(fast)` **Added**\n* `open_router.responses.send()`: \n * `request.service_tier.enum(fast)` **Added**\n * `response` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(class (7)).type` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(class (7)).type` **Changed**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[].union(class (7)).type` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 68385d22..e207a1dd 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.22 + version: 1.1.23 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index a4f40fe2..339949af 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -11090,6 +11090,11 @@ components: type: 'array' - type: 'string' - type: 'null' + type: + default: 'message' + enum: + - 'message' + type: 'string' type: 'object' description: 'An output message item' example: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index efdd0088..7720f4fa 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:382a74da2ebf5e8d0d8551d76b3999c98b6a9fef8318f44b935c21c0dc01d178 - sourceBlobDigest: sha256:7ce50587c3ee8461b48e7eef8de817da3c66327a84eca93b45a71c350d277307 + sourceRevisionDigest: sha256:71ad71e0b5138ebb6ed877f60e121fd26f0cca98284f0abb4b7cd7fef45cfa40 + sourceBlobDigest: sha256:92929a5c9d144c5f379c694094acea53c3767e9ca1a9df64c84b92e3e67aca7d tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:382a74da2ebf5e8d0d8551d76b3999c98b6a9fef8318f44b935c21c0dc01d178 - sourceBlobDigest: sha256:7ce50587c3ee8461b48e7eef8de817da3c66327a84eca93b45a71c350d277307 + sourceRevisionDigest: sha256:71ad71e0b5138ebb6ed877f60e121fd26f0cca98284f0abb4b7cd7fef45cfa40 + sourceBlobDigest: sha256:92929a5c9d144c5f379c694094acea53c3767e9ca1a9df64c84b92e3e67aca7d codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:1fb7d6b0e35a3f8df93331022ea6997ba05d71eeb651d959ebf0f7948d1ee0a9 + codeSamplesRevisionDigest: sha256:ab150ee098def8e75556180e64ae86bf6877be5271dbe315935df33658a1f525 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 116691d2..9c2b72e7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1009,4 +1009,14 @@ Based on: ### Generated - [python v1.1.22] . ### Releases -- [PyPI v1.1.22] https://pypi.org/project/openrouter/1.1.22 - . \ No newline at end of file +- [PyPI v1.1.22] https://pypi.org/project/openrouter/1.1.22 - . + +## 2026-07-31 14:32:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.23] . +### Releases +- [PyPI v1.1.23] https://pypi.org/project/openrouter/1.1.23 - . \ No newline at end of file diff --git a/docs/components/inputsmessage.mdx b/docs/components/inputsmessage.mdx index 60f7bd2f..f64aa8de 100644 --- a/docs/components/inputsmessage.mdx +++ b/docs/components/inputsmessage.mdx @@ -14,4 +14,4 @@ An output message item | `phase` | [OptionalNullable[components.InputsPhaseUnion]](../components/inputsphaseunion.mdx) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. | | `role` | [components.InputsRole](../components/inputsrole.mdx) | :heavy_check_mark: | N/A | | `status` | [Optional[components.InputsStatusUnion1]](../components/inputsstatusunion1.mdx) | :heavy_minus_sign: | N/A | -| `type` | [components.InputsTypeMessage](../components/inputstypemessage.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | [Optional[components.InputsTypeMessage]](../components/inputstypemessage.mdx) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6aa68711..59d8a340 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.22" +version = "1.1.23" 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 b1afeb0e..acc2a45c 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.22" +__version__: str = "1.1.23" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.22 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.23 2.914.0 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 fdb4f4d8..636485de 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -324,10 +324,10 @@ class InputsMessageTypedDict(TypedDict): content: Nullable[InputsContent2TypedDict] id: str role: InputsRole - type: InputsTypeMessage phase: NotRequired[Nullable[InputsPhaseUnionTypedDict]] r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" status: NotRequired[InputsStatusUnion1TypedDict] + type: NotRequired[InputsTypeMessage] class InputsMessage(BaseModel): @@ -339,16 +339,16 @@ class InputsMessage(BaseModel): role: InputsRole - type: InputsTypeMessage - phase: OptionalNullable[InputsPhaseUnion] = UNSET r"""The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.""" status: Optional[InputsStatusUnion1] = None + type: Optional[InputsTypeMessage] = "message" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["phase", "status"]) + optional_fields = set(["phase", "status", "type"]) nullable_fields = set(["content", "phase"]) serialized = handler(self) m = {} diff --git a/uv.lock b/uv.lock index 9d3fb285..ac7db154 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.22" +version = "1.1.23" source = { editable = "." } dependencies = [ { name = "httpcore" },