Skip to content

fix(review): use configured model for fix sessions#4091

Open
alex-alecu wants to merge 1 commit into
mainfrom
fix/review-fix-session-model
Open

fix(review): use configured model for fix sessions#4091
alex-alecu wants to merge 1 commit into
mainfrom
fix/review-fix-session-model

Conversation

@alex-alecu

Copy link
Copy Markdown
Contributor

Summary

  • Resolve the current personal or organization Code Review catalog model before preparing a fix session.
  • Stop reusing the review usage model, which can contain a provider-resolved version ID that Cloud Agent rejects as unavailable.
  • Cover the production-shaped GLM and Claude model ID mismatches for personal and organization reviews.

Verification

N/A — no manual production flow was executed because it requires an authenticated Code Review fix link.

Visual Changes

N/A

Reviewer Notes

Fix sessions intentionally use the owner's current Code Review model configuration when the link is clicked. The historical cloud_agent_code_reviews.model field remains dedicated to reporting the concrete model recorded by usage billing.

Resolve the owner catalog model before preparing a review fix session so usage-resolved model IDs are not rejected.
@kilo-code-bot

kilo-code-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the fix-session model-resolution change in the Cloud Agent review route and its tests; the logic is sound, both tRPC caller paths resolve correctly, and the new failure-path coverage is adequate.

Files Reviewed (2 files)
  • apps/web/src/app/cloud-agent-fork/review/[reviewId]/route.ts
  • apps/web/src/app/cloud-agent-fork/review/[reviewId]/route.test.ts
Notes
  • The route now resolves the configured catalog model via personalReviewAgent.getReviewConfig / organizations.reviewAgent.getReviewConfig instead of reusing review.model (the usage-billing snapshot). Both router paths exist in the root router and modelSlug is always returned (defaults to PRIMARY_DEFAULT_MODEL), so no null/undefined reaches prepareSession.
  • The getReviewConfig call is inside the existing try/catch, so configuration lookup failures redirect to fix_session_failed without creating a session, as covered by the new test.
  • No module-scope state or transport-owning clients are introduced; no memory-leak concern.

Reviewed by glm-5.2-20260616 · 993,772 tokens

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