diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c3788e5aa..4ba27d690 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: cd38c6b0d27bcda4e77540ad94350fdb + docChecksum: 86b31e3b2783aea03e8fc172cc5f1fdb docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.88 - configChecksum: d1cff2367bbdfc279716b7345e547534 + releaseVersion: 1.3.89 + configChecksum: 79444ec5d345ecb016134f29890143fa repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: bb412b4e-2fe5-4d0c-8ebf-6bdde22a0c76 - pristine_commit_hash: 1410a7fa153b2a0816765e3ae07af0181bc7ba56 - pristine_tree_hash: 5232527313cc402469351b106c223d7c98c296c4 + generation_id: bd7bd74d-54e4-469f-9a1a-9f9cfe0423d3 + pristine_commit_hash: 6971b1e0667bf50768e507536f98d635a5aff5f6 + pristine_tree_hash: a3141f649c56f66affe20225a37b981107587e44 features: python: acceptHeaders: 3.0.0 @@ -1904,12 +1904,8 @@ trackedFiles: pristine_git_object: eee9489fd2c3f15a7cc6525688a5b0cd12839e10 docs/components/chatdevelopermessage.mdx: id: 36556ee902ee - last_write_checksum: sha1:ea18be20bcb2210f450165c0791725485bfaa924 - pristine_git_object: 3db8a03b39f47e61b924319f2aeb2cbec522d7ea - docs/components/chatdevelopermessageconfigurationupdate.mdx: - id: d9f8b151accf - last_write_checksum: sha1:fd0f3db2afacb6414e356244691b3408d9dd3282 - pristine_git_object: f4dfd91b7aad64da9fe2196b3e1dc341b6757f01 + last_write_checksum: sha1:b3b3bd94d65b90cce50a8d5590e7171b6985fe37 + pristine_git_object: 5f8ccf3bcc4e949a58ac207d17a20c3c6495dfcf docs/components/chatdevelopermessagecontent.mdx: id: 0f36d5e7c6ff last_write_checksum: sha1:fe6c792d0d0f647b8894543c23df0d59a34f3c54 @@ -2104,12 +2100,8 @@ trackedFiles: pristine_git_object: 602231cf40fe0c66347bd13dd158bd75741c0759 docs/components/chatsystemmessage.mdx: id: fd74aa853b84 - last_write_checksum: sha1:b09948ed9a49c74cef962b379da78d3b71b86efb - pristine_git_object: d904f59d23eac44202b78b5a722bf8de0f0c7de6 - docs/components/chatsystemmessageconfigurationupdate.mdx: - id: f1296b6e2ca4 - last_write_checksum: sha1:9b6d014e6fda8b399db9265c856bf108a57921e7 - pristine_git_object: 31dd268a4edfa81004b2f81c576d0164acd81623 + last_write_checksum: sha1:05d7836f4113a8d872c73bcf67d510f2bf3aa788 + pristine_git_object: d6912ab69f634bc043cebb4b2d68ff57d1dbfce9 docs/components/chatsystemmessagecontent.mdx: id: a26e029e8e60 last_write_checksum: sha1:475985246731f53936fe0e0b4d6557c54f201ed1 @@ -2338,6 +2330,10 @@ trackedFiles: id: e4aadaca19bc last_write_checksum: sha1:d7024f63ad66f7701809f41907d35f4b08e21c2b pristine_git_object: 37199a7b510c1e9fcb61566fb1ca2dc3d6a5428b + docs/components/configurationupdate.mdx: + id: c5bb9102459b + last_write_checksum: sha1:5fa67e44debc152fadb56afc34a1c5a01b28b408 + pristine_git_object: 4d93c3ccf46db8d2cc949cfab62f8e020a76ab51 docs/components/configurationupdateitem.mdx: id: c118c80819dc last_write_checksum: sha1:3a492618aab7f070429ce0b06d27ef33814c3fd1 @@ -8040,8 +8036,8 @@ trackedFiles: pristine_git_object: a7be3b3d7329f05b2811e9961bd15903541be69b docs/components/websearchstatus.mdx: id: 10ad5bbdde7e - last_write_checksum: sha1:9c9476967dc3135c6443efb573c474acab396a33 - pristine_git_object: d24fe5f411ca8e3bcbaad9e364d7e7613bc8aa0f + last_write_checksum: sha1:3d1ba5bb9ab82deb6fc1660fd9c8799074f6f6a3 + pristine_git_object: 8656487f961f11ef75d2a81ddbb272b43047721e docs/components/websearchuserlocation.mdx: id: 472951d8225f last_write_checksum: sha1:7342cfe19e978ced434c23766ef8cd796198db49 @@ -10092,8 +10088,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:2a16a4502bcbee9ef1d45cc1f19175adb18e322f - pristine_git_object: 24ac149e97d2adfcb641dec2efad2c6435bd4564 + last_write_checksum: sha1:35fa0d4fa14345f3b6ae2c7073d35ac4ab9a5736 + pristine_git_object: b54878e93a0e105a2f82c943267ffab705fde30c scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -10120,8 +10116,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:9e1d8ca2afd40003e6910774558ff0dd37158b53 - pristine_git_object: 98e806f8952505654ba3d620943826b6deac374f + last_write_checksum: sha1:699011b685b1b27f19c534dd739e7fdb8f9c4d29 + pristine_git_object: e104c6481a0a6c5c503ba845b57811343e3b98cb src/openrouter/alpha.py: id: 306c4d93308d last_write_checksum: sha1:30f55a360f41376ab194b9ea725fe4e001a5ae1a @@ -10168,8 +10164,8 @@ trackedFiles: pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:ff2ae7aba9e0c4395dc30c0289a485748e018ddf - pristine_git_object: 6c4602a164f4131db1e6686b3124baf1723a3390 + last_write_checksum: sha1:df294a97d609fccb6bf824446197837f79308f94 + pristine_git_object: 5dea727121dee0edfa40de7fdb1bc731753167b7 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c @@ -10964,8 +10960,8 @@ trackedFiles: pristine_git_object: 309df1015b07e05ad2d692ed73ef1224535e8582 src/openrouter/components/chatdevelopermessage.py: id: bcba94e8d19a - last_write_checksum: sha1:f45ebe02bdd4169102a49a3365f1067d9f936d8d - pristine_git_object: 59d993da3b8e9d67cd9d9378a189f9a27b9b79dd + last_write_checksum: sha1:60b2eb8ccd9a16045a7c40c86be0cc86c8fd7474 + pristine_git_object: 68ab93fde1f96d599c1cb6de63dc5cca8a3610bb src/openrouter/components/chatdynamicservertool.py: id: ebd380d84eb9 last_write_checksum: sha1:ba1487cd474edaffa46f52bbbe7673dabf3bed86 @@ -11056,8 +11052,8 @@ trackedFiles: pristine_git_object: 936fefc210c5b6b9e94ea708035b085b59aed2f4 src/openrouter/components/chatsystemmessage.py: id: 72524b9ccaed - last_write_checksum: sha1:110e3e706bba5d21b4722ec9b13f8024aff1470e - pristine_git_object: 61a1b8eb15b56f372562c0a8f923a9a082e11957 + last_write_checksum: sha1:8dd6757196495cc958b758d876058f8b20fccc88 + pristine_git_object: 268361e7935348717941de77e6033d3b4b6f6d36 src/openrouter/components/chattokenlogprob.py: id: 6ddf9cf44f5a last_write_checksum: sha1:75641fdaddc42fea10d46e9974c051f3393ff94c @@ -11146,6 +11142,10 @@ trackedFiles: id: 10d96ee539dc last_write_checksum: sha1:303bd561791e19e9f90b5f827dd4b48383c7560b pristine_git_object: 142b18a2755af4d57085b1086bb3ad45286e37c1 + src/openrouter/components/configurationupdate.py: + id: 07a8def2ad6a + last_write_checksum: sha1:bf4493b0df830700f4051b914f1202fe683018a4 + pristine_git_object: 8ffb2715962af2bf2edcf99b1ca0c6588c55cf32 src/openrouter/components/configurationupdateitem.py: id: c4b8a6acaa9c last_write_checksum: sha1:8983a895f7c6e57c4ed90f8da530092d84c91b9d @@ -13472,8 +13472,8 @@ trackedFiles: pristine_git_object: 13e5a78c446eb248e95c1af3f2424c99d577d391 src/openrouter/components/websearchstatus.py: id: 639330492ee8 - last_write_checksum: sha1:bd1285ae6b8fb2695468777c7b22d94ce06b520e - pristine_git_object: a607c88285f5f8b8e0f057750cde1b6cd14244df + last_write_checksum: sha1:36068373c2530261a2d60916de40156e9403ce57 + pristine_git_object: 71ba89cf6551c87c4c9c55c32a131bb6bc585aaf src/openrouter/components/websearchuserlocation.py: id: 26eff9609a46 last_write_checksum: sha1:30cfffec9ed7c8c74a3e3efb721b8c2376ea1e3a @@ -18781,3 +18781,4 @@ examples: "502": application/json: {"error": {"code": 502, "message": "Provider returned error"}} examplesVersion: 1.0.2 +releaseNotes: "## Python SDK Changes:\n* `open_router.batch.create_batches()`: `response.results[].response.body.union(OpenResponsesResult).error.metadata.alignment.rejected.union(Array)[].union(web_search_call).status.enum(incomplete)` **Added**\n* `open_router.batch.get_batches()`: `response.results[].response.body.union(OpenResponsesResult).error.metadata.alignment.rejected.union(Array)[].union(web_search_call).status.enum(incomplete)` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(OutputFileSearchCallItem).status.enum(incomplete)` **Added**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[].union(OutputWebSearchCallItem).status.enum(incomplete)` **Added**\n * `response` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(OutputWebSearchCallItem).status.enum(incomplete)` **Added**\n * `response` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9791d7ab4..17bdc394a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.88 + version: 1.3.89 additionalDependencies: dev: pytest: '>=8.3' diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 7dd750405..a4b3408a5 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -7476,19 +7476,14 @@ components: role: 'developer' properties: configuration_update: - additionalProperties: false + anyOf: + - $ref: '#/components/schemas/ConfigurationUpdate' + - type: 'null' + - type: 'null' description: 'OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.' example: reasoning: effort: 'low' - properties: - reasoning: - $ref: '#/components/schemas/ConfigurationUpdateReasoning' - required: - - 'reasoning' - type: - - 'object' - - 'null' content: anyOf: - type: 'string' @@ -8496,19 +8491,14 @@ components: role: 'system' properties: configuration_update: - additionalProperties: false + anyOf: + - $ref: '#/components/schemas/ConfigurationUpdate' + - type: 'null' + - type: 'null' description: 'OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.' example: reasoning: effort: 'low' - properties: - reasoning: - $ref: '#/components/schemas/ConfigurationUpdateReasoning' - required: - - 'reasoning' - type: - - 'object' - - 'null' content: anyOf: - type: 'string' @@ -9213,6 +9203,18 @@ components: - 'display_width' - 'environment' type: 'object' + ConfigurationUpdate: + additionalProperties: false + description: 'Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns.' + example: + reasoning: + effort: 'low' + properties: + reasoning: + $ref: '#/components/schemas/ConfigurationUpdateReasoning' + required: + - 'reasoning' + type: 'object' ConfigurationUpdateItem: description: 'Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding items. Place it before the user message it should apply to; it stays in effect until another configuration update. Two adjacent configuration updates are rejected. Only supported by models that accept mid-conversation effort changes.' example: @@ -33760,6 +33762,7 @@ components: - 'searching' - 'in_progress' - 'failed' + - 'incomplete' example: 'completed' type: 'string' x-speakeasy-unknown-values: allow @@ -42848,7 +42851,9 @@ paths: limit: description: 'Optional spending limit for the API key in USD' example: 50 + exclusiveMaximum: 1000000 format: 'double' + minimum: 0 type: - 'number' - 'null' @@ -42867,6 +42872,7 @@ paths: name: description: 'Name for the new API key' example: 'My New API Key' + maxLength: 256 minLength: 1 type: 'string' workspace_id: @@ -43576,7 +43582,9 @@ paths: limit: description: 'New spending limit for the API key in USD' example: 75 + exclusiveMaximum: 1000000 format: 'double' + minimum: 0 type: - 'number' - 'null' @@ -43595,6 +43603,8 @@ paths: name: description: 'New name for the API key' example: 'Updated API Key Name' + maxLength: 256 + minLength: 1 type: 'string' workspace_id: description: 'Move the API key to this workspace. The key keeps its value; guardrail selections move with it, while other workspace-scoped settings (presets, BYOK keys, broadcast destinations, routing rules) do not. Sending the key''s current workspace is a no-op.' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b4e2cb6fc..0e851c844 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:0615f2da470f27553db60491de37627efa065bfd3bd9c3ef0ebc60850ab989ef - sourceBlobDigest: sha256:11efa435d8bebfa5d9170b01f068da7a7bcab0a7f520d4e3e8e95da3fd083585 + sourceRevisionDigest: sha256:fcdad7537942c9b18a06e7fd79fcae3afdc87311808c8e2689f8d5abc8c72f64 + sourceBlobDigest: sha256:8115e1225fb743c7b16594d94213c702f77758d0740638c4c1a54e1754a7b1b7 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:0615f2da470f27553db60491de37627efa065bfd3bd9c3ef0ebc60850ab989ef - sourceBlobDigest: sha256:11efa435d8bebfa5d9170b01f068da7a7bcab0a7f520d4e3e8e95da3fd083585 + sourceRevisionDigest: sha256:fcdad7537942c9b18a06e7fd79fcae3afdc87311808c8e2689f8d5abc8c72f64 + sourceBlobDigest: sha256:8115e1225fb743c7b16594d94213c702f77758d0740638c4c1a54e1754a7b1b7 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:eae14ce4b3923290ea9c3a995d5ad1eb32d34886478e6f2d3f2a858f5dc885a3 + codeSamplesRevisionDigest: sha256:2cdb1e5afe2966df04d75d69d2ce08a64a999b44d13c671e3cedbe4d0231f0e3 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 484035b2f..b95124c30 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3649,4 +3649,14 @@ Based on: ### Generated - [python v1.3.88] . ### Releases -- [PyPI v1.3.88] https://pypi.org/project/openrouter/1.3.88 - . \ No newline at end of file +- [PyPI v1.3.88] https://pypi.org/project/openrouter/1.3.88 - . + +## 2026-10-28 08:48:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.3.89] . +### Releases +- [PyPI v1.3.89] https://pypi.org/project/openrouter/1.3.89 - . \ No newline at end of file diff --git a/docs/components/chatdevelopermessage.mdx b/docs/components/chatdevelopermessage.mdx index 9dff56a52..ba8a47b0d 100644 --- a/docs/components/chatdevelopermessage.mdx +++ b/docs/components/chatdevelopermessage.mdx @@ -9,7 +9,7 @@ Developer message | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `configuration_update` | [OptionalNullable[components.ChatDeveloperMessageConfigurationUpdate]](../components/chatdevelopermessageconfigurationupdate.mdx) | ➖ | OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. | \{
"reasoning": \{
"effort": "low"
}
} | +| `configuration_update` | [OptionalNullable[components.ConfigurationUpdate]](../components/configurationupdate.mdx) | ➖ | OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. | \{
"reasoning": \{
"effort": "low"
}
} | | `content` | [components.ChatDeveloperMessageContent](../components/chatdevelopermessagecontent.mdx) | ✅ | Developer message content | This is a message from the developer. | | `name` | *Optional[str]* | ➖ | Optional name for the developer message | Developer | | `role` | [components.ChatDeveloperMessageRole](../components/chatdevelopermessagerole.mdx) | ✅ | N/A | | \ No newline at end of file diff --git a/docs/components/chatsystemmessage.mdx b/docs/components/chatsystemmessage.mdx index b29202ee8..5cb85c4e8 100644 --- a/docs/components/chatsystemmessage.mdx +++ b/docs/components/chatsystemmessage.mdx @@ -9,7 +9,7 @@ System message for setting behavior | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `configuration_update` | [OptionalNullable[components.ChatSystemMessageConfigurationUpdate]](../components/chatsystemmessageconfigurationupdate.mdx) | ➖ | OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`. | \{
"reasoning": \{
"effort": "low"
}
} | +| `configuration_update` | [OptionalNullable[components.ConfigurationUpdate]](../components/configurationupdate.mdx) | ➖ | OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`. | \{
"reasoning": \{
"effort": "low"
}
} | | `content` | [components.ChatSystemMessageContent](../components/chatsystemmessagecontent.mdx) | ✅ | System message content | You are a helpful assistant. | | `name` | *Optional[str]* | ➖ | Optional name for the system message | Assistant Config | | `role` | [components.ChatSystemMessageRole](../components/chatsystemmessagerole.mdx) | ✅ | N/A | | \ No newline at end of file diff --git a/docs/components/chatsystemmessageconfigurationupdate.mdx b/docs/components/chatsystemmessageconfigurationupdate.mdx deleted file mode 100644 index e9b57360b..000000000 --- a/docs/components/chatsystemmessageconfigurationupdate.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ChatSystemMessageConfigurationUpdate" ---- - -OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`. - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `reasoning` | [components.ConfigurationUpdateReasoning](../components/configurationupdatereasoning.mdx) | ✅ | Reasoning settings applied from this point in the conversation onward | \{
"effort": "low"
} | \ No newline at end of file diff --git a/docs/components/chatdevelopermessageconfigurationupdate.mdx b/docs/components/configurationupdate.mdx similarity index 84% rename from docs/components/chatdevelopermessageconfigurationupdate.mdx rename to docs/components/configurationupdate.mdx index 0681a6eac..4fc9d267f 100644 --- a/docs/components/chatdevelopermessageconfigurationupdate.mdx +++ b/docs/components/configurationupdate.mdx @@ -1,8 +1,8 @@ --- -title: "ChatDeveloperMessageConfigurationUpdate" +title: "ConfigurationUpdate" --- -OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. +Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns. ## Fields diff --git a/docs/components/websearchstatus.mdx b/docs/components/websearchstatus.mdx index d24fe5f41..8656487f9 100644 --- a/docs/components/websearchstatus.mdx +++ b/docs/components/websearchstatus.mdx @@ -20,3 +20,4 @@ This is an open enum. Unrecognized values will not fail type checks. - `"searching"` - `"in_progress"` - `"failed"` +- `"incomplete"` diff --git a/pyproject.toml b/pyproject.toml index 24ac149e9..b54878e93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.3.88" +version = "1.3.89" 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 98e806f89..e104c6481 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.88" +__version__: str = "1.3.89" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.3.88 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.3.89 2.914.0 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 6c4602a16..5dea72712 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -1111,8 +1111,6 @@ from .chatdebugoptions import ChatDebugOptions, ChatDebugOptionsTypedDict from .chatdevelopermessage import ( ChatDeveloperMessage, - ChatDeveloperMessageConfigurationUpdate, - ChatDeveloperMessageConfigurationUpdateTypedDict, ChatDeveloperMessageContent, ChatDeveloperMessageContentTypedDict, ChatDeveloperMessageRole, @@ -1225,8 +1223,6 @@ ) from .chatsystemmessage import ( ChatSystemMessage, - ChatSystemMessageConfigurationUpdate, - ChatSystemMessageConfigurationUpdateTypedDict, ChatSystemMessageContent, ChatSystemMessageContentTypedDict, ChatSystemMessageRole, @@ -1356,6 +1352,7 @@ ComputerUseServerToolTypedDict, EnvironmentEnum, ) + from .configurationupdate import ConfigurationUpdate, ConfigurationUpdateTypedDict from .configurationupdateitem import ( ConfigurationUpdateItem, ConfigurationUpdateItemType, @@ -5120,8 +5117,6 @@ "ChatDebugOptions", "ChatDebugOptionsTypedDict", "ChatDeveloperMessage", - "ChatDeveloperMessageConfigurationUpdate", - "ChatDeveloperMessageConfigurationUpdateTypedDict", "ChatDeveloperMessageContent", "ChatDeveloperMessageContentTypedDict", "ChatDeveloperMessageRole", @@ -5202,8 +5197,6 @@ "ChatStreamingResponse", "ChatStreamingResponseTypedDict", "ChatSystemMessage", - "ChatSystemMessageConfigurationUpdate", - "ChatSystemMessageConfigurationUpdateTypedDict", "ChatSystemMessageContent", "ChatSystemMessageContentTypedDict", "ChatSystemMessageRole", @@ -5294,12 +5287,14 @@ "ComputerUseServerTool", "ComputerUseServerToolType", "ComputerUseServerToolTypedDict", + "ConfigurationUpdate", "ConfigurationUpdateItem", "ConfigurationUpdateItemType", "ConfigurationUpdateItemTypedDict", "ConfigurationUpdateReasoning", "ConfigurationUpdateReasoningEffort", "ConfigurationUpdateReasoningTypedDict", + "ConfigurationUpdateTypedDict", "ConflictResponseErrorData", "ConflictResponseErrorDataTypedDict", "ConnectorID", @@ -8416,8 +8411,6 @@ "ChatDebugOptions": ".chatdebugoptions", "ChatDebugOptionsTypedDict": ".chatdebugoptions", "ChatDeveloperMessage": ".chatdevelopermessage", - "ChatDeveloperMessageConfigurationUpdate": ".chatdevelopermessage", - "ChatDeveloperMessageConfigurationUpdateTypedDict": ".chatdevelopermessage", "ChatDeveloperMessageContent": ".chatdevelopermessage", "ChatDeveloperMessageContentTypedDict": ".chatdevelopermessage", "ChatDeveloperMessageRole": ".chatdevelopermessage", @@ -8501,8 +8494,6 @@ "ChatStreamToolCallType": ".chatstreamtoolcall", "ChatStreamToolCallTypedDict": ".chatstreamtoolcall", "ChatSystemMessage": ".chatsystemmessage", - "ChatSystemMessageConfigurationUpdate": ".chatsystemmessage", - "ChatSystemMessageConfigurationUpdateTypedDict": ".chatsystemmessage", "ChatSystemMessageContent": ".chatsystemmessage", "ChatSystemMessageContentTypedDict": ".chatsystemmessage", "ChatSystemMessageRole": ".chatsystemmessage", @@ -8590,6 +8581,8 @@ "ComputerUseServerToolType": ".computeruseservertool", "ComputerUseServerToolTypedDict": ".computeruseservertool", "EnvironmentEnum": ".computeruseservertool", + "ConfigurationUpdate": ".configurationupdate", + "ConfigurationUpdateTypedDict": ".configurationupdate", "ConfigurationUpdateItem": ".configurationupdateitem", "ConfigurationUpdateItemType": ".configurationupdateitem", "ConfigurationUpdateItemTypedDict": ".configurationupdateitem", diff --git a/src/openrouter/components/chatdevelopermessage.py b/src/openrouter/components/chatdevelopermessage.py index 59d993da3..68ab93fde 100644 --- a/src/openrouter/components/chatdevelopermessage.py +++ b/src/openrouter/components/chatdevelopermessage.py @@ -2,10 +2,7 @@ from __future__ import annotations from .chatcontenttext import ChatContentText, ChatContentTextTypedDict -from .configurationupdatereasoning import ( - ConfigurationUpdateReasoning, - ConfigurationUpdateReasoningTypedDict, -) +from .configurationupdate import ConfigurationUpdate, ConfigurationUpdateTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -18,20 +15,6 @@ from typing_extensions import NotRequired, TypeAliasType, TypedDict -class ChatDeveloperMessageConfigurationUpdateTypedDict(TypedDict): - r"""OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.""" - - reasoning: ConfigurationUpdateReasoningTypedDict - r"""Reasoning settings applied from this point in the conversation onward""" - - -class ChatDeveloperMessageConfigurationUpdate(BaseModel): - r"""OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.""" - - reasoning: ConfigurationUpdateReasoning - r"""Reasoning settings applied from this point in the conversation onward""" - - ChatDeveloperMessageContentTypedDict = TypeAliasType( "ChatDeveloperMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]] ) @@ -53,9 +36,7 @@ class ChatDeveloperMessageTypedDict(TypedDict): content: ChatDeveloperMessageContentTypedDict r"""Developer message content""" role: ChatDeveloperMessageRole - configuration_update: NotRequired[ - Nullable[ChatDeveloperMessageConfigurationUpdateTypedDict] - ] + configuration_update: NotRequired[Nullable[ConfigurationUpdateTypedDict]] r"""OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.""" name: NotRequired[str] r"""Optional name for the developer message""" @@ -69,9 +50,7 @@ class ChatDeveloperMessage(BaseModel): role: ChatDeveloperMessageRole - configuration_update: OptionalNullable[ChatDeveloperMessageConfigurationUpdate] = ( - UNSET - ) + configuration_update: OptionalNullable[ConfigurationUpdate] = UNSET r"""OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.""" name: Optional[str] = None diff --git a/src/openrouter/components/chatsystemmessage.py b/src/openrouter/components/chatsystemmessage.py index 61a1b8eb1..268361e79 100644 --- a/src/openrouter/components/chatsystemmessage.py +++ b/src/openrouter/components/chatsystemmessage.py @@ -2,10 +2,7 @@ from __future__ import annotations from .chatcontenttext import ChatContentText, ChatContentTextTypedDict -from .configurationupdatereasoning import ( - ConfigurationUpdateReasoning, - ConfigurationUpdateReasoningTypedDict, -) +from .configurationupdate import ConfigurationUpdate, ConfigurationUpdateTypedDict from openrouter.types import ( BaseModel, Nullable, @@ -18,20 +15,6 @@ from typing_extensions import NotRequired, TypeAliasType, TypedDict -class ChatSystemMessageConfigurationUpdateTypedDict(TypedDict): - r"""OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: \"\"`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.""" - - reasoning: ConfigurationUpdateReasoningTypedDict - r"""Reasoning settings applied from this point in the conversation onward""" - - -class ChatSystemMessageConfigurationUpdate(BaseModel): - r"""OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: \"\"`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.""" - - reasoning: ConfigurationUpdateReasoning - r"""Reasoning settings applied from this point in the conversation onward""" - - ChatSystemMessageContentTypedDict = TypeAliasType( "ChatSystemMessageContentTypedDict", Union[str, List[ChatContentTextTypedDict]] ) @@ -53,9 +36,7 @@ class ChatSystemMessageTypedDict(TypedDict): content: ChatSystemMessageContentTypedDict r"""System message content""" role: ChatSystemMessageRole - configuration_update: NotRequired[ - Nullable[ChatSystemMessageConfigurationUpdateTypedDict] - ] + configuration_update: NotRequired[Nullable[ConfigurationUpdateTypedDict]] r"""OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: \"\"`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.""" name: NotRequired[str] r"""Optional name for the system message""" @@ -69,7 +50,7 @@ class ChatSystemMessage(BaseModel): role: ChatSystemMessageRole - configuration_update: OptionalNullable[ChatSystemMessageConfigurationUpdate] = UNSET + configuration_update: OptionalNullable[ConfigurationUpdate] = UNSET r"""OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: \"\"`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.""" name: Optional[str] = None diff --git a/src/openrouter/components/configurationupdate.py b/src/openrouter/components/configurationupdate.py new file mode 100644 index 000000000..8ffb27159 --- /dev/null +++ b/src/openrouter/components/configurationupdate.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .configurationupdatereasoning import ( + ConfigurationUpdateReasoning, + ConfigurationUpdateReasoningTypedDict, +) +from openrouter.types import BaseModel +from typing_extensions import TypedDict + + +class ConfigurationUpdateTypedDict(TypedDict): + r"""Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns.""" + + reasoning: ConfigurationUpdateReasoningTypedDict + r"""Reasoning settings applied from this point in the conversation onward""" + + +class ConfigurationUpdate(BaseModel): + r"""Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns.""" + + reasoning: ConfigurationUpdateReasoning + r"""Reasoning settings applied from this point in the conversation onward""" diff --git a/src/openrouter/components/websearchstatus.py b/src/openrouter/components/websearchstatus.py index a607c8828..71ba89cf6 100644 --- a/src/openrouter/components/websearchstatus.py +++ b/src/openrouter/components/websearchstatus.py @@ -11,6 +11,7 @@ "searching", "in_progress", "failed", + "incomplete", ], UnrecognizedStr, ] diff --git a/uv.lock b/uv.lock index 2f2ccf8aa..334db25ce 100644 --- a/uv.lock +++ b/uv.lock @@ -231,7 +231,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.3.88" +version = "1.3.89" source = { editable = "." } dependencies = [ { name = "httpcore" },