Skip to content

Commit 8bc63e6

Browse files
committed
## Python SDK Changes:
* `open_router.containers.promote_container_file()`: **Added**
1 parent f2f56bd commit 8bc63e6

14 files changed

Lines changed: 758 additions & 28 deletions

File tree

‎.speakeasy/gen.lock‎

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
lockVersion: 2.0.0
22
id: c48cf606-fb42-4a45-9c23-8f0555307828
33
management:
4-
docChecksum: 48ba9f57a8739e1dc8c8cab173aad2c2
4+
docChecksum: 8921a22ee9a28c5cd98b924a272e809e
55
docVersion: 1.0.0
66
speakeasyVersion: 1.787.0
77
generationVersion: 2.914.0
8-
releaseVersion: 1.1.84
9-
configChecksum: 059fa58d21b2c4db029872d5ace90cf8
8+
releaseVersion: 1.1.85
9+
configChecksum: 056db9012f4a842d5c3fbcf891459fe3
1010
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
1111
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
1212
published: true
1313
persistentEdits:
14-
generation_id: bf95c823-4039-43d0-b85b-805749d1664a
15-
pristine_commit_hash: 1213af1001443f1d78e596f6bcbb0ade102e30d4
16-
pristine_tree_hash: 4e6717d18e993a28ec595a08069585abf2c96e03
14+
generation_id: 86f35643-8d5a-4437-9448-84a67826db84
15+
pristine_commit_hash: 38f3a057898aac5a1b7148d458af890d5a2f8ebd
16+
pristine_tree_hash: cc383fb366cc3db32cb2bb5e6a6492a13d9da573
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -7032,6 +7032,14 @@ trackedFiles:
70327032
id: 038d66aa4fc1
70337033
last_write_checksum: sha1:f65e16f5901c128767ab047aaeb811430c2bce3e
70347034
pristine_git_object: a1fdee3160b2294a66e05f59cfd17382364c129c
7035+
docs/operations/promotecontainerfileglobals.mdx:
7036+
id: 157cfc1fe10a
7037+
last_write_checksum: sha1:05fbeea7c6d8a91974ad8ad0c869ff5a0e91b0fc
7038+
pristine_git_object: f1aa90ac480684bca770ec4c9f8b607e1b22fc42
7039+
docs/operations/promotecontainerfilerequest.mdx:
7040+
id: ced315623746
7041+
last_write_checksum: sha1:a81fe86e71dd07bc86e242e75df43ce8054feedd
7042+
pristine_git_object: a14427c499dccc4349e29d812671863031285866
70357043
docs/operations/prompttokensdetails.mdx:
70367044
id: 346b38e82e1c
70377045
last_write_checksum: sha1:ece0f5c30ccaef159981265b3ac57381289e86b3
@@ -7286,8 +7294,8 @@ trackedFiles:
72867294
pristine_git_object: bed5f74e5e8269cbba66943524ffa5206c933de3
72877295
docs/sdks/containers/README.mdx:
72887296
id: cc963972ad75
7289-
last_write_checksum: sha1:b5c29b6c94661027e661293829ccfe541f56ab5b
7290-
pristine_git_object: c2d0f3257e6f5876adb5bd4c32a8ea9ce1b8e5b8
7297+
last_write_checksum: sha1:e98902490b924d55601ebc5d6a76aa7271edaccb
7298+
pristine_git_object: 05e2d9345a19a297d29482462ca718fba4b6cc3d
72917299
docs/sdks/credits/README.mdx:
72927300
id: 2ba51de8de3f
72937301
last_write_checksum: sha1:08de2963f78b645eaa14fa8511552bae2ddccd75
@@ -7378,8 +7386,8 @@ trackedFiles:
73787386
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
73797387
pyproject.toml:
73807388
id: 5d07e7d72637
7381-
last_write_checksum: sha1:0dc4c6ff50614403a21a01d9b296c7188801d9e8
7382-
pristine_git_object: c550e3af60e52b1139ba6c5338d1748e052fe68e
7389+
last_write_checksum: sha1:d456d250d743e1fc424fe4b564385da9e801d20d
7390+
pristine_git_object: b06203b5c1c269dd0b8c45485ce66cf71e94f528
73837391
scripts/prepare_readme.py:
73847392
id: e0c5957a6035
73857393
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
@@ -7406,8 +7414,8 @@ trackedFiles:
74067414
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
74077415
src/openrouter/_version.py:
74087416
id: d8d15ad6c586
7409-
last_write_checksum: sha1:5ff5135d061ab60f34140aaf6c2831e382a1c570
7410-
pristine_git_object: 1f54f6a389e5cfd98021dc7c87c03eec6fbe3d99
7417+
last_write_checksum: sha1:c0a63eddf73b86cd05f70c11ee50271a68efc6ad
7418+
pristine_git_object: 2edbb2f02918b24e6d5135393d66d3abfb572228
74117419
src/openrouter/analytics.py:
74127420
id: cb406b5aaabb
74137421
last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9
@@ -9922,8 +9930,8 @@ trackedFiles:
99229930
pristine_git_object: ad78361d147d2edb7b5772c14501d9c25a2000b0
99239931
src/openrouter/containers.py:
99249932
id: 5edae5db57e9
9925-
last_write_checksum: sha1:4228e5d7fd7634b5e9c53afe0fb5ec0cacf89fa1
9926-
pristine_git_object: d26eef63014e92380c21e5a132d7e683bd0a3858
9933+
last_write_checksum: sha1:37d4af3253f0fc119cf2414d935dc7b7cf2d9244
9934+
pristine_git_object: 8328666b72a7f3d0c6330f02ab0268dab64070d4
99279935
src/openrouter/credits.py:
99289936
id: cdc961937101
99299937
last_write_checksum: sha1:7ac37671d3de537eb98f15239d531e3ab3928a59
@@ -10066,8 +10074,8 @@ trackedFiles:
1006610074
pristine_git_object: 5c553b76ab24d9eaef51c3bf6d85aa74391e335e
1006710075
src/openrouter/operations/__init__.py:
1006810076
id: 9afcea1e7161
10069-
last_write_checksum: sha1:19c99d02b7b5e77db4f93366318666cf82db6d3d
10070-
pristine_git_object: c81a9eff8a1cb74fac30f84ce8d83f6ccb6bb245
10077+
last_write_checksum: sha1:485909820533419acf0fa1d0c8fef5acfe16bee5
10078+
pristine_git_object: 153455463a5dffde89e5d15bc223e3aa091d4eb7
1007110079
src/openrouter/operations/bulkaddworkspacemembers.py:
1007210080
id: e0ed56117619
1007310081
last_write_checksum: sha1:5c44eb0d40fdece3ac084615f6c6082be4cf1d5a
@@ -10420,6 +10428,10 @@ trackedFiles:
1042010428
id: fe94c6f61835
1042110429
last_write_checksum: sha1:32f503f121d7ca1b10392f2615fea224ce7d5f1b
1042210430
pristine_git_object: cbdad12f956c5f2a8252b7f6db102f1e83c4e85a
10431+
src/openrouter/operations/promotecontainerfile.py:
10432+
id: 4303a549823d
10433+
last_write_checksum: sha1:b38c12973abf643632ac5fd2293bff383c20c0a2
10434+
pristine_git_object: 6ab264885a9454b195955adba4b65e01f2abf223
1042310435
src/openrouter/operations/queryanalytics.py:
1042410436
id: d76c63ff66f6
1042510437
last_write_checksum: sha1:8c04150e53c68a2a7b19217f478118d12b9e27d1
@@ -12409,5 +12421,32 @@ examples:
1240912421
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
1241012422
"503":
1241112423
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
12424+
promoteContainerFile:
12425+
speakeasy-default-promote-container-file:
12426+
parameters:
12427+
path:
12428+
container_id: "sess_abc123"
12429+
file_id: "cfile_b3V0L3JlcG9ydC5jc3Y"
12430+
responses:
12431+
"200":
12432+
application/json: {"_shape": "openrouter", "created_at": "2025-01-01T00:00:00Z", "downloadable": false, "filename": "document.pdf", "id": "or_file_011CNha8iCJcU1wXNR6q4V8w", "mime_type": "application/pdf", "size_bytes": 1024000, "type": "file"}
12433+
"400":
12434+
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
12435+
"401":
12436+
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
12437+
"403":
12438+
application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}}
12439+
"404":
12440+
application/json: {"error": {"code": 404, "message": "Resource not found"}}
12441+
"413":
12442+
application/json: {"error": {"code": 413, "message": "Request payload too large"}}
12443+
"429":
12444+
application/json: {"error": {"code": 429, "message": "Rate limit exceeded"}}
12445+
"500":
12446+
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
12447+
"503":
12448+
application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}}
1241212449
examplesVersion: 1.0.2
12413-
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(ShellServerTool_OpenRouter).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"
12450+
releaseNotes: |
12451+
## Python SDK Changes:
12452+
* `open_router.containers.promote_container_file()`: **Added**

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ generation:
3636
documentation: mintlify
3737
preApplyUnionDiscriminators: true
3838
python:
39-
version: 1.1.84
39+
version: 1.1.85
4040
additionalDependencies:
4141
dev: {}
4242
main: {}

‎.speakeasy/out.openapi.yaml‎

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29655,6 +29655,131 @@ paths:
2965529655
- $ref: "#/components/parameters/AppIdentifier"
2965629656
- $ref: "#/components/parameters/AppDisplayName"
2965729657
- $ref: "#/components/parameters/AppCategories"
29658+
/containers/{container_id}/files/{file_id}/promote:
29659+
post:
29660+
description: 'Copies a file from the container''s sandbox prefix into the workspace''s durable document storage, so it outlives the container. Returns the new document in the Files API shape, with a durable file id in the documents namespace. The copy counts against the workspace''s storage quota exactly like an upload.'
29661+
operationId: 'promoteContainerFile'
29662+
parameters:
29663+
- description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r<nonce>`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.'
29664+
in: 'path'
29665+
name: 'container_id'
29666+
required: true
29667+
schema:
29668+
description: 'The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r<nonce>`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.'
29669+
example: 'sess_abc123'
29670+
type: 'string'
29671+
- description: 'Container file id (`cfile_` + base64url of the file path).'
29672+
in: 'path'
29673+
name: 'file_id'
29674+
required: true
29675+
schema:
29676+
description: 'Container file id (`cfile_` + base64url of the file path).'
29677+
example: 'cfile_b3V0L3JlcG9ydC5jc3Y'
29678+
type: 'string'
29679+
responses:
29680+
'200':
29681+
content:
29682+
application/json:
29683+
example:
29684+
_shape: 'openrouter'
29685+
created_at: '2026-08-23T00:00:00Z'
29686+
downloadable: false
29687+
filename: 'out/report.csv'
29688+
id: 'or_file_011CNha8iCJcU1wXNR6q4V8w'
29689+
mime_type: 'text/csv'
29690+
size_bytes: 123
29691+
type: 'file'
29692+
schema:
29693+
$ref: '#/components/schemas/FileResponse'
29694+
description: 'The promoted file, as a workspace document.'
29695+
'400':
29696+
content:
29697+
application/json:
29698+
example:
29699+
error:
29700+
code: 400
29701+
message: 'Invalid request parameters'
29702+
schema:
29703+
$ref: '#/components/schemas/BadRequestResponse'
29704+
description: 'Bad Request - Invalid request parameters or malformed input'
29705+
'401':
29706+
content:
29707+
application/json:
29708+
example:
29709+
error:
29710+
code: 401
29711+
message: 'Missing Authentication header'
29712+
schema:
29713+
$ref: '#/components/schemas/UnauthorizedResponse'
29714+
description: 'Unauthorized - Authentication required or invalid credentials'
29715+
'403':
29716+
content:
29717+
application/json:
29718+
example:
29719+
error:
29720+
code: 403
29721+
message: 'Only management keys can perform this operation'
29722+
schema:
29723+
$ref: '#/components/schemas/ForbiddenResponse'
29724+
description: 'Forbidden - Authentication successful but insufficient permissions'
29725+
'404':
29726+
content:
29727+
application/json:
29728+
example:
29729+
error:
29730+
code: 404
29731+
message: 'Resource not found'
29732+
schema:
29733+
$ref: '#/components/schemas/NotFoundResponse'
29734+
description: 'Not Found - Resource does not exist'
29735+
'413':
29736+
content:
29737+
application/json:
29738+
example:
29739+
error:
29740+
code: 413
29741+
message: 'Request payload too large'
29742+
schema:
29743+
$ref: '#/components/schemas/PayloadTooLargeResponse'
29744+
description: 'Payload Too Large - Request payload exceeds size limits'
29745+
'429':
29746+
content:
29747+
application/json:
29748+
example:
29749+
error:
29750+
code: 429
29751+
message: 'Rate limit exceeded'
29752+
schema:
29753+
$ref: '#/components/schemas/TooManyRequestsResponse'
29754+
description: 'Too Many Requests - Rate limit exceeded'
29755+
'500':
29756+
content:
29757+
application/json:
29758+
example:
29759+
error:
29760+
code: 500
29761+
message: 'Internal Server Error'
29762+
schema:
29763+
$ref: '#/components/schemas/InternalServerResponse'
29764+
description: 'Internal Server Error - Unexpected server error'
29765+
'503':
29766+
content:
29767+
application/json:
29768+
example:
29769+
error:
29770+
code: 503
29771+
message: 'Service temporarily unavailable'
29772+
schema:
29773+
$ref: '#/components/schemas/ServiceUnavailableResponse'
29774+
description: 'Service Unavailable - Service temporarily unavailable'
29775+
summary: 'Promote a container file into workspace documents'
29776+
tags:
29777+
- 'Containers'
29778+
x-hidden: true
29779+
parameters:
29780+
- $ref: "#/components/parameters/AppIdentifier"
29781+
- $ref: "#/components/parameters/AppDisplayName"
29782+
- $ref: "#/components/parameters/AppCategories"
2965829783
/credits:
2965929784
get:
2966029785
description: 'Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.'

‎.speakeasy/workflow.lock‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
5-
sourceRevisionDigest: sha256:bec3d9a23d04c2029e5a5a5d7cdd9c325dd56a298bbd9c15770bc3347db66098
6-
sourceBlobDigest: sha256:53f9396f5f5ff4458589931840f9bf7a8dc0a50a322e11e05659684267a1443d
5+
sourceRevisionDigest: sha256:385f7f8d2f902977c1423ae176629a87bd05d4a60d9e7014f50056fe583436e7
6+
sourceBlobDigest: sha256:5a656c3be6631afcd0cc49e5dd57423299f17dc9d241ecd40752814ab8adbcc7
77
tags:
88
- latest
99
- 1.0.0
1010
targets:
1111
open-router:
1212
source: OpenRouter API
1313
sourceNamespace: open-router-chat-completions-api
14-
sourceRevisionDigest: sha256:bec3d9a23d04c2029e5a5a5d7cdd9c325dd56a298bbd9c15770bc3347db66098
15-
sourceBlobDigest: sha256:53f9396f5f5ff4458589931840f9bf7a8dc0a50a322e11e05659684267a1443d
14+
sourceRevisionDigest: sha256:385f7f8d2f902977c1423ae176629a87bd05d4a60d9e7014f50056fe583436e7
15+
sourceBlobDigest: sha256:5a656c3be6631afcd0cc49e5dd57423299f17dc9d241ecd40752814ab8adbcc7
1616
codeSamplesNamespace: open-router-python-code-samples
17-
codeSamplesRevisionDigest: sha256:61a70fc24a729a656b47de162acd80d763cd8525fe51bdc8e691d83fa1ebf320
17+
codeSamplesRevisionDigest: sha256:c397d9479a42226b46d1558d1033c1f9d81ac3bbce81389f1f94b85e50e4549c
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.787.0

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,4 +1629,14 @@ Based on:
16291629
### Generated
16301630
- [python v1.1.84] .
16311631
### Releases
1632-
- [PyPI v1.1.84] https://pypi.org/project/openrouter/1.1.84 - .
1632+
- [PyPI v1.1.84] https://pypi.org/project/openrouter/1.1.84 - .
1633+
1634+
## 2026-08-25 08:39:17
1635+
### Changes
1636+
Based on:
1637+
- OpenAPI Doc
1638+
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
1639+
### Generated
1640+
- [python v1.1.85] .
1641+
### Releases
1642+
- [PyPI v1.1.85] https://pypi.org/project/openrouter/1.1.85 - .
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "PromoteContainerFileGlobals"
3+
---
4+
5+
## Fields
6+
7+
| Field | Type | Required | Description |
8+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
9+
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
10+
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
11+
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |

0 commit comments

Comments
 (0)