Repository navigation
Commit 391bc5a
committed
fix(codex-inject): restore stripRootContextWindowOverrides (gpt-5.5 1M regression)
c29ee78 ('harden opencodex release and runtime paths') removed
stripRootContextWindowOverrides and its injectCodexConfig call site, so a
stale root 'model_context_window = 1000000' in ~/.codex/config.toml was never
stripped. Codex treats that root key as a global override that wins over the
per-model catalog, forcing every model (incl. gpt-5.5) to report a 1M window.
Restore the function + the injection-path strip so the catalog drives per-model
context size again. Export it and add a regression unit test. The restore/teardown
path keeps c29ee78's preserve-user-overrides behavior (left unchanged).1 parent bb3826e commit 391bc5a
2 files changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
84 | 101 | | |
85 | 102 | | |
86 | 103 | | |
| |||
243 | 260 | | |
244 | 261 | | |
245 | 262 | | |
| 263 | + | |
246 | 264 | | |
247 | 265 | | |
248 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
39 | 62 | | |
40 | 63 | | |
41 | 64 | | |
| |||
0 commit comments