diff --git a/README.md b/README.md index 91264da..2681874 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ curl http://127.0.0.1:8000/v1/chat/completions \ - `gpt-5.2` - `gpt-5-codex` - `gpt-5.2-codex` +- `gpt-5.3-codex` - `gpt-5.1-codex` - `gpt-5.1-codex-max` - `gpt-5.1-codex-mini` @@ -129,7 +130,7 @@ curl http://127.0.0.1:8000/v1/chat/completions \ - `--reasoning-effort` (choice of minimal,low,medium,high,xhigh)
GPT-5 has a configurable amount of "effort" it can put into thinking, which may cause it to take more time for a response to return, but may overall give a smarter answer. Applying this parameter after `serve` forces the server to use this reasoning effort by default, unless overrided by the API request with a different effort set. The default reasoning effort without setting this parameter is `medium`.
- The `gpt-5.1` family (including codex) supports `low`, `medium`, and `high` while `gpt-5.1-codex-max` adds `xhigh`. The `gpt-5.2` family (including codex) supports `low`, `medium`, `high`, and `xhigh`. + The `gpt-5.1` family (including codex) supports `low`, `medium`, and `high` while `gpt-5.1-codex-max` adds `xhigh`. The `gpt-5.2` and `gpt-5.3` families (including codex) support `low`, `medium`, `high`, and `xhigh`. ### Thinking summaries @@ -173,4 +174,3 @@ When the model returns a thinking summary, the model will send back thinking tag [![Star History Chart](https://api.star-history.com/svg?repos=RayBytes/ChatMock&type=Timeline)](https://www.star-history.com/#RayBytes/ChatMock&Timeline) - diff --git a/chatmock/reasoning.py b/chatmock/reasoning.py index 5b04ac2..a6df9c9 100644 --- a/chatmock/reasoning.py +++ b/chatmock/reasoning.py @@ -11,6 +11,8 @@ def allowed_efforts_for_model(model: str | None) -> Set[str]: if not base: return DEFAULT_REASONING_EFFORTS normalized = base.split(":", 1)[0] + if normalized.startswith("gpt-5.3"): + return {"low", "medium", "high", "xhigh"} if normalized.startswith("gpt-5.2"): return {"low", "medium", "high", "xhigh"} if normalized.startswith("gpt-5.1-codex-max"): diff --git a/chatmock/routes_ollama.py b/chatmock/routes_ollama.py index 413adff..6974f24 100644 --- a/chatmock/routes_ollama.py +++ b/chatmock/routes_ollama.py @@ -71,7 +71,7 @@ def ollama_version() -> Response: def _instructions_for_model(model: str) -> str: base = current_app.config.get("BASE_INSTRUCTIONS", BASE_INSTRUCTIONS) - if model.startswith("gpt-5-codex") or model.startswith("gpt-5.1-codex") or model.startswith("gpt-5.2-codex"): + if "codex" in (model or "").lower(): codex = current_app.config.get("GPT5_CODEX_INSTRUCTIONS") or GPT5_CODEX_INSTRUCTIONS if isinstance(codex, str) and codex.strip(): return codex @@ -97,6 +97,7 @@ def ollama_tags() -> Response: "gpt-5", "gpt-5.1", "gpt-5.2", + "gpt-5.3-codex", "gpt-5-codex", "gpt-5.2-codex", "gpt-5.1-codex", @@ -125,6 +126,10 @@ def ollama_tags() -> Response: "gpt-5.2-codex-high", "gpt-5.2-codex-medium", "gpt-5.2-codex-low", + "gpt-5.3-codex-xhigh", + "gpt-5.3-codex-high", + "gpt-5.3-codex-medium", + "gpt-5.3-codex-low", "gpt-5.1-codex-high", "gpt-5.1-codex-medium", "gpt-5.1-codex-low", diff --git a/chatmock/routes_openai.py b/chatmock/routes_openai.py index c7a2c94..219a15f 100644 --- a/chatmock/routes_openai.py +++ b/chatmock/routes_openai.py @@ -59,7 +59,7 @@ def _wrap_stream_logging(label: str, iterator, enabled: bool): def _instructions_for_model(model: str) -> str: base = current_app.config.get("BASE_INSTRUCTIONS", BASE_INSTRUCTIONS) - if model.startswith("gpt-5-codex") or model.startswith("gpt-5.1-codex") or model.startswith("gpt-5.2-codex"): + if "codex" in (model or "").lower(): codex = current_app.config.get("GPT5_CODEX_INSTRUCTIONS") or GPT5_CODEX_INSTRUCTIONS if isinstance(codex, str) and codex.strip(): return codex @@ -535,6 +535,7 @@ def list_models() -> Response: ("gpt-5", ["high", "medium", "low", "minimal"]), ("gpt-5.1", ["high", "medium", "low"]), ("gpt-5.2", ["xhigh", "high", "medium", "low"]), + ("gpt-5.3-codex", ["xhigh", "high", "medium", "low"]), ("gpt-5-codex", ["high", "medium", "low"]), ("gpt-5.2-codex", ["xhigh", "high", "medium", "low"]), ("gpt-5.1-codex", ["high", "medium", "low"]), diff --git a/chatmock/upstream.py b/chatmock/upstream.py index 4803954..6dc4156 100644 --- a/chatmock/upstream.py +++ b/chatmock/upstream.py @@ -45,6 +45,9 @@ def normalize_model_name(name: str | None, debug_model: str | None = None) -> st "gpt5.2": "gpt-5.2", "gpt-5.2": "gpt-5.2", "gpt-5.2-latest": "gpt-5.2", + "gpt5.3-codex": "gpt-5.3-codex", + "gpt-5.3-codex": "gpt-5.3-codex", + "gpt-5.3-codex-latest": "gpt-5.3-codex", "gpt5.2-codex": "gpt-5.2-codex", "gpt-5.2-codex": "gpt-5.2-codex", "gpt-5.2-codex-latest": "gpt-5.2-codex",