mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-28 04:29:42 +00:00
fix: ensure gpt-5.5 compacts at correct context size when using openai oauth (#24212)
This commit is contained in:
parent
c4e33d3168
commit
4a67905266
1 changed files with 10 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue