Skip to content

feat: show Terminal Bench model details - #10879

Merged
lambertjosh merged 5 commits into
mainfrom
feat/terminal-bench-model-details
Jun 8, 2026
Merged

feat: show Terminal Bench model details#10879
lambertjosh merged 5 commits into
mainfrom
feat/terminal-bench-model-details

Conversation

@lambertjosh

@lambertjosh lambertjosh commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Carry optional Terminal Bench 2.0 completion and per-attempt cost metadata through the Kilo Gateway model catalog and generated SDK model type.
  • Show the benchmark rows as a separate group in VS Code model previews, the CLI wide model picker, and the CLI session sidebar for the currently selected prompt model.
  • Omit malformed or missing optional benchmark metadata so display enrichment cannot block model selection.

Rollout

Notes

  • Benchmark cost stays separate from token pricing because it represents one complete Terminal Bench attempt.
  • Models without a publishable result omit the entire benchmark group.

Validation

CLI TUI

image

VSCode

image

@lambertjosh
lambertjosh marked this pull request as ready for review June 5, 2026 18:06
@kilo-code-bot

kilo-code-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Carried Forward | Recommendation: Minor suggestion, safe to merge

Overview

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

SUGGESTION (carried forward — unchanged file)

File Line Issue
packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx 149–158 bench()! non-null assertions inside unkeyed <Show> — inconsistent with model-info-panel.tsx which uses the keyed accessor form
Incremental Change Notes (commit 210f587)

The second commit ("test: focus Terminal Bench coverage") reorganises tests:

  • kilo-gateway/test/api/models.test.ts: The terminalBench undefined assertion was moved from the generic success test into a new dedicated test ("omits malformed Terminal Bench metadata without rejecting the catalog"). Coverage is equivalent or better.

  • model-preview-data-line.test.ts: Removed the describe("model preview Terminal Bench group") block, which tested source code structure via string-matching (checking for specific variable names and JSX strings in ModelPreview.tsx). This is the right call — those tests were asserting implementation details rather than behavior.

  • model-price-format.test.ts / model-info-panel-utils.test.ts: Removed unit tests for fmtTerminalBenchScore, fmtScore, and fmtAttemptCost. These are simple one-liner formatters ((n * 100).toFixed(1) + "%" and "$" + n.toFixed(2)) and are exercised indirectly by the gateway integration tests, so the risk is low. The commit message says "focus Terminal Bench coverage" but the refocus is on integration-level tests rather than unit-level formatting tests — a reasonable tradeoff for functions this simple.

Other Observations

Keyed vs unkeyed <Show> pattern inconsistency (unchanged from previous review):

In ModelPreview.tsx, the Terminal Bench section uses <Show when={bench()}> and accesses bench()!.overallScore / bench()!.avgAttemptCostUsd with non-null assertions:

<Show when={bench()}>
  ...
  <span>{fmtTerminalBenchScore(bench()!.overallScore)}</span>
  <span>{fmtAttemptCost(bench()!.avgAttemptCostUsd)}</span>
</Show>

The CLI equivalent in model-info-panel.tsx uses the keyed accessor form, which is idiomatic SolidJS:

<Show when={m().terminalBench}>
  {(bench) => (
    ...
    <text>{fmtScore(bench().overallScore)}</text>
    ...
  )}
</Show>

This is not a bug — Show gates the render so bench()! is always non-null when the content renders. But the keyed form is preferred and the existing cost / caps sections in the same component use it consistently. Consider:

<Show when={bench()}>
  {(b) => (
    <div class="model-preview-group">
      ...
      <span class="model-preview-value">{fmtTerminalBenchScore(b().overallScore)}</span>
      ...
      <span class="model-preview-value">{fmtAttemptCost(b().avgAttemptCostUsd)}</span>
    </div>
  )}
</Show>
Files Reviewed

First commit (b0a4f03) — full review:

  • .changeset/brisk-terminal-bench-details.md
  • packages/kilo-gateway/src/api/models.ts
  • packages/kilo-gateway/test/api/models.test.ts
  • packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts
  • packages/kilo-vscode/tests/unit/model-price-format.test.ts
  • packages/kilo-vscode/webview-ui/src/components/shared/ModelPreview.tsx
  • packages/kilo-vscode/webview-ui/src/components/shared/model-preview-utils.ts
  • packages/kilo-vscode/webview-ui/src/styles/model-selector.css
  • packages/kilo-vscode/webview-ui/src/types/messages/providers.ts
  • packages/opencode/src/kilocode/components/model-info-panel-utils.ts
  • packages/opencode/src/kilocode/components/model-info-panel.tsx
  • packages/opencode/src/kilocode/plugins/sidebar-usage.tsx
  • packages/opencode/src/kilocode/provider/provider.ts
  • packages/opencode/test/kilocode/model-info-panel-utils.test.ts
  • packages/sdk/js/src/v2/gen/types.gen.ts
  • packages/sdk/openapi.json
  • i18n files (17 languages)

Second commit (210f587) — incremental review:

  • packages/kilo-gateway/test/api/models.test.ts — test reorganisation, no new issues
  • packages/kilo-vscode/tests/unit/model-preview-data-line.test.ts — string-match tests removed, no new issues
  • packages/kilo-vscode/tests/unit/model-price-format.test.ts — formatting tests removed, no new issues
  • packages/opencode/test/kilocode/model-info-panel-utils.test.ts — formatting tests removed, no new issues

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 415,059 tokens

Review guidance: REVIEW.md from base branch main

@lambertjosh
lambertjosh merged commit 0b0f095 into main Jun 8, 2026
21 checks passed
@lambertjosh
lambertjosh deleted the feat/terminal-bench-model-details branch June 8, 2026 16:53
LigiaZ added a commit that referenced this pull request Jun 8, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…odel-details

feat: show Terminal Bench model details
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