From 9d6e75dfe8405bc1abdb7b430251c427e87582f8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 05:20:11 +0200 Subject: [PATCH] Update default model to gpt-5.4-nano (#761) --- README.md | 4 ++-- sgpt/config.py | 2 +- tests/_integration.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 819445b..fecedcf 100644 --- a/README.md +++ b/README.md @@ -374,7 +374,7 @@ CACHE_PATH=/tmp/shell_gpt/cache # Request timeout in seconds. REQUEST_TIMEOUT=60 # Default OpenAI model to use. -DEFAULT_MODEL=gpt-4o +DEFAULT_MODEL=gpt-5.4-mini # Default color for shell and code completions. DEFAULT_COLOR=magenta # When in --shell mode, default to "Y" for no input. @@ -401,7 +401,7 @@ Possible options for `CODE_THEME`: https://pygments.org/styles/ │ prompt [PROMPT] The prompt to generate completions for. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ --model TEXT Large language model to use. [default: gpt-4o] │ +│ --model TEXT Large language model to use. [default: gpt-5.4-mini] │ │ --temperature FLOAT RANGE [0.0<=x<=2.0] Randomness of generated output. [default: 0.0] │ │ --top-p FLOAT RANGE [0.0<=x<=1.0] Limits highest probable tokens (words). [default: 1.0] │ │ --md --no-md Prettify markdown output. [default: md] │ diff --git a/sgpt/config.py b/sgpt/config.py index bc08373..24ea5bd 100644 --- a/sgpt/config.py +++ b/sgpt/config.py @@ -22,7 +22,7 @@ DEFAULT_CONFIG = { "CHAT_CACHE_LENGTH": int(os.getenv("CHAT_CACHE_LENGTH", "100")), "CACHE_LENGTH": int(os.getenv("CHAT_CACHE_LENGTH", "100")), "REQUEST_TIMEOUT": int(os.getenv("REQUEST_TIMEOUT", "60")), - "DEFAULT_MODEL": os.getenv("DEFAULT_MODEL", "gpt-4o"), + "DEFAULT_MODEL": os.getenv("DEFAULT_MODEL", "gpt-5.4-mini"), "DEFAULT_COLOR": os.getenv("DEFAULT_COLOR", "magenta"), "ROLE_STORAGE_PATH": os.getenv("ROLE_STORAGE_PATH", str(ROLE_STORAGE_PATH)), "DEFAULT_EXECUTE_SHELL_CMD": os.getenv("DEFAULT_EXECUTE_SHELL_CMD", "false"), diff --git a/tests/_integration.py b/tests/_integration.py index 97025de..7adcba2 100644 --- a/tests/_integration.py +++ b/tests/_integration.py @@ -34,8 +34,8 @@ class TestShellGpt(TestCase): def setUpClass(cls): # Response streaming should be enabled for these tests. assert cfg.get("DISABLE_STREAMING") == "false" - # ShellGPT optimised and tested with gpt-4 turbo. - assert cfg.get("DEFAULT_MODEL") == "gpt-4o" + # ShellGPT optimised and tested with gpt-5.4-mini. + assert cfg.get("DEFAULT_MODEL") == "gpt-5.4-mini" # Make sure we will not call any functions. assert cfg.get("OPENAI_USE_FUNCTIONS") == "false" @@ -400,10 +400,10 @@ class TestShellGpt(TestCase): def test_color_output(self): color = cfg.get("DEFAULT_COLOR") role = SystemRole.get("ShellGPT") - handler = Handler(role=role) + handler = Handler(role=role, markdown=False) assert handler.color == color os.environ["DEFAULT_COLOR"] = "red" - handler = Handler(role=role) + handler = Handler(role=role, markdown=False) assert handler.color == "red" def test_simple_stdin(self):