Skip to content

fix(codex): let the 1M opt-in raise gpt-6-astra to its own ceiling - #3414

Merged
lidge-jun merged 1 commit into
devfrom
codex/260904-astra-optin-window
Sep 4, 2026
Merged

fix(codex): let the 1M opt-in raise gpt-6-astra to its own ceiling#3414
lidge-jun merged 1 commit into
devfrom
codex/260904-astra-optin-window

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

The dashboard's native 1M opt-in had no effect on gpt-6-astra: the toggle raised every other native model's window and left Astra pinned at 272k.

The toggle writes providerContextCaps.openai = 922_000 for the whole native group. narrowToLimits only ever raised a window for members of NATIVE_GPT56_FAMILY — for everything else a cap can only narrow. Astra was removed from that family so it would stop inheriting the measured 922k clamp (its real ceiling is 872k), and that removal silently took the opt-in path with it.

The fix reads the opt-in ceiling per slug rather than keying it on family membership. The GPT-5.6 family keeps its measured 922k; a self-described native uses its own maxContextWindow. So the shared 922k lever raises Astra to 872k — its actual ceiling — instead of advertising a window the model does not have.

Verification

  • Live with the toggle on (providerContextCaps.openai = 922000), /v1/models reports 922000 for gpt-5.6-sol and 872000 for gpt-6-astra. Before the fix Astra reported 272000.
  • The on-disk Codex catalog agrees: gpt-6-astra writes context_window: 872000.
  • New regression test asserts the raise, that the family ceiling is undisturbed, and that the tier pair stays {272000, 872000}.
  • bun test on the catalog, toggle and desktop-context suites — 306 pass / 0 fail.
  • bun run test:changed — 10430 pass / 0 fail across 556 files.
  • bun run typecheck — exit 0.

No GUI change: the toggle already sent the right lever, the server-side resolver ignored it.

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.

Summary by CodeRabbit

  • Improvements

    • Improved long-context opt-in handling for supported native models.
    • Models with model-specific context limits now use their correct maximum window instead of sharing another model family’s limit.
    • Updated context-window tier information to accurately reflect default and expanded limits.
  • Bug Fixes

    • Corrected expanded context behavior for gpt-6-astra, increasing its opt-in limit to 872,000 tokens rather than applying an unrelated 922,000-token ceiling.

The dashboard 1M toggle writes providerContextCaps.openai = 922000 for the whole native group, but narrowToLimits only RAISED a window for members of NATIVE_GPT56_FAMILY. Astra ships its own 272k/872k pair and was removed from that family so it would stop inheriting the measured 922k clamp, which silently took the opt-in path with it: the toggle moved every other native and left Astra pinned at 272k.

Read the opt-in ceiling per slug instead. The family keeps its measured 922k; a self-described native uses its own maxContextWindow, so the shared 922k lever raises Astra to 872k rather than advertising a ceiling the model does not have. Verified live: with the toggle on, /v1/models reports 922000 for gpt-5.6-sol and 872000 for gpt-6-astra.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 4, 2026 01:17
@github-actions

github-actions Bot commented Sep 4, 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 4, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: b7d65f75-7621-4eac-99c0-049761d4482c

📥 Commits

Reviewing files that changed from the base of the PR and between 4dbf614 and c2870fb.

📒 Files selected for processing (2)
  • src/codex/catalog/metadata.ts
  • tests/native-model-toggle.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The catalog now resolves long-window opt-in ceilings per model slug. GPT-5.6 family models retain the 922k ceiling. Models such as gpt-6-astra use their configured 872k ceiling. Tests verify the ceiling and context-tier metadata.

Changes

Native context ceiling

Layer / File(s) Summary
Resolve and apply per-slug ceilings
src/codex/catalog/metadata.ts lines 268-297
longWindowOptInCeiling returns the GPT-5.6 family ceiling or a valid model-specific override. narrowToLimits uses the resolved ceiling for opt-in clamping.
Validate Astra ceiling behavior
tests/native-model-toggle.test.ts lines 28, 120-138
Tests verify Astra’s 872k ceiling, the GPT-5.6 family’s 922k ceiling, and Astra’s 272k/872k tier metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c2870

The 1M opt-in now raises gpt-6-astra to its configured 872k context ceiling while retaining GPT-5.6 behavior. The change includes focused regression coverage, with no current merge-blocking risk identified.

Suggested reviewers: luvs01

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing the 1M opt-in to raise gpt-6-astra to its model-specific context ceiling.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260904-astra-optin-window

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.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 75 / 80

이 PR은 대시보드의 네이티브 1M(긴 창) 켜기 스위치가 gpt-6-astra에는 아무 효과가 없던 구멍을 막는다. 지금 dev(HEAD 4dbf6147c, #3412까지)에서는 Astra가 Sol 계보에서 빠져 있고, NATIVE_OPENAI_CONTEXT_OVERRIDES에 기본 272k / 천장 872k 쌍이 박혀 있다. 대시보드 토글은 여전히 그룹 전체에 providerContextCaps.openai = 922_000을 쓴다. 그런데 narrowToLimits는 창을 올릴 수 있는 대상을 NATIVE_GPT56_FAMILY 멤버에게만 열어 두었다. Astra는 그 패밀리에서 빠진 뒤라서, 같은 922k 레버가 Sol/Terra/Luna는 922k까지 올리는데 Astra만 272k에 붙잡혀 있었다. 사용자가 1M을 켰는데 Astra만 안 커진다고 느끼는 바로 그 증상이다.

고치는 방식은 단순하다. 패밀리 소속 여부가 아니라 슬러그마다 opt-in 천장을 읽는다. 새 longWindowOptInCeiling은 (1) GPT-5.6 패밀리면 측정값 922k, (2) 아니면 NATIVE_OPENAI_CONTEXT_OVERRIDES에서 contextWindow보다 maxContextWindow가 큰 자기 천장(Astra면 872k), (3) 둘이 같거나 없으면 undefined(올리지 않음). 그다음 narrowToLimits가 그 천장이 있을 때만 overlay ?? cap ?? raw를 천장으로 클램프해서 올린다. 그래서 공유 922k 레버가 Astra를 872k까지 올리고, 없는 922k를 광고하지는 않는다. PR 본문 실측(/v1/models에서 sol=922000, astra=872000)과 디스크 카탈로그 context_window: 872000이 그 약속을 뒷받침한다.

이게 #3410(목록 해제) → #3412(업스트림 스키마 정렬) 다음 자연스러운 한 칸이다. #3412가 “Astra는 Sol이 아니다”를 숫자·스키마로 고정한 뒤, 이번 PR은 그 독립 숫자 쌍에 1M 토글이 다시 붙게 만든다. types.ts/config.ts 분할과 무관하고, 손댄 파일도 src/codex/catalog/metadata.ts와 회귀 테스트 한 줄기다. 회귀 테스트는 기본 272k, opt-in 시 872k, sol은 여전히 922k, tier 쌍 {272000, 872000} 유지를 한 번에 잠근다.

nativeOpenAiContextTier는 원래부터 오버라이드 쌍을 읽어서 Astra tier는 이미 보였고, 창 값만 안 움직이던 불일치가 이번으로 맞춰진다. nativeOpenAiMaxInputTokens도 같은 narrowToLimits와 “윈도우로 한 번 더 min”을 타므로, 창이 872k로 올라가면 입력 천장도 같이 872k로 따라온다. 오버라이드 주석이 이미 그 의도를 적어 둔 상태다. CI는 아직 돌고 있고(작성자 로컬은 catalog/toggle/desktop-context 306, test:changed 10430, typecheck green이라고 함). 프로모트 PR #3409는 여전히 열려 있고 astra 열차(#3410/#3412/이번)보다 앞에 잘렸으니, 미리보기 승격은 이 열차가 dev에 앉은 뒤가 맞다. 미리보기 배포 자체는 계획에 없다.

src/codex/catalog/metadata.ts NativeContextLimits JSDoc - 아직도 GPT-5.6 패밀리만 올리고 다른 네이티브는 내리기만 한다고 쓰여 있다. 이번 변경 뒤에는 Astra처럼 maxContextWindow > contextWindow 인 자기 서술 네이티브도 올릴 수 있으므로 주석이 코드와 어긋난다. 같은 파일에서 같이 고치면 이후 기여자가 또 패밀리 게이트로 돌아갈 위험이 줄어든다.
tests/native-model-toggle.test.ts 새 테스트 - nativeOpenAiContextWindow / nativeOpenAiContextTier 만 잠그고 nativeOpenAiMaxInputTokens(gpt-6-astra, optIn) === 872000 은 없다. 입력 천장 경로는 창에 묶여 있어서 지금 동작은 맞지만, 나중에 maxInput 경로만 깨져도 이 테스트는 통과할 수 있다. expect 한 줄을 더하면 회귀 구멍이 막힌다.

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

너의 추천
CI 초록 확인 후 그대로 dev에 머지. 가능하면 같은 PR(또는 바로 이은 초소형 follow-up)에서 NativeContextLimits JSDoc을 “패밀리 922k 또는 슬러그 자기 천장”으로 고치고, 테스트에 nativeOpenAiMaxInputTokens 872k assert 한 줄을 추가. #3409는 이 머지 뒤에 retarget/rebase. types/config 분할 무관 — 닫지 말고 랜딩.

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

@lidge-jun
lidge-jun merged commit 19017e9 into dev Sep 4, 2026
28 checks passed
@lidge-jun
lidge-jun deleted the codex/260904-astra-optin-window branch September 4, 2026 01:33
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.

1 participant