Skip to content

feat(models): advertise tools for OpenRouter virtual routers - #6739

Merged
chrarnoldus merged 3 commits into
mainfrom
feat/router-models-tool-support
Sep 26, 2026
Merged

chrarnoldus merged 3 commits into
mainfrom
feat/router-models-tool-support

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

OpenRouter lists the virtual routers typesafe/jev-router (Jev Router) and openrouter/pareto-code (Pareto Code Router) with an empty supported_parameters list. Kilo clients filter out models that don't list tools, so these routers never show up for users.

enhancedModelList now adds tools to supported_parameters for these two model IDs, which are hardcoded, unless upstream already lists it. These routers forward requests to regular chat models, which are likely to accept tools. No other model is affected.

Verification

  • Added unit tests in apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts. They cover:
    • the two routers get tools, whether their list is empty or missing
    • tools is not added twice when upstream already lists it
    • other virtual models are left alone
  • Tool calling through both routers still needs a manual test.

@chrarnoldus chrarnoldus self-assigned this Sep 25, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental follow-up replaces the name/tokenizer heuristic with an explicit ID allowlist and updates tests accordingly; no changed-code issues found.

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts
Previous Review Summary (commit 0d0468c)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 0d0468c)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@joshburt
joshburt self-requested a review September 26, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants