Skip to content

Update model lineup to GPT-5.4 and remove Auto selection#108

Merged
BoxPistols merged 6 commits into
mainfrom
claude/update-gpt-5-4-models-mNn0y
Mar 19, 2026
Merged

Update model lineup to GPT-5.4 and remove Auto selection#108
BoxPistols merged 6 commits into
mainfrom
claude/update-gpt-5-4-models-mNn0y

Conversation

@BoxPistols

@BoxPistols BoxPistols commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

This PR updates the AI model lineup from GPT-5/4.1 to GPT-5.4 and removes the "Auto" model selection feature. The default model is now gpt-5.4-nano instead of auto-selection, and model selection is persisted to localStorage.

Key Changes

  • Model Lineup Update: Replaced 5 models (gpt-5-nano, gpt-5-mini, gpt-4.1-mini, gpt-4.1-nano, and Auto) with 2 models (gpt-5.4-nano and gpt-5.4-mini)
  • Removed Auto Selection: Eliminated the AUTO_MODEL_ID feature and its associated UI logic (green highlighting, auto-selection explanation text)
  • New Default: Changed DEFAULT_MODEL_ID from 'auto' to 'gpt-5.4-nano'
  • Model Persistence: Added localStorage persistence for model selection via MODEL_STORAGE_KEY ('ai-brainstorm-model')
  • Updated Costs: Adjusted MODEL_COSTS to reflect new model pricing
  • Simplified UI: Removed conditional styling for Auto model in SettingsModal and simplified model selection button logic
  • Updated Tests: Changed all test expectations to use new model IDs (gpt-5.4-nano/mini instead of gpt-5/4.1 variants)
  • Documentation Updates: Updated FAQ, help text, and support data to reference new models and pricing

Implementation Details

  • Model selection now automatically saves to localStorage when changed, with fallback to DEFAULT_MODEL_ID if saved value is invalid
  • The modelRouter utility continues to support AUTO_MODEL_ID for backward compatibility in API calls, resolving it to DEFAULT_MODEL_ID
  • HeaderBar no longer displays "Auto → resolved model" notation; it shows the current model directly
  • All cost calculations and token estimates updated to use new model identifiers

https://claude.ai/code/session_01MuR5kCZDrYyzHVpZkhAiXX

Summary by CodeRabbit

リリースノート

  • 新機能

    • モデルが gpt-5.4-nano と gpt-5.4-mini に更新されました
    • 選択したモデルの自動保存機能を追加
  • 改善

    • API キーの形式チェックを強化(より厳密な検証)
    • 無料モードではデフォルトモデルのみ利用可能に
    • テキスト表示のスペーシング・レイアウト改善
    • ヘルプの料金情報を最新モデルに対応
  • その他

    • モデル選択画面の UI を改善

claude added 2 commits March 18, 2026 15:54
- 旧モデル(gpt-5-nano/mini, gpt-4.1-nano/mini)を廃止
- GPT-5.4 nano(デフォルト)と GPT-5.4 mini の2択に変更
- モデル選択を localStorage に保存し、リロード後も維持
- SettingsModal から Auto モード UI を削除
- ヘルプ・サポートテキスト・ストーリー・テストを更新

https://claude.ai/code/session_01MuR5kCZDrYyzHVpZkhAiXX
Auto モデル廃止に伴い到達不能だった lastUsedModel の
矢印表示ロジックを削除し、ツールチップの文言を調整

https://claude.ai/code/session_01MuR5kCZDrYyzHVpZkhAiXX
Copilot AI review requested due to automatic review settings March 18, 2026 22:02
@vercel

vercel Bot commented Mar 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
brain-brain-brain Ready Ready Preview, Comment Mar 19, 2026 1:11pm

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the application's AI model integration by upgrading the available model lineup to the latest GPT-5.4 series and removing the 'Auto' model selection feature. The change simplifies user choice by defaulting to 'gpt-5.4-nano' and enhances user experience by persisting model selections, while ensuring all cost calculations, UI elements, and documentation are up-to-date with the new model ecosystem.

Highlights

  • Model Lineup Update: Replaced five existing models (gpt-5-nano, gpt-5-mini, gpt-4.1-mini, gpt-4.1-nano, and Auto) with two new models: gpt-5.4-nano and gpt-5.4-mini.
  • Removed Auto Selection: Eliminated the 'Auto' model selection feature, including its ID, UI logic, and associated display elements.
  • New Default Model: Changed the default model ID from 'auto' to 'gpt-5.4-nano'.
  • Model Persistence: Implemented localStorage persistence for user-selected models, ensuring the choice is remembered across sessions.
  • Updated Costs and UI: Adjusted model costs to reflect new pricing, simplified the model selection UI in the SettingsModal, and updated HeaderBar display logic.
  • Tests and Documentation: Updated all relevant test expectations and documentation (FAQ, help text, support data) to align with the new model IDs and pricing.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively updates the model lineup to use the new GPT-5.4 models and removes the 'Auto' selection feature, which simplifies the user interface. The implementation includes persisting the user's model choice to localStorage, which is a nice enhancement. The tests and documentation have been updated accordingly. I've found one minor issue in the HeaderBar component where a comparison between a model ID and a model label might not behave as expected. Overall, this is a solid update.

<div
className={`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs border ${T.cardFlat} ${T.t2}`}
title={`使用モデル: ${modelLabel}${lastUsedModel ? `${lastUsedModel}` : ''}`}
title={`使用モデル: ${modelLabel}${lastUsedModel && lastUsedModel !== modelLabel ? `(最終: ${lastUsedModel}` : ''}`}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The condition lastUsedModel !== modelLabel appears to be comparing a model ID (e.g., 'gpt-5.4-nano') with a user-facing label (e.g., '5.4 Nano'). This comparison will likely not work as intended, as an ID and a label will rarely be equal. To correctly check if the last used model is different from the currently selected one, you should compare their IDs. This might require passing the current modelId to this component and comparing it with lastUsedModel.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the app’s OpenAI model lineup to gpt-5.4-*, removes the “Auto” model option from the UI, and persists the user’s selected model in localStorage (defaulting to gpt-5.4-nano).

Changes:

  • Replace the selectable model list + pricing with gpt-5.4-nano and gpt-5.4-mini, and set gpt-5.4-nano as the new default.
  • Persist the selected model to localStorage and load it on startup (with validation against supported models).
  • Update UI copy, Storybook stories, and unit tests to reflect the new model IDs and cost expectations.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utils/modelRouter.ts Updates router “nano/mini” targets to gpt-5.4-*.
src/hooks/useAI.ts Loads/saves selected model via MODEL_STORAGE_KEY in localStorage.
src/constants/models.ts Updates model list, default model, pricing table, and adds MODEL_STORAGE_KEY.
src/components/support/supportData.ts Updates FAQ/support text to reference new models and costs.
src/components/support/SupportAIChat.tsx Moves support chat to use gpt-5.4-nano.
src/components/modals/SettingsModal.tsx Removes Auto-specific UI and simplifies model selection display; mentions auto-save.
src/components/modals/SettingsModal.stories.tsx Updates stories to use gpt-5.4-* ids/labels.
src/components/modals/HelpModal.tsx Updates cost guidance text to new models.
src/components/layout/HeaderBar.tsx Simplifies model display; adjusts tooltip to show last-used model.
src/components/layout/HeaderBar.stories.tsx Updates stories away from “Auto” and to gpt-5.4-*.
src/tests/modelRouter.test.ts Updates routing expectations to gpt-5.4-*.
src/tests/costTracker.test.ts Updates cost calculations/tests to gpt-5.4-*.
Comments suppressed due to low confidence (1)

src/utils/modelRouter.ts:30

  • selectModel hard-codes the new model ids as local constants (NANO/MINI). This duplicates source-of-truth already present in DEFAULT_MODEL_ID / MODELS and can drift on the next lineup update. Consider deriving these ids from the shared constants (e.g. use DEFAULT_MODEL_ID for Nano and a single exported constant for Mini) so the router can’t get out of sync with the rest of the app.
const NANO = 'gpt-5.4-nano';
const MINI = 'gpt-5.4-mini';

/**
 * Auto モード時のモデル自動選択
 * Free mode → 常に Nano(サーバー負担軽減)
 * Pro mode → タスク複雑度に応じて Nano / Mini を切り替え
 */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<div
className={`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs border ${T.cardFlat} ${T.t2}`}
title={`使用モデル: ${modelLabel}${lastUsedModel ? `${lastUsedModel}` : ''}`}
title={`使用モデル: ${modelLabel}${lastUsedModel && lastUsedModel !== modelLabel ? `(最終: ${lastUsedModel}` : ''}`}
Comment thread src/hooks/useAI.ts
Comment on lines +66 to +73
const setModelId = useCallback((id: string) => {
setModelIdState(id);
try {
localStorage.setItem(MODEL_STORAGE_KEY, id);
} catch {
/* ignore */
}
}, []);
@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

モデルシステムをGPT-5.4系(nano/mini)に統一し、localStorage基盤の永続化、Pro限定モデルロック機能、API認証の厳密化を実装。複数ファイルにわたるモデルID・定数・UI表示の更新を含む。

Changes

Cohort / File(s) Summary
モデルIDの一括更新
src/__tests__/costTracker.test.ts, src/__tests__/modelRouter.test.ts, src/utils/modelRouter.ts, src/components/support/SupportAIChat.tsx
モデル識別子を gpt-5-nano/minigpt-5.4-nano/mini に統一。テストアサーションとルーティング定数を更新。
モデル定義の根本的な再構成
src/constants/models.ts
DEFAULT_MODEL_ID'gpt-5.4-nano' に変更。MODELS 配列と MODEL_COSTS を2モデル(gpt-5.4-nano/mini)のみに削減。isProMode() の検証ロジックを強化(長さ≥20文字、sk- 接頭辞)。MODEL_STORAGE_KEY 定数を新規追加。
モデル選択の永続化と状態管理
src/hooks/useAI.ts
localStorage ベースの遅延初期化を導入。setModelId() コールバックで選択状態を保持・同期。非Pro環境での DEFAULT_MODEL_ID への強制コアーション。
SettingsModalのPro限定ロック機能と検証改善
src/components/modals/SettingsModal.tsx
AUTO_MODEL_IDDEFAULT_MODEL_ID へ置換。Pro専用モデルに disabled/locked UI を適用。API キー形式の詳細警告(長さチェック追加)を実装。モデル選択ヘルプテキストをPro状態ベースに簡潔化。
Storybook ストーリーの更新
src/components/layout/HeaderBar.stories.tsx, src/components/modals/SettingsModal.stories.tsx
モデルラベルとID を新スキーム(5.4 Nano/Mini)に更新。modelId'gpt-5.4-nano' に統一。WithAutoResolvedWithNanoModel へリネーム。
UI表示の改善
src/components/layout/HeaderBar.tsx, src/components/results/RichText.tsx
HeaderBar: 条件付きで "(最終: ...)" バッジを表示。RichText: Tailwind マージンとパディングを増加(表/見出し/リスト間隔の拡大)。
ヘルプ・ドキュメントの更新
src/components/modals/HelpModal.tsx, src/components/support/supportData.ts
コスト見積もりと利用可能モデル情報を gpt-5.4-nano/mini に更新。FAQ と システムプロンプトの記載を刷新。
開発サーバー設定の拡張
vite.config.ts
/api/openai プロキシに x-api-key ヘッダー読み込み機能を追加。ユーザーキーが存在すればそれを優先、無ければ環境変数フォールバック。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 モデルは新たに5.4へ装い替え
ナノとミニ、二つの選択肢
localStorageに夢を秘めて
Pro のお城に錠前かけたり
古き gpt よ、さらば!🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、主な変更内容を正確に反映しています。GPT-5.4への移行とAuto選択の削除という、このPRの中心的な目的の両方を簡潔に表現しています。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/update-gpt-5-4-models-mNn0y
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Free モードでは gpt-5.4-mini を選択不可にし、ボタンを
無効化 + Pro ラベル表示。API呼び出し時も Free モードでは
nano にフォールバックするガードを追加。
RichText: space-y-0.5 → space-y-1.5、空行 h-1.5 → h-3、
見出し前後のマージン拡大、テーブルセル padding 拡大。
isProMode: sk- の3文字だけで Pro 判定されるバグを修正(20文字以上を要求)。
Vite dev proxy がユーザーの x-api-key を無視して常に env の
キーで認証していた問題を修正。Pro モード時はユーザーのキーで
OpenAI に接続テストを行うよう変更。
不正形式のキー入力時に警告メッセージを即座に表示。
@BoxPistols BoxPistols merged commit 7baa026 into main Mar 19, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants