Update default model to GPT-5.4 (#716)
Signed-off-by: Glenn Jocher <[email protected]> Co-authored-by: UltralyticsAssistant <[email protected]> Co-authored-by: Glenn Jocher <[email protected]>
This commit is contained in:
co-authored by
UltralyticsAssistant
Glenn Jocher
parent
b082cf2a40
commit
9f66e75d9f
@@ -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.
|
||||
|
||||
+2
-2
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user