Skip to content

fix: make imageSize optional and fix default model ID#42

Merged
boxp merged 1 commit intomasterfrom
fix/generate-image-optional-size
Feb 2, 2026
Merged

fix: make imageSize optional and fix default model ID#42
boxp merged 1 commit intomasterfrom
fix/generate-image-optional-size

Conversation

@boxp
Copy link
Copy Markdown
Owner

@boxp boxp commented Feb 2, 2026

Summary

  • デフォルトモデルIDを gemini-2.5-flash-image-previewgemini-2.5-flash-image に修正(正しいモデルID)
  • --size オプションをデフォルトなしに変更。gemini-2.5-flash-imageimageSize パラメータ非対応のため、常に送信すると400エラーになっていた
  • -s を明示指定した場合のみ imageSize をAPIリクエストに含める(gemini-3-pro-image-preview 等で利用可能)

Test plan

  • デフォルト(Nano Banana)でオプションなしで画像生成できることを確認
  • -m gemini-3-pro-image-preview -s 2K でNano Banana Proでの画像生成を確認
  • -h でヘルプ表示を確認

🤖 Generated with Claude Code

- Change default model from gemini-2.5-flash-image-preview to
  gemini-2.5-flash-image (correct model ID)
- Make --size option optional (no default) since gemini-2.5-flash-image
  does not support imageSize parameter, which caused 400 errors
- Only include imageSize in API request when explicitly specified via -s

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@boxp boxp merged commit 8375fe6 into master Feb 2, 2026
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.

1 participant