This repository was archived by the owner on Aug 6, 2026. It is now read-only.
fix(loops): source model picker from per-adapter task catalog - #3782
Merged
Conversation
|
😎 This pull request was merged. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/loops/hooks/useLoopModelConfigOptions.ts:30
**Catalog failures remove model choices**
When the preview-config request is pending or fails, this hook returns an empty catalog, causing the loop picker to show only “Default (recommended)” with no loading or error indication instead of retaining the previous fallback model choices.
Reviews (1): Last reviewed commit: "source loops model picker from preview c..." | Re-trigger Greptile |
2 tasks
There was a problem hiding this comment.
Frontend-only fix to the loops model picker reusing existing, already-tested infra (preview config catalog, restricted-model filtering, reasoning-effort helpers); all real behavior enforcement stays server-side. The one Greptile P1 concern (empty catalog on load/error) is in fact addressed by the code's fallback-model-options path, matches its [resolved] status, and 21 new parameterized tests cover the new logic directly.
- Author wrote 61% of the modified lines and has 8 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 301L, 6F substantive, 568L/7F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (568L, 7F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 3792cce · reviewed head 83efe25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GLM-5.2 shows up in the main create-task model picker but not in loops.
Changes
LoopModelFieldsnow builds its model list from the same per-adapteragent.getPreviewConfigOptionssource as the main create-task picker: curated models, friendly labels, GLM-5.2 behind the existingposthog-code-glm-modelflag, plan-restricted models dropped and a pinned model on an existing loop always kept selectable.loopModels.tsconstrains reasoning-effort options to the effective model's supported set (GLM offers Auto/High/Max) and clamps invalid combos when the adapter or model changes, so the form can no longer submit anything the server's validation inprocess_task/utils.pyrejects.LOOP_DEFAULT_MODELSmirrors the backend'sDEFAULT_MODEL_BY_RUNTIME_ADAPTERunchanged: claude stays onclaude-sonnet-5, codex ongpt-5.How did you test this?
loopModels.test.ts(option building, GLM flag gating, per-model effort sets, clamping).@posthog/uisuite (2063 tests),@posthog/uiand@posthog/webtypechecks and Biome all pass.Automatic notifications