diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4056cc7..5b24086 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: 16502ba1d37c69afff28bddd6d7626fa + docChecksum: 5e32c54953ba574d9ee698feec69132b docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 0.11.18 - configChecksum: a2b5416af2f6e419e890e700ebff85b2 + releaseVersion: 0.11.19 + configChecksum: 68995e9d0f9c16d2db0f9967edfb3af3 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 43c7e9de-e01c-454f-963f-fffefb852389 - pristine_commit_hash: 507fe1d22cb798a9ec68eac499ec65af7c93a995 - pristine_tree_hash: e7dc383135ed75f29c946b77f2965d61ec238f63 + generation_id: 1d141ee6-3f2d-4871-9848-c0b44ce3fc81 + pristine_commit_hash: 5d90a57f4c2fe856a5bdf25892ac7645ace722dc + pristine_tree_hash: 79eec5b9a9eebb656a47a973193134b0f2f61d67 features: python: acceptHeaders: 3.0.0 @@ -156,6 +156,30 @@ trackedFiles: id: 037d49b1a02c last_write_checksum: sha1:1ef65dad1b6f74dad67829f8b67d65da6144922b pristine_git_object: 95bf97c81f4b519b1abf0b8ef96d5344140ac182 + docs/components/agent.mdx: + id: a9ece83c3330 + last_write_checksum: sha1:6aa5ec348e98fe755fa241b09b94e9316f130a5a + pristine_git_object: d0300461c7036764ce02b5ad12748485406a018f + docs/components/agentmessageitem.mdx: + id: 207b0f2bd32f + last_write_checksum: sha1:11acb80bcbb86196a5fa991843bce2ffa8ce1f88 + pristine_git_object: f50b6f364c0b9deddd755f43d68af8f032bc8298 + docs/components/agentmessageitemcontentinputimage.mdx: + id: a491c3154b29 + last_write_checksum: sha1:ae00600fdb044ef6055b821ea9e1c6ed1984059e + pristine_git_object: 67e9a2411f1fb7ed3dd9d20900ea39cca3c90536 + docs/components/agentmessageitemcontentunion.mdx: + id: 1059ca11299e + last_write_checksum: sha1:772f5e3f8bd01d99bddc12160bf5e3b448bbf8a6 + pristine_git_object: 0ffa1e9e09f27fe2e3fa668316ee29271a6ce46c + docs/components/agentmessageitemdetail.mdx: + id: fe0d57b4e1d7 + last_write_checksum: sha1:3c38eb440eb62672a2543017bb57d2f9277ddbbc + pristine_git_object: 1e49ee6a692735eeaab980d66640a8212fb24152 + docs/components/agentmessageitemtypeinputimage.mdx: + id: d16eed88b27f + last_write_checksum: sha1:f1b71145d88842c0b61651b24f1b7245ece6620d + pristine_git_object: 4acb9c2305ede0ba0e6596e3c2b8d261ff24e12d docs/components/allowedtools.mdx: id: bc9b06183311 last_write_checksum: sha1:9b19ddb249037404d76b5c8f7cd8b40e20cf598d @@ -1146,8 +1170,8 @@ trackedFiles: pristine_git_object: 8a2adc33e4a201f48cc802d12dd0154dfa674aa9 docs/components/compactionitem.mdx: id: 26c52557072b - last_write_checksum: sha1:5d5e9a7ece815c6cc9aea6cb3b484e8d3a7e0321 - pristine_git_object: 7fb1a632309091019e4f2622225c07f926e42b1b + last_write_checksum: sha1:f8c0deb4eb10c507ec77d2be7669a96bb81c2a1b + pristine_git_object: 52161ac34082b508dbc5da7e8ec8a380ab813c99 docs/components/compactionitemtype.mdx: id: 688981b39855 last_write_checksum: sha1:70bb56c5e1b6352f709a63c98103e99c379fc86c @@ -1208,6 +1232,10 @@ trackedFiles: id: 1923f9db3cff last_write_checksum: sha1:59526732df9d4b5a69f3a79d1210493dff8d8898 pristine_git_object: 39acf3a7dc4de67d2eb07a4e21e33e6cfdd2091f + docs/components/contentencryptedcontent.mdx: + id: 0dc55809c394 + last_write_checksum: sha1:97675b67fb3cdb6c892bbe01d2cd9e6bab5e4dec + pristine_git_object: f6d3a51c9fa32b15dd589583fd07b835f76f0ecc docs/components/contentfilteraction.mdx: id: 11728ebb9679 last_write_checksum: sha1:c2e70a8136e1af5a9a0e2abd930e5cd3bdb880a1 @@ -1340,6 +1368,14 @@ trackedFiles: id: e53d83e87e2b last_write_checksum: sha1:22dd4ec3f699feb7d8f22abff79623b427292e35 pristine_git_object: c944724a99b7f7d4a9b5de4dc478f1e15643e20a + docs/components/contextcompactionitem.mdx: + id: 4e12480f54d6 + last_write_checksum: sha1:b3491d872cda856a3c9e338cf9121af0e68f1be0 + pristine_git_object: 4410f499ce362b79b38a3ea450e03913cfafc984 + docs/components/contextcompactionitemtype.mdx: + id: 393257938ed7 + last_write_checksum: sha1:28b03a5e14d3ab558cd6379fa25a4481e05e3016 + pristine_git_object: a8256a82a3cc87a83ac240f2bd3971b29af436cf docs/components/contextcompressionengine.mdx: id: 684ea7e73a30 last_write_checksum: sha1:b093510814e6d7a1911104a6a5911e789b689759 @@ -2434,8 +2470,8 @@ trackedFiles: pristine_git_object: 33aee92c61bf7ab9beded4e193f50a2c08462378 docs/components/inputsunion1.mdx: id: c216609d21ce - last_write_checksum: sha1:be2b2255aaaa200ee37b27ad64e428592f8065cd - pristine_git_object: be6efd1c3a0a797e8f00600fb2fb47fa00b4ddf4 + last_write_checksum: sha1:38d513739703efb245bb9c09606aacc35651ad92 + pristine_git_object: 2e56403330ecae1d43fd2e4d23976dfe5330c38d docs/components/inputtext.mdx: id: c8a97322a50a last_write_checksum: sha1:58653e40ea0a33629dda40d2a11c8d21a75b0467 @@ -4704,6 +4740,10 @@ trackedFiles: id: 6b8fbaf1abe6 last_write_checksum: sha1:a8d7df683cc00996868f4a8f16d43f5171f9786c pristine_git_object: 92220371000c3ec2476ecbeaccc4f095d25a997e + docs/components/typeagentmessage.mdx: + id: 806319bb3eee + last_write_checksum: sha1:486521730ba37bb9393665797e1f1cc775766874 + pristine_git_object: b03f1ab2115442904e357d6aee81e6656a6b6f15 docs/components/typeany.mdx: id: b3bd6b0de96e last_write_checksum: sha1:7d4c65b6740216e057d36ea498509249d9c97354 @@ -4744,6 +4784,10 @@ trackedFiles: id: 2107f66972cb last_write_checksum: sha1:47c1d819d31519b3d19a87f3389786d5c23206d4 pristine_git_object: 52ed7b166a48116cbd5a6f950a50f3f180c62a84 + docs/components/typeencryptedcontent.mdx: + id: 7e29de8a1874 + last_write_checksum: sha1:19b66fd2808ce791e8ec41203dd91bf1eeb9a996 + pristine_git_object: 62d36e211de192914adac3fd60dc58b52956f57a docs/components/typeexec.mdx: id: bdffae9225e9 last_write_checksum: sha1:adcee4778c3a095280c7e3541c1bfec21eba0139 @@ -6534,8 +6578,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:bb8d05c87d2fce01ba7ea9fe811425844624c6d6 - pristine_git_object: b9fecdcfb5971da6721e949608d09ca07d77307c + last_write_checksum: sha1:cbe4db46712b81214486e0f26d72f9384a264b7e + pristine_git_object: 9c5d4bfdf21ef61dcb7441889ce4f49cbdba7881 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -6562,8 +6606,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:109693a9a2f8aaa8302f4a8c79ca80d9f736ed4f - pristine_git_object: 040c27279c9bd92aa793b82352d5b0b986c6faf9 + last_write_checksum: sha1:fac5e109f7e32666cc375872e0a411749b13533e + pristine_git_object: 085782e387bd5ce779b4220e2c549eb621a203f3 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 @@ -6602,8 +6646,8 @@ trackedFiles: pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1 src/openrouter/components/__init__.py: id: 81754e97b3f4 - last_write_checksum: sha1:db6939dcf34a388b4111cb127e372fd434a437c0 - pristine_git_object: 2b758c9d3531925e091e70d3aeb1559ecfef10a2 + last_write_checksum: sha1:7da528c3b443bbc59febd9ba816c068802b8f5dd + pristine_git_object: 0aa62516217cf61492f33d953c54956fbfeb4124 src/openrouter/components/aabenchmarkentry.py: id: e2e0f0b48c82 last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c @@ -6636,6 +6680,10 @@ trackedFiles: id: 683887bb9db3 last_write_checksum: sha1:3a801b02cc92e02a00f0e26f377fb93a6893641a pristine_git_object: d92e19f8e9bec36933cd3e5d7ccc1690f14b168f + src/openrouter/components/agentmessageitem.py: + id: 6dbe0c8e2c79 + last_write_checksum: sha1:cdc92eac94cf3a35a412c95f894345c7a362afeb + pristine_git_object: 612d33983cd731ce83f33949fb2e9ab05b89f43b src/openrouter/components/annotationaddedevent.py: id: dc032c9ad744 last_write_checksum: sha1:8e5d49d2b57114df7f4559b611d40769e65f9f78 @@ -7122,8 +7170,8 @@ trackedFiles: pristine_git_object: ea86f79f7e10d7584621fb804ac56e7bb79578ba src/openrouter/components/compactionitem.py: id: f1535c3a68c3 - last_write_checksum: sha1:c344678bd27fea9bae0da60dae93aff484483a20 - pristine_git_object: 0c6d74912168fc04a0d756e9fac3b914e0ca6106 + last_write_checksum: sha1:877b1856696c67229c1f0bc9c39e98d79c11120f + pristine_git_object: fd2fa67f5ed2630c005e33123ec291065ee5b6ff src/openrouter/components/compoundfilter.py: id: 0cab72c7a3bc last_write_checksum: sha1:7bc0251dcf6c06f0fd00c9cadee2fa6a1e88ea82 @@ -7200,6 +7248,10 @@ trackedFiles: id: 2dbef15bd5df last_write_checksum: sha1:34ee6609ef4171a4d54b52e41b781970edcf8fa8 pristine_git_object: 50bdff02f1430696b08d5bb5dc38ba67704dad61 + src/openrouter/components/contextcompactionitem.py: + id: 0212b34610c0 + last_write_checksum: sha1:e4f65d722d166d4818afffe5a4d2e2756b810dba + pristine_git_object: 591e51c49354f87abbaaa20e6b7d9bdb10a2be69 src/openrouter/components/contextcompressionengine.py: id: a3965275d07f last_write_checksum: sha1:8aeacab427a9277db44ef731fd7a38a58752a64f @@ -7642,8 +7694,8 @@ trackedFiles: pristine_git_object: a3d84a96f4553a320f5eee5d63f6bc5c244ab446 src/openrouter/components/inputs_union.py: id: 17d6239cb6a7 - last_write_checksum: sha1:56b54bc88ad27ba75866fa7f548fa405650d689a - pristine_git_object: 138ccb8156df5fe2baa8b2b4b60dce353fd3cf7a + last_write_checksum: sha1:8f82753fd340ed60d3314a63e913500c3281d686 + pristine_git_object: 39681f4c16af7831a14dcccf7447e742c8a2b43b src/openrouter/components/inputtext.py: id: a995ae96be99 last_write_checksum: sha1:f78a6a35792b704f18ee6e1312c24f78f38cca36 @@ -10909,4 +10961,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.input.union(Array<>)[].union(AdditionalToolsItem)` **Added**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem)` **Added**\n" +releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[]` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[]` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 20ab2ae..fccd8e6 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 0.11.18 + version: 0.11.19 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 460cc29..cd49a8b 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -364,6 +364,72 @@ components: $ref: '#/components/schemas/AdvisorNestedTool' type: array type: object + AgentMessageItem: + additionalProperties: + nullable: true + description: A message routed between agents in a multi-agent session + example: + author: /root/worker + content: + - text: Task complete. + type: input_text + recipient: /root + type: agent_message + properties: + agent: + additionalProperties: + nullable: true + nullable: true + properties: + agent_name: + type: string + required: + - agent_name + type: object + author: + type: string + content: + items: + oneOf: + - $ref: '#/components/schemas/InputText' + - allOf: + - $ref: '#/components/schemas/InputImage' + - properties: {} + type: object + description: Image input content item + example: + detail: auto + image_url: https://example.com/image.jpg + type: input_image + - additionalProperties: + nullable: true + properties: + encrypted_content: + type: string + type: + enum: + - encrypted_content + type: string + required: + - type + - encrypted_content + type: object + type: array + id: + nullable: true + type: string + recipient: + type: string + type: + enum: + - agent_message + type: string + required: + - type + - author + - recipient + - content + type: object AnnotationAddedEvent: allOf: - $ref: '#/components/schemas/BaseAnnotationAddedEvent' @@ -5854,6 +5920,8 @@ components: - type type: object CompactionItem: + additionalProperties: + nullable: true description: A context compaction marker with encrypted summary example: encrypted_content: enc_abc123... @@ -6302,6 +6370,27 @@ components: - type - video_url type: object + ContextCompactionItem: + additionalProperties: + nullable: true + description: A context compaction marker with an optional encrypted summary + example: + encrypted_content: enc_abc123... + type: context_compaction + properties: + encrypted_content: + nullable: true + type: string + id: + nullable: true + type: string + type: + enum: + - context_compaction + type: string + required: + - type + type: object ContextCompressionEngine: description: The compression engine to use. Defaults to "middle-out". enum: @@ -10434,8 +10523,10 @@ components: - $ref: '#/components/schemas/CustomToolCallItem' - $ref: '#/components/schemas/CustomToolCallOutputItem' - $ref: '#/components/schemas/CompactionItem' + - $ref: '#/components/schemas/ContextCompactionItem' - $ref: '#/components/schemas/ItemReferenceItem' - $ref: '#/components/schemas/AdditionalToolsItem' + - $ref: '#/components/schemas/AgentMessageItem' type: array description: Input for a response request - can be a string or array of items example: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1f1f0a0..c9ecd11 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:5d92f9e16b58b6867b6333b47544046d8179ed6ee1ce9b9d289a5f5fc9ac13bf - sourceBlobDigest: sha256:59fc773016c0c02fc04da6c9785ff6cf5b572b30f5d22095b14564f1c4ff958b + sourceRevisionDigest: sha256:046e876891ba57af72f3f26e8394a517ea258cecf8c2d8f885357e7796516f2d + sourceBlobDigest: sha256:a38421ec1aa0fb81cf260b96096fb44a9f31543b4b49d700280b2b58460671d1 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:5d92f9e16b58b6867b6333b47544046d8179ed6ee1ce9b9d289a5f5fc9ac13bf - sourceBlobDigest: sha256:59fc773016c0c02fc04da6c9785ff6cf5b572b30f5d22095b14564f1c4ff958b + sourceRevisionDigest: sha256:046e876891ba57af72f3f26e8394a517ea258cecf8c2d8f885357e7796516f2d + sourceBlobDigest: sha256:a38421ec1aa0fb81cf260b96096fb44a9f31543b4b49d700280b2b58460671d1 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:3770bb81a5566b8937f2c434e761c2a63e5c7f0507d7b3439ec0d1a87d53c673 + codeSamplesRevisionDigest: sha256:0eccbc2f8f6e176d5a67e24ec42aee8a70ef63fdf3da3c2a2fbb8b78587bfd8b workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index e1fac37..127b4ff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -288,4 +288,14 @@ Based on: ### Generated - [python v0.11.18] . ### Releases -- [PyPI v0.11.18] https://pypi.org/project/openrouter/0.11.18 - . \ No newline at end of file +- [PyPI v0.11.18] https://pypi.org/project/openrouter/0.11.18 - . + +## 2026-07-10 15:41:48 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.11.19] . +### Releases +- [PyPI v0.11.19] https://pypi.org/project/openrouter/0.11.19 - . \ No newline at end of file diff --git a/docs/components/agent.mdx b/docs/components/agent.mdx new file mode 100644 index 0000000..d030046 --- /dev/null +++ b/docs/components/agent.mdx @@ -0,0 +1,10 @@ +--- +title: "Agent" +--- + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `agent_name` | *str* | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/agentmessageitem.mdx b/docs/components/agentmessageitem.mdx new file mode 100644 index 0000000..f50b6f3 --- /dev/null +++ b/docs/components/agentmessageitem.mdx @@ -0,0 +1,18 @@ +--- +title: "AgentMessageItem" +--- + +A message routed between agents in a multi-agent session + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `agent` | [OptionalNullable[components.Agent]](../components/agent.mdx) | :heavy_minus_sign: | N/A | | +| `author` | *str* | :heavy_check_mark: | N/A | | +| `content` | List[[components.AgentMessageItemContentUnion](../components/agentmessageitemcontentunion.mdx)] | :heavy_check_mark: | N/A | | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `recipient` | *str* | :heavy_check_mark: | N/A | | +| `type` | [components.TypeAgentMessage](../components/typeagentmessage.mdx) | :heavy_check_mark: | N/A | | +| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{
"author": "/root/worker",
"content": [
\{
"text": "Task complete.",
"type": "input_text"
}
],
"recipient": "/root",
"type": "agent_message"
} | \ No newline at end of file diff --git a/docs/components/agentmessageitemcontentinputimage.mdx b/docs/components/agentmessageitemcontentinputimage.mdx new file mode 100644 index 0000000..67e9a24 --- /dev/null +++ b/docs/components/agentmessageitemcontentinputimage.mdx @@ -0,0 +1,14 @@ +--- +title: "AgentMessageItemContentInputImage" +--- + +Image input content item + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `detail` | [components.AgentMessageItemDetail](../components/agentmessageitemdetail.mdx) | :heavy_check_mark: | N/A | +| `image_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `type` | [components.AgentMessageItemTypeInputImage](../components/agentmessageitemtypeinputimage.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/agentmessageitemcontentunion.mdx b/docs/components/agentmessageitemcontentunion.mdx new file mode 100644 index 0000000..0ffa1e9 --- /dev/null +++ b/docs/components/agentmessageitemcontentunion.mdx @@ -0,0 +1,24 @@ +--- +title: "AgentMessageItemContentUnion" +--- + +## Supported Types + +### `components.InputText` + +```python +value: components.InputText = /* values here */ +``` + +### `components.AgentMessageItemContentInputImage` + +```python +value: components.AgentMessageItemContentInputImage = /* values here */ +``` + +### `components.ContentEncryptedContent` + +```python +value: components.ContentEncryptedContent = /* values here */ +``` + diff --git a/docs/components/agentmessageitemdetail.mdx b/docs/components/agentmessageitemdetail.mdx new file mode 100644 index 0000000..1e49ee6 --- /dev/null +++ b/docs/components/agentmessageitemdetail.mdx @@ -0,0 +1,22 @@ +--- +title: "AgentMessageItemDetail" +--- + +## Example Usage + +```python +from openrouter.components import AgentMessageItemDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: AgentMessageItemDetail = "auto" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"auto"` +- `"high"` +- `"low"` +- `"original"` diff --git a/docs/components/agentmessageitemtypeinputimage.mdx b/docs/components/agentmessageitemtypeinputimage.mdx new file mode 100644 index 0000000..4acb9c2 --- /dev/null +++ b/docs/components/agentmessageitemtypeinputimage.mdx @@ -0,0 +1,15 @@ +--- +title: "AgentMessageItemTypeInputImage" +--- + +## Example Usage + +```python +from openrouter.components import AgentMessageItemTypeInputImage +value: AgentMessageItemTypeInputImage = "input_image" +``` + + +## Values + +- `"input_image"` diff --git a/docs/components/compactionitem.mdx b/docs/components/compactionitem.mdx index 7fb1a63..52161ac 100644 --- a/docs/components/compactionitem.mdx +++ b/docs/components/compactionitem.mdx @@ -7,8 +7,9 @@ A context compaction marker with encrypted summary ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `encrypted_content` | *str* | :heavy_check_mark: | N/A | -| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `type` | [components.CompactionItemType](../components/compactionitemtype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `encrypted_content` | *str* | :heavy_check_mark: | N/A | | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `type` | [components.CompactionItemType](../components/compactionitemtype.mdx) | :heavy_check_mark: | N/A | | +| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{
"encrypted_content": "enc_abc123...",
"type": "compaction"
} | \ No newline at end of file diff --git a/docs/components/contentencryptedcontent.mdx b/docs/components/contentencryptedcontent.mdx new file mode 100644 index 0000000..f6d3a51 --- /dev/null +++ b/docs/components/contentencryptedcontent.mdx @@ -0,0 +1,11 @@ +--- +title: "ContentEncryptedContent" +--- + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `encrypted_content` | *str* | :heavy_check_mark: | N/A | +| `type` | [components.TypeEncryptedContent](../components/typeencryptedcontent.mdx) | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/components/contextcompactionitem.mdx b/docs/components/contextcompactionitem.mdx new file mode 100644 index 0000000..4410f49 --- /dev/null +++ b/docs/components/contextcompactionitem.mdx @@ -0,0 +1,15 @@ +--- +title: "ContextCompactionItem" +--- + +A context compaction marker with an optional encrypted summary + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `encrypted_content` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `type` | [components.ContextCompactionItemType](../components/contextcompactionitemtype.mdx) | :heavy_check_mark: | N/A | | +| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{
"encrypted_content": "enc_abc123...",
"type": "context_compaction"
} | \ No newline at end of file diff --git a/docs/components/contextcompactionitemtype.mdx b/docs/components/contextcompactionitemtype.mdx new file mode 100644 index 0000000..a8256a8 --- /dev/null +++ b/docs/components/contextcompactionitemtype.mdx @@ -0,0 +1,15 @@ +--- +title: "ContextCompactionItemType" +--- + +## Example Usage + +```python +from openrouter.components import ContextCompactionItemType +value: ContextCompactionItemType = "context_compaction" +``` + + +## Values + +- `"context_compaction"` diff --git a/docs/components/inputsunion1.mdx b/docs/components/inputsunion1.mdx index be6efd1..2e56403 100644 --- a/docs/components/inputsunion1.mdx +++ b/docs/components/inputsunion1.mdx @@ -274,6 +274,12 @@ value: components.CustomToolCallOutputItem = /* values here */ value: components.CompactionItem = /* values here */ ``` +### `components.ContextCompactionItem` + +```python +value: components.ContextCompactionItem = /* values here */ +``` + ### `components.ItemReferenceItem` ```python @@ -286,3 +292,9 @@ value: components.ItemReferenceItem = /* values here */ value: components.AdditionalToolsItem = /* values here */ ``` +### `components.AgentMessageItem` + +```python +value: components.AgentMessageItem = /* values here */ +``` + diff --git a/docs/components/typeagentmessage.mdx b/docs/components/typeagentmessage.mdx new file mode 100644 index 0000000..b03f1ab --- /dev/null +++ b/docs/components/typeagentmessage.mdx @@ -0,0 +1,15 @@ +--- +title: "TypeAgentMessage" +--- + +## Example Usage + +```python +from openrouter.components import TypeAgentMessage +value: TypeAgentMessage = "agent_message" +``` + + +## Values + +- `"agent_message"` diff --git a/docs/components/typeencryptedcontent.mdx b/docs/components/typeencryptedcontent.mdx new file mode 100644 index 0000000..62d36e2 --- /dev/null +++ b/docs/components/typeencryptedcontent.mdx @@ -0,0 +1,15 @@ +--- +title: "TypeEncryptedContent" +--- + +## Example Usage + +```python +from openrouter.components import TypeEncryptedContent +value: TypeEncryptedContent = "encrypted_content" +``` + + +## Values + +- `"encrypted_content"` diff --git a/pyproject.toml b/pyproject.toml index b9fecdc..9c5d4bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "0.11.18" +version = "0.11.19" 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 040c272..085782e 100644 --- a/src/openrouter/_version.py +++ b/src/openrouter/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "openrouter" -__version__: str = "0.11.18" +__version__: str = "0.11.19" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 0.11.18 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 0.11.19 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 2b758c9..0aa6251 100644 --- a/src/openrouter/components/__init__.py +++ b/src/openrouter/components/__init__.py @@ -36,6 +36,22 @@ AdvisorServerToolConfig, AdvisorServerToolConfigTypedDict, ) + from .agentmessageitem import ( + Agent, + AgentMessageItem, + AgentMessageItemContentInputImage, + AgentMessageItemContentInputImageTypedDict, + AgentMessageItemContentUnion, + AgentMessageItemContentUnionTypedDict, + AgentMessageItemDetail, + AgentMessageItemTypeInputImage, + AgentMessageItemTypedDict, + AgentTypedDict, + ContentEncryptedContent, + ContentEncryptedContentTypedDict, + TypeAgentMessage, + TypeEncryptedContent, + ) from .annotationaddedevent import ( AnnotationAddedEvent, AnnotationAddedEventType, @@ -711,6 +727,11 @@ VideoURL, VideoURLTypedDict, ) + from .contextcompactionitem import ( + ContextCompactionItem, + ContextCompactionItemType, + ContextCompactionItemTypedDict, + ) from .contextcompressionengine import ContextCompressionEngine from .contextcompressionplugin import ( ContextCompressionPlugin, @@ -2802,6 +2823,16 @@ "AdvisorServerToolOpenRouter", "AdvisorServerToolOpenRouterType", "AdvisorServerToolOpenRouterTypedDict", + "Agent", + "AgentMessageItem", + "AgentMessageItemContentInputImage", + "AgentMessageItemContentInputImageTypedDict", + "AgentMessageItemContentUnion", + "AgentMessageItemContentUnionTypedDict", + "AgentMessageItemDetail", + "AgentMessageItemTypeInputImage", + "AgentMessageItemTypedDict", + "AgentTypedDict", "AllowedTools", "AllowedToolsTypedDict", "AllowedToolsUnion", @@ -3221,6 +3252,8 @@ "ContainerTypedDict", "ContentCompaction", "ContentCompactionTypedDict", + "ContentEncryptedContent", + "ContentEncryptedContentTypedDict", "ContentFilterAction", "ContentFilterBuiltinAction", "ContentFilterBuiltinEntry", @@ -3276,6 +3309,9 @@ "ContentWebSearchToolResultError", "ContentWebSearchToolResultErrorTypedDict", "ContentWebSearchToolResultTypedDict", + "ContextCompactionItem", + "ContextCompactionItemType", + "ContextCompactionItemTypedDict", "ContextCompressionEngine", "ContextCompressionPlugin", "ContextCompressionPluginID", @@ -4611,6 +4647,7 @@ "TypeAdaptive", "TypeAdditionalTools", "TypeAdvisor20260301", + "TypeAgentMessage", "TypeAny", "TypeBash20250124", "TypeClearThinking20251015", @@ -4621,6 +4658,7 @@ "TypeDisabled", "TypeDocument", "TypeEnabled", + "TypeEncryptedContent", "TypeExec", "TypeExit", "TypeFileSearch", @@ -4827,6 +4865,20 @@ "AdvisorServerToolOpenRouterTypedDict": ".advisorservertool_openrouter", "AdvisorServerToolConfig": ".advisorservertoolconfig", "AdvisorServerToolConfigTypedDict": ".advisorservertoolconfig", + "Agent": ".agentmessageitem", + "AgentMessageItem": ".agentmessageitem", + "AgentMessageItemContentInputImage": ".agentmessageitem", + "AgentMessageItemContentInputImageTypedDict": ".agentmessageitem", + "AgentMessageItemContentUnion": ".agentmessageitem", + "AgentMessageItemContentUnionTypedDict": ".agentmessageitem", + "AgentMessageItemDetail": ".agentmessageitem", + "AgentMessageItemTypeInputImage": ".agentmessageitem", + "AgentMessageItemTypedDict": ".agentmessageitem", + "AgentTypedDict": ".agentmessageitem", + "ContentEncryptedContent": ".agentmessageitem", + "ContentEncryptedContentTypedDict": ".agentmessageitem", + "TypeAgentMessage": ".agentmessageitem", + "TypeEncryptedContent": ".agentmessageitem", "AnnotationAddedEvent": ".annotationaddedevent", "AnnotationAddedEventType": ".annotationaddedevent", "AnnotationAddedEventTypedDict": ".annotationaddedevent", @@ -5290,6 +5342,9 @@ "ContentPartVideoTypedDict": ".contentpartvideo", "VideoURL": ".contentpartvideo", "VideoURLTypedDict": ".contentpartvideo", + "ContextCompactionItem": ".contextcompactionitem", + "ContextCompactionItemType": ".contextcompactionitem", + "ContextCompactionItemTypedDict": ".contextcompactionitem", "ContextCompressionEngine": ".contextcompressionengine", "ContextCompressionPlugin": ".contextcompressionplugin", "ContextCompressionPluginID": ".contextcompressionplugin", diff --git a/src/openrouter/components/agentmessageitem.py b/src/openrouter/components/agentmessageitem.py new file mode 100644 index 0000000..612d339 --- /dev/null +++ b/src/openrouter/components/agentmessageitem.py @@ -0,0 +1,213 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .inputtext import InputText, InputTextTypedDict +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from openrouter.utils import get_discriminator +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from typing import Any, Dict, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class AgentTypedDict(TypedDict): + agent_name: str + + +class Agent(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + agent_name: str + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + +TypeEncryptedContent = Literal["encrypted_content",] + + +class ContentEncryptedContentTypedDict(TypedDict): + encrypted_content: str + type: TypeEncryptedContent + + +class ContentEncryptedContent(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + encrypted_content: str + + type: TypeEncryptedContent + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + +AgentMessageItemDetail = Union[ + Literal[ + "auto", + "high", + "low", + "original", + ], + UnrecognizedStr, +] + + +AgentMessageItemTypeInputImage = Literal["input_image",] + + +class AgentMessageItemContentInputImageTypedDict(TypedDict): + r"""Image input content item""" + + detail: AgentMessageItemDetail + type: AgentMessageItemTypeInputImage + image_url: NotRequired[Nullable[str]] + + +class AgentMessageItemContentInputImage(BaseModel): + r"""Image input content item""" + + detail: AgentMessageItemDetail + + type: AgentMessageItemTypeInputImage + + image_url: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["image_url"]) + nullable_fields = set(["image_url"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +AgentMessageItemContentUnionTypedDict = TypeAliasType( + "AgentMessageItemContentUnionTypedDict", + Union[ + InputTextTypedDict, + AgentMessageItemContentInputImageTypedDict, + ContentEncryptedContentTypedDict, + ], +) + + +AgentMessageItemContentUnion = Annotated[ + Union[ + Annotated[InputText, Tag("input_text")], + Annotated[AgentMessageItemContentInputImage, Tag("input_image")], + Annotated[ContentEncryptedContent, Tag("encrypted_content")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] + + +TypeAgentMessage = Literal["agent_message",] + + +class AgentMessageItemTypedDict(TypedDict): + r"""A message routed between agents in a multi-agent session""" + + author: str + content: List[AgentMessageItemContentUnionTypedDict] + recipient: str + type: TypeAgentMessage + agent: NotRequired[Nullable[AgentTypedDict]] + id: NotRequired[Nullable[str]] + + +class AgentMessageItem(BaseModel): + r"""A message routed between agents in a multi-agent session""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + author: str + + content: List[AgentMessageItemContentUnion] + + recipient: str + + type: TypeAgentMessage + + agent: OptionalNullable[Agent] = UNSET + + id: OptionalNullable[str] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["agent", "id"]) + nullable_fields = set(["agent", "id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/openrouter/components/compactionitem.py b/src/openrouter/components/compactionitem.py index 0c6d749..fd2fa67 100644 --- a/src/openrouter/components/compactionitem.py +++ b/src/openrouter/components/compactionitem.py @@ -8,8 +8,9 @@ UNSET, UNSET_SENTINEL, ) -from pydantic import model_serializer -from typing import Literal +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Literal from typing_extensions import NotRequired, TypedDict @@ -27,12 +28,25 @@ class CompactionItemTypedDict(TypedDict): class CompactionItem(BaseModel): r"""A context compaction marker with encrypted summary""" + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + encrypted_content: str type: CompactionItemType id: OptionalNullable[str] = UNSET + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["id"]) @@ -43,6 +57,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -55,5 +70,7 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val + for k, v in serialized.items(): + m[k] = v return m diff --git a/src/openrouter/components/contextcompactionitem.py b/src/openrouter/components/contextcompactionitem.py new file mode 100644 index 0000000..591e51c --- /dev/null +++ b/src/openrouter/components/contextcompactionitem.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from openrouter.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Literal +from typing_extensions import NotRequired, TypedDict + + +ContextCompactionItemType = Literal["context_compaction",] + + +class ContextCompactionItemTypedDict(TypedDict): + r"""A context compaction marker with an optional encrypted summary""" + + type: ContextCompactionItemType + encrypted_content: NotRequired[Nullable[str]] + id: NotRequired[Nullable[str]] + + +class ContextCompactionItem(BaseModel): + r"""A context compaction marker with an optional encrypted summary""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Nullable[Any]] = pydantic.Field(init=False) + + type: ContextCompactionItemType + + encrypted_content: OptionalNullable[str] = UNSET + + id: OptionalNullable[str] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["encrypted_content", "id"]) + nullable_fields = set(["encrypted_content", "id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/openrouter/components/inputs_union.py b/src/openrouter/components/inputs_union.py index 138ccb8..39681f4 100644 --- a/src/openrouter/components/inputs_union.py +++ b/src/openrouter/components/inputs_union.py @@ -2,12 +2,14 @@ from __future__ import annotations from .additionaltoolsitem import AdditionalToolsItem, AdditionalToolsItemTypedDict +from .agentmessageitem import AgentMessageItem, AgentMessageItemTypedDict from .applypatchcallitem import ApplyPatchCallItem, ApplyPatchCallItemTypedDict from .applypatchcalloutputitem import ( ApplyPatchCallOutputItem, ApplyPatchCallOutputItemTypedDict, ) from .compactionitem import CompactionItem, CompactionItemTypedDict +from .contextcompactionitem import ContextCompactionItem, ContextCompactionItemTypedDict from .customtoolcallitem import CustomToolCallItem, CustomToolCallItemTypedDict from .customtoolcalloutputitem import ( CustomToolCallOutputItem, @@ -376,50 +378,52 @@ def serialize_model(self, handler): Union[ ItemReferenceItemTypedDict, CompactionItemTypedDict, + InputMessageItemTypedDict, AdditionalToolsItemTypedDict, - OutputImageGenerationCallItemTypedDict, + EasyInputMessageTypedDict, + ContextCompactionItemTypedDict, + OutputWebSearchServerToolItemTypedDict, + CustomToolCallOutputItemTypedDict, LocalShellCallOutputItemTypedDict, OutputToolSearchServerToolItemTypedDict, OutputFileSearchServerToolItemTypedDict, - CustomToolCallOutputItemTypedDict, - InputMessageItemTypedDict, - EasyInputMessageTypedDict, - OutputWebSearchServerToolItemTypedDict, OutputWebSearchCallItemTypedDict, OutputFileSearchCallItemTypedDict, - OutputDatetimeItemTypedDict, + OutputImageGenerationCallItemTypedDict, OutputApplyPatchServerToolItemTypedDict, + McpApprovalRequestItemTypedDict, + OutputDatetimeItemTypedDict, FunctionCallOutputItemTypedDict, - LocalShellCallItemTypedDict, - McpListToolsItemTypedDict, - OutputSearchModelsServerToolItemTypedDict, + ApplyPatchCallItemTypedDict, ApplyPatchCallOutputItemTypedDict, - OutputMcpServerToolItemTypedDict, - OutputBrowserUseServerToolItemTypedDict, McpApprovalResponseItemTypedDict, + OutputBrowserUseServerToolItemTypedDict, + McpListToolsItemTypedDict, OutputTextEditorServerToolItemTypedDict, - ApplyPatchCallItemTypedDict, - McpApprovalRequestItemTypedDict, - OutputCodeInterpreterCallItemTypedDict, - OutputMemoryServerToolItemTypedDict, + LocalShellCallItemTypedDict, + OutputSearchModelsServerToolItemTypedDict, + OutputMcpServerToolItemTypedDict, CustomToolCallItemTypedDict, - InputsMessageTypedDict, + OutputComputerCallItemTypedDict, + OutputCodeInterpreterCallItemTypedDict, OutputCustomToolCallItemTypedDict, - ShellCallOutputItemTypedDict, + InputsMessageTypedDict, + OutputMemoryServerToolItemTypedDict, ShellCallItemTypedDict, - OutputComputerCallItemTypedDict, + ShellCallOutputItemTypedDict, OutputBashServerToolItemTypedDict, McpCallItemTypedDict, - OutputImageGenerationServerToolItemTypedDict, OutputFunctionCallItemTypedDict, + AgentMessageItemTypedDict, FunctionCallItemTypedDict, - OutputFilesServerToolItemTypedDict, + OutputImageGenerationServerToolItemTypedDict, OutputSubagentServerToolItemTypedDict, + InputsReasoningTypedDict, OutputAdvisorServerToolItemTypedDict, + OutputCodeInterpreterServerToolItemTypedDict, OutputWebFetchServerToolItemTypedDict, + OutputFilesServerToolItemTypedDict, ReasoningItemTypedDict, - OutputCodeInterpreterServerToolItemTypedDict, - InputsReasoningTypedDict, OutputFusionServerToolItemTypedDict, ], ) @@ -430,50 +434,52 @@ def serialize_model(self, handler): Union[ ItemReferenceItem, CompactionItem, + InputMessageItem, AdditionalToolsItem, - OutputImageGenerationCallItem, + EasyInputMessage, + ContextCompactionItem, + OutputWebSearchServerToolItem, + CustomToolCallOutputItem, LocalShellCallOutputItem, OutputToolSearchServerToolItem, OutputFileSearchServerToolItem, - CustomToolCallOutputItem, - InputMessageItem, - EasyInputMessage, - OutputWebSearchServerToolItem, OutputWebSearchCallItem, OutputFileSearchCallItem, - OutputDatetimeItem, + OutputImageGenerationCallItem, OutputApplyPatchServerToolItem, + McpApprovalRequestItem, + OutputDatetimeItem, FunctionCallOutputItem, - LocalShellCallItem, - McpListToolsItem, - OutputSearchModelsServerToolItem, + ApplyPatchCallItem, ApplyPatchCallOutputItem, - OutputMcpServerToolItem, - OutputBrowserUseServerToolItem, McpApprovalResponseItem, + OutputBrowserUseServerToolItem, + McpListToolsItem, OutputTextEditorServerToolItem, - ApplyPatchCallItem, - McpApprovalRequestItem, - OutputCodeInterpreterCallItem, - OutputMemoryServerToolItem, + LocalShellCallItem, + OutputSearchModelsServerToolItem, + OutputMcpServerToolItem, CustomToolCallItem, - InputsMessage, + OutputComputerCallItem, + OutputCodeInterpreterCallItem, OutputCustomToolCallItem, - ShellCallOutputItem, + InputsMessage, + OutputMemoryServerToolItem, ShellCallItem, - OutputComputerCallItem, + ShellCallOutputItem, OutputBashServerToolItem, McpCallItem, - OutputImageGenerationServerToolItem, OutputFunctionCallItem, + AgentMessageItem, FunctionCallItem, - OutputFilesServerToolItem, + OutputImageGenerationServerToolItem, OutputSubagentServerToolItem, + InputsReasoning, OutputAdvisorServerToolItem, + OutputCodeInterpreterServerToolItem, OutputWebFetchServerToolItem, + OutputFilesServerToolItem, ReasoningItem, - OutputCodeInterpreterServerToolItem, - InputsReasoning, OutputFusionServerToolItem, ], ) diff --git a/uv.lock b/uv.lock index 61e791f..405c5a6 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "0.11.18" +version = "0.11.19" source = { editable = "." } dependencies = [ { name = "httpcore" },