Skip to content

fix(models): retain selected provider context limits across toggles - #3695

Merged
lidge-jun merged 6 commits into
devfrom
codex/lane-b-02-context
Sep 5, 2026
Merged

lidge-jun merged 6 commits into
devfrom
codex/lane-b-02-context

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Turning a provider context limit off and on currently loses the selected value; the OpenAI switch can force 922k instead. Persist the last selection separately from active caps, restore it on enable, and show the next-enable choice while disabled. Preserve per-model supported ceilings and provider rename/removal cleanup.

Carries #3654 at 8facdb0d8c10109701015c0f6109fc67b1d9dd3c, including its two distinct setAll request contracts and original screenshots. Closes #3651 after verified dev integration. Robin Bially's author identity and contribution trailer are retained.

Stack — merge bottom-up

Layer PR Scope
1 #3685 Manual/native model visibility
2 this PR Persistent provider context selections
3 planned Go efforts and picker/spawn ordering
4 planned Model hide/delete and default-only sync
5 planned Fable 1M selector persistence

Parent #3685 is merged on dev at 9115b17; this PR is retargeted to dev and incorporates that tip. Review this layer's diff only. The owner authorized incremental admin merges.

Verification

  • Full source binary diff applied cleanly on the verified visibility parent.
  • Added off/reload/on, both global setAll forms, rename/removal, invalid-request atomicity, native-budget and GUI remount/legacy-response regressions. An independently found inherited-property fallback defect is repaired with own numeric selection validation and provider-name regressions.
  • Independent persistence/management review and final 42-file diff review passed at 29f9846. Remote GUI/docs/red-green verification and exact-head hosted CI run 33980871551 are in progress.
  • No local test suite, typecheck or build is run, per owner instruction.
  • Original contributor screenshots, carried unchanged:

Remembered context selection disabled
Remembered context selection enabled

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: Robin Bially [email protected]

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 5, 2026
@lidge-jun
lidge-jun changed the base branch from codex/lane-b-01-visibility to dev September 5, 2026 17:22
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 74 / 80

이 PR은 제공자별 context 한도를 껐다 켜면 고른 값이 사라지고, OpenAI 스위치가 922k로 강제되던 버그를 고칩니다. 지금 dev HEAD(9115b179a)에는 Lane B 1층 #3685(manual OpenAI visibility)가 이미 들어가 있습니다. Models GUI는 contextCaps만 보고 켜짐/값을 같이 다루고, 끄면 선택값이 메모리에서 빠집니다. 그래서 다시 켤 때 서버/네이티브 기본(922k·1.05M 쪽)으로 튀는 게 #3651 증상입니다. 이 변경은 활성 cap(caps)과 기억값(values/contextCapValues)을 갈라서, 꺼진 동안에도 다음에 켤 값을 보여 주고, 다시 켤 때 그 값을 복구합니다. 원본 #3654 carry이고, 검증 후 #3651을 닫는 Lane B 2/5입니다.

서버·GUI·문서·스크린샷이 한 묶음입니다. PUT /api/provider-context-caps의 setAll 두 계약, rename/removal 정리, 잘못된 요청의성, native budget, remount/legacy 응답 회귀가 추가됐습니다. 토글할 때 native 그룹에 NATIVE_GPT56_OPT_IN_WINDOW를 강제 넣던 GUI 경로를 없애서, “끄고 켜면 큰 창으로 바뀜” 축을 끊습니다. #3685 위에 retarget 되어 있어 지금 dev와 맞습니다. types/config 분할과 직접 충돌하지 않습니다.

카탈로그 스택에서 visibility 다음에 context를 넣는 순서가 맞습니다. 사용자가 Models에서 한도를 만질 때마다 값이 리셋되면 1층 visibility 신뢰도 같이 깎입니다. 원본 #3654는 그대로 두고 이 replacement만 올리는 운영과도 맞습니다. draft이고 hosted CI가 진행 중이라, 머지 게이트는 초록·draft 해제입니다.

gui/src/pages/Models.tsx contextCapValues - 활성 contextCaps와 별도로 기억값을 둡니다. 끄면 표시는 contextCaps ?? contextCapValues ?? contextCapValue라서 “다음에 켤 값”이 보입니다.

gui/src/pages/Models.tsx toggleProviderCap - nativeGroup일 때 opt-in window를 body에 강제하던 분기를 제거했습니다. 켜기만 요청하고 값은 서버 기억/기본에 맡깁니다.

경로/심볼 PUT /api/provider-context-caps setAll 두 형태 - 원본 #3654 계약을 유지한다고 본문에 적혀 있습니다. 머지 전에 두 형태 회귀가 CI에서 초록인지 확인하세요.

경로 원본 #3654 / 이슈 #3651 - 둘 다 아직 열려 있습니다. 이 PR이 dev에 안착한 뒤 #3654는 rebase 말고 landed 닫기, #3651도 닫으세요.

경로 plan 020_context / 021_context_build - 상위 Lane B 문서입니다. 리뷰 범위는 context persistence 레이어입니다.

메인테이너의 판단이 필요한 지점

  • #3654를 이 PR ready 직후 바로 닫을지, CI·머지 후에 닫을지
  • Lane B 3층(ordering / #3571 계열)을 context 직후에 붙일지, management(#3659)를 먼저 볼지
  • GUI remount 캐시에 values가 없는 구형 세션 캐시를 얼마나 오래 허용할지

너의 추천
Lane B 다음 층이고 사용자-보이는 리셋 버그입니다. hosted CI 초록·draft 해제 후 머지를 추천합니다. 머지 직후 #3654에 Landed via #3695 + landed-via-maintainer로 닫고, #3651도 닫은 뒤 3층으로 가세요.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun

lidge-jun commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner Author

Owner-authorized admin merge: every actual CI producer on 29f9846 has succeeded (deliberate trigger-only skips unchanged). Run 33980871551 has only the aggregation-only ci job queued; ci.yml:906-948 merely checks the producer conclusions and runs no additional tests. No functional test is bypassed. Independent code/security reviews and remote typecheck, 166 backend + 15 rendered-component tests, 425-page docs build, isolated dashboard state flow and causal red/green passed. The queued aggregate is recorded honestly and will remain under observation.

@lidge-jun
lidge-jun marked this pull request as ready for review September 5, 2026 18:07
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 5, 2026 18:07
@lidge-jun
lidge-jun merged commit ab6762b into dev Sep 5, 2026
33 of 34 checks passed
@lidge-jun
lidge-jun deleted the codex/lane-b-02-context branch September 5, 2026 18:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-05T18:08:58.383280Z 29f9846 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
fix(models): retain selected provider context limits across toggles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants