diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 41c54077..1705aa28 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: e23d814be45efb3a8f0ce93a58e6f1ee
+ docChecksum: 186444ac50b88d1207a835200608f251
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
- releaseVersion: 1.1.81
- configChecksum: 4c8ecd6c854e57a38d160410ab56f977
+ releaseVersion: 1.1.82
+ configChecksum: 6b02708e9a731c541c4323938516a205
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
- generation_id: 9534f798-9ad9-4bf3-8e07-503c0ef9edeb
- pristine_commit_hash: 5982ac8d3875e7a1908e5283e00aab0ca4d39c54
- pristine_tree_hash: b5b39013d72c09f032f8a0278f41fd7a1e664eca
+ generation_id: e0f8cd63-f2af-4039-837c-6f102e5afaa8
+ pristine_commit_hash: 914334dd4b71b6cea69a39113b6421a255db660e
+ pristine_tree_hash: 3b27fb8c1c6eb0f50343d764f364332c24110317
features:
python:
acceptHeaders: 3.0.0
@@ -1358,8 +1358,8 @@ trackedFiles:
pristine_git_object: 00e55b66a5ea22e92742f1bc669c12bbdbef3c0e
docs/components/containerautoenvironment.mdx:
id: 650b2f4ccef7
- last_write_checksum: sha1:001869d2818fe3dc3d890364d05f884e8030b808
- pristine_git_object: f902de7beb69ab7afaf4df8d03b3440f77f57b9a
+ last_write_checksum: sha1:345253c907cde799be825591bddba280d23ae734
+ pristine_git_object: cb58029793ced0911cd38b8975c750906c4e3707
docs/components/containerautoenvironmenttype.mdx:
id: 1e247d70245d
last_write_checksum: sha1:66636ec50e7863bc4c8f9fb4f95b1e895f429b97
@@ -1384,10 +1384,26 @@ trackedFiles:
id: 3a64638e26d2
last_write_checksum: sha1:24d370611c20eaae07bbe4d65d76eacf3bc03cf9
pristine_git_object: d202c01bb7fea9b2ccc19803a9c36ed5e3354930
+ docs/components/containernetworkpolicy.mdx:
+ id: abc988eef1de
+ last_write_checksum: sha1:6738315e63c4b38773bc76e7027856921eed4605
+ pristine_git_object: 36da413ab28af72c313945845537b30e57a3d403
+ docs/components/containernetworkpolicyallowlist.mdx:
+ id: 0e4eb164ee13
+ last_write_checksum: sha1:e2d377b63f70c28e800d56255175fae906811c5e
+ pristine_git_object: 9855092889452d12f4125a4597e30e8addd167d9
+ docs/components/containernetworkpolicydisabled.mdx:
+ id: fe6ed8622136
+ last_write_checksum: sha1:b5f138dcd97c47e6677dff912d9b4e8b2d561268
+ pristine_git_object: a2e14bd5644a02b093b74848dfad2c269cc68682
+ docs/components/containernetworkpolicytypedisabled.mdx:
+ id: c1f2db42c9fe
+ last_write_checksum: sha1:9674f78330cbdbc52a96f3a72e007e91b8a6197e
+ pristine_git_object: d049147a8daf05aece7e56fe5db7cb85a50640e4
docs/components/containerreferenceenvironment.mdx:
id: 80d581804fd7
- last_write_checksum: sha1:36ffda3a629e12783433f0ab5ec923626ea9cb8f
- pristine_git_object: b950cbb6097f05ae389b152519e50e807904dd25
+ last_write_checksum: sha1:13f95aca55d7d00b2f4e35d974e3a97a4eb183f6
+ pristine_git_object: 1cb0abb76bc24aabd265a8797801114fc7383189
docs/components/containerreferenceenvironmenttype.mdx:
id: 3baa9f801f17
last_write_checksum: sha1:e41a1c97b5ed7ef5e404bff0f2a7a65bd262ac17
@@ -5166,12 +5182,16 @@ trackedFiles:
pristine_git_object: 970ce43cb7364b35d06aa17346d9396e95f405ec
docs/components/thinkingdisabled.mdx:
id: cf4dce085103
- last_write_checksum: sha1:0d5c4141cae38ef701eb469c9cdb838c3737420f
- pristine_git_object: ef2829f67a7bb69b05b3322713c87a46d5e725cb
+ last_write_checksum: sha1:9a16b391d2f8e4caed2ec0a94783ea31f802c6c8
+ pristine_git_object: 5da5da387900ed3b48b59d3692794e672dd921ae
docs/components/thinkingenabled.mdx:
id: 453ea2c27cab
last_write_checksum: sha1:ad555fb37bfcdb7e7ac537df4de7e028c71aed00
pristine_git_object: 533ba7c8fa879e91e3134d65f5f0282aca3ba170
+ docs/components/thinkingtypedisabled.mdx:
+ id: 9f8561d6342c
+ last_write_checksum: sha1:6226a4ff5f99a852e34cd5053851a507cb3a9e7c
+ pristine_git_object: 834297f4c2167ee22b57bd3cfb126b37662cd1ae
docs/components/timings.mdx:
id: f8f7eb6e6313
last_write_checksum: sha1:4061554783746bdb572dc5eb4ae678a677fc6c5e
@@ -5304,6 +5324,10 @@ trackedFiles:
id: 806319bb3eee
last_write_checksum: sha1:486521730ba37bb9393665797e1f1cc775766874
pristine_git_object: b03f1ab2115442904e357d6aee81e6656a6b6f15
+ docs/components/typeallowlist.mdx:
+ id: 8b9fc5747d59
+ last_write_checksum: sha1:4f0c78db55a4654edd07b82e0d5874639fd53ec4
+ pristine_git_object: edb2c4a49e7ac4488505ac5fba24ec02d663ad9e
docs/components/typeany.mdx:
id: b3bd6b0de96e
last_write_checksum: sha1:7d4c65b6740216e057d36ea498509249d9c97354
@@ -5328,10 +5352,6 @@ trackedFiles:
id: 6afc200110eb
last_write_checksum: sha1:67b122fb7d678523303b419575d85075c6cf260a
pristine_git_object: 8c90b7c0c4ccd514fd2b06a1e10c9879298978ef
- docs/components/typedisabled.mdx:
- id: 38f9c06b7850
- last_write_checksum: sha1:708a451e2d389c0c40fed9aa44a6186837103a4e
- pristine_git_object: 65c2b6da67afde9dcf0cddf87d95465bafb054bc
docs/components/typedocument.mdx:
id: fa9ad2eb2436
last_write_checksum: sha1:fe8fa4d17512f8263bea11e1e294e6079c223312
@@ -7358,8 +7378,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
- last_write_checksum: sha1:17abd609fdb3afcac3eb99dcb66a854ef28eaea9
- pristine_git_object: 49f3fc2baf87a081814ed289a2fa864bb3a82ce3
+ last_write_checksum: sha1:ee5273941a01e88fc4491ce707da7194cb8bd4c2
+ pristine_git_object: c62bd79fcd4210fbd9d956a6f1b068c972ad287d
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7386,8 +7406,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
- last_write_checksum: sha1:ffa09155e99b5078fb12f5a53e884b85faa9cef2
- pristine_git_object: 8c4be141657683598f6fd9135e9894ed0443097a
+ last_write_checksum: sha1:dcd38933ce3fe0560a62846e839314f4a75de73e
+ pristine_git_object: 66415488ba4a2b6bdfa9d321923b27b511c61cf0
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9
@@ -7426,8 +7446,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
- last_write_checksum: sha1:ebd95cc90194d32d4141fc2396523f97938d7a21
- pristine_git_object: 0d8caf88d87547770651198530fbddaaa428cb16
+ last_write_checksum: sha1:7d0f83beca07f6a7087127d97dcb4d27477c937d
+ pristine_git_object: 345c915e9f71f8a2e419341cec7101dfb1e27637
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
@@ -8026,8 +8046,8 @@ trackedFiles:
pristine_git_object: c5b073593a00002f60feb94eccc8e42be28282c3
src/openrouter/components/containerautoenvironment.py:
id: 0c41c2609d28
- last_write_checksum: sha1:d6b8b06b51d5f0ffc28b1644843a8fa8a576d31b
- pristine_git_object: 78d8937bcdaf636d1df431e7fe868ae820b5f40c
+ last_write_checksum: sha1:3da91f1ce9fb73a9f68d8147c0a752498b5ffeb8
+ pristine_git_object: 6e5f3ee912f795d88f51e2eca082e07bc28f703f
src/openrouter/components/containerfile.py:
id: 2dc442adcee4
last_write_checksum: sha1:ab38fa64e20369568413f106c30aa7ae60de692a
@@ -8036,10 +8056,14 @@ trackedFiles:
id: f1d494b9a4e9
last_write_checksum: sha1:cfcee9763748a5ad9ea44d0da222e2ecca8635b5
pristine_git_object: a2593a4d8fab2fda41f2476015a4f60f9898da2f
+ src/openrouter/components/containernetworkpolicy.py:
+ id: 1220566c09a4
+ last_write_checksum: sha1:2753c594b183ed5a881591ffe473fcc3763afb6f
+ pristine_git_object: bde618ee586c10f7c2627b197d6086796fa2b682
src/openrouter/components/containerreferenceenvironment.py:
id: deb4c42c7020
- last_write_checksum: sha1:23898392d6671cfb7ed9270778801922eef203b6
- pristine_git_object: 4a9d2ebeabd4a7bb04eca94744a005c2c234f5f0
+ last_write_checksum: sha1:423ac71d5ff279b938b49738fe69f1a874cbe4dc
+ pristine_git_object: dddfdc9a61ec30a322fa4d2aac75741f60ffa832
src/openrouter/components/contentfilteraction.py:
id: 55792ae75016
last_write_checksum: sha1:cba4f155efe30819eea009eaf90bdbf0a497b7b0
@@ -8730,8 +8754,8 @@ trackedFiles:
pristine_git_object: 7e69d1f775baece5f94b03d35bcd884d5e6f519d
src/openrouter/components/messagesrequest.py:
id: 72b1f339024d
- last_write_checksum: sha1:760292062d2ff56aff19302d8a2094c793704d7c
- pristine_git_object: 28b51a4be794559958948c0e64bf6761b41e8139
+ last_write_checksum: sha1:8275acc6a16596cdcc5f7ce0842724c0dc459432
+ pristine_git_object: 1c780c7ca333d557c86d405d85430f523f7aaa91
src/openrouter/components/messagessearchmodelsservertool.py:
id: 53d755edb120
last_write_checksum: sha1:389786fc22ba4bb47b0a086b7aa321f2f04fe943
@@ -12386,3 +12410,4 @@ examples:
"503":
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
examplesVersion: 1.0.2
+releaseNotes: "## Python SDK Changes:\n* `open_router.chat.send()`: \n * `request.tools[].union(BashServerTool).parameters.environment` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.tools[].union(BashServerTool).parameters.environment` **Changed**\n* `open_router.presets.create_presets_messages()`: \n * `request.tools[].union(BashServerTool).parameters.environment` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(BashServerTool).parameters.environment` **Changed**\n* `open_router.responses.send()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(BashServerTool).parameters.environment` **Changed**\n* `open_router.beta.responses.send()`: \n * `request.input.union(Array<>)[].union(AdditionalToolsItem).tools[].union(ShellServerTool_OpenRouter).parameters.environment` **Changed**\n"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index bd582ca9..6c0f3f70 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
- version: 1.1.81
+ version: 1.1.82
additionalDependencies:
dev: {}
main: {}
diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml
index ea845635..6850780d 100644
--- a/.speakeasy/out.openapi.yaml
+++ b/.speakeasy/out.openapi.yaml
@@ -6624,6 +6624,8 @@ components:
example:
type: 'container_auto'
properties:
+ network_policy:
+ $ref: '#/components/schemas/ContainerNetworkPolicy'
type:
enum:
- 'container_auto'
@@ -6705,6 +6707,46 @@ components:
- 'last_id'
- 'has_more'
type: 'object'
+ ContainerNetworkPolicy:
+ anyOf:
+ - properties:
+ type:
+ description: 'No outbound internet access.'
+ enum:
+ - 'disabled'
+ type: 'string'
+ required:
+ - 'type'
+ type: 'object'
+ - properties:
+ allowed_domains:
+ description: 'Hostnames the container may reach over ports 80/443 (max 50). Entries are lowercase hostnames or glob patterns where * matches any run of characters (e.g. *.example.com). An exact hostname does not cover its subdomains — use a glob or list each hostname. pip needs both pypi.org and files.pythonhosted.org (or *.pythonhosted.org).'
+ example:
+ - 'pypi.org'
+ - 'files.pythonhosted.org'
+ items:
+ maxLength: 253
+ minLength: 1
+ pattern: '^[a-z0-9*]([a-z0-9*-]{0,61}[a-z0-9*])?(\.[a-z0-9*]([a-z0-9*-]{0,61}[a-z0-9*])?)*$'
+ type: 'string'
+ maxItems: 50
+ minItems: 1
+ type: 'array'
+ type:
+ description: 'Outbound access restricted to the listed domains.'
+ enum:
+ - 'allowlist'
+ type: 'string'
+ required:
+ - 'type'
+ - 'allowed_domains'
+ type: 'object'
+ description: 'Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"].'
+ example:
+ allowed_domains:
+ - 'pypi.org'
+ - 'files.pythonhosted.org'
+ type: 'allowlist'
ContainerReferenceEnvironment:
description: 'Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.'
example:
@@ -6718,6 +6760,8 @@ components:
minLength: 1
pattern: '^[\w-]+$'
type: 'string'
+ network_policy:
+ $ref: '#/components/schemas/ContainerNetworkPolicy'
type:
enum:
- 'container_reference'
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 2dcfa78a..246a3f74 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:d966a380c4881c5f75315011fe4731f1e74b677f405a8758fbae7ee77591a077
- sourceBlobDigest: sha256:d9f7f65a79bd68786ae40d49ec6ae88d47e40419cbdbd71c719221bc21225a9c
+ sourceRevisionDigest: sha256:0092c7ac1b0ecd92a3d9dfa895ae3122821745e1bb2bf1281b4a9f2fa2db5a0d
+ sourceBlobDigest: sha256:ad9a760785d69b72c95fda1d0efe927d16f005536045dad1d758035c81c98d1c
tags:
- latest
- 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
- sourceRevisionDigest: sha256:d966a380c4881c5f75315011fe4731f1e74b677f405a8758fbae7ee77591a077
- sourceBlobDigest: sha256:d9f7f65a79bd68786ae40d49ec6ae88d47e40419cbdbd71c719221bc21225a9c
+ sourceRevisionDigest: sha256:0092c7ac1b0ecd92a3d9dfa895ae3122821745e1bb2bf1281b4a9f2fa2db5a0d
+ sourceBlobDigest: sha256:ad9a760785d69b72c95fda1d0efe927d16f005536045dad1d758035c81c98d1c
codeSamplesNamespace: open-router-python-code-samples
- codeSamplesRevisionDigest: sha256:f540ff84d7912a5c0709ed0cc82f7bcd6454bb09437dfdfe2101fd483052cd99
+ codeSamplesRevisionDigest: sha256:265040464ee7de25944d60e31fcc4320ffe2d68c0cae5758f98b0286e613df91
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
diff --git a/RELEASES.md b/RELEASES.md
index 94b8c80b..e5446a1f 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1599,4 +1599,14 @@ Based on:
### Generated
- [python v1.1.81] .
### Releases
-- [PyPI v1.1.81] https://pypi.org/project/openrouter/1.1.81 - .
\ No newline at end of file
+- [PyPI v1.1.81] https://pypi.org/project/openrouter/1.1.81 - .
+
+## 2026-08-25 04:17:14
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v1.1.82] .
+### Releases
+- [PyPI v1.1.82] https://pypi.org/project/openrouter/1.1.82 - .
\ No newline at end of file
diff --git a/docs/components/containerautoenvironment.mdx b/docs/components/containerautoenvironment.mdx
index f902de7b..cb580297 100644
--- a/docs/components/containerautoenvironment.mdx
+++ b/docs/components/containerautoenvironment.mdx
@@ -7,6 +7,7 @@ An OpenRouter-managed, auto-provisioned ephemeral container.
## Fields
-| Field | Type | Required | Description |
-| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
-| `type` | [components.ContainerAutoEnvironmentType](../components/containerautoenvironmenttype.mdx) | :heavy_check_mark: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `network_policy` | [Optional[components.ContainerNetworkPolicy]](../components/containernetworkpolicy.mdx) | :heavy_minus_sign: | Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"]. | \{
"allowed_domains": [
"pypi.org",
"files.pythonhosted.org"
],
"type": "allowlist"
} |
+| `type` | [components.ContainerAutoEnvironmentType](../components/containerautoenvironmenttype.mdx) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/containernetworkpolicy.mdx b/docs/components/containernetworkpolicy.mdx
new file mode 100644
index 00000000..36da413a
--- /dev/null
+++ b/docs/components/containernetworkpolicy.mdx
@@ -0,0 +1,21 @@
+---
+title: "ContainerNetworkPolicy"
+---
+
+Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"].
+
+
+## Supported Types
+
+### `components.ContainerNetworkPolicyDisabled`
+
+```python
+value: components.ContainerNetworkPolicyDisabled = /* values here */
+```
+
+### `components.ContainerNetworkPolicyAllowlist`
+
+```python
+value: components.ContainerNetworkPolicyAllowlist = /* values here */
+```
+
diff --git a/docs/components/containernetworkpolicyallowlist.mdx b/docs/components/containernetworkpolicyallowlist.mdx
new file mode 100644
index 00000000..98550928
--- /dev/null
+++ b/docs/components/containernetworkpolicyallowlist.mdx
@@ -0,0 +1,10 @@
+---
+title: "ContainerNetworkPolicyAllowlist"
+---
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `allowed_domains` | List[*str*] | :heavy_check_mark: | Hostnames the container may reach over ports 80/443 (max 50). Entries are lowercase hostnames or glob patterns where * matches any run of characters (e.g. *.example.com). An exact hostname does not cover its subdomains — use a glob or list each hostname. pip needs both pypi.org and files.pythonhosted.org (or *.pythonhosted.org). | [
"pypi.org",
"files.pythonhosted.org"
] |
+| `type` | [components.TypeAllowlist](../components/typeallowlist.mdx) | :heavy_check_mark: | Outbound access restricted to the listed domains. | |
\ No newline at end of file
diff --git a/docs/components/containernetworkpolicydisabled.mdx b/docs/components/containernetworkpolicydisabled.mdx
new file mode 100644
index 00000000..a2e14bd5
--- /dev/null
+++ b/docs/components/containernetworkpolicydisabled.mdx
@@ -0,0 +1,9 @@
+---
+title: "ContainerNetworkPolicyDisabled"
+---
+
+## Fields
+
+| Field | Type | Required | Description |
+| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
+| `type` | [components.ContainerNetworkPolicyTypeDisabled](../components/containernetworkpolicytypedisabled.mdx) | :heavy_check_mark: | No outbound internet access. |
\ No newline at end of file
diff --git a/docs/components/containernetworkpolicytypedisabled.mdx b/docs/components/containernetworkpolicytypedisabled.mdx
new file mode 100644
index 00000000..d049147a
--- /dev/null
+++ b/docs/components/containernetworkpolicytypedisabled.mdx
@@ -0,0 +1,17 @@
+---
+title: "ContainerNetworkPolicyTypeDisabled"
+---
+
+No outbound internet access.
+
+## Example Usage
+
+```python
+from openrouter.components import ContainerNetworkPolicyTypeDisabled
+value: ContainerNetworkPolicyTypeDisabled = "disabled"
+```
+
+
+## Values
+
+- `"disabled"`
diff --git a/docs/components/containerreferenceenvironment.mdx b/docs/components/containerreferenceenvironment.mdx
index b950cbb6..1cb0abb7 100644
--- a/docs/components/containerreferenceenvironment.mdx
+++ b/docs/components/containerreferenceenvironment.mdx
@@ -10,4 +10,5 @@ Reference to a container by its canonical id — a previously returned container
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `container_id` | *str* | :heavy_check_mark: | Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace. | sess_abc123 |
+| `network_policy` | [Optional[components.ContainerNetworkPolicy]](../components/containernetworkpolicy.mdx) | :heavy_minus_sign: | Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"]. | \{
"allowed_domains": [
"pypi.org",
"files.pythonhosted.org"
],
"type": "allowlist"
} |
| `type` | [components.ContainerReferenceEnvironmentType](../components/containerreferenceenvironmenttype.mdx) | :heavy_check_mark: | N/A | |
\ No newline at end of file
diff --git a/docs/components/thinkingdisabled.mdx b/docs/components/thinkingdisabled.mdx
index ef2829f6..5da5da38 100644
--- a/docs/components/thinkingdisabled.mdx
+++ b/docs/components/thinkingdisabled.mdx
@@ -4,6 +4,6 @@ title: "ThinkingDisabled"
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
-| `type` | [components.TypeDisabled](../components/typedisabled.mdx) | :heavy_check_mark: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| `type` | [components.ThinkingTypeDisabled](../components/thinkingtypedisabled.mdx) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/components/thinkingtypedisabled.mdx b/docs/components/thinkingtypedisabled.mdx
new file mode 100644
index 00000000..834297f4
--- /dev/null
+++ b/docs/components/thinkingtypedisabled.mdx
@@ -0,0 +1,15 @@
+---
+title: "ThinkingTypeDisabled"
+---
+
+## Example Usage
+
+```python
+from openrouter.components import ThinkingTypeDisabled
+value: ThinkingTypeDisabled = "disabled"
+```
+
+
+## Values
+
+- `"disabled"`
diff --git a/docs/components/typeallowlist.mdx b/docs/components/typeallowlist.mdx
new file mode 100644
index 00000000..edb2c4a4
--- /dev/null
+++ b/docs/components/typeallowlist.mdx
@@ -0,0 +1,17 @@
+---
+title: "TypeAllowlist"
+---
+
+Outbound access restricted to the listed domains.
+
+## Example Usage
+
+```python
+from openrouter.components import TypeAllowlist
+value: TypeAllowlist = "allowlist"
+```
+
+
+## Values
+
+- `"allowlist"`
diff --git a/docs/components/typedisabled.mdx b/docs/components/typedisabled.mdx
deleted file mode 100644
index 65c2b6da..00000000
--- a/docs/components/typedisabled.mdx
+++ /dev/null
@@ -1,15 +0,0 @@
----
-title: "TypeDisabled"
----
-
-## Example Usage
-
-```python
-from openrouter.components import TypeDisabled
-value: TypeDisabled = "disabled"
-```
-
-
-## Values
-
-- `"disabled"`
diff --git a/pyproject.toml b/pyproject.toml
index 49f3fc2b..c62bd79f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "openrouter"
-version = "1.1.81"
+version = "1.1.82"
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 8c4be141..66415488 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.81"
+__version__: str = "1.1.82"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.914.0"
-__user_agent__: str = "speakeasy-sdk/python 1.1.81 2.914.0 1.0.0 openrouter"
+__user_agent__: str = "speakeasy-sdk/python 1.1.82 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 0d8caf88..345c915e 100644
--- a/src/openrouter/components/__init__.py
+++ b/src/openrouter/components/__init__.py
@@ -751,6 +751,16 @@
ContainerFileListResponseObject,
ContainerFileListResponseTypedDict,
)
+ from .containernetworkpolicy import (
+ ContainerNetworkPolicy,
+ ContainerNetworkPolicyAllowlist,
+ ContainerNetworkPolicyAllowlistTypedDict,
+ ContainerNetworkPolicyDisabled,
+ ContainerNetworkPolicyDisabledTypedDict,
+ ContainerNetworkPolicyTypeDisabled,
+ ContainerNetworkPolicyTypedDict,
+ TypeAllowlist,
+ )
from .containerreferenceenvironment import (
ContainerReferenceEnvironment,
ContainerReferenceEnvironmentType,
@@ -1703,6 +1713,7 @@
ThinkingDisabledTypedDict,
ThinkingEnabled,
ThinkingEnabledTypedDict,
+ ThinkingTypeDisabled,
ThinkingTypedDict,
ToolAdvisor20260301,
ToolAdvisor20260301TypedDict,
@@ -1739,7 +1750,6 @@
TypeClearThinking20251015,
TypeClearToolUses20250919,
TypeCompact20260112,
- TypeDisabled,
TypeEnabled,
TypeNone,
TypeTextEditor20250124,
@@ -3670,6 +3680,13 @@
"ContainerFileObject",
"ContainerFileSource",
"ContainerFileTypedDict",
+ "ContainerNetworkPolicy",
+ "ContainerNetworkPolicyAllowlist",
+ "ContainerNetworkPolicyAllowlistTypedDict",
+ "ContainerNetworkPolicyDisabled",
+ "ContainerNetworkPolicyDisabledTypedDict",
+ "ContainerNetworkPolicyTypeDisabled",
+ "ContainerNetworkPolicyTypedDict",
"ContainerReferenceEnvironment",
"ContainerReferenceEnvironmentType",
"ContainerReferenceEnvironmentTypedDict",
@@ -5180,6 +5197,7 @@
"ThinkingDisabledTypedDict",
"ThinkingEnabled",
"ThinkingEnabledTypedDict",
+ "ThinkingTypeDisabled",
"ThinkingTypedDict",
"Timings",
"TimingsTypedDict",
@@ -5235,13 +5253,13 @@
"TypeAdditionalTools",
"TypeAdvisor20260301",
"TypeAgentMessage",
+ "TypeAllowlist",
"TypeAny",
"TypeBash20250124",
"TypeClearThinking20251015",
"TypeClearToolUses20250919",
"TypeCodeInterpreter",
"TypeCompact20260112",
- "TypeDisabled",
"TypeDocument",
"TypeEnabled",
"TypeEncryptedContent",
@@ -5960,6 +5978,14 @@
"ContainerFileListResponse": ".containerfilelistresponse",
"ContainerFileListResponseObject": ".containerfilelistresponse",
"ContainerFileListResponseTypedDict": ".containerfilelistresponse",
+ "ContainerNetworkPolicy": ".containernetworkpolicy",
+ "ContainerNetworkPolicyAllowlist": ".containernetworkpolicy",
+ "ContainerNetworkPolicyAllowlistTypedDict": ".containernetworkpolicy",
+ "ContainerNetworkPolicyDisabled": ".containernetworkpolicy",
+ "ContainerNetworkPolicyDisabledTypedDict": ".containernetworkpolicy",
+ "ContainerNetworkPolicyTypeDisabled": ".containernetworkpolicy",
+ "ContainerNetworkPolicyTypedDict": ".containernetworkpolicy",
+ "TypeAllowlist": ".containernetworkpolicy",
"ContainerReferenceEnvironment": ".containerreferenceenvironment",
"ContainerReferenceEnvironmentType": ".containerreferenceenvironment",
"ContainerReferenceEnvironmentTypedDict": ".containerreferenceenvironment",
@@ -6682,6 +6708,7 @@
"ThinkingDisabledTypedDict": ".messagesrequest",
"ThinkingEnabled": ".messagesrequest",
"ThinkingEnabledTypedDict": ".messagesrequest",
+ "ThinkingTypeDisabled": ".messagesrequest",
"ThinkingTypedDict": ".messagesrequest",
"ToolAdvisor20260301": ".messagesrequest",
"ToolAdvisor20260301TypedDict": ".messagesrequest",
@@ -6718,7 +6745,6 @@
"TypeClearThinking20251015": ".messagesrequest",
"TypeClearToolUses20250919": ".messagesrequest",
"TypeCompact20260112": ".messagesrequest",
- "TypeDisabled": ".messagesrequest",
"TypeEnabled": ".messagesrequest",
"TypeNone": ".messagesrequest",
"TypeTextEditor20250124": ".messagesrequest",
diff --git a/src/openrouter/components/containerautoenvironment.py b/src/openrouter/components/containerautoenvironment.py
index 78d8937b..6e5f3ee9 100644
--- a/src/openrouter/components/containerautoenvironment.py
+++ b/src/openrouter/components/containerautoenvironment.py
@@ -1,9 +1,14 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel
-from typing import Literal
-from typing_extensions import TypedDict
+from .containernetworkpolicy import (
+ ContainerNetworkPolicy,
+ ContainerNetworkPolicyTypedDict,
+)
+from openrouter.types import BaseModel, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
ContainerAutoEnvironmentType = Literal["container_auto",]
@@ -13,9 +18,30 @@ class ContainerAutoEnvironmentTypedDict(TypedDict):
r"""An OpenRouter-managed, auto-provisioned ephemeral container."""
type: ContainerAutoEnvironmentType
+ network_policy: NotRequired[ContainerNetworkPolicyTypedDict]
+ r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
class ContainerAutoEnvironment(BaseModel):
r"""An OpenRouter-managed, auto-provisioned ephemeral container."""
type: ContainerAutoEnvironmentType
+
+ network_policy: Optional[ContainerNetworkPolicy] = None
+ r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = set(["network_policy"])
+ 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))
+
+ if val != UNSET_SENTINEL:
+ if val is not None or k not in optional_fields:
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/containernetworkpolicy.py b/src/openrouter/components/containernetworkpolicy.py
new file mode 100644
index 00000000..bde618ee
--- /dev/null
+++ b/src/openrouter/components/containernetworkpolicy.py
@@ -0,0 +1,61 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from openrouter.types import BaseModel
+from openrouter.utils import get_discriminator
+from pydantic import Discriminator, Tag
+from typing import List, Literal, Union
+from typing_extensions import Annotated, TypeAliasType, TypedDict
+
+
+TypeAllowlist = Literal["allowlist",]
+r"""Outbound access restricted to the listed domains."""
+
+
+class ContainerNetworkPolicyAllowlistTypedDict(TypedDict):
+ allowed_domains: List[str]
+ r"""Hostnames the container may reach over ports 80/443 (max 50). Entries are lowercase hostnames or glob patterns where * matches any run of characters (e.g. *.example.com). An exact hostname does not cover its subdomains — use a glob or list each hostname. pip needs both pypi.org and files.pythonhosted.org (or *.pythonhosted.org)."""
+ type: TypeAllowlist
+ r"""Outbound access restricted to the listed domains."""
+
+
+class ContainerNetworkPolicyAllowlist(BaseModel):
+ allowed_domains: List[str]
+ r"""Hostnames the container may reach over ports 80/443 (max 50). Entries are lowercase hostnames or glob patterns where * matches any run of characters (e.g. *.example.com). An exact hostname does not cover its subdomains — use a glob or list each hostname. pip needs both pypi.org and files.pythonhosted.org (or *.pythonhosted.org)."""
+
+ type: TypeAllowlist
+ r"""Outbound access restricted to the listed domains."""
+
+
+ContainerNetworkPolicyTypeDisabled = Literal["disabled",]
+r"""No outbound internet access."""
+
+
+class ContainerNetworkPolicyDisabledTypedDict(TypedDict):
+ type: ContainerNetworkPolicyTypeDisabled
+ r"""No outbound internet access."""
+
+
+class ContainerNetworkPolicyDisabled(BaseModel):
+ type: ContainerNetworkPolicyTypeDisabled
+ r"""No outbound internet access."""
+
+
+ContainerNetworkPolicyTypedDict = TypeAliasType(
+ "ContainerNetworkPolicyTypedDict",
+ Union[
+ ContainerNetworkPolicyDisabledTypedDict,
+ ContainerNetworkPolicyAllowlistTypedDict,
+ ],
+)
+r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
+
+
+ContainerNetworkPolicy = Annotated[
+ Union[
+ Annotated[ContainerNetworkPolicyDisabled, Tag("disabled")],
+ Annotated[ContainerNetworkPolicyAllowlist, Tag("allowlist")],
+ ],
+ Discriminator(lambda m: get_discriminator(m, "type", "type")),
+]
+r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
diff --git a/src/openrouter/components/containerreferenceenvironment.py b/src/openrouter/components/containerreferenceenvironment.py
index 4a9d2ebe..dddfdc9a 100644
--- a/src/openrouter/components/containerreferenceenvironment.py
+++ b/src/openrouter/components/containerreferenceenvironment.py
@@ -1,9 +1,14 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
-from openrouter.types import BaseModel
-from typing import Literal
-from typing_extensions import TypedDict
+from .containernetworkpolicy import (
+ ContainerNetworkPolicy,
+ ContainerNetworkPolicyTypedDict,
+)
+from openrouter.types import BaseModel, UNSET_SENTINEL
+from pydantic import model_serializer
+from typing import Literal, Optional
+from typing_extensions import NotRequired, TypedDict
ContainerReferenceEnvironmentType = Literal["container_reference",]
@@ -15,6 +20,8 @@ class ContainerReferenceEnvironmentTypedDict(TypedDict):
container_id: str
r"""Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace."""
type: ContainerReferenceEnvironmentType
+ network_policy: NotRequired[ContainerNetworkPolicyTypedDict]
+ r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
class ContainerReferenceEnvironment(BaseModel):
@@ -24,3 +31,22 @@ class ContainerReferenceEnvironment(BaseModel):
r"""Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace."""
type: ContainerReferenceEnvironmentType
+
+ network_policy: Optional[ContainerNetworkPolicy] = None
+ r"""Network egress policy for the container. \"disabled\" blocks all outbound internet; \"allowlist\" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to \"disabled\" (no outbound internet). For unrestricted egress, use an allowlist of [\"*\"]."""
+
+ @model_serializer(mode="wrap")
+ def serialize_model(self, handler):
+ optional_fields = set(["network_policy"])
+ 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))
+
+ if val != UNSET_SENTINEL:
+ if val is not None or k not in optional_fields:
+ m[k] = val
+
+ return m
diff --git a/src/openrouter/components/messagesrequest.py b/src/openrouter/components/messagesrequest.py
index 28b51a4b..1c780c7c 100644
--- a/src/openrouter/components/messagesrequest.py
+++ b/src/openrouter/components/messagesrequest.py
@@ -452,15 +452,15 @@ def serialize_model(self, handler):
return m
-TypeDisabled = Literal["disabled",]
+ThinkingTypeDisabled = Literal["disabled",]
class ThinkingDisabledTypedDict(TypedDict):
- type: TypeDisabled
+ type: ThinkingTypeDisabled
class ThinkingDisabled(BaseModel):
- type: TypeDisabled
+ type: ThinkingTypeDisabled
TypeEnabled = Literal["enabled",]
diff --git a/uv.lock b/uv.lock
index 01319b89..022434b0 100644
--- a/uv.lock
+++ b/uv.lock
@@ -213,7 +213,7 @@ wheels = [
[[package]]
name = "openrouter"
-version = "1.1.81"
+version = "1.1.82"
source = { editable = "." }
dependencies = [
{ name = "httpcore" },