From fc9727cb73428684c03b98e41763483463d2c48c Mon Sep 17 00:00:00 2001 From: Game_Time <108236317+RayBytes@users.noreply.github.com> Date: Wed, 20 Aug 2025 11:41:10 +0500 Subject: [PATCH] added "minimal" reasoning option (better for coding) --- README.md | 2 +- chatmock/cli.py | 2 +- chatmock/reasoning.py | 2 +- chatmock/upstream.py | 2 +- gui.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c6c3872..0c4ceb3 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ curl http://127.0.0.1:8000/v1/chat/completions \ ### Thinking effort -- `--reasoning-effort` (choice of low,medium,high)
+- `--reasoning-effort` (choice of minimal,low,medium,high)
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`. ### Thinking summaries diff --git a/chatmock/cli.py b/chatmock/cli.py index 3868896..3e28e29 100644 --- a/chatmock/cli.py +++ b/chatmock/cli.py @@ -85,7 +85,7 @@ def main() -> None: ) p_serve.add_argument( "--reasoning-effort", - choices=["low", "medium", "high", "none"], + choices=["minimal", "low", "medium", "high"], default=os.getenv("CHATGPT_LOCAL_REASONING_EFFORT", "medium").lower(), help="Reasoning effort level for Responses API (default: medium)", ) diff --git a/chatmock/reasoning.py b/chatmock/reasoning.py index b6fec10..7918ce2 100644 --- a/chatmock/reasoning.py +++ b/chatmock/reasoning.py @@ -9,7 +9,7 @@ def build_reasoning_param( effort = (base_effort or "").strip().lower() summary = (base_summary or "").strip().lower() - valid_efforts = {"low", "medium", "high", "none"} + valid_efforts = {"minimal", "low", "medium", "high"} valid_summaries = {"auto", "concise", "detailed", "none"} if isinstance(overrides, dict): diff --git a/chatmock/upstream.py b/chatmock/upstream.py index 6742eb7..c7c886e 100644 --- a/chatmock/upstream.py +++ b/chatmock/upstream.py @@ -58,7 +58,7 @@ def start_upstream_request( return None, resp include: List[str] = [] - if isinstance(reasoning_param, dict) and reasoning_param.get("effort") != "none": + if isinstance(reasoning_param, dict): include.append("reasoning.encrypted_content") client_session_id = None diff --git a/gui.py b/gui.py index f444437..bb654b3 100644 --- a/gui.py +++ b/gui.py @@ -298,7 +298,7 @@ class MainWindow(QtWidgets.QMainWindow): opts.setVerticalSpacing(8) opts.addWidget(QtWidgets.QLabel("Reasoning Effort"), 0, 0) self.effort = QtWidgets.QComboBox() - self.effort.addItems(["low", "medium", "high", "none"]) # default medium + self.effort.addItems(["minimal", "low", "medium", "high"]) # default medium self.effort.setCurrentText("medium") self.effort.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents) self.effort.setMinimumContentsLength(7)