From 0155e452e665c59304a4736133b6023d3afb52ec Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 29 Jul 2026 21:42:23 +0000 Subject: [PATCH 1/2] ## Python SDK Changes: * `open_router.beta.responses.send()`: * `request.plugins[]` **Changed** * `open_router.chat.send()`: * `request.plugins[]` **Changed** * `open_router.presets.create_presets_chat_completions()`: * `request.plugins[]` **Changed** * `open_router.presets.create_presets_messages()`: * `request.plugins[]` **Changed** * `open_router.presets.create_presets_responses()`: * `request.plugins[]` **Changed** * `open_router.responses.send()`: * `request.plugins[]` **Changed** --- .speakeasy/gen.lock | 50 +++++++++---------- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 24 ++++++++- .speakeasy/workflow.lock | 10 ++-- RELEASES.md | 12 ++++- docs/components/autobetarouterplugin.mdx | 1 + docs/components/autorouterplugin.mdx | 1 + pyproject.toml | 2 +- src/openrouter/_version.py | 4 +- .../components/autobetarouterplugin.py | 13 ++++- src/openrouter/components/autorouterplugin.py | 6 +++ src/openrouter/components/chatrequest.py | 2 +- src/openrouter/components/messagesrequest.py | 2 +- src/openrouter/components/responsesrequest.py | 2 +- uv.lock | 2 +- 15 files changed, 91 insertions(+), 42 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3bb909a0..d34176e5 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: f376da798e7da872235aa5d701d44cc9 + docChecksum: c1532f25a6a4baf4638964bf1c7d3db0 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.14 - configChecksum: 3ef05474b12cc53e1a3ae46ff5ad9b08 + releaseVersion: 1.1.15 + configChecksum: c0ca7be4e27bf65e22e0ad9cc03e31be repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 3ac0f10f-604c-4804-ab9f-5f791660887f - pristine_commit_hash: 0f9f0e731cec2dafd65c32bdd6f2be26abc8dbd7 - pristine_tree_hash: 804bdcd14f457289952f01d4b6ffe1395688ca8b + generation_id: 310923b3-d9ca-40aa-91a3-0f38a4003c85 + pristine_commit_hash: d7c2b5ba344c412c3b3fd436cf905a049c1398cb + pristine_tree_hash: 64340937870a67ae71e0ec76d4aac09506741453 features: python: acceptHeaders: 3.0.0 @@ -650,8 +650,8 @@ trackedFiles: pristine_git_object: ef98b1de499df79940ccacaf5da0be2d635b104e docs/components/autobetarouterplugin.mdx: id: 036f0e51d7c9 - last_write_checksum: sha1:b0a06e90eb11a8f9bd1642fdf2fe5b4d869a61b0 - pristine_git_object: 7ea7dc96f10b916ab31732304345774a14cea3a4 + last_write_checksum: sha1:f69a1c5c8d69de1c36b710fca3b5f34e7d2ddbf4 + pristine_git_object: 0ad5b6f463784919f5b9b1d0946de05e02a91ab1 docs/components/autobetarouterplugincosttier.mdx: id: b56ac3529805 last_write_checksum: sha1:f5e869ca0629601f0367ca1e5614bb1d1f58f70f @@ -662,8 +662,8 @@ trackedFiles: pristine_git_object: 800b8e4a3fd07f10592e3ee8f9c15c7e57398d4c docs/components/autorouterplugin.mdx: id: 4d62f9b36bc2 - last_write_checksum: sha1:027e227fad90f65f2ea67900e94ab3a0b30bf624 - pristine_git_object: 26f69ea544dd6e91a579e0c7b54e30045ed138f1 + last_write_checksum: sha1:1e62c64377f4f961f678ef7da29d14cb80f0bb48 + pristine_git_object: 5e2e372cdebdae0ce6f6758ed7656517b15a173d docs/components/autorouterplugincosttier.mdx: id: 72049c1ccaf4 last_write_checksum: sha1:88c357901d1b51ef575f21ee957f6aa16bba7b83 @@ -6926,8 +6926,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:ac37c31e9dbc6f587cd51437e2106cccaff80954 - pristine_git_object: 948b23ed9da20606fd1d4998523e137dcc4ad434 + last_write_checksum: sha1:564376f6181c036db9abe535dce0ca6a0a31c267 + pristine_git_object: e25b6b7808f22678436c3d7cab08018cef1d43d0 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -6954,8 +6954,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:707448bafc2810674f0df17ff50e48540b9ed587 - pristine_git_object: 94318b0151291065184cb13c1ad612d116b0cf30 + last_write_checksum: sha1:ac930f4d2fe85067df84995c978fedf2f3c75275 + pristine_git_object: c24b55302afdb3ff702355d6fa529036e1619489 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 @@ -7266,12 +7266,12 @@ trackedFiles: pristine_git_object: 2ccc3d9be586133e5d5138c77eacefa243987fb5 src/openrouter/components/autobetarouterplugin.py: id: bb4119e5d4dc - last_write_checksum: sha1:bf7b506b33df81da887af6f0ca009cfcebe1d52a - pristine_git_object: 1388c23edecbd1779145112533aa79503887d9d1 + last_write_checksum: sha1:9a7b53ebff8cffc9c9bb0e91380c7bf450978ad5 + pristine_git_object: e1ae76a7b02d866e99ec3a58dbd8d01d786b65dd src/openrouter/components/autorouterplugin.py: id: cf49add5d1ae - last_write_checksum: sha1:5dcdc4c9001dc06fc6859e865735ed975ac2f29e - pristine_git_object: 077c2a1ee3d255605f19ff48a71c474d7a354de4 + last_write_checksum: sha1:63f3397389da14c253bdda100e1984c4f5556efb + pristine_git_object: 414a9ca4bcd0783e976ca6834132d002a696d5d6 src/openrouter/components/badgatewayresponseerrordata.py: id: f7a33d30d269 last_write_checksum: sha1:d85ab25a06594703cb353767f07f4e1d44e0181c @@ -7470,8 +7470,8 @@ trackedFiles: pristine_git_object: 8bbde153b53887e426989fd5b0486b6dc1122810 src/openrouter/components/chatrequest.py: id: 5e39eaefa9cf - last_write_checksum: sha1:e4acd632bcc5fe672d244e84bf2d849ddb0f6a98 - pristine_git_object: c0e21ad130468e74758749193f0a6210fb6454cd + last_write_checksum: sha1:532d58899ab40cdd4421fefe53f9869efea88d31 + pristine_git_object: 019097cb212ad6452fdf081e050f473e954378ad src/openrouter/components/chatresult.py: id: 9062fe2935fe last_write_checksum: sha1:2ff1963c54e7e79500115c8549c8d395f4e336d1 @@ -8222,8 +8222,8 @@ trackedFiles: pristine_git_object: 7e69d1f775baece5f94b03d35bcd884d5e6f519d src/openrouter/components/messagesrequest.py: id: 72b1f339024d - last_write_checksum: sha1:c07e0a032be800d1e3fdab79f0aca4b4cb5e465e - pristine_git_object: 516c30ac13e88999dbdf6e63afcf00da8d63c337 + last_write_checksum: sha1:07a8582c3781e2adb8e5a897c8b4c5899b0acc39 + pristine_git_object: 112dcbe2a609222d42ae3cd50b29cae0c979d0fa src/openrouter/components/messagessearchmodelsservertool.py: id: 53d755edb120 last_write_checksum: sha1:389786fc22ba4bb47b0a086b7aa321f2f04fe943 @@ -8878,8 +8878,8 @@ trackedFiles: pristine_git_object: f38c8edcb616d9e7cbd0f724fbb9d9f5aae014f9 src/openrouter/components/responsesrequest.py: id: 8c850080ec5d - last_write_checksum: sha1:17b9e65fa563b3a73b7a36ddc8bae1f905b7bfe0 - pristine_git_object: 8c9b4fa1a1a58d4c09bb56af4098e86438e571b2 + last_write_checksum: sha1:2876781a678e033493f84e46229312bd754bc218 + pristine_git_object: ddd09755746c6b38305db3706b16af7187d6d646 src/openrouter/components/responsesstreamingresponse.py: id: 142379f3bd90 last_write_checksum: sha1:a48d6f3610f5d15248ef4d25a0d88a0a4a1a9db7 @@ -11537,4 +11537,4 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Python SDK Changes:\n* `open_router.embeddings.list_models()`: `response.data[].alias_target` **Added**\n* `open_router.models.get()`: `response.data.alias_target` **Added**\n* `open_router.models.list()`: `response.data[].alias_target` **Added**\n* `open_router.models.list_for_user()`: `response.data[].alias_target` **Added**\n* `open_router.workspaces.list()`: `response.data[].include_byok_in_budgets` **Added**\n* `open_router.workspaces.create()`: `response.data.include_byok_in_budgets` **Added**\n* `open_router.workspaces.get()`: `response.data.include_byok_in_budgets` **Added**\n* `open_router.workspaces.update()`: `response.data.include_byok_in_budgets` **Added**\n* `open_router.workspaces.list_budgets()`: `response.include_byok_in_budgets` **Added**\n* `open_router.workspaces.set_budget()`: \n * `request.include_byok_in_budgets` **Added**\n * `response.include_byok_in_budgets` **Added**\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" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index df75c614..7537ceea 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.14 + version: 1.1.15 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 6a9e3dae..6ab860cc 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -2968,9 +2968,11 @@ components: example: allowed_models: - 'anthropic/*' - - 'openai/gpt-4o' + - 'openai/*' cost_tier: 'low' enabled: true + excluded_models: + - 'openai/gpt-4o' id: 'auto-beta-router' properties: allowed_models: @@ -3003,6 +3005,14 @@ components: enabled: description: 'Set to false to disable the auto-beta-router plugin for this request. Defaults to true.' type: 'boolean' + excluded_models: + description: 'List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.' + example: + - 'openai/gpt-4o' + - 'meta-llama/*' + items: + type: 'string' + type: 'array' id: enum: - 'auto-beta-router' @@ -3014,9 +3024,11 @@ components: example: allowed_models: - 'anthropic/*' - - 'openai/gpt-4o' + - 'openai/*' cost_tier: 'medium' enabled: true + excluded_models: + - 'openai/gpt-4o' id: 'auto-router' pin_model: false properties: @@ -3050,6 +3062,14 @@ components: enabled: description: 'Set to false to disable the auto-router plugin for this request. Defaults to true.' type: 'boolean' + excluded_models: + description: 'List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.' + example: + - 'openai/gpt-4o' + - 'meta-llama/*' + items: + type: 'string' + type: 'array' id: enum: - 'auto-router' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4892fa6f..8e11a6f0 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:d65897ade8223dfa917d14eb82bec1bfcd4480ab76170619946205ce224de80c - sourceBlobDigest: sha256:4ae6c80d625ff2d504f1c84a56e92f3e9c9cc369ecdd89152b954ec6b238e12b + sourceRevisionDigest: sha256:8a15f41bd0173a54c0dd96daeb896baa4d6ee1f039af2d853865a377c64e9490 + sourceBlobDigest: sha256:b1c6c6ec7be42f515bad45f8df35ac79cd759825f46a88f53f7a1ef199f3c47b tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:d65897ade8223dfa917d14eb82bec1bfcd4480ab76170619946205ce224de80c - sourceBlobDigest: sha256:4ae6c80d625ff2d504f1c84a56e92f3e9c9cc369ecdd89152b954ec6b238e12b + sourceRevisionDigest: sha256:8a15f41bd0173a54c0dd96daeb896baa4d6ee1f039af2d853865a377c64e9490 + sourceBlobDigest: sha256:b1c6c6ec7be42f515bad45f8df35ac79cd759825f46a88f53f7a1ef199f3c47b codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:c69840b41de3374efaa32f4f0093f61a712d09adb31dd6a123fba573700e53da + codeSamplesRevisionDigest: sha256:eb2c675ec9330d364532ee8143943dfe297c65c6ad7fc1b4b29b802fe2a8eb8e workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index 3c783996..d526a901 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -939,4 +939,14 @@ Based on: ### Generated - [python v1.1.14] . ### Releases -- [PyPI v1.1.14] https://pypi.org/project/openrouter/1.1.14 - . \ No newline at end of file +- [PyPI v1.1.14] https://pypi.org/project/openrouter/1.1.14 - . + +## 2026-07-29 21:40:23 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.15] . +### Releases +- [PyPI v1.1.15] https://pypi.org/project/openrouter/1.1.15 - . \ No newline at end of file diff --git a/docs/components/autobetarouterplugin.mdx b/docs/components/autobetarouterplugin.mdx index 7ea7dc96..0ad5b6f4 100644 --- a/docs/components/autobetarouterplugin.mdx +++ b/docs/components/autobetarouterplugin.mdx @@ -10,4 +10,5 @@ title: "AutoBetaRouterPlugin" | ~~`cost_quality_tradeoff`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

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. | 9 | | `cost_tier` | [Optional[components.AutoBetaRouterPluginCostTier]](../components/autobetarouterplugincosttier.mdx) | :heavy_minus_sign: | 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. | low | | `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-beta-router plugin for this request. Defaults to true. | | +| `excluded_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one. | [
"openai/gpt-4o",
"meta-llama/*"
] | | `id` | [components.AutoBetaRouterPluginID](../components/autobetarouterpluginid.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/autorouterplugin.mdx b/docs/components/autorouterplugin.mdx index 26f69ea5..5e2e372c 100644 --- a/docs/components/autorouterplugin.mdx +++ b/docs/components/autorouterplugin.mdx @@ -10,5 +10,6 @@ title: "AutoRouterPlugin" | ~~`cost_quality_tradeoff`~~ | *Optional[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

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. | 7 | | `cost_tier` | [Optional[components.AutoRouterPluginCostTier]](../components/autorouterplugincosttier.mdx) | :heavy_minus_sign: | 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. | medium | | `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the auto-router plugin for this request. Defaults to true. | | +| `excluded_models` | List[*str*] | :heavy_minus_sign: | List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one. | [
"openai/gpt-4o",
"meta-llama/*"
] | | `id` | [components.AutoRouterPluginID](../components/autorouterpluginid.mdx) | :heavy_check_mark: | N/A | | | `pin_model` | *Optional[bool]* | :heavy_minus_sign: | When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false. | false | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 948b23ed..e25b6b78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.14" +version = "1.1.15" 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 94318b01..c24b5530 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.14" +__version__: str = "1.1.15" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.14 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.15 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/autobetarouterplugin.py b/src/openrouter/components/autobetarouterplugin.py index 1388c23e..e1ae76a7 100644 --- a/src/openrouter/components/autobetarouterplugin.py +++ b/src/openrouter/components/autobetarouterplugin.py @@ -34,6 +34,8 @@ class AutoBetaRouterPluginTypedDict(TypedDict): r"""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.""" enabled: NotRequired[bool] r"""Set to false to disable the auto-beta-router plugin for this request. Defaults to true.""" + excluded_models: NotRequired[List[str]] + r"""List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., \"meta-llama/*\" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.""" class AutoBetaRouterPlugin(BaseModel): @@ -56,10 +58,19 @@ class AutoBetaRouterPlugin(BaseModel): enabled: Optional[bool] = None r"""Set to false to disable the auto-beta-router plugin for this request. Defaults to true.""" + excluded_models: Optional[List[str]] = None + r"""List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., \"meta-llama/*\" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["allowed_models", "cost_quality_tradeoff", "cost_tier", "enabled"] + [ + "allowed_models", + "cost_quality_tradeoff", + "cost_tier", + "enabled", + "excluded_models", + ] ) serialized = handler(self) m = {} diff --git a/src/openrouter/components/autorouterplugin.py b/src/openrouter/components/autorouterplugin.py index 077c2a1e..414a9ca4 100644 --- a/src/openrouter/components/autorouterplugin.py +++ b/src/openrouter/components/autorouterplugin.py @@ -34,6 +34,8 @@ class AutoRouterPluginTypedDict(TypedDict): r"""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.""" enabled: NotRequired[bool] r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + excluded_models: NotRequired[List[str]] + r"""List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., \"meta-llama/*\" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.""" pin_model: NotRequired[bool] r"""When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.""" @@ -58,6 +60,9 @@ class AutoRouterPlugin(BaseModel): enabled: Optional[bool] = None r"""Set to false to disable the auto-router plugin for this request. Defaults to true.""" + excluded_models: Optional[List[str]] = None + r"""List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., \"meta-llama/*\" excludes all Llama models). Applied after allowed_models, so an excluded pattern always wins over an allowed one.""" + pin_model: Optional[bool] = None r"""When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.""" @@ -69,6 +74,7 @@ def serialize_model(self, handler): "cost_quality_tradeoff", "cost_tier", "enabled", + "excluded_models", "pin_model", ] ) diff --git a/src/openrouter/components/chatrequest.py b/src/openrouter/components/chatrequest.py index c0e21ad1..019097cb 100644 --- a/src/openrouter/components/chatrequest.py +++ b/src/openrouter/components/chatrequest.py @@ -81,9 +81,9 @@ ResponseHealingPluginTypedDict, FileParserPluginTypedDict, ContextCompressionPluginTypedDict, - AutoBetaRouterPluginTypedDict, WebFetchPluginTypedDict, ParetoRouterPluginTypedDict, + AutoBetaRouterPluginTypedDict, AutoRouterPluginTypedDict, FusionPluginTypedDict, WebSearchPluginTypedDict, diff --git a/src/openrouter/components/messagesrequest.py b/src/openrouter/components/messagesrequest.py index 516c30ac..112dcbe2 100644 --- a/src/openrouter/components/messagesrequest.py +++ b/src/openrouter/components/messagesrequest.py @@ -363,9 +363,9 @@ def serialize_model(self, handler): ResponseHealingPluginTypedDict, FileParserPluginTypedDict, ContextCompressionPluginTypedDict, - AutoBetaRouterPluginTypedDict, WebFetchPluginTypedDict, ParetoRouterPluginTypedDict, + AutoBetaRouterPluginTypedDict, AutoRouterPluginTypedDict, FusionPluginTypedDict, WebSearchPluginTypedDict, diff --git a/src/openrouter/components/responsesrequest.py b/src/openrouter/components/responsesrequest.py index 8c9b4fa1..ddd09755 100644 --- a/src/openrouter/components/responsesrequest.py +++ b/src/openrouter/components/responsesrequest.py @@ -129,9 +129,9 @@ ResponseHealingPluginTypedDict, FileParserPluginTypedDict, ContextCompressionPluginTypedDict, - AutoBetaRouterPluginTypedDict, WebFetchPluginTypedDict, ParetoRouterPluginTypedDict, + AutoBetaRouterPluginTypedDict, AutoRouterPluginTypedDict, FusionPluginTypedDict, WebSearchPluginTypedDict, diff --git a/uv.lock b/uv.lock index 6b69315f..97c8459a 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.14" +version = "1.1.15" source = { editable = "." } dependencies = [ { name = "httpcore" }, From b752c63dcc38397f90a4f6f4084a29e2714b79b3 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:42:29 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow