diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6c6f09c9..1e6828e0 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: 48d5a81172df7e47f0a05fd4a90ce217 + docChecksum: ef196b7b8b17b8af9ade078f1eeee2c0 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.1.5 - configChecksum: 366ee98787158293e8d90134db38bd17 + releaseVersion: 1.1.6 + configChecksum: 548cc80ca457bf3455cd71e3bbab74fd repoURL: https://github.com/OpenRouterTeam/python-sdk.git installationURL: https://github.com/OpenRouterTeam/python-sdk.git published: true persistentEdits: - generation_id: c0de5ec0-83f9-4bc0-a0fc-b6923ac4f43d - pristine_commit_hash: c2a5bb7caed893bd0d62131d4d2e04db8a162db2 - pristine_tree_hash: c37a7a6d463a342ca36da91f1ded0c85a852aa5f + generation_id: d3020812-3cc9-4147-8689-da5e4d3132ef + pristine_commit_hash: 7f67540f77f8090772e6db753cd4c228655b6ab0 + pristine_tree_hash: 65857091513cf2e3a4deba682803a4d00a6ffc27 features: python: acceptHeaders: 3.0.0 @@ -1950,20 +1950,20 @@ trackedFiles: pristine_git_object: eff3701c44c58f6c8a93badff21969b939089a4f docs/components/fusionanalysisresult.mdx: id: a3d19bd18149 - last_write_checksum: sha1:07be09bbe40db29df2ab80183aca39136b575dcf - pristine_git_object: 461abd3405a1f3625b5aba440474f5b8f438e0b5 + last_write_checksum: sha1:3fc83d03ab1cfe864d1a8206f8beab5bfeb05d74 + pristine_git_object: 06562dd230f2ebd22ec17bb65da8d04afa23f272 docs/components/fusioncallanalysiscompletedevent.mdx: id: c0bd92da771d - last_write_checksum: sha1:47e2810628a394ea1d0266e2e7454ad43f656f17 - pristine_git_object: dc3640ff8add5ace3d6dd14a3edf1262556d6d22 + last_write_checksum: sha1:860868c080c4158b6c1a9d7dd3b6bec0575ba64b + pristine_git_object: 7f295a8c0ee4ff220c2347b64183560c74f8cb2e docs/components/fusioncallanalysiscompletedeventtype.mdx: id: 6ea6b2bc49c5 last_write_checksum: sha1:667bc54812dff48413bb3ebcb4144aa5de5202dd pristine_git_object: 897efa69c65c240777c2639958db44191cf6ccd1 docs/components/fusioncallanalysisinprogressevent.mdx: id: f3845ebae84c - last_write_checksum: sha1:829d05a50b21a4b30b67a869624f1224fcc52e9a - pristine_git_object: cd16c26cae8bece70bb9cb566a6f16b63d4f4534 + last_write_checksum: sha1:2246ae8154596f623013b80659182d820b3c88c0 + pristine_git_object: 6538c8ffb1c3fa508dd66d572058c462a52aa932 docs/components/fusioncallanalysisinprogresseventtype.mdx: id: dab80e9a7de4 last_write_checksum: sha1:c9bb3b13718e05441f746c08f79d9cc15eeb04bf @@ -2026,8 +2026,8 @@ trackedFiles: pristine_git_object: 7b7d7a350209a88f9a688d1fab6d88fc4754664e docs/components/fusionplugin.mdx: id: 91c7b4638c7e - last_write_checksum: sha1:d6cb2d143277157399b5c8560827b4e5f92c1931 - pristine_git_object: 47df2cd777c8b157b4df2ff942b9af80b36dd697 + last_write_checksum: sha1:2361b03ff5f2910737adf0b8faee2493a63a6fb1 + pristine_git_object: 269960766fecb39f0ead44af2cb142548d8d73b1 docs/components/fusionpluginid.mdx: id: 2b90bfd2d611 last_write_checksum: sha1:8111a4424197eb86dfccedfdc798d1a2b5a1c39e @@ -2038,32 +2038,32 @@ trackedFiles: pristine_git_object: 967c0e2abcf18d52589d674bdf45d0414050b71f docs/components/fusionservertoolconfig.mdx: id: 87976811b0c3 - last_write_checksum: sha1:897a21e872f16b3da363410d17ff89473701343d - pristine_git_object: 745dc5599a9a96a9727a68292c5061d7dfac0ffa + last_write_checksum: sha1:9a167625bd084e1bcb317ec7b88b490c79490a3d + pristine_git_object: 00c2183f63a67622cb53109ca8e8887473e07b07 docs/components/fusionservertoolconfigeffort.mdx: id: f5ce0fbc94aa - last_write_checksum: sha1:4ce09a069b4eeae41ac1531027cf97dc4139927f - pristine_git_object: 8ba9e2e9776f6f5ff13255a95514f68003ed066c + last_write_checksum: sha1:6cefaed8456c5ca47af14755dcfa0df67589f59a + pristine_git_object: be7c289f919977a5b8f0198d2ebdd0a948e89d15 docs/components/fusionservertoolconfigreasoning.mdx: id: e2814e0ec2ce - last_write_checksum: sha1:2cce3523a6ece5ff53b99e7508e95283d69e5f51 - pristine_git_object: af7105baa0ce972bfccbae84a2ec91ae50ae6333 + last_write_checksum: sha1:154bbe0864c431765820b68ac7aea9cecb1fbbe2 + pristine_git_object: 49dd617c5c79dbb25f38384669c3bca25f5eb855 docs/components/fusionservertoolconfigtool.mdx: id: cb4b076ea8f1 last_write_checksum: sha1:ce722d9d42cb5709d45aeb7566ab510ecc185cd3 pristine_git_object: 486dbbd1c8e0033396fa9702034d52dc07ccdd23 docs/components/fusionservertoolopenrouter.mdx: id: e90614058484 - last_write_checksum: sha1:ca700c405e7a9cb2d5f10932cd1413b0192c8527 - pristine_git_object: 6f4149fb710f4d73e562190483469ab7c79f84fc + last_write_checksum: sha1:baaa7834e297973623305f58dd8846fffb22bb5c + pristine_git_object: dd8444b46c802116fdbfb16a55b712c5cf1cdd15 docs/components/fusionservertoolopenroutertype.mdx: id: da7e7bf8b425 last_write_checksum: sha1:e3b47af2ce0438e276c4669ddbeb373dedc8cd07 pristine_git_object: 51199c32af27a46659b1c3d5a48e5ba11912dca8 docs/components/fusionsource.mdx: id: 9c98ab0aea5a - last_write_checksum: sha1:5718b311bbd7315cda6723e16da7f06eca0459f4 - pristine_git_object: b305413e07a9922a150dfb23e65164f7d2166495 + last_write_checksum: sha1:558bcf970e10b728252d8fab1f2e1a15b747b403 + pristine_git_object: 384c9eac32dc42b655935f262e21ecd6d125dfa0 docs/components/generationcontentdata.mdx: id: 030f8930b5df last_write_checksum: sha1:84792e91bcca8347a02d62672fa755bd7c607cbb @@ -3590,8 +3590,8 @@ trackedFiles: pristine_git_object: 700af387aa2f0f827ef4775f69fbb3900b075899 docs/components/outputfusionservertoolitem.mdx: id: bc7c73cc3100 - last_write_checksum: sha1:53565a2c163e9aacdb4f786ef71fc65063b60137 - pristine_git_object: 996340e483ed52e0faaa69bb38aded9bcaa6d5b2 + last_write_checksum: sha1:742a3b9abfc785a775b7f79f922945da1e8d2e48 + pristine_git_object: 8a5941a7a9a3b47176f9f06f72d33865e949bbdc docs/components/outputfusionservertoolitemtype.mdx: id: d5337e29a21f last_write_checksum: sha1:133446222202e08ffceaa5944185842c21078830 @@ -3990,8 +3990,8 @@ trackedFiles: pristine_git_object: 5c5675beaf31e5b109617040c2d6eb9055f891d7 docs/components/presetenum.mdx: id: 5c9d69c551a8 - last_write_checksum: sha1:5d1fdd6337d62463657cfbae4a58abb21cedc03d - pristine_git_object: d4ae3a8992c31daf56310ec01d089eb862ed13b3 + last_write_checksum: sha1:38f3fee4b72b586b64dcf7bca9e7baa32a668d19 + pristine_git_object: 5c2dac2ed572fcaeccf9c195fd2695d23e065ecb docs/components/presetstatus.mdx: id: cb4faf64ee85 last_write_checksum: sha1:7a2f2619305e77274fa23eb6a68e17c122a0fb38 @@ -6794,8 +6794,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:cd60d35abf54ca3250cf89188a1083620ec7f26d - pristine_git_object: 5359be57c68bde0baa392e275381c906a0691d0a + last_write_checksum: sha1:aee065f71cf68ab4dba5b2afb46b13310977d6ff + pristine_git_object: 921465df249ebeeb6ba51bacfa08ad314f51c5d5 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77f44b60b98bc126557ec27391f91dfba764bb54 @@ -6822,8 +6822,8 @@ trackedFiles: pristine_git_object: 86713cfea633e09d33b3d4e65281071fe20e6137 src/openrouter/_version.py: id: d8d15ad6c586 - last_write_checksum: sha1:7ed944ea23e58377537ef854af17f5a96ac80b8e - pristine_git_object: d1b834456918071dc73a76b4e3166b2d1e1f1086 + last_write_checksum: sha1:40326bee126ce6a2f05bb8a5d8e6be79bfba6a20 + pristine_git_object: bf343337191f635de7b4b2e0c7dfb8c2486ee0b8 src/openrouter/analytics.py: id: cb406b5aaabb last_write_checksum: sha1:9e709b71dd0611056dc0cec6150b578defe32841 @@ -7706,16 +7706,16 @@ trackedFiles: pristine_git_object: 5a290e0b17b588c58fc73ff77b95bc38fac2245f src/openrouter/components/fusionanalysisresult.py: id: 8c88c59e344e - last_write_checksum: sha1:d1ca69c25b7e3ad67b93d94853e2054ed5e0258c - pristine_git_object: 44526fc446b4e41290ea9198dc6cb764ad9bbf76 + last_write_checksum: sha1:b64559e722fac2ca6acf2d8e69ba29080d0350fd + pristine_git_object: 920585a43dd3228868d7dca9d9b42b66dd72f24d src/openrouter/components/fusioncallanalysiscompletedevent.py: id: 2c5e1c627905 - last_write_checksum: sha1:2dd1d0a1771e01acc7ff760d4df5c1a39a51369b - pristine_git_object: c6c88ac1cd387b7679d480ca5d9cf3590e4e6688 + last_write_checksum: sha1:c2f93ba142920407f845c06a4895d10e5711e203 + pristine_git_object: e5cc28dd5a10d9df0074ff014bead0e28f596759 src/openrouter/components/fusioncallanalysisinprogressevent.py: id: 88976d8d8503 - last_write_checksum: sha1:7abc4dfb3dea17715135772104ce4ecb2aba5eae - pristine_git_object: 4031d8daac28fe0b52c53c1b640060180ed67aaf + last_write_checksum: sha1:f190ea6c5b88028631c87f4d8c4abf276392409a + pristine_git_object: 6324bc7ceafbbb700c55749efc3d696066539dc3 src/openrouter/components/fusioncallcompletedevent.py: id: 40c32bcd2f02 last_write_checksum: sha1:e0fdc079df2c1327a936ea5fa6b7efdd708c3b2f @@ -7746,20 +7746,20 @@ trackedFiles: pristine_git_object: 2836ce37ac58b2b90568bbd6247fa52b982ef131 src/openrouter/components/fusionplugin.py: id: c0b307f15bb0 - last_write_checksum: sha1:567325a085e7346e160a8df3b882097aaede2777 - pristine_git_object: 7ef18fda85990e3991922d073228970c2b7a8a65 + last_write_checksum: sha1:5178b40046c291eca6b890290bfeef9e5db6885c + pristine_git_object: 9ec723b1f05f5cf6cd28987d58d6e5c542756b2c src/openrouter/components/fusionservertool_openrouter.py: id: a1d6d3aefe6f - last_write_checksum: sha1:5946f3beb667144593dfb06796f51995ce8140ad - pristine_git_object: 0015e263bbb2d817af89780610cc8f25ff852e73 + last_write_checksum: sha1:b1e560ea3ed00d00dce53b8d5897e59c7face470 + pristine_git_object: 6c8ceeaf14e361cee78935da98ce2da718e7f47a src/openrouter/components/fusionservertoolconfig.py: id: 0d1d229c531f - last_write_checksum: sha1:fdda1ef4d255f3f1860609dbf3b569271c47b4ac - pristine_git_object: 3e4fc18f5b963d2a29ef65d22c12ec8cba69d506 + last_write_checksum: sha1:299e4b56a189e200e473037691e8e0e42feb66db + pristine_git_object: e9eec1d9f62c2aee90f3a98a4b388b2829aab9ea src/openrouter/components/fusionsource.py: id: ce20a4a9f32f - last_write_checksum: sha1:2141dd1dd9396035bf8070878c9ec945331514c8 - pristine_git_object: c60f29915ce3fed38a693d10b8c2de868f8ee728 + last_write_checksum: sha1:d38e02465da7d7d4caed6a25b3602709236d9ce6 + pristine_git_object: cfe434755a0c8f34cc8797777eee68311dbbd243 src/openrouter/components/generationcontentdata.py: id: 0140215b5b46 last_write_checksum: sha1:8f0b1104c944ce96fa078baf47dfd9d040828c77 @@ -8350,8 +8350,8 @@ trackedFiles: pristine_git_object: 13dc4afc3516bdb0590427677835c1d1590c9d9d src/openrouter/components/outputfusionservertoolitem.py: id: 1d798a2bb7ae - last_write_checksum: sha1:6015789e687721a2f4c9313afa5ae564381920e3 - pristine_git_object: 78b73afecc9c83608207aa23b5f0996d1ec3d33f + last_write_checksum: sha1:e9e1fb793c0181b4869f935265c1f15ed317ca52 + pristine_git_object: ea89c055fd6c31c0b273b5b8934c3232bac8e67d src/openrouter/components/outputimagegenerationcallitem.py: id: 48d20dc00e1c last_write_checksum: sha1:339b1256fd865d8ddb8b3be54a4203ccb6498c3f @@ -8814,8 +8814,8 @@ trackedFiles: pristine_git_object: a27d8806096c5db215e83fc89b4700ff94d3078f src/openrouter/components/streamevents.py: id: 331636234c76 - last_write_checksum: sha1:b049ae1a8dd7b46726b56557e2b7440182960a7a - pristine_git_object: cc94aff80f6eb55e18385bc4a80db2a881d238e2 + last_write_checksum: sha1:112335cf676d4178d1eadce236ef4f0c7ea3a7ec + pristine_git_object: 6e69218e4e91b0f7181b4f78a179faecee4ec913 src/openrouter/components/streameventsresponsecompleted.py: id: fd244f61371c last_write_checksum: sha1:011e0930c7994f64dbee78c0a4c2fa5d7167d8ab @@ -11329,3 +11329,7 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 +releaseNotes: | + ## Python SDK Changes: + * `open_router.beta.responses.send()`: `response.[].data.union(response.fusion_call.analysis.in_progress).analyst_model` **Added** + * `open_router.responses.send()`: `response.[].data.union(response.fusion_call.analysis.in_progress).analyst_model` **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9d9e89e4..281dec62 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.1.5 + version: 1.1.6 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index fbaef491..b9f473a3 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -8304,7 +8304,7 @@ components: - 'parameters' type: 'object' FusionAnalysisResult: - description: 'Structured analysis produced by the fusion judge model.' + description: 'Structured analysis produced by the fusion analyst model.' example: blind_spots: - 'No model considered the impact on existing API consumers.' @@ -8389,7 +8389,7 @@ components: - 'blind_spots' type: 'object' FusionCallAnalysisCompletedEvent: - description: 'Emitted when the fusion judge completes with the structured analysis.' + description: 'Emitted when the fusion analyst completes with the structured analysis.' example: analysis: blind_spots: [] @@ -8422,17 +8422,23 @@ components: - 'sequence_number' type: 'object' FusionCallAnalysisInProgressEvent: - description: 'Emitted when the fusion judge starts producing the structured analysis.' + description: 'Emitted when the fusion analyst starts producing the structured analysis.' example: + analyst_model: 'openai/gpt-5' item_id: 'st_fusion_abc' judge_model: 'openai/gpt-5' output_index: 0 sequence_number: 25 type: 'response.fusion_call.analysis.in_progress' properties: + analyst_model: + description: 'Slug of the model producing the structured analysis.' + type: 'string' item_id: type: 'string' judge_model: + deprecated: true + description: 'Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`.' type: 'string' output_index: type: 'integer' @@ -8444,6 +8450,7 @@ components: type: 'string' required: - 'type' + - 'analyst_model' - 'judge_model' - 'output_index' - 'item_id' @@ -8667,7 +8674,7 @@ components: model: '~anthropic/claude-opus-latest' properties: analysis_models: - description: 'Slugs of models to run in parallel as the "expert panel" the judge 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: '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' @@ -8685,17 +8692,17 @@ components: - 'fusion' type: 'string' max_tool_calls: - description: 'Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.' + 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 8. Capped at 16.' example: 12 maximum: 16 minimum: 1 type: 'integer' model: - description: 'Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.' + 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.' 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 judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.' + 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.' enum: - 'general-high' - 'general-budget' @@ -8704,7 +8711,7 @@ components: type: 'string' x-speakeasy-unknown-values: allow tools: - description: 'Server tools available to panelist and judge 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: '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: @@ -8754,7 +8761,7 @@ components: - 'id' type: 'object' FusionServerTool_OpenRouter: - description: 'OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.' + description: 'OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from.' example: parameters: analysis_models: @@ -8780,7 +8787,7 @@ components: - '~google/gemini-pro-latest' properties: analysis_models: - description: 'Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.' + description: 'Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.' example: - '~anthropic/claude-opus-latest' - '~openai/gpt-latest' @@ -8793,24 +8800,24 @@ components: cache_control: $ref: '#/components/schemas/AnthropicCacheControlDirective' max_completion_tokens: - description: 'Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the judge to 20000.' + description: 'Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the analyst to 20000.' example: 16384 type: 'integer' max_tool_calls: - description: 'Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.' + 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 8. Capped at 16.' example: 12 maximum: 16 minimum: 1 type: 'integer' model: - description: 'Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.' + description: 'Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request.' example: '~anthropic/claude-opus-latest' type: 'string' reasoning: - description: 'Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.' + description: 'Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.' properties: effort: - description: 'Reasoning effort level for panelist and judge inner calls.' + description: 'Reasoning effort level for panelist and analyst inner calls.' enum: - 'max' - 'xhigh' @@ -8822,16 +8829,16 @@ components: type: 'string' x-speakeasy-unknown-values: allow max_tokens: - description: 'Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought.' + description: 'Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought.' type: 'integer' type: 'object' temperature: - description: 'Temperature forwarded to panelist inner calls. The judge always runs at temperature 0 regardless of this value. When omitted, the provider''s default applies.' + description: 'Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider''s default applies.' example: 0.7 format: 'double' type: 'number' tools: - description: 'Server tools available to panelist and judge 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: '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: @@ -8863,7 +8870,7 @@ components: description: 'Title of the retrieved web page.' type: 'string' url: - description: 'URL of the web page a panel or the judge retrieved during the run.' + description: 'URL of the web page a panel or the analyst retrieved during the run.' type: 'string' required: - 'url' @@ -17284,7 +17291,7 @@ components: type: 'object' type: 'array' failure_reason: - description: 'Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion.' + description: 'Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.' type: 'string' id: type: 'string' @@ -17301,7 +17308,7 @@ components: type: 'object' type: 'array' sources: - description: 'Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.' + description: 'Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.' items: $ref: '#/components/schemas/FusionSource' type: 'array' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9ba61ff4..4cafa6b4 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:425a3cee66f9488d3ce54957205ad04204aebe71268135e56d167d988d73cea5 - sourceBlobDigest: sha256:9263140a95dff45663a8fe5abe0f1eadaa305d0cefdcc05286fdafc7e794b6f0 + sourceRevisionDigest: sha256:12e03b029979a7da75a0175b639f45d881812355cfaac730e0133c31bb51aea1 + sourceBlobDigest: sha256:3fb9895975f966a788ecedf394003c04e105bfa7e206833dd3a7bf63f7b2a17e tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: open-router: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:425a3cee66f9488d3ce54957205ad04204aebe71268135e56d167d988d73cea5 - sourceBlobDigest: sha256:9263140a95dff45663a8fe5abe0f1eadaa305d0cefdcc05286fdafc7e794b6f0 + sourceRevisionDigest: sha256:12e03b029979a7da75a0175b639f45d881812355cfaac730e0133c31bb51aea1 + sourceBlobDigest: sha256:3fb9895975f966a788ecedf394003c04e105bfa7e206833dd3a7bf63f7b2a17e codeSamplesNamespace: open-router-python-code-samples - codeSamplesRevisionDigest: sha256:98d258b409c6acdf2cfaf3680fb5d2aa477502ad85c9200da10aca720ef8adfd + codeSamplesRevisionDigest: sha256:7606273f59f52a52b020f46a53d5cdb5dc5867da91c033f88a2daa627b14db02 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index cfcf16ec..893826c5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -849,4 +849,14 @@ Based on: ### Generated - [python v1.1.5] . ### Releases -- [PyPI v1.1.5] https://pypi.org/project/openrouter/1.1.5 - . \ No newline at end of file +- [PyPI v1.1.5] https://pypi.org/project/openrouter/1.1.5 - . + +## 2026-07-28 02:25:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v1.1.6] . +### Releases +- [PyPI v1.1.6] https://pypi.org/project/openrouter/1.1.6 - . \ No newline at end of file diff --git a/docs/components/fusionanalysisresult.mdx b/docs/components/fusionanalysisresult.mdx index 461abd34..06562dd2 100644 --- a/docs/components/fusionanalysisresult.mdx +++ b/docs/components/fusionanalysisresult.mdx @@ -2,7 +2,7 @@ title: "FusionAnalysisResult" --- -Structured analysis produced by the fusion judge model. +Structured analysis produced by the fusion analyst model. ## Fields diff --git a/docs/components/fusioncallanalysiscompletedevent.mdx b/docs/components/fusioncallanalysiscompletedevent.mdx index dc3640ff..7f295a8c 100644 --- a/docs/components/fusioncallanalysiscompletedevent.mdx +++ b/docs/components/fusioncallanalysiscompletedevent.mdx @@ -2,14 +2,14 @@ title: "FusionCallAnalysisCompletedEvent" --- -Emitted when the fusion judge completes with the structured analysis. +Emitted when the fusion analyst completes with the structured analysis. ## Fields | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `analysis` | [components.FusionAnalysisResult](../components/fusionanalysisresult.mdx) | :heavy_check_mark: | Structured analysis produced by the fusion judge model. | \{
"blind_spots": [
"No model considered the impact on existing API consumers."
],
"consensus": [
"All panel models agree the request is asking for a concise summary."
],
"contradictions": [
\{
"stances": [
\{
"model": "openai/gpt-5",
"stance": "Favors an incremental rollout."
},
\{
"model": "anthropic/claude-sonnet-4.5",
"stance": "Favors a single coordinated migration."
}
],
"topic": "Recommended approach"
}
],
"partial_coverage": [
\{
"models": [
"openai/gpt-5"
],
"point": "Only one model addressed the rollback strategy."
}
],
"unique_insights": [
\{
"insight": "Highlighted a backwards-compatibility risk the other models missed.",
"model": "anthropic/claude-sonnet-4.5"
}
]
} | +| `analysis` | [components.FusionAnalysisResult](../components/fusionanalysisresult.mdx) | :heavy_check_mark: | Structured analysis produced by the fusion analyst model. | \{
"blind_spots": [
"No model considered the impact on existing API consumers."
],
"consensus": [
"All panel models agree the request is asking for a concise summary."
],
"contradictions": [
\{
"stances": [
\{
"model": "openai/gpt-5",
"stance": "Favors an incremental rollout."
},
\{
"model": "anthropic/claude-sonnet-4.5",
"stance": "Favors a single coordinated migration."
}
],
"topic": "Recommended approach"
}
],
"partial_coverage": [
\{
"models": [
"openai/gpt-5"
],
"point": "Only one model addressed the rollback strategy."
}
],
"unique_insights": [
\{
"insight": "Highlighted a backwards-compatibility risk the other models missed.",
"model": "anthropic/claude-sonnet-4.5"
}
]
} | | `item_id` | *str* | :heavy_check_mark: | N/A | | | `output_index` | *int* | :heavy_check_mark: | N/A | | | `sequence_number` | *int* | :heavy_check_mark: | N/A | | diff --git a/docs/components/fusioncallanalysisinprogressevent.mdx b/docs/components/fusioncallanalysisinprogressevent.mdx index cd16c26c..6538c8ff 100644 --- a/docs/components/fusioncallanalysisinprogressevent.mdx +++ b/docs/components/fusioncallanalysisinprogressevent.mdx @@ -2,15 +2,16 @@ title: "FusionCallAnalysisInProgressEvent" --- -Emitted when the fusion judge starts producing the structured analysis. +Emitted when the fusion analyst starts producing the structured analysis. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `item_id` | *str* | :heavy_check_mark: | N/A | -| `judge_model` | *str* | :heavy_check_mark: | N/A | -| `output_index` | *int* | :heavy_check_mark: | N/A | -| `sequence_number` | *int* | :heavy_check_mark: | N/A | -| `type` | [components.FusionCallAnalysisInProgressEventType](../components/fusioncallanalysisinprogresseventtype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `analyst_model` | *str* | :heavy_check_mark: | Slug of the model producing the structured analysis. | +| `item_id` | *str* | :heavy_check_mark: | N/A | +| ~~`judge_model`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`. | +| `output_index` | *int* | :heavy_check_mark: | N/A | +| `sequence_number` | *int* | :heavy_check_mark: | N/A | +| `type` | [components.FusionCallAnalysisInProgressEventType](../components/fusioncallanalysisinprogresseventtype.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/components/fusionplugin.mdx b/docs/components/fusionplugin.mdx index 47df2cd7..26996076 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 judge 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 judge 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 8. Capped at 16. | 12 | -| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the model that performs both the judge 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 judge 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 judge 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: | 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 8. 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 diff --git a/docs/components/fusionservertoolconfig.mdx b/docs/components/fusionservertoolconfig.mdx index 745dc559..00c2183f 100644 --- a/docs/components/fusionservertoolconfig.mdx +++ b/docs/components/fusionservertoolconfig.mdx @@ -9,11 +9,11 @@ Configuration for the openrouter:fusion server tool. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `analysis_models` | List[*str*] | :heavy_minus_sign: | Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | +| `analysis_models` | List[*str*] | :heavy_minus_sign: | Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. | [
"~anthropic/claude-opus-latest",
"~openai/gpt-latest",
"~google/gemini-pro-latest"
] | | `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. | \{
"type": "ephemeral"
} | -| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the judge to 20000. | 16384 | -| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16. | 12 | -| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request. | ~anthropic/claude-opus-latest | -| `reasoning` | [Optional[components.FusionServerToolConfigReasoning]](../components/fusionservertoolconfigreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. | | -| `temperature` | *Optional[float]* | :heavy_minus_sign: | Temperature forwarded to panelist inner calls. The judge always runs at temperature 0 regardless of this value. When omitted, the provider's default applies. | 0.7 | -| `tools` | List[[components.FusionServerToolConfigTool](../components/fusionservertoolconfigtool.mdx)] | :heavy_minus_sign: | Server tools available to panelist and judge 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 +| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the analyst to 20000. | 16384 | +| `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 8. Capped at 16. | 12 | +| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request. | ~anthropic/claude-opus-latest | +| `reasoning` | [Optional[components.FusionServerToolConfigReasoning]](../components/fusionservertoolconfigreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. | | +| `temperature` | *Optional[float]* | :heavy_minus_sign: | Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies. | 0.7 | +| `tools` | List[[components.FusionServerToolConfigTool](../components/fusionservertoolconfigtool.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 diff --git a/docs/components/fusionservertoolconfigeffort.mdx b/docs/components/fusionservertoolconfigeffort.mdx index 8ba9e2e9..be7c289f 100644 --- a/docs/components/fusionservertoolconfigeffort.mdx +++ b/docs/components/fusionservertoolconfigeffort.mdx @@ -2,7 +2,7 @@ title: "FusionServerToolConfigEffort" --- -Reasoning effort level for panelist and judge inner calls. +Reasoning effort level for panelist and analyst inner calls. ## Example Usage diff --git a/docs/components/fusionservertoolconfigreasoning.mdx b/docs/components/fusionservertoolconfigreasoning.mdx index af7105ba..49dd617c 100644 --- a/docs/components/fusionservertoolconfigreasoning.mdx +++ b/docs/components/fusionservertoolconfigreasoning.mdx @@ -2,12 +2,12 @@ title: "FusionServerToolConfigReasoning" --- -Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. +Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `effort` | [Optional[components.FusionServerToolConfigEffort]](../components/fusionservertoolconfigeffort.mdx) | :heavy_minus_sign: | Reasoning effort level for panelist and judge inner calls. | -| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `effort` | [Optional[components.FusionServerToolConfigEffort]](../components/fusionservertoolconfigeffort.mdx) | :heavy_minus_sign: | Reasoning effort level for panelist and analyst inner calls. | +| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought. | \ No newline at end of file diff --git a/docs/components/fusionservertoolopenrouter.mdx b/docs/components/fusionservertoolopenrouter.mdx index 6f4149fb..dd8444b4 100644 --- a/docs/components/fusionservertoolopenrouter.mdx +++ b/docs/components/fusionservertoolopenrouter.mdx @@ -2,7 +2,7 @@ title: "FusionServerToolOpenRouter" --- -OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from. +OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from. ## Fields diff --git a/docs/components/fusionsource.mdx b/docs/components/fusionsource.mdx index b305413e..384c9eac 100644 --- a/docs/components/fusionsource.mdx +++ b/docs/components/fusionsource.mdx @@ -7,7 +7,7 @@ A web page retrieved via web search during a fusion run. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `title` | *str* | :heavy_check_mark: | Title of the retrieved web page. | -| `url` | *str* | :heavy_check_mark: | URL of the web page a panel or the judge retrieved during the run. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `title` | *str* | :heavy_check_mark: | Title of the retrieved web page. | +| `url` | *str* | :heavy_check_mark: | URL of the web page a panel or the analyst retrieved during the run. | \ No newline at end of file diff --git a/docs/components/outputfusionservertoolitem.mdx b/docs/components/outputfusionservertoolitem.mdx index 996340e4..8a5941a7 100644 --- a/docs/components/outputfusionservertoolitem.mdx +++ b/docs/components/outputfusionservertoolitem.mdx @@ -9,12 +9,12 @@ An openrouter:fusion server tool output item | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `analysis` | [Optional[components.FusionAnalysisResult]](../components/fusionanalysisresult.mdx) | :heavy_minus_sign: | Structured analysis produced by the fusion judge model. | \{
"blind_spots": [
"No model considered the impact on existing API consumers."
],
"consensus": [
"All panel models agree the request is asking for a concise summary."
],
"contradictions": [
\{
"stances": [
\{
"model": "openai/gpt-5",
"stance": "Favors an incremental rollout."
},
\{
"model": "anthropic/claude-sonnet-4.5",
"stance": "Favors a single coordinated migration."
}
],
"topic": "Recommended approach"
}
],
"partial_coverage": [
\{
"models": [
"openai/gpt-5"
],
"point": "Only one model addressed the rollback strategy."
}
],
"unique_insights": [
\{
"insight": "Highlighted a backwards-compatibility risk the other models missed.",
"model": "anthropic/claude-sonnet-4.5"
}
]
} | +| `analysis` | [Optional[components.FusionAnalysisResult]](../components/fusionanalysisresult.mdx) | :heavy_minus_sign: | Structured analysis produced by the fusion analyst model. | \{
"blind_spots": [
"No model considered the impact on existing API consumers."
],
"consensus": [
"All panel models agree the request is asking for a concise summary."
],
"contradictions": [
\{
"stances": [
\{
"model": "openai/gpt-5",
"stance": "Favors an incremental rollout."
},
\{
"model": "anthropic/claude-sonnet-4.5",
"stance": "Favors a single coordinated migration."
}
],
"topic": "Recommended approach"
}
],
"partial_coverage": [
\{
"models": [
"openai/gpt-5"
],
"point": "Only one model addressed the rollback strategy."
}
],
"unique_insights": [
\{
"insight": "Highlighted a backwards-compatibility risk the other models missed.",
"model": "anthropic/claude-sonnet-4.5"
}
]
} | | `error` | *Optional[str]* | :heavy_minus_sign: | Error message when the fusion run did not produce an analysis result. | | | `failed_models` | List[[components.FailedModel](../components/failedmodel.mdx)] | :heavy_minus_sign: | Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel. | | -| `failure_reason` | *Optional[str]* | :heavy_minus_sign: | Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. | | +| `failure_reason` | *Optional[str]* | :heavy_minus_sign: | Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching. | | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `responses` | List[[components.Response](../components/response.mdx)] | :heavy_minus_sign: | Analysis models that produced a response in this fusion run, with each model's full panel content. | | -| `sources` | List[[components.FusionSource](../components/fusionsource.mdx)] | :heavy_minus_sign: | Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source. | | +| `sources` | List[[components.FusionSource](../components/fusionsource.mdx)] | :heavy_minus_sign: | Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source. | | | `status` | [components.ToolCallStatus](../components/toolcallstatus.mdx) | :heavy_check_mark: | N/A | completed | | `type` | [components.OutputFusionServerToolItemType](../components/outputfusionservertoolitemtype.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/components/presetenum.mdx b/docs/components/presetenum.mdx index d4ae3a89..5c2dac2e 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 judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. +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. ## Example Usage diff --git a/pyproject.toml b/pyproject.toml index 5359be57..921465df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openrouter" -version = "1.1.5" +version = "1.1.6" 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 d1b83445..bf343337 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.5" +__version__: str = "1.1.6" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.914.0" -__user_agent__: str = "speakeasy-sdk/python 1.1.5 2.914.0 1.0.0 openrouter" +__user_agent__: str = "speakeasy-sdk/python 1.1.6 2.914.0 1.0.0 openrouter" try: if __package__ is not None: diff --git a/src/openrouter/components/fusionanalysisresult.py b/src/openrouter/components/fusionanalysisresult.py index 44526fc4..920585a4 100644 --- a/src/openrouter/components/fusionanalysisresult.py +++ b/src/openrouter/components/fusionanalysisresult.py @@ -51,7 +51,7 @@ class UniqueInsight(BaseModel): class FusionAnalysisResultTypedDict(TypedDict): - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" blind_spots: List[str] consensus: List[str] @@ -61,7 +61,7 @@ class FusionAnalysisResultTypedDict(TypedDict): class FusionAnalysisResult(BaseModel): - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" blind_spots: List[str] diff --git a/src/openrouter/components/fusioncallanalysiscompletedevent.py b/src/openrouter/components/fusioncallanalysiscompletedevent.py index c6c88ac1..e5cc28dd 100644 --- a/src/openrouter/components/fusioncallanalysiscompletedevent.py +++ b/src/openrouter/components/fusioncallanalysiscompletedevent.py @@ -13,10 +13,10 @@ class FusionCallAnalysisCompletedEventTypedDict(TypedDict): - r"""Emitted when the fusion judge completes with the structured analysis.""" + r"""Emitted when the fusion analyst completes with the structured analysis.""" analysis: FusionAnalysisResultTypedDict - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" item_id: str output_index: int sequence_number: int @@ -24,10 +24,10 @@ class FusionCallAnalysisCompletedEventTypedDict(TypedDict): class FusionCallAnalysisCompletedEvent(BaseModel): - r"""Emitted when the fusion judge completes with the structured analysis.""" + r"""Emitted when the fusion analyst completes with the structured analysis.""" analysis: FusionAnalysisResult - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" item_id: str diff --git a/src/openrouter/components/fusioncallanalysisinprogressevent.py b/src/openrouter/components/fusioncallanalysisinprogressevent.py index 4031d8da..6324bc7c 100644 --- a/src/openrouter/components/fusioncallanalysisinprogressevent.py +++ b/src/openrouter/components/fusioncallanalysisinprogressevent.py @@ -2,8 +2,9 @@ from __future__ import annotations from openrouter.types import BaseModel +import pydantic from typing import Literal -from typing_extensions import TypedDict +from typing_extensions import Annotated, TypedDict FusionCallAnalysisInProgressEventType = Literal[ @@ -12,21 +13,33 @@ class FusionCallAnalysisInProgressEventTypedDict(TypedDict): - r"""Emitted when the fusion judge starts producing the structured analysis.""" + r"""Emitted when the fusion analyst starts producing the structured analysis.""" + analyst_model: str + r"""Slug of the model producing the structured analysis.""" item_id: str judge_model: str + r"""Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`.""" output_index: int sequence_number: int type: FusionCallAnalysisInProgressEventType class FusionCallAnalysisInProgressEvent(BaseModel): - r"""Emitted when the fusion judge starts producing the structured analysis.""" + r"""Emitted when the fusion analyst starts producing the structured analysis.""" + + analyst_model: str + r"""Slug of the model producing the structured analysis.""" item_id: str - judge_model: str + judge_model: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + r"""Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`.""" output_index: int diff --git a/src/openrouter/components/fusionplugin.py b/src/openrouter/components/fusionplugin.py index 7ef18fda..9ec723b1 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 judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" +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.""" 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 judge 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"""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.""" max_tool_calls: NotRequired[int] - r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.""" + 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 8. Capped at 16.""" model: NotRequired[str] - r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" + 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.""" 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 judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" + 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.""" tools: NotRequired[List[FusionPluginToolTypedDict]] - r"""Server tools available to panelist and judge 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"""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 judge 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"""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.""" max_tool_calls: Optional[int] = None - r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.""" + 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 8. Capped at 16.""" model: Optional[str] = None - r"""Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.""" + 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.""" 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 judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.""" + 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.""" tools: Optional[List[FusionPluginTool]] = None - r"""Server tools available to panelist and judge 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"""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/src/openrouter/components/fusionservertool_openrouter.py b/src/openrouter/components/fusionservertool_openrouter.py index 0015e263..6c8ceeaf 100644 --- a/src/openrouter/components/fusionservertool_openrouter.py +++ b/src/openrouter/components/fusionservertool_openrouter.py @@ -15,7 +15,7 @@ class FusionServerToolOpenRouterTypedDict(TypedDict): - r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.""" + r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from.""" type: FusionServerToolOpenRouterType parameters: NotRequired[FusionServerToolConfigTypedDict] @@ -23,7 +23,7 @@ class FusionServerToolOpenRouterTypedDict(TypedDict): class FusionServerToolOpenRouter(BaseModel): - r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks a judge model to summarize their collective output as structured JSON the outer model can synthesize from.""" + r"""OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from.""" type: FusionServerToolOpenRouterType diff --git a/src/openrouter/components/fusionservertoolconfig.py b/src/openrouter/components/fusionservertoolconfig.py index 3e4fc18f..e9eec1d9 100644 --- a/src/openrouter/components/fusionservertoolconfig.py +++ b/src/openrouter/components/fusionservertoolconfig.py @@ -23,26 +23,26 @@ ], UnrecognizedStr, ] -r"""Reasoning effort level for panelist and judge inner calls.""" +r"""Reasoning effort level for panelist and analyst inner calls.""" class FusionServerToolConfigReasoningTypedDict(TypedDict): - r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" + r"""Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" effort: NotRequired[FusionServerToolConfigEffort] - r"""Reasoning effort level for panelist and judge inner calls.""" + r"""Reasoning effort level for panelist and analyst inner calls.""" max_tokens: NotRequired[int] - r"""Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought.""" + r"""Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought.""" class FusionServerToolConfigReasoning(BaseModel): - r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" + r"""Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" effort: Optional[FusionServerToolConfigEffort] = None - r"""Reasoning effort level for panelist and judge inner calls.""" + r"""Reasoning effort level for panelist and analyst inner calls.""" max_tokens: Optional[int] = None - r"""Maximum number of reasoning tokens each panelist and judge model may use. Helps bound cost when models allocate too much budget to chain-of-thought.""" + r"""Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought.""" @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -96,49 +96,49 @@ class FusionServerToolConfigTypedDict(TypedDict): r"""Configuration for the openrouter:fusion server tool.""" analysis_models: NotRequired[List[str]] - r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" + r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" cache_control: NotRequired[AnthropicCacheControlDirectiveTypedDict] r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.""" max_completion_tokens: NotRequired[int] - r"""Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the judge to 20000.""" + r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the analyst to 20000.""" max_tool_calls: NotRequired[int] - r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.""" + 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 8. Capped at 16.""" model: NotRequired[str] - r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" + r"""Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" reasoning: NotRequired[FusionServerToolConfigReasoningTypedDict] - r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" + r"""Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" temperature: NotRequired[float] - r"""Temperature forwarded to panelist inner calls. The judge always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.""" + r"""Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.""" tools: NotRequired[List[FusionServerToolConfigToolTypedDict]] - r"""Server tools available to panelist and judge 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"""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 FusionServerToolConfig(BaseModel): r"""Configuration for the openrouter:fusion server tool.""" analysis_models: Optional[List[str]] = None - r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then a judge model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" + r"""Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.""" cache_control: Optional[AnthropicCacheControlDirective] = None r"""Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.""" max_completion_tokens: Optional[int] = None - r"""Maximum number of output tokens (including reasoning tokens) each panelist and the judge model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the judge to 20000.""" + r"""Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the analyst to 20000.""" max_tool_calls: Optional[int] = None - r"""Maximum number of tool-calling steps each panelist (analysis model) and the judge 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 8. Capped at 16.""" + 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 8. Capped at 16.""" model: Optional[str] = None - r"""Slug of the judge model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" + r"""Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request.""" reasoning: Optional[FusionServerToolConfigReasoning] = None - r"""Reasoning configuration forwarded to panelist and judge inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" + r"""Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.""" temperature: Optional[float] = None - r"""Temperature forwarded to panelist inner calls. The judge always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.""" + r"""Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.""" tools: Optional[List[FusionServerToolConfigTool]] = None - r"""Server tools available to panelist and judge 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"""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/src/openrouter/components/fusionsource.py b/src/openrouter/components/fusionsource.py index c60f2991..cfe43475 100644 --- a/src/openrouter/components/fusionsource.py +++ b/src/openrouter/components/fusionsource.py @@ -11,7 +11,7 @@ class FusionSourceTypedDict(TypedDict): title: str r"""Title of the retrieved web page.""" url: str - r"""URL of the web page a panel or the judge retrieved during the run.""" + r"""URL of the web page a panel or the analyst retrieved during the run.""" class FusionSource(BaseModel): @@ -21,4 +21,4 @@ class FusionSource(BaseModel): r"""Title of the retrieved web page.""" url: str - r"""URL of the web page a panel or the judge retrieved during the run.""" + r"""URL of the web page a panel or the analyst retrieved during the run.""" diff --git a/src/openrouter/components/outputfusionservertoolitem.py b/src/openrouter/components/outputfusionservertoolitem.py index 78b73afe..ea89c055 100644 --- a/src/openrouter/components/outputfusionservertoolitem.py +++ b/src/openrouter/components/outputfusionservertoolitem.py @@ -82,18 +82,18 @@ class OutputFusionServerToolItemTypedDict(TypedDict): status: ToolCallStatus type: OutputFusionServerToolItemType analysis: NotRequired[FusionAnalysisResultTypedDict] - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" error: NotRequired[str] r"""Error message when the fusion run did not produce an analysis result.""" failed_models: NotRequired[List[FailedModelTypedDict]] r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel.""" failure_reason: NotRequired[str] - r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion.""" + r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.""" id: NotRequired[str] responses: NotRequired[List[ResponseTypedDict]] r"""Analysis models that produced a response in this fusion run, with each model's full panel content.""" sources: NotRequired[List[FusionSourceTypedDict]] - r"""Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.""" + r"""Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.""" class OutputFusionServerToolItem(BaseModel): @@ -104,7 +104,7 @@ class OutputFusionServerToolItem(BaseModel): type: OutputFusionServerToolItemType analysis: Optional[FusionAnalysisResult] = None - r"""Structured analysis produced by the fusion judge model.""" + r"""Structured analysis produced by the fusion analyst model.""" error: Optional[str] = None r"""Error message when the fusion run did not produce an analysis result.""" @@ -113,7 +113,7 @@ class OutputFusionServerToolItem(BaseModel): r"""Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel.""" failure_reason: Optional[str] = None - r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion.""" + r"""Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.""" id: Optional[str] = None @@ -121,7 +121,7 @@ class OutputFusionServerToolItem(BaseModel): r"""Analysis models that produced a response in this fusion run, with each model's full panel content.""" sources: Optional[List[FusionSource]] = None - r"""Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.""" + r"""Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/openrouter/components/streamevents.py b/src/openrouter/components/streamevents.py index cc94aff8..6e69218e 100644 --- a/src/openrouter/components/streamevents.py +++ b/src/openrouter/components/streamevents.py @@ -162,25 +162,24 @@ StreamEventsResponseIncompleteTypedDict, StreamEventsResponseFailedTypedDict, OpenResponsesCreatedEventTypedDict, - FusionCallCompletedEventTypedDict, - StreamEventsResponseOutputItemAddedTypedDict, + FusionCallInProgressEventTypedDict, WebSearchCallCompletedEventTypedDict, - StreamEventsResponseOutputItemDoneTypedDict, + StreamEventsResponseOutputItemAddedTypedDict, + FusionCallCompletedEventTypedDict, ImageGenCallInProgressEventTypedDict, + StreamEventsResponseOutputItemDoneTypedDict, ImageGenCallGeneratingEventTypedDict, ImageGenCallCompletedEventTypedDict, - FusionCallInProgressEventTypedDict, WebSearchCallInProgressEventTypedDict, WebSearchCallSearchingEventTypedDict, FusionCallPanelAddedEventTypedDict, - CustomToolCallInputDoneEventTypedDict, CustomToolCallInputDeltaEventTypedDict, - ApplyPatchCallOperationDiffDeltaEventTypedDict, + CustomToolCallInputDoneEventTypedDict, FunctionCallArgsDeltaEventTypedDict, + ApplyPatchCallOperationDiffDeltaEventTypedDict, ApplyPatchCallOperationDiffDoneEventTypedDict, - FusionCallAnalysisInProgressEventTypedDict, - FusionCallAnalysisCompletedEventTypedDict, ErrorEventTypedDict, + FusionCallAnalysisCompletedEventTypedDict, ReasoningSummaryTextDoneEventTypedDict, RefusalDoneEventTypedDict, ReasoningSummaryTextDeltaEventTypedDict, @@ -192,13 +191,14 @@ ContentPartAddedEventTypedDict, ImageGenCallPartialImageEventTypedDict, RefusalDeltaEventTypedDict, + ContentPartDoneEventTypedDict, FusionCallPanelDeltaEventTypedDict, FusionCallPanelReasoningDeltaEventTypedDict, FusionCallPanelCompletedEventTypedDict, - ContentPartDoneEventTypedDict, - TextDoneEventTypedDict, - TextDeltaEventTypedDict, + FusionCallAnalysisInProgressEventTypedDict, FusionCallPanelFailedEventTypedDict, + TextDeltaEventTypedDict, + TextDoneEventTypedDict, AnnotationAddedEventTypedDict, ], ) diff --git a/uv.lock b/uv.lock index 2efb246e..c775470b 100644 --- a/uv.lock +++ b/uv.lock @@ -213,7 +213,7 @@ wheels = [ [[package]] name = "openrouter" -version = "1.1.5" +version = "1.1.6" source = { editable = "." } dependencies = [ { name = "httpcore" },