Skip to content

fix(code-reviews): use gateway model variants - #5055

Open
chrarnoldus wants to merge 4 commits into
mainfrom
linen-gasosaurus
Open

fix(code-reviews): use gateway model variants#5055
chrarnoldus wants to merge 4 commits into
mainfrom
linen-gasosaurus

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • carry OpenCode variant names from the Kilo Gateway models response into ModelOption
  • read endpoint-provided variants directly from selected model options in code-review selectors
  • treat the /models response as authoritative, including its server-side fallback variants

Verification

  • pnpm format
  • pnpm --filter web lint
  • pnpm --filter web typecheck
  • git diff --check

@chrarnoldus chrarnoldus self-assigned this Aug 5, 2026
Comment thread apps/web/src/components/code-reviews/ReviewConfigForm.tsx
Comment thread apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx
Comment thread apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx
@kilo-code-bot

kilo-code-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of commit bd34764 confirms all three previous findings are resolved — the thinking-effort pruning effects in both config forms and the manual-job initialization now defer to the models-query loading state — and the changed lines introduce no new issues.

Files Reviewed (3 files)
  • apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx
  • apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx
  • apps/web/src/components/code-reviews/ReviewConfigForm.tsx
Previous Review Summary (commit 1d7ba6f)

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

Previous review (commit 1d7ba6f)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

Switching thinking-effort variants from the static fallback list to endpoint-driven modelOptions introduces a loading race in the two review-config forms: a valid saved thinkingEffort can be silently reset to null while the models query is in flight, and the next save drops it.

Overview

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

WARNING

File Line Issue
apps/web/src/components/code-reviews/ReviewConfigForm.tsx 296 availableVariants is [] while models load; unguarded reset effect wipes a hydrated configured thinkingEffort, never restored
apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx 127 Same transient-empty race: pruning effect clears draft.thinkingEffort before models arrive; save then drops the setting

SUGGESTION

File Line Issue
apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx 315 Empty modelOptions during load treated as "no variants"; opening the job dialog before models load drops the configured default effort
Files Reviewed (7 files)
  • apps/web/src/components/cloud-agent/hooks/useOrganizationModels.ts
  • apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx - 1 issue
  • apps/web/src/components/code-reviews/CodeReviewJobsCard.tsx - 1 issue
  • apps/web/src/components/code-reviews/CouncilSpecialistPicker.tsx
  • apps/web/src/components/code-reviews/RepositoryModelOverrides.tsx
  • apps/web/src/components/code-reviews/ReviewConfigForm.tsx - 1 issue
  • apps/web/src/lib/code-reviews/core/model-variants.ts

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 41.7K · Output: 6.1K · Cached: 258K

Review guidance: REVIEW.md from base branch main

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.

1 participant