add gpt-5.1 to ollama route
This commit is contained in:
@@ -67,7 +67,7 @@ def ollama_version() -> Response:
|
|||||||
|
|
||||||
def _instructions_for_model(model: str) -> str:
|
def _instructions_for_model(model: str) -> str:
|
||||||
base = current_app.config.get("BASE_INSTRUCTIONS", BASE_INSTRUCTIONS)
|
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
|
codex = current_app.config.get("GPT5_CODEX_INSTRUCTIONS") or GPT5_CODEX_INSTRUCTIONS
|
||||||
if isinstance(codex, str) and codex.strip():
|
if isinstance(codex, str) and codex.strip():
|
||||||
return codex
|
return codex
|
||||||
@@ -89,7 +89,7 @@ def ollama_tags() -> Response:
|
|||||||
if bool(current_app.config.get("VERBOSE")):
|
if bool(current_app.config.get("VERBOSE")):
|
||||||
print("IN GET /api/tags")
|
print("IN GET /api/tags")
|
||||||
expose_variants = bool(current_app.config.get("EXPOSE_REASONING_MODELS"))
|
expose_variants = bool(current_app.config.get("EXPOSE_REASONING_MODELS"))
|
||||||
model_ids = ["gpt-5", "gpt-5-codex", "codex-mini"]
|
model_ids = ["gpt-5", "gpt-5.1", "gpt-5-codex", "gpt-5.1-codex", "gpt-5.1-codex-mini", "codex-mini"]
|
||||||
if expose_variants:
|
if expose_variants:
|
||||||
model_ids.extend(
|
model_ids.extend(
|
||||||
[
|
[
|
||||||
@@ -97,9 +97,16 @@ def ollama_tags() -> Response:
|
|||||||
"gpt-5-medium",
|
"gpt-5-medium",
|
||||||
"gpt-5-low",
|
"gpt-5-low",
|
||||||
"gpt-5-minimal",
|
"gpt-5-minimal",
|
||||||
|
"gpt-5.1-high",
|
||||||
|
"gpt-5.1-medium",
|
||||||
|
"gpt-5.1-low",
|
||||||
|
"gpt-5.1-minimal",
|
||||||
"gpt-5-codex-high",
|
"gpt-5-codex-high",
|
||||||
"gpt-5-codex-medium",
|
"gpt-5-codex-medium",
|
||||||
"gpt-5-codex-low",
|
"gpt-5-codex-low",
|
||||||
|
"gpt-5.1-codex-high",
|
||||||
|
"gpt-5.1-codex-medium",
|
||||||
|
"gpt-5.1-codex-low",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
models = []
|
models = []
|
||||||
|
|||||||
Reference in New Issue
Block a user