Skip to content

Commit 4a67905

Browse files
authored
fix: ensure gpt-5.5 compacts at correct context size when using openai oauth (#24212)
1 parent c4e33d3 commit 4a67905

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
@@ -390,6 +390,16 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
390390
output: 0,
391391
cache: { read: 0, write: 0 },
392392
}
393+
394+
// gpt-5.5 models temporarily have restricted context window size for codex plans
395+
if (model.id.includes("gpt-5.5")) {
396+
model.limit = {
397+
context: 400_000,
398+
//@ts-expect-error incorrect type for v1 sdk but works
399+
input: 272_000,
400+
output: 128_000,
401+
}
402+
}
393403
}
394404

395405
return {

0 commit comments

Comments
 (0)