From 9f66e75d9ffebcc317e8b3f9654d7ffb0699c523 Mon Sep 17 00:00:00 2001 From: fatih akyon <34196005+fcakyon@users.noreply.github.com> Date: Sun, 8 Mar 2026 05:21:52 +0300 Subject: [PATCH] Update default model to GPT-5.4 (#716) Signed-off-by: Glenn Jocher Co-authored-by: UltralyticsAssistant Co-authored-by: Glenn Jocher --- README.md | 2 +- action.yml | 4 ++-- actions/utils/openai_utils.py | 5 +++-- tests/test_openai_utils.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0bc1968..95b228f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Choose between [OpenAI](https://openai.com/) or [Anthropic](https://anthropic.co | Provider | Default Model | API Key | | --------- | ------------------- | ------------------- | -| OpenAI | `gpt-5.3-codex` | `openai_api_key` | +| OpenAI | `gpt-5.4` | `openai_api_key` | | Anthropic | `claude-sonnet-4-6` | `anthropic_api_key` | The model is auto-detected based on which API key you provide. Override with the `model` input, or use `review_model` to override PR review only. diff --git a/action.yml b/action.yml index 4b8f0a7..8599b03 100644 --- a/action.yml +++ b/action.yml @@ -72,10 +72,10 @@ inputs: description: "Anthropic API Key" required: false model: - description: "AI Model - defaults to GPT-5.3-codex or Sonnet 4.6 based on API key" + description: "AI Model - defaults to GPT-5.4 or Sonnet 4.6 based on API key" required: false review_model: - description: "AI Model for PR reviews (optional, defaults to gpt-5.3-codex)" + description: "AI Model for PR reviews (optional, defaults to gpt-5.4)" required: false first_issue_response: description: "Example response to a new issue" diff --git a/actions/utils/openai_utils.py b/actions/utils/openai_utils.py index 59f2520..113e6e1 100644 --- a/actions/utils/openai_utils.py +++ b/actions/utils/openai_utils.py @@ -18,9 +18,9 @@ REVIEW_MODEL = os.getenv("REVIEW_MODEL") # Optional override for PR reviews MAX_PROMPT_CHARS = round(128000 * 3.3 * 0.5) # Max characters for prompt (50% of 128k context) # Default models (single source of truth) -OPENAI_MODEL_DEFAULT = "gpt-5.3-codex" +OPENAI_MODEL_DEFAULT = "gpt-5.4" ANTHROPIC_MODEL_DEFAULT = "claude-sonnet-4-6" -PR_REVIEW_MODEL_DEFAULT = "gpt-5.3-codex" +PR_REVIEW_MODEL_DEFAULT = "gpt-5.4" MODEL_COSTS = { # (input, output) per 1M tokens # OpenAI models @@ -30,6 +30,7 @@ MODEL_COSTS = { # (input, output) per 1M tokens "gpt-5.2-2025-12-11": (1.75, 14.00), "gpt-5.2-codex": (1.75, 14.00), "gpt-5.3-codex": (1.75, 14.00), + "gpt-5.4": (2.50, 15.00), "gpt-5-nano-2025-08-07": (0.05, 0.40), "gpt-5-mini-2025-08-07": (0.25, 2.00), # Anthropic Claude 4.5 models diff --git a/tests/test_openai_utils.py b/tests/test_openai_utils.py index 6c95a38..9493659 100644 --- a/tests/test_openai_utils.py +++ b/tests/test_openai_utils.py @@ -16,7 +16,7 @@ def test_is_anthropic_model(): assert _is_anthropic_model("claude-sonnet-4-6") is True assert _is_anthropic_model("claude-haiku-4-5-20251001") is True assert _is_anthropic_model("claude-opus-4-5-20251101") is True - assert _is_anthropic_model("gpt-5.3-codex") is False + assert _is_anthropic_model("gpt-5.4") is False assert _is_anthropic_model("gpt-5-mini-2025-08-07") is False @@ -40,7 +40,7 @@ def test_remove_outer_codeblocks(): def test_get_review_model_override(): """Test review model override logic.""" with patch("actions.utils.openai_utils.REVIEW_MODEL", "claude-opus-4-5-20251101"): - with patch("actions.utils.openai_utils.MODEL", "gpt-5.3-codex"): + with patch("actions.utils.openai_utils.MODEL", "gpt-5.4"): assert get_review_model() == "claude-opus-4-5-20251101"