fix(model-switch): soft-accept unlisted openai-codex models

This commit is contained in:
Sanhu Li
2026-04-26 16:02:03 +08:00
committed by Teknium
parent 52882dade6
commit ef8c213e88
2 changed files with 59 additions and 3 deletions

View File

@@ -3185,11 +3185,12 @@ def validate_requested_model(
if suggestions:
suggestion_text = "\n Similar models: " + ", ".join(f"`{s}`" for s in suggestions)
return {
"accepted": False,
"persist": False,
"accepted": True,
"persist": True,
"recognized": False,
"message": (
f"Model `{requested}` was not found in the OpenAI Codex model listing."
f"Note: `{requested}` was not found in the OpenAI Codex model listing. "
"It may still work if your ChatGPT/Codex account has access to a newer or hidden model ID."
f"{suggestion_text}"
),
}