Gemini 3.1 Flash Image Preview (Nano Banana 2) is now available on AI Gateway. This release improves visual quality while maintaining the generation speed and cost of flash-tier models. Nano Banana 2 can use Google Image Search to ground outputs in real-world imagery. This helps with rendering lesser-known landmarks and objects by retrieving live visual data. This model also introduces configurable thinking levels (Minimal and High) to let the model reason through complex prompts before rendering. New resolutions and new aspect ratios (512p, 1:4 and 1:8) are available alongside the existing options to expand to support more types of creative assets. To use this model, set model to google/gemini-3.1-flash-image-preview in the AI SDK. Nano Banana 2 is a multimodal model. Use `streamText` or `generateText` to generate images alongside text responses. This example shows how the model can use web search to find live data.…