Update model lineup to GPT-5.4 and remove Auto selection#108
Conversation
- 旧モデル(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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello, 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
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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})` : ''}`} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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-nanoandgpt-5.4-mini, and setgpt-5.4-nanoas the new default. - Persist the selected model to
localStorageand 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
selectModelhard-codes the new model ids as local constants (NANO/MINI). This duplicates source-of-truth already present inDEFAULT_MODEL_ID/MODELSand can drift on the next lineup update. Consider deriving these ids from the shared constants (e.g. useDEFAULT_MODEL_IDfor 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})` : ''}`} |
| const setModelId = useCallback((id: string) => { | ||
| setModelIdState(id); | ||
| try { | ||
| localStorage.setItem(MODEL_STORAGE_KEY, id); | ||
| } catch { | ||
| /* ignore */ | ||
| } | ||
| }, []); |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughモデルシステムをGPT-5.4系(nano/mini)に統一し、localStorage基盤の永続化、Pro限定モデルロック機能、API認証の厳密化を実装。複数ファイルにわたるモデルID・定数・UI表示の更新を含む。 Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
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 に接続テストを行うよう変更。 不正形式のキー入力時に警告メッセージを即座に表示。
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-nanoinstead of auto-selection, and model selection is persisted to localStorage.Key Changes
Implementation Details
https://claude.ai/code/session_01MuR5kCZDrYyzHVpZkhAiXX
Summary by CodeRabbit
リリースノート
新機能
改善
その他