Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 35 additions & 27 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
lockVersion: 2.0.0
id: c48cf606-fb42-4a45-9c23-8f0555307828
management:
docChecksum: dc7b28650f4b75a64b994dc8d9426192
docChecksum: a1446b873bd87da38239da96fef30136
docVersion: 1.0.0
speakeasyVersion: 1.787.0
generationVersion: 2.914.0
releaseVersion: 1.1.10
configChecksum: 0fb15d23c07ed7613621e9c5d0e13c7a
releaseVersion: 1.1.11
configChecksum: 9d5c81b4e0fe110544c084f1cf1dc5b1
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
published: true
persistentEdits:
generation_id: 432a09a5-fa48-4bd0-87d1-85bcfe29a104
pristine_commit_hash: 61118dc79015705a356aa88189a1d052da5bf0f3
pristine_tree_hash: 42b6d08626e66fd5679709e8e4edbfaff1368c6e
generation_id: 89695304-a652-4c57-99fb-18d5cfc8d261
pristine_commit_hash: 90a6fb17bc6a68cd7604ec4b9273c4149a97540a
pristine_tree_hash: 5efbf62418627973246e3d236e6dc09685a28f8f
features:
python:
acceptHeaders: 3.0.0
Expand Down Expand Up @@ -618,16 +618,24 @@ trackedFiles:
pristine_git_object: ef98b1de499df79940ccacaf5da0be2d635b104e
docs/components/autobetarouterplugin.mdx:
id: 036f0e51d7c9
last_write_checksum: sha1:07c3279c2b32711a088fefd3f60699ebc4235cf3
pristine_git_object: d70f386636c456a081d4c4a147b01b2589e8ad03
last_write_checksum: sha1:b0a06e90eb11a8f9bd1642fdf2fe5b4d869a61b0
pristine_git_object: 7ea7dc96f10b916ab31732304345774a14cea3a4
docs/components/autobetarouterplugincosttier.mdx:
id: b56ac3529805
last_write_checksum: sha1:f5e869ca0629601f0367ca1e5614bb1d1f58f70f
pristine_git_object: b2e319282c4ebbb4eb7eb01115c54021916e287e
docs/components/autobetarouterpluginid.mdx:
id: 619eb7d92a83
last_write_checksum: sha1:47b80552a64dbc3dc37421630fddf931ffe5c795
pristine_git_object: 800b8e4a3fd07f10592e3ee8f9c15c7e57398d4c
docs/components/autorouterplugin.mdx:
id: 4d62f9b36bc2
last_write_checksum: sha1:74e39d385a2b96ab03d37f959364510eaaae2489
pristine_git_object: 305de1b54cded7b2bf8290f0595bc35fb24ddc02
last_write_checksum: sha1:027e227fad90f65f2ea67900e94ab3a0b30bf624
pristine_git_object: 26f69ea544dd6e91a579e0c7b54e30045ed138f1
docs/components/autorouterplugincosttier.mdx:
id: 72049c1ccaf4
last_write_checksum: sha1:88c357901d1b51ef575f21ee957f6aa16bba7b83
pristine_git_object: 77c913f91b03aefe7f6997bb588080a84960b777
docs/components/autorouterpluginid.mdx:
id: ea9862a88ce8
last_write_checksum: sha1:51d6cd6296501209ebc8b721adb3feadeb798f9a
Expand Down Expand Up @@ -6794,8 +6802,8 @@ trackedFiles:
pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544
pyproject.toml:
id: 5d07e7d72637
last_write_checksum: sha1:d814adb88a8e2c7c5168a931c03704ea9ce69ade
pristine_git_object: c9a345fd0ef4d7fd00fb3e382936627f6cd3241f
last_write_checksum: sha1:68887cf7196f5c439b739b25497108f729e92089
pristine_git_object: 9ad37b87b230c9153a126f25cb27597e10faac3a
scripts/prepare_readme.py:
id: e0c5957a6035
last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54
Expand All @@ -6822,8 +6830,8 @@ trackedFiles:
pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137
src/openrouter/_version.py:
id: d8d15ad6c586
last_write_checksum: sha1:806800cec67125a989b20b50152ebd9de3d0105e
pristine_git_object: fe2edf4a9a3c2f7defcd6068df34488aedbe50de
last_write_checksum: sha1:7881d7cb60e4ba8017a87fdd070b6b4ebd5f81e6
pristine_git_object: 3d3b3319338c4ded93b69642770503f11927bff5
src/openrouter/analytics.py:
id: cb406b5aaabb
last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841
Expand Down Expand Up @@ -6866,8 +6874,8 @@ trackedFiles:
pristine_git_object: ad3d247954547814054c01989a2dff3d12b3e4e1
src/openrouter/components/__init__.py:
id: 81754e97b3f4
last_write_checksum: sha1:03132ec935a4e444eab14cb18e268fb77e3b6d08
pristine_git_object: 1a1bea47e675fbde39b1b72e7b42ef04b2025a54
last_write_checksum: sha1:c926cc7209a972eafc02ee0697c8c4664131a44d
pristine_git_object: 10eb82a8be06db9cf72d7169b2f82317e29f53a6
src/openrouter/components/aabenchmarkentry.py:
id: e2e0f0b48c82
last_write_checksum: sha1:fab4d9a24d2cea937bb749d46c5f83941e99d65c
Expand Down Expand Up @@ -7122,12 +7130,12 @@ trackedFiles:
pristine_git_object: 2ccc3d9be586133e5d5138c77eacefa243987fb5
src/openrouter/components/autobetarouterplugin.py:
id: bb4119e5d4dc
last_write_checksum: sha1:4eb9e7bcfe488da3974e5d3f8ef8e05091cfa6f1
pristine_git_object: 56c32d14e00e66f5415c9ea0d503503f7925d62b
last_write_checksum: sha1:bf7b506b33df81da887af6f0ca009cfcebe1d52a
pristine_git_object: 1388c23edecbd1779145112533aa79503887d9d1
src/openrouter/components/autorouterplugin.py:
id: cf49add5d1ae
last_write_checksum: sha1:4d0e56867780d5b238a8c37378fa53db80c42e69
pristine_git_object: db933a4a1660b5ed5b94167b980e296080f10672
last_write_checksum: sha1:5dcdc4c9001dc06fc6859e865735ed975ac2f29e
pristine_git_object: 077c2a1ee3d255605f19ff48a71c474d7a354de4
src/openrouter/components/badgatewayresponseerrordata.py:
id: f7a33d30d269
last_write_checksum: sha1:d85ab25a06594703cb353767f07f4e1d44e0181c
Expand Down Expand Up @@ -7326,8 +7334,8 @@ trackedFiles:
pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810
src/openrouter/components/chatrequest.py:
id: 5e39eaefa9cf
last_write_checksum: sha1:c1a5ce1daa8973042113ff59f08aca13ed4df8fa
pristine_git_object: ef954b6c9ecef144e14c16f5b414640cb9c81f11
last_write_checksum: sha1:e4acd632bcc5fe672d244e84bf2d849ddb0f6a98
pristine_git_object: c0e21ad130468e74758749193f0a6210fb6454cd
src/openrouter/components/chatresult.py:
id: 9062fe2935fe
last_write_checksum: sha1:2ff1963c54e7e79500115c8549c8d395f4e336d1
Expand Down Expand Up @@ -8074,8 +8082,8 @@ trackedFiles:
pristine_git_object: 7e69d1f775baece5f94b03d35bcd884d5e6f519d
src/openrouter/components/messagesrequest.py:
id: 72b1f339024d
last_write_checksum: sha1:69d731617a67a0d262bb647f6ee35cfc0bdc7827
pristine_git_object: 083d56730e0686ca08a6e13979d912d30f2682d4
last_write_checksum: sha1:c07e0a032be800d1e3fdab79f0aca4b4cb5e465e
pristine_git_object: 516c30ac13e88999dbdf6e63afcf00da8d63c337
src/openrouter/components/messagessearchmodelsservertool.py:
id: 53d755edb120
last_write_checksum: sha1:389786fc22ba4bb47b0a086b7aa321f2f04fe943
Expand Down Expand Up @@ -8702,8 +8710,8 @@ trackedFiles:
pristine_git_object: f38c8edcb616d9e7cbd0f724fbb9d9f5aae014f9
src/openrouter/components/responsesrequest.py:
id: 8c850080ec5d
last_write_checksum: sha1:55ff8b1195c9d9c7deb522719f37a41fd0b15f10
pristine_git_object: 0c49df2a87f8403a07d277ed8b64a995c6ea8466
last_write_checksum: sha1:17b9e65fa563b3a73b7a36ddc8bae1f905b7bfe0
pristine_git_object: 8c9b4fa1a1a58d4c09bb56af4098e86438e571b2
src/openrouter/components/responsesstreamingresponse.py:
id: 142379f3bd90
last_write_checksum: sha1:a48d6f3610f5d15248ef4d25a0d88a0a4a1a9db7
Expand Down Expand Up @@ -11329,4 +11337,4 @@ examples:
"500":
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
examplesVersion: 1.0.2
releaseNotes: "## Python SDK Changes:\n* `open_router.guardrails.list()`: `response.data[]` **Changed**\n* `open_router.guardrails.create()`: \n * `request` **Changed**\n * `response.data` **Changed**\n* `open_router.guardrails.get()`: `response.data` **Changed**\n* `open_router.guardrails.update()`: \n * `request` **Changed**\n * `response.data` **Changed**\n"
releaseNotes: "## Python SDK Changes:\n* `open_router.beta.responses.send()`: \n * `request.plugins[]` **Changed**\n* `open_router.chat.send()`: \n * `request.plugins[]` **Changed**\n* `open_router.presets.create_presets_chat_completions()`: \n * `request.plugins[]` **Changed**\n* `open_router.presets.create_presets_messages()`: \n * `request.plugins[]` **Changed**\n* `open_router.presets.create_presets_responses()`: \n * `request.plugins[]` **Changed**\n* `open_router.responses.send()`: \n * `request.plugins[]` **Changed**\n"
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ generation:
documentation: mintlify
preApplyUnionDiscriminators: true
python:
version: 1.1.10
version: 1.1.11
additionalDependencies:
dev: {}
main: {}
Expand Down
32 changes: 28 additions & 4 deletions .speakeasy/out.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,7 @@ components:
allowed_models:
- 'anthropic/*'
- 'openai/gpt-4o'
cost_quality_tradeoff: 9
cost_tier: 'low'
enabled: true
id: 'auto-beta-router'
properties:
Expand All @@ -2885,11 +2885,23 @@ components:
type: 'string'
type: 'array'
cost_quality_tradeoff:
description: 'Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9.'
deprecated: true
description: 'Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9. Numeric cost_quality_tradeoff remains supported, retains ceiling behavior, and takes precedence over cost_tier when both are provided.'
example: 9
maximum: 10
minimum: 0
type: 'integer'
cost_tier:
description: 'Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Numeric cost_quality_tradeoff takes precedence and retains ceiling behavior.'
enum:
- 'low'
- 'medium'
- 'high'
- 'xhigh'
- 'max'
example: 'low'
type: 'string'
x-speakeasy-unknown-values: allow
enabled:
description: 'Set to false to disable the auto-beta-router plugin for this request. Defaults to true.'
type: 'boolean'
Expand All @@ -2905,7 +2917,7 @@ components:
allowed_models:
- 'anthropic/*'
- 'openai/gpt-4o'
cost_quality_tradeoff: 7
cost_tier: 'medium'
enabled: true
id: 'auto-router'
pin_model: false
Expand All @@ -2920,11 +2932,23 @@ components:
type: 'string'
type: 'array'
cost_quality_tradeoff:
description: 'Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7.'
deprecated: true
description: 'Deprecated: Use cost_tier instead. Controls cost vs. quality routing tradeoff (0–10). 0 = pure quality (best model regardless of cost), 10 = maximize for cost (cheapest model wins). Intermediate values blend quality and cost signals continuously. Defaults to 7. Numeric cost_quality_tradeoff remains supported and takes precedence over cost_tier when both are provided.'
example: 7
maximum: 10
minimum: 0
type: 'integer'
cost_tier:
description: 'Shorthand for cost_quality_tradeoff. Higher tiers spend more on better models: low = 9, medium = 7, high = 5, xhigh = 3, and max = 1. Numeric cost_quality_tradeoff takes precedence when both are provided.'
enum:
- 'low'
- 'medium'
- 'high'
- 'xhigh'
- 'max'
example: 'medium'
type: 'string'
x-speakeasy-unknown-values: allow
enabled:
description: 'Set to false to disable the auto-router plugin for this request. Defaults to true.'
type: 'boolean'
Expand Down
10 changes: 5 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ speakeasyVersion: 1.787.0
sources:
OpenRouter API:
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6f41b4fc5146523ef9ffe5907d1de58a3d5bf3a7a52f333ca6bd215079f0b6ab
sourceBlobDigest: sha256:d636342ceccb904cee7648a4bafba3ce7c272b6e05f59a1e0073191f4e7c0a23
sourceRevisionDigest: sha256:3463c7642dac4e0be5ab491342c923d203bec99aaf8f09d978a8773f66aa858f
sourceBlobDigest: sha256:bcf0c7b7716d4ac425c204f04dd3b60a1631a628c87100bdf8171db17ef44797
tags:
- latest
- 1.0.0
targets:
open-router:
source: OpenRouter API
sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:6f41b4fc5146523ef9ffe5907d1de58a3d5bf3a7a52f333ca6bd215079f0b6ab
sourceBlobDigest: sha256:d636342ceccb904cee7648a4bafba3ce7c272b6e05f59a1e0073191f4e7c0a23
sourceRevisionDigest: sha256:3463c7642dac4e0be5ab491342c923d203bec99aaf8f09d978a8773f66aa858f
sourceBlobDigest: sha256:bcf0c7b7716d4ac425c204f04dd3b60a1631a628c87100bdf8171db17ef44797
codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:120f53668535c593d17783ebb8f66d4c5e44f195df21d8b9aba07767049ad535
codeSamplesRevisionDigest: sha256:0406a0924db3ccfe1fae98f1ee09cfe42acca15d228dfa66c818e954b61a79bf
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.787.0
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,4 +899,14 @@ Based on:
### Generated
- [python v1.1.10] .
### Releases
- [PyPI v1.1.10] https://pypi.org/project/openrouter/1.1.10 - .
- [PyPI v1.1.10] https://pypi.org/project/openrouter/1.1.10 - .

## 2026-07-28 23:05:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.1.11] .
### Releases
- [PyPI v1.1.11] https://pypi.org/project/openrouter/1.1.11 - .
Loading
Loading