fix: surface openrouter/fusion in the model picker - #82767
fagramapp-star wants to merge 1 commit into
Conversation
OpenRouter meta-routers (openrouter/fusion, openrouter/fusion-flash) publish supported_parameters: [] because the concrete model is resolved per-request, yet they fully support tool calling (verified against the live chat/completions endpoint: the outer model returns tool_calls). _openrouter_model_supports_tools treated the empty list as an explicit 'no tools' declaration and dropped these routers from the picker. An empty list carries no capability information, so treat it like a missing field (permissive) — only a non-empty list that omits 'tools' hides a model. Also adds openrouter/fusion and openrouter/fusion-flash to the curated OPENROUTER_MODELS fallback list so they appear in the picker.
Updated — linked issue + PR templateFixes #46064 What does this PR do?OpenRouter's meta-routers (
Type of Change
Checklist
NotesThe image-only-model protection remains intact — those models advertise a non-empty parameter list without Note: I can't update the PR title/body directly (authored from |
Summary
OpenRouter's meta-routers (
openrouter/fusion,openrouter/fusion-flash) publishsupported_parameters: []in the/api/v1/modelscatalog because the concrete model is resolved per-request. They do support tool calling — verified against the livechat/completionsendpoint with a function tool: the outer model (resolved toanthropic/claude-opus-5) returnedfinish_reason: tool_callswith a well-formed call._openrouter_model_supports_tools()treated the empty list as an explicit "no tools" declaration, so these routers were silently dropped from the model picker even though they work fine as the agent's driving model.Changes
_openrouter_model_supports_tools: treat an emptysupported_parameterslist like a missing field (permissive). Only a non-empty list that omitstoolshides a model. An empty list carries no capability information.openrouter/fusionandopenrouter/fusion-flashto the curatedOPENROUTER_MODELSfallback list with short descriptions (including the ~4-5x cost caveat when the fusion panel is invoked).test_empty_supported_parameters_list_drops_modelwithtest_empty_supported_parameters_list_is_permissive(documents the fusion case) and addedtest_explicit_list_without_tools_drops_modelto keep the original protection covered.Test Plan
tests/hermes_cli/test_models.py— 31 passedPOST /chat/completionswithmodel: openrouter/fusion+ aget_weatherfunction tool returnstool_callsNotes
The image-only-model protection from Kilo-Org/kilocode#9068 remains intact — those models advertise a non-empty parameter list without
tools(e.g.google/gemini-3-pro-image-preview) and are still filtered.