From 328d439a0e46198a42e83b094ac2896f88919322 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:58:53 +0000 Subject: [PATCH 1/2] feat: Exclude toolless models from router assignment pools Co-authored-by: sheepdestroyer <1377479+sheepdestroyer@users.noreply.github.com> --- router/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/router/main.py b/router/main.py index b8bb564b..6676e438 100644 --- a/router/main.py +++ b/router/main.py @@ -191,6 +191,13 @@ async def sync_adaptive_router_roster(master_key: str): # Skip internal OpenRouter encoded IDs that LiteLLM can't map to a provider if not mid or (len(mid) > 64 and "/" not in mid): continue + + # 1. Enforce Tool/Function Calling Support + supported_params = m.get("supported_parameters", []) + if "tools" not in supported_params: + logger.info(f"🚫 Skipping {mid} — Model does not support tool calling.") + continue + pricing = m.get("pricing", {}) if pricing.get("prompt") in ("0", 0, "0.0", 0.0) and pricing.get("completion") in ("0", 0, "0.0", 0.0): try: From beb3c9430300a500e10231a8b20c654ca4465efb Mon Sep 17 00:00:00 2001 From: sheepdestroyer Date: Tue, 16 Jun 2026 18:52:43 +0200 Subject: [PATCH 2/2] Update router/main.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- router/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/main.py b/router/main.py index 6676e438..1e4167d0 100644 --- a/router/main.py +++ b/router/main.py @@ -193,8 +193,8 @@ async def sync_adaptive_router_roster(master_key: str): continue # 1. Enforce Tool/Function Calling Support - supported_params = m.get("supported_parameters", []) - if "tools" not in supported_params: + supported_params = m.get('supported_parameters') or [] + if 'tools' not in supported_params: logger.info(f"🚫 Skipping {mid} — Model does not support tool calling.") continue