Update default model to GPT-5.5 (#746)

This commit is contained in:
Glenn Jocher
2026-05-01 17:04:18 +02:00
committed by GitHub
parent 0c76581dfa
commit d5d30fc7ce
3 changed files with 18 additions and 9 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ Choose between [OpenAI](https://openai.com/) or [Anthropic](https://www.anthropi
| 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.
The model is auto-detected based on which API key you provide. Override with the `model` input, for example `gpt-5.5`, or use `review_model` to override PR review only.
### 🛠️ How It Works
@@ -104,8 +104,8 @@ jobs:
# AI API keys - provide OpenAI OR Anthropic (model auto-detected from key)
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
# anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# model: claude-haiku-4-5-20251001 # Optional: override default model
# review_model: claude-opus-4-5-20251101 # Optional: override PR review model
# model: gpt-5.5 # Optional: override default model
# review_model: claude-opus-4-7 # Optional: override PR review model
brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
```
+3 -1
View File
@@ -30,15 +30,17 @@ 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.5": (5.00, 30.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
# Anthropic Claude models
"claude-sonnet-4-5-20250929": (3.00, 15.00),
"claude-sonnet-4-6": (3.00, 15.00),
"claude-haiku-4-5-20251001": (1.00, 5.00),
"claude-opus-4-5-20251101": (5.00, 25.00),
"claude-opus-4-6": (5.00, 25.00),
"claude-opus-4-7": (5.00, 25.00),
}
SYSTEM_PROMPT_ADDITION = """Guidance:
- Ultralytics Branding: Use YOLO11, YOLO26, etc., not YOLOv11, YOLOv26 (only older versions like YOLOv10 have a v).
+12 -5
View File
@@ -3,6 +3,7 @@
from unittest.mock import MagicMock, patch
from actions.utils.openai_utils import (
OPENAI_MODEL_DEFAULT,
PR_REVIEW_MODEL_DEFAULT,
_is_anthropic_model,
get_response,
@@ -11,12 +12,18 @@ from actions.utils.openai_utils import (
)
def test_default_models():
"""Test canonical default models."""
assert OPENAI_MODEL_DEFAULT == "gpt-5.4"
assert PR_REVIEW_MODEL_DEFAULT == "gpt-5.4"
def test_is_anthropic_model():
"""Test model provider detection."""
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.4") is False
assert _is_anthropic_model("claude-opus-4-7") is True
assert _is_anthropic_model("gpt-5.5") is False
assert _is_anthropic_model("gpt-5-mini-2025-08-07") is False
@@ -39,9 +46,9 @@ 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.4"):
assert get_review_model() == "claude-opus-4-5-20251101"
with patch("actions.utils.openai_utils.REVIEW_MODEL", "claude-opus-4-7"):
with patch("actions.utils.openai_utils.MODEL", "gpt-5.5"):
assert get_review_model() == "claude-opus-4-7"
def test_get_review_model_fallback():