diff options
| author | Aiden Cline <[email protected]> | 2026-04-24 17:39:06 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-24 17:39:06 -0400 |
| commit | 4a67905266633f1867aaf89d863b4a8d149d5237 (patch) | |
| tree | 79bd4353b435bef89657b0a3b9e88c2b7faf09bf | |
| parent | c4e33d31680f4b0804045e5b9f0ed78596d33ea4 (diff) | |
| download | opencode-4a67905266633f1867aaf89d863b4a8d149d5237.tar.gz opencode-4a67905266633f1867aaf89d863b4a8d149d5237.zip | |
fix: ensure gpt-5.5 compacts at correct context size when using openai oauth (#24212)
| -rw-r--r-- | packages/opencode/src/plugin/codex.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/opencode/src/plugin/codex.ts b/packages/opencode/src/plugin/codex.ts index e05111fc6..60d2d5b47 100644 --- a/packages/opencode/src/plugin/codex.ts +++ b/packages/opencode/src/plugin/codex.ts @@ -390,6 +390,16 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> { output: 0, cache: { read: 0, write: 0 }, } + + // gpt-5.5 models temporarily have restricted context window size for codex plans + if (model.id.includes("gpt-5.5")) { + model.limit = { + context: 400_000, + //@ts-expect-error incorrect type for v1 sdk but works + input: 272_000, + output: 128_000, + } + } } return { |
