Skip to content

fix(gateway): optimistically assume tools support when supported_parameters is missing - #12426

Merged
chrarnoldus merged 3 commits into
mainfrom
fix/gateway-optimistic-tools-support
Jul 21, 2026
Merged

fix(gateway): optimistically assume tools support when supported_parameters is missing#12426
chrarnoldus merged 3 commits into
mainfrom
fix/gateway-optimistic-tools-support

Conversation

@chrarnoldus

Copy link
Copy Markdown
Collaborator

Models with a missing supported_parameters array are now optimistically assumed to support tools, instead of being filtered out. Only models that explicitly list parameters without tools are skipped.

…meters is missing

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jul 21, 2026
if (!model.supported_parameters?.includes("tools")) {
// Skip models that explicitly don't support tools — Kilo requires tool calling
// Optimistically assume models with a missing supported_parameters array support tools
if (model.supported_parameters && !model.supported_parameters.includes("tools")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: tool_call still resolves to false for optimistically-included models

This filter now lets models with a missing supported_parameters array through, but transformToModelDevFormat (models.ts:216) does const supportedParameters = model.supported_parameters || [], then supportsTools = supportedParameters.includes("tools") (models.ts:226). For a model with no supported_parameters, that evaluates to [], so supportsTools is false and the resulting model gets tool_call: false — directly contradicting the stated intent of "optimistically assume ... support tools". Consumers that gate tool usage on tool_call will still treat these models as non-tool-capable, so the fix doesn't fully achieve its goal. Consider deriving supportsTools the same way as this filter, e.g. !model.supported_parameters || supportedParameters.includes("tools").


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't seem to matter

@kilo-code-bot

kilo-code-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The follow-up commit fixes the previously flagged issue: supportsTools in transformToModelDevFormat now uses !model.supported_parameters || supportedParameters.includes("tools"), matching the filter's optimistic-inclusion logic so tool_call no longer resolves to false for models with a missing supported_parameters array.

Files Reviewed (1 file)
  • packages/kilo-gateway/src/api/models.ts
Previous Review Summary (commit e944a57)

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

Previous review (commit e944a57)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-gateway/src/api/models.ts 102 tool_call still resolves to false for models optimistically included by the new filter, contradicting the PR's stated intent
Files Reviewed (1 file)
  • packages/kilo-gateway/src/api/models.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5 · Input: 22 · Output: 3.5K · Cached: 426K

Review guidance: REVIEW.md from base branch main

chrarnoldus and others added 2 commits July 21, 2026 09:54
…ng supported_parameters

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus
chrarnoldus merged commit 156f176 into main Jul 21, 2026
26 checks passed
@chrarnoldus
chrarnoldus deleted the fix/gateway-optimistic-tools-support branch July 21, 2026 11:48
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…c-tools-support

fix(gateway): optimistically assume tools support when supported_parameters is missing
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