Skip to content

Commit 8fd0c0e

Browse files
rekram1-nodevaur94
authored andcommitted
fix: ensure gpt-5.5 compacts at correct context size when using openai oauth (anomalyco#24212)
(cherry picked from commit 4a67905)
1 parent 5b3923b commit 8fd0c0e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/opencode/src/plugin/codex.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,16 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
391391
output: 0,
392392
cache: { read: 0, write: 0 },
393393
}
394+
395+
// gpt-5.5 models temporarily have restricted context window size for codex plans
396+
if (model.id.includes("gpt-5.5")) {
397+
model.limit = {
398+
context: 400_000,
399+
//@ts-expect-error incorrect type for v1 sdk but works
400+
input: 272_000,
401+
output: 128_000,
402+
}
403+
}
394404
}
395405

396406
return {

0 commit comments

Comments
 (0)