refactor(models): 圖片模型整理成 便宜/中等/貴 三品質階層#94
Merged
Conversation
把 IMAGE_MODELS 的呈現改成清楚的三階層 (便宜→中等→貴), 並修掉 2.5 Flash Image 被誤標「將停用」的字眼 — 2026-06 Imagen 4 淘汰公告針對的是 imagen-4.0-* 端點, 本專案從未使用, 三顆圖片模型 (gemini-*-image 家族) 皆不受影響。 - 便宜: gemini-2.5-flash-image ($0.003, 經濟) - 中等: gemini-3.1-flash-image ($0.003, 主力 · 預設) - 貴: gemini-3-pro-image ($0.04, 最高畫質) 內部 key (legacy/flash/pro)、定價表、預設模型皆不變, 只改 label/排序/註解。 52 個既有 model/cost 測試全綠。 Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGT1mi2KPYyD76U1BKEhMo
dofliu
marked this pull request as ready for review
June 27, 2026 12:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
劉老師收到 Google 通知:Imagen 4 端點(
imagen-4.0-*)將於 2026-08-17 淘汰。經全庫稽核,本專案從未呼叫任何 Imagen 端點(唯二「imagen」字樣是diagram_image_gen.py註解,且明寫「不是 imagen 那條」)。圖片生成全用 gemini-image 家族,預設gemini-3.1-flash-image正是公告建議的遷移目標——不受影響。順手把圖片模型選單整理成清楚的「便宜 / 中等 / 貴」三品質階層,並修掉 2.5 Flash Image 被誤標「將停用」的字眼(那是針對 Imagen,不是這顆)。
變更(
core/infocards/models.py,僅此一檔)gemini-2.5-flash-imagegemini-3.1-flash-imagegemini-3-pro-imagelegacy/flash/pro)、定價表、DEFAULT_IMAGE_MODEL全不變 → 零行為變更、零相容性破壞。測試
test_infocards_data/test_usage/test_check_models/test_infocards_poster— 52 passed。備註
若 Google 日後另行淘汰
gemini-2.5-flash-image,屆時只需把「便宜」階層換成下一顆 flash image 模型即可(單檔單行)。🤖 Generated with Claude Code
Generated by Claude Code