A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.
C++
fix(ai): revert defaultModel rename — gpt-5.4 is the right slug
Tobif1eb982a5898
diff --git a/macos/Core/Enums/ProviderType.swift b/macos/Core/Enums/ProviderType.swiftindex 42fab21..4332b5a 100644--- a/macos/Core/Enums/ProviderType.swift+++ b/macos/Core/Enums/ProviderType.swift@@ -104,13 +104,7 @@ enum ProviderType: String, Codable, Sendable, CaseIterable, Identifiable {case .anthropic: return "claude-sonnet-4-6"case .gemini: return "gemini-2.5-flash"case .ollama: return "llama3"- // ChatGPT model slugs are owned by `/backend-api/codex/models`. The- // authoritative list comes from the live fetch after sign-in;- // `gpt-5-codex` is Codex CLI's own default and the safest known-real- // slug to use as a stop-gap until the live `/models` call resolves.- // (Earlier value `gpt-5.4` was invented and produced HTTP 400 on- // first request before the picker had a chance to update.)- case .chatGPT: return "gpt-5-codex"+ case .chatGPT: return "gpt-5.4"case .openAI: return "gpt-4o"case .azureOpenAI: return "gpt-4o"case .groq: return "llama-3.3-70b-versatile"diff --git a/macos/Tests/GridexTests/ProviderFactoryTests.swift b/macos/Tests/GridexTests/ProviderFactoryTests.swiftindex 9a46750..c87b920 100644--- a/macos/Tests/GridexTests/ProviderFactoryTests.swift+++ b/macos/Tests/GridexTests/ProviderFactoryTests.swift@@ -88,21 +88,12 @@ final class ProviderFactoryTests: XCTestCase {XCTAssertTrue(service is OpenAIProvider)}- // MARK: - Default model for .chatGPT must be a real slug-- // Regression for the `defaultModel = "gpt-5.4"` bug — that slug doesn't- // exist server-side, so a freshly-created ChatGPT provider fired a request- // before the live `/models` picker resolved would 400 immediately.- func test_defaultModel_chatGPT_isRealisticSlug() {- let model = ProviderType.chatGPT.defaultModel- XCTAssertFalse(model.isEmpty, "ChatGPT default model must be set")- // Avoid the literal regression: invented "gpt-X.Y" decimal slugs.- XCTAssertFalse(model.contains("gpt-5.4"), "must not use the invented 'gpt-5.4' slug")- // Codex CLI uses gpt-5-codex; either that or another known-real slug- // (gpt-5, gpt-5-codex variants) is acceptable.- XCTAssertTrue(- model.hasPrefix("gpt-5") || model == "gpt-4o",- "default must be a known-real OpenAI model slug, got: \(model)"- )+ // MARK: - Default model for .chatGPT++ func test_defaultModel_chatGPT_isNonEmpty() {+ // The authoritative slug list comes from `/backend-api/codex/models`+ // after sign-in. The default just needs to be non-empty so the form+ // has something to send before the live picker resolves.+ XCTAssertFalse(ProviderType.chatGPT.defaultModel.isEmpty)}}