feat(auto-approve): configurable reviewer model in settings #206

Merged
dries merged 2 commits from feat/auto-approve-model-selector into main 2026-07-03 10:22:29 +02:00
Owner

Summary

  • Add a "Reviewer model" selector to Settings → Auto-approve. The auto-approve judge previously used a hardcoded model (anthropic/claude-haiku-4-5); it can now be changed from the UI.
  • Empty selection keeps the built-in default, so behavior is unchanged unless a model is chosen.
  • Stored server-side in the generic setting table (key judge_model, provider/modelID string) — no new migration. Applied to the running judge immediately on save and re-read per judge run.
  • New GET/POST /api/settings/judge-model; frontend reuses the existing ModelSelect component.

Testing

  • make lint and make test pass.
  • Added TestLoadJudgeModel covering the provider/modelID parsing (unset, malformed, provider-with-slashes model, leading/trailing slash).
## Summary - Add a "Reviewer model" selector to Settings → Auto-approve. The auto-approve judge previously used a hardcoded model (`anthropic/claude-haiku-4-5`); it can now be changed from the UI. - Empty selection keeps the built-in default, so behavior is unchanged unless a model is chosen. - Stored server-side in the generic `setting` table (key `judge_model`, `provider/modelID` string) — no new migration. Applied to the running judge immediately on save and re-read per judge run. - New `GET`/`POST /api/settings/judge-model`; frontend reuses the existing `ModelSelect` component. ## Testing - `make lint` and `make test` pass. - Added `TestLoadJudgeModel` covering the `provider/modelID` parsing (unset, malformed, provider-with-slashes model, leading/trailing slash).
feat(auto-approve): configurable reviewer model in settings
Some checks failed
CI / Frontend (pull_request) Successful in 4m17s
CI / Backend (pull_request) Successful in 4m19s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m3s
CI / Playwright E2E (pull_request) Successful in 8m6s
CI / Build (pull_request) Successful in 5m16s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Ratchet (pull_request) Failing after 5m51s
e4f57c7730

Coverage ratchet: pass

Suite Baseline This PR Δ
go 69.50% 69.60% +0.10
frontend 58.56% 58.53% -0.03

Tolerance: -0.1%. Baseline stored on gh-pages.

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 69.50% | 69.60% | +0.10 | ✅ | | frontend | 58.56% | 58.53% | -0.03 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
test(auto-approve): cover judge-model HTTP handlers
All checks were successful
CI / Frontend (pull_request) Successful in 4m32s
CI / Backend (pull_request) Successful in 4m49s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m12s
CI / Playwright E2E (pull_request) Successful in 7m48s
CI / Coverage Ratchet (pull_request) Successful in 5m47s
CI / Build (pull_request) Successful in 4m26s
CI / Semantic Tag (pull_request) Has been skipped
0ea9f17803
Add handler tests for GET/POST /api/settings/judge-model (get unset +
set, post valid/apply, post empty/revert-to-default, invalid JSON, nil
stateDB, method-not-allowed). Restores Go coverage the ratchet flagged.
dries merged commit ee60cbfa3c into main 2026-07-03 10:22:29 +02:00
Sign in to join this conversation.
No description provided.