From 396c88dc495249dbfa8a7b158d28aca9a6fa3efe Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 20 Apr 2026 14:15:20 +0900 Subject: [PATCH] feat(openai): add GPT-5.4 and GPT-5.4-mini (#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the two GPT-5.4 variants exposed by OpenAI's API (source: https://developers.openai.com/api/docs/models/gpt-5.4 and https://developers.openai.com/api/docs/models/gpt-5.4-mini): - **gpt-5.4** — frontier tier, 1,050,000 context window, 128k max output, $2.50 / input MTok, $15.00 / output MTok. - **gpt-5.4-mini** — balanced tier (matching the naming convention used by `gpt-5-mini`, `gpt-4.1-mini`, etc.), 400,000 context window, 128k max output, $0.75 / input MTok, $4.50 / output MTok. Ordered right after the GPT-5.2 family and before the Codex variants section to keep the frontier-GPT chain in release order. Addresses librefang/librefang-registry#65 — the original request filed these under the `codex-cli` provider, but Codex CLI's upstream `models.json` doesn't list `gpt-5.4-mini` (only the full `gpt-5.4` slug is list-visible there, and it's already tracked in `providers/codex-cli.toml`). The correct home for OpenAI-API-direct access is this file; users who want `gpt-5.4-mini` should configure `provider = "openai"` rather than `provider = "codex-cli"`. --- providers/openai.toml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/providers/openai.toml b/providers/openai.toml index dc95d3c..d98be56 100644 --- a/providers/openai.toml +++ b/providers/openai.toml @@ -1,5 +1,5 @@ # OpenAI — https://openai.com -# Models: 13 (including 2 Codex variants) +# Models: 15 (including 2 Codex variants) [provider] id = "openai" @@ -154,6 +154,32 @@ supports_vision = true supports_streaming = true aliases = [] +[[models]] +id = "gpt-5.4" +display_name = "GPT-5.4" +tier = "frontier" +context_window = 1050000 +max_output_tokens = 128000 +input_cost_per_m = 2.50 +output_cost_per_m = 15.0 +supports_tools = true +supports_vision = true +supports_streaming = true +aliases = [] + +[[models]] +id = "gpt-5.4-mini" +display_name = "GPT-5.4 Mini" +tier = "balanced" +context_window = 400000 +max_output_tokens = 128000 +input_cost_per_m = 0.75 +output_cost_per_m = 4.50 +supports_tools = true +supports_vision = true +supports_streaming = true +aliases = [] + # Codex variants (same OpenAI driver & API key) [[models]]