Implement latest GPT-5.1 models

This commit is contained in:
Game_Time
2025-11-19 14:59:34 +05:00
parent fd900eb7af
commit a4b9ae9471
2 changed files with 7 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ openai_bp = Blueprint("openai", __name__)
def _instructions_for_model(model: str) -> str:
base = current_app.config.get("BASE_INSTRUCTIONS", BASE_INSTRUCTIONS)
if model == "gpt-5-codex":
if model == "gpt-5-codex" or model == "gpt-5.1-codex":
codex = current_app.config.get("GPT5_CODEX_INSTRUCTIONS") or GPT5_CODEX_INSTRUCTIONS
if isinstance(codex, str) and codex.strip():
return codex
@@ -441,7 +441,10 @@ def list_models() -> Response:
expose_variants = bool(current_app.config.get("EXPOSE_REASONING_MODELS"))
model_groups = [
("gpt-5", ["high", "medium", "low", "minimal"]),
("gpt-5.1", ["high", "medium", "low", "minimal"]),
("gpt-5-codex", ["high", "medium", "low"]),
("gpt-5.1-codex", ["high", "medium", "low"]),
("gpt-5.1-codex-mini", []),
("codex-mini", []),
]
model_ids: List[str] = []