mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-21 16:03:37 +00:00
tweak: match codex limits for openai models exactly when using chatgpt subscription (#39082)
This commit is contained in:
parent
5a0e07efcf
commit
4d68d30b48
2 changed files with 7 additions and 12 deletions
|
|
@ -299,16 +299,11 @@ export async function CodexAuthPlugin(input: PluginInput, options: CodexAuthPlug
|
|||
output: 0,
|
||||
cache: { read: 0, write: 0 },
|
||||
},
|
||||
limit: model.id.includes("gpt-5.5")
|
||||
? {
|
||||
context: 400_000,
|
||||
input: 272_000,
|
||||
output: 128_000,
|
||||
}
|
||||
: model.id.includes("gpt-5.6")
|
||||
limit:
|
||||
model.id.includes("gpt-5.5") || model.id.includes("gpt-5.6")
|
||||
? {
|
||||
context: 500_000,
|
||||
input: 372_000,
|
||||
context: 400_000,
|
||||
input: 272_000,
|
||||
output: 128_000,
|
||||
}
|
||||
: model.limit,
|
||||
|
|
|
|||
|
|
@ -181,9 +181,9 @@ describe("plugin.codex", () => {
|
|||
|
||||
expect(models["gpt-5.4"]?.limit).toEqual(limit)
|
||||
expect(models["gpt-5.5"]?.limit).toEqual({ context: 400_000, input: 272_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-sol"]?.limit).toEqual({ context: 500_000, input: 372_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-terra"]?.limit).toEqual({ context: 500_000, input: 372_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-luna"]?.limit).toEqual({ context: 500_000, input: 372_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-sol"]?.limit).toEqual({ context: 400_000, input: 272_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-terra"]?.limit).toEqual({ context: 400_000, input: 272_000, output: 128_000 })
|
||||
expect(models["gpt-5.6-luna"]?.limit).toEqual({ context: 400_000, input: 272_000, output: 128_000 })
|
||||
expect(models["gpt-5.4-pro"]).toBeUndefined()
|
||||
expect(models["gpt-5.7-pro"]).toBeDefined()
|
||||
expect(models["gpt-5.6-sol-high"]).toBeDefined()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue