Skip to content

Commit d2879a3

Browse files
committed
add gpt-5.1 to ollama route
1 parent bdae946 commit d2879a3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

chatmock/routes_ollama.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def ollama_version() -> Response:
6767

6868
def _instructions_for_model(model: str) -> str:
6969
base = current_app.config.get("BASE_INSTRUCTIONS", BASE_INSTRUCTIONS)
70-
if model == "gpt-5-codex":
70+
if model == "gpt-5-codex" or model == "gpt-5.1-codex":
7171
codex = current_app.config.get("GPT5_CODEX_INSTRUCTIONS") or GPT5_CODEX_INSTRUCTIONS
7272
if isinstance(codex, str) and codex.strip():
7373
return codex
@@ -89,17 +89,24 @@ def ollama_tags() -> Response:
8989
if bool(current_app.config.get("VERBOSE")):
9090
print("IN GET /api/tags")
9191
expose_variants = bool(current_app.config.get("EXPOSE_REASONING_MODELS"))
92-
model_ids = ["gpt-5", "gpt-5-codex", "codex-mini"]
92+
model_ids = ["gpt-5", "gpt-5.1", "gpt-5-codex", "gpt-5.1-codex", "gpt-5.1-codex-mini", "codex-mini"]
9393
if expose_variants:
9494
model_ids.extend(
9595
[
9696
"gpt-5-high",
9797
"gpt-5-medium",
9898
"gpt-5-low",
9999
"gpt-5-minimal",
100+
"gpt-5.1-high",
101+
"gpt-5.1-medium",
102+
"gpt-5.1-low",
103+
"gpt-5.1-minimal",
100104
"gpt-5-codex-high",
101105
"gpt-5-codex-medium",
102106
"gpt-5-codex-low",
107+
"gpt-5.1-codex-high",
108+
"gpt-5.1-codex-medium",
109+
"gpt-5.1-codex-low",
103110
]
104111
)
105112
models = []

0 commit comments

Comments
 (0)