Skip to content

refactor(models): 圖片模型整理成 便宜/中等/貴 三品質階層#94

Merged
dofliu merged 1 commit into
mainfrom
claude/image-model-tiers
Jun 27, 2026
Merged

refactor(models): 圖片模型整理成 便宜/中等/貴 三品質階層#94
dofliu merged 1 commit into
mainfrom
claude/image-model-tiers

Conversation

@dofliu

@dofliu dofliu commented Jun 27, 2026

Copy link
Copy Markdown
Owner

背景

劉老師收到 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,僅此一檔)

階層 model id 成本
💲 便宜 gemini-2.5-flash-image $0.003
⚡ 中等(預設) gemini-3.1-flash-image $0.003
👑 貴 gemini-3-pro-image $0.04
  • 只改 label / 下拉順序 / 註解;內部 key(legacy/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

把 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
dofliu marked this pull request as ready for review June 27, 2026 12:54
@dofliu
dofliu merged commit 285bf27 into main Jun 27, 2026
7 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.

2 participants