diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f9e435e1..ed599a3c 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: f6c5b72912f9dd85cb89099bbfad9fc0 + docChecksum: 1399a961b6d0a2f35e428d48864064db docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.89 - configChecksum: 9fc9f8573ca9396646ca57e9f26a17fe + releaseVersion: 1.1.90 + configChecksum: c28142f462e8cc19ac66f39fc501f7f9 repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: 2793dbee-3635-4a87-9840-16bbb9eee245 - pristine_commit_hash: 07fc4a0dc54d733216eaf7ac5000552205fd48d7 - pristine_tree_hash: 5e217b5ee0c32e6aac19d851c299d1dfe0e7c163 + generation_id: 67c4ddad-6c0c-4461-a2ac-66fdcbe1d53d + pristine_commit_hash: 96cb29d1679688f60c40ec3f5d598677500e69d9 + pristine_tree_hash: 61171c160980f9d8cdf063075fa9e59bad5eb612 features: python: acceptHeaders: 3.0.0 @@ -2182,8 +2182,8 @@ trackedFiles: pristine_git_object: 7b7d7a350209a88f9a688d1fab6d88fc4754664e docs/components/fusionplugin.mdx: id: 91c7b4638c7e - last_write_checksum: sha1:870595df572ae4a17b4daee349e13d8193c57241 - pristine_git_object: 32a6b478678908aa7a2df9cc15398a4490741be3 + last_write_checksum: sha1:5a076ac40081a043497700e83dbd7c64d3b7dde1 + pristine_git_object: 0cb9761c99aa8ba6332e3b64357f5b704427e467 docs/components/fusionpluginid.mdx: id: 2b90bfd2d611 last_write_checksum: sha1:8111a4424197eb86dfccedfdc798d1a2b5a1c39e @@ -4306,8 +4306,8 @@ trackedFiles: pristine_git_object: 5c5675beaf31e5b109617040c2d6eb9055f891d7 docs/components/presetenum.mdx: id: 5c9d69c551a8 - last_write_checksum: sha1:38f3fee4b72b586b64dcf7bca9e7baa32a668d19 - pristine_git_object: 5c2dac2ed572fcaeccf9c195fd2695d23e065ecb + last_write_checksum: sha1:2d1f19ad66e100482793ba915cd950824bd5133e + pristine_git_object: 210727eae53c2ed5d2e54972f941e0504621ef60 docs/components/presetstatus.mdx: id: cb4faf64ee85 last_write_checksum: sha1:7a2f2619305e77274fa23eb6a68e17c122a0fb38 @@ -7386,8 +7386,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:45d8374b9430f85dd1dde25cbf505b77f8931d57 - pristine_git_object: a43ad28ca2b08dda34a73dd2cb55ee69a52b3cd9 + last_write_checksum: sha1:78dd517a5da7ba579c7184883d6bd0b150ff2eaa + pristine_git_object: 0eb05d43a029c6289e4849b125b04f2c4c3767ae scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -7414,8 +7414,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:2ba3a264350bdc9e4664fa885528912f37db700f - pristine_git_object: e162234afa195293c69464a1bb84b8475dab9c27 + last_write_checksum: sha1:5a8813e8e1a4434589fa8e4e877fa3640aaf2a9a + pristine_git_object: a78909fc4ea77e5b6e84a2b5ff14308679ec38eb src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:1e0004d8d1d5d797e2b54cd1cabeb7f9489d08e9 @@ -8406,8 +8406,8 @@ trackedFiles: pristine_git_object: 2836ce37ac58b2b90568bbd6247fa52b982ef131 src/openrouter/components/fusionplugin.py: id: c0b307f15bb0 - last_write_checksum: sha1:ccfc15d5b3295c565987f457c86731a46e3f61bc - pristine_git_object: b3762615f700ff0be163417f4e88cf5b9083f0b2 + last_write_checksum: sha1:a2ad5fda5b8afec32752b0fdc9b7332b9f0454a6 + pristine_git_object: afd9a2b9eefd33f6b5b377211a11b0b4a510d164 src/openrouter/components/fusionservertool_openrouter.py: id: a1d6d3aefe6f last_write_checksum: sha1:b1e560ea3ed00d00dce53b8d5897e59c7face470 @@ -12457,6 +12457,3 @@ examples: "503": application/json: {"error": {"code": 503, "message": "Service temporarily unavailable"}} examplesVersion: 1.0.2 -releaseNotes: | - ## Python SDK Changes: - * `open_router.images.list_model_endpoints()`: `response.endpoints[].pricing[].unit.enum(request)` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d54de2b8..7ece8400 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.89 + version: 1.1.90 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 6c202700..ce5377f5 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -9135,7 +9135,7 @@ components: model: '~anthropic/claude-opus-latest' properties: analysis_models: - description: 'Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).' example: - '~anthropic/claude-opus-latest' - '~openai/gpt-latest' @@ -9146,24 +9146,24 @@ components: minItems: 1 type: 'array' enabled: - description: 'Set to false to disable the fusion plugin for this request. Defaults to true.' + description: 'Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.' type: 'boolean' id: enum: - 'fusion' type: 'string' max_tool_calls: - description: 'Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.' example: 12 maximum: 16 minimum: 1 type: 'integer' model: - description: 'Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.' example: '~anthropic/claude-opus-latest' type: 'string' preset: - description: 'A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset''s analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.' + description: 'Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset''s analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.' enum: - 'general-high' - 'general-budget' @@ -9172,7 +9172,7 @@ components: type: 'string' x-speakeasy-unknown-values: allow tools: - description: 'Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).' + description: 'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).' example: - parameters: excluded_domains: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5b99b357..66540112 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:b294c3055789018d9d75d7c9bc915fa61ad8d3292565e703806514a008a32e63 - sourceBlobDigest: sha256:0ccddc43fe77b61dd6510b019f5ee479f595be1de67eacb65f12d120c995059d + sourceRevisionDigest: sha256:3dc5488760063ddc32216104271a3c12a2fa46a613269b4c65d5378730b0df45 + sourceBlobDigest: sha256:a44fa84bc753df180bf93c118992517157f58d85f05060594ec5db8a8df722e9 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:b294c3055789018d9d75d7c9bc915fa61ad8d3292565e703806514a008a32e63 - sourceBlobDigest: sha256:0ccddc43fe77b61dd6510b019f5ee479f595be1de67eacb65f12d120c995059d + sourceRevisionDigest: sha256:3dc5488760063ddc32216104271a3c12a2fa46a613269b4c65d5378730b0df45 + sourceBlobDigest: sha256:a44fa84bc753df180bf93c118992517157f58d85f05060594ec5db8a8df722e9 codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:93ef6fe23c8915211f233788b2cda77b41ce5a3e2e46048d9ae7bd330d6a95b3 + codeSamplesRevisionDigest: sha256:78d1e498502fa4ba5f24037192aec3074e192aad4d4703552edc049e9190b2e0 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index e047b738..372fcd11 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1679,4 +1679,14 @@ Based on: ### Generated - [python v1.1.89] . ### Releases -- [PyPI v1.1.89] https://pypi.org/project/openrouter/1.1.89 - . \ No newline at end of file +- [PyPI v1.1.89] https://pypi.org/project/openrouter/1.1.89 - . + +## 2026-08-25 22:46:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.90] . +### Releases +- [PyPI v1.1.90] https://pypi.org/project/openrouter/1.1.90 - . \ No newline at end of file diff --git a/docs/components/fusionplugin.mdx b/docs/components/fusionplugin.mdx index 32a6b478..0cb9761c 100644 --- a/docs/components/fusionplugin.mdx +++ b/docs/components/fusionplugin.mdx @@ -4,12 +4,12 @@ title: "FusionPlugin" ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `analysis_models` | List[*str*] | :heavy_minus_sign: | Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | -| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable the fusion plugin for this request. Defaults to true. | | -| `id` | [components.FusionPluginID](../components/fusionpluginid.mdx) | :heavy_check_mark: | N/A | | -| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. | 12 | -| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | -| `preset` | [Optional[components.PresetEnum]](../components/presetenum.mdx) | :heavy_minus_sign: | A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | -| `tools` | List[[components.FusionPluginTool](../components/fusionplugintool.mdx)] | :heavy_minus_sign: | Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `analysis_models` | List[*str*] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest). | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | +| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. | | +| `id` | [components.FusionPluginID](../components/fusionpluginid.mdx) | :heavy_check_mark: | N/A | | +| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. | 12 | +| `model` | *Optional[str]* | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. | ~anthropic/claude-opus-latest | +| `preset` | [Optional[components.PresetEnum]](../components/presetenum.mdx) | :heavy_minus_sign: | Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. | general-high | +| `tools` | List[[components.FusionPluginTool](../components/fusionplugintool.mdx)] | :heavy_minus_sign: | For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). | [
\{
"parameters": \{
"excluded_domains": [
"example.com"
]
},
"type": "openrouter:web_search"
},
\{
"type": "openrouter:web_fetch"
}
] | \ No newline at end of file diff --git a/docs/components/presetenum.mdx b/docs/components/presetenum.mdx index 5c2dac2e..210727ea 100644 --- a/docs/components/presetenum.mdx +++ b/docs/components/presetenum.mdx @@ -2,7 +2,7 @@ title: "PresetEnum" --- -A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. +Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. ## Example Usage diff --git a/pyproject.toml b/pyproject.toml index a43ad28c..0eb05d43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.89" +version = "1.1.90" 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 e162234a..a78909fc 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.89" +__version__: str = "1.1.90" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.89 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.90 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/fusionplugin.py b/src/openrouter/components/fusionplugin.py index b3762615..afd9a2b9 100644 --- a/src/openrouter/components/fusionplugin.py +++ b/src/openrouter/components/fusionplugin.py @@ -18,7 +18,7 @@ ], UnrecognizedStr, ] -r"""A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" +r"""Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" Parameters2TypedDict = TypeAliasType("Parameters2TypedDict", Union[str, float, bool]) @@ -87,39 +87,39 @@ def serialize_model(self, handler): class FusionPluginTypedDict(TypedDict): id: FusionPluginID analysis_models: NotRequired[List[str]] - r"""Slugs of models to run in parallel as the \"expert panel\" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the \"expert panel\" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" enabled: NotRequired[bool] - r"""Set to false to disable the fusion plugin for this request. Defaults to true.""" + r"""Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.""" max_tool_calls: NotRequired[int] - r"""Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.""" model: NotRequired[str] - r"""Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" preset: NotRequired[PresetEnum] - r"""A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" + r"""Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" tools: NotRequired[List[FusionPluginToolTypedDict]] - r"""Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).""" class FusionPlugin(BaseModel): id: FusionPluginID analysis_models: Optional[List[str]] = None - r"""Slugs of models to run in parallel as the \"expert panel\" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the \"expert panel\" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).""" enabled: Optional[bool] = None - r"""Set to false to disable the fusion plugin for this request. Defaults to true.""" + r"""Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.""" max_tool_calls: Optional[int] = None - r"""Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.""" model: Optional[str] = None - r"""Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" preset: Optional[PresetEnum] = None - r"""A curated OpenRouter fusion preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" + r"""Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" tools: Optional[List[FusionPluginTool]] = None - r"""Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).""" + r"""For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: \"openrouter:web_search\" }, { type: \"openrouter:web_fetch\" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/uv.lock b/uv.lock index f9c23bca..2a6f2b71 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.89" +version = "1.1.90" source = { editable = "." } dependencies = [ { name = "httpcore" },