fix: dont show gpt-5.5-pro when using codex oauth (#33400)
Co-authored-by: Devin Oldenburg <devin@logicplanes.com>
This commit is contained in:
parent
39d7394ede
commit
c5a4a8288c
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ const CODEX_API_ENDPOINT = "https://chatgpt.com/backend-api/codex/responses"
|
||||||
const OAUTH_PORT = 1455
|
const OAUTH_PORT = 1455
|
||||||
const OAUTH_POLLING_SAFETY_MARGIN_MS = 3000
|
const OAUTH_POLLING_SAFETY_MARGIN_MS = 3000
|
||||||
const ALLOWED_MODELS = new Set(["gpt-5.5", "gpt-5.3-codex-spark", "gpt-5.4", "gpt-5.4-mini"])
|
const ALLOWED_MODELS = new Set(["gpt-5.5", "gpt-5.3-codex-spark", "gpt-5.4", "gpt-5.4-mini"])
|
||||||
|
const DISALLOWED_MODELS = new Set(["gpt-5.5-pro"])
|
||||||
|
|
||||||
interface PkceCodes {
|
interface PkceCodes {
|
||||||
verifier: string
|
verifier: string
|
||||||
|
|
@ -370,6 +371,7 @@ export async function CodexAuthPlugin(input: PluginInput, options: CodexAuthPlug
|
||||||
Object.entries(provider.models)
|
Object.entries(provider.models)
|
||||||
.filter(([, model]) => {
|
.filter(([, model]) => {
|
||||||
if (ALLOWED_MODELS.has(model.api.id)) return true
|
if (ALLOWED_MODELS.has(model.api.id)) return true
|
||||||
|
if (DISALLOWED_MODELS.has(model.api.id)) return false
|
||||||
const match = model.api.id.match(/^gpt-(\d+\.\d+)/)
|
const match = model.api.id.match(/^gpt-(\d+\.\d+)/)
|
||||||
return match ? parseFloat(match[1]) > 5.4 : false
|
return match ? parseFloat(match[1]) > 5.4 : false
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue