SPB Git

Repository Public

whats-new-gemini-3.5.md 31.5 KB 671 lines markdown

1[3.6 Flash \& 3.5 Flash-Lite](https://ai.google.dev/gemini-api/docs/latest-model)2[This page](https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.5#)34Gemini 3.5 Flash is **generally available (GA)**, stable, and ready for scaled5production use. As our most intelligent Flash model, it delivers sustained6frontier performance in agentic execution, coding, and long-horizon tasks at7scale.89This guide contains an overview of improvements, API changes, and migration10guidance for Gemini 3.5 Flash.1112## New model1314| Model | Model ID | Description |15|---|---|---|16| Gemini 3.5 Flash | `gemini-3.5-flash` | Our most intelligent model for sustained frontier performance in agentic and coding tasks. |1718Gemini 3.5 Flash supports the 1M token context window, 65k max output tokens,19thinking, and the same set of tools and platform features as Gemini 3 Flash,20including [Computer Use (Preview)](https://ai.google.dev/gemini-api/docs/computer-use).2122For complete specs, see the [models overview](https://ai.google.dev/gemini-api/docs/models/gemini-3.5-flash).23For pricing, see the [pricing page](https://ai.google.dev/gemini-api/docs/pricing#gemini-3.5-flash).2425## Quickstart2627All examples in this guide use the Interactions API. The28GenerateContent API is also supported; the29same configuration options and recommendations apply.3031### Python3233    from google import genai3435    client = genai.Client()3637    interaction = client.interactions.create(38        model="gemini-3.5-flash",39        input="Explain how parallel agentic execution works in three sentences."40    )41    print(interaction.output_text)4243### JavaScript4445    import { GoogleGenAI } from "@google/genai";4647    const client = new GoogleGenAI({});4849    async function main() {50      const interaction = await client.interactions.create({51        model: "gemini-3.5-flash",52        input: "Explain how parallel agentic execution works in three sentences.",53      });54      console.log(interaction.output_text);55    }5657    main();5859### Java6061    import com.google.genai.Client;62    import com.google.genai.gaos.models.interactions.CreateModelInteraction;63    import com.google.genai.gaos.models.interactions.Interaction;64    import com.google.genai.gaos.models.interactions.InteractionsInput;65    import com.google.genai.gaos.models.interactions.Model;66    import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;6768    Client client = new Client();6970    CreateModelInteraction params =71        CreateModelInteraction.builder()72            .model(Model.of("gemini-3.5-flash"))73            .input(74                InteractionsInput.of(75                    "Explain how parallel agentic execution works in three sentences."))76            .build();7778    Interaction interaction =79        client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();8081    System.out.println(interaction.outputText().orElse(""));8283### REST8485    curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \86      -H "x-goog-api-key: $GEMINI_API_KEY" \87      -H 'Content-Type: application/json' \88      -d '{89        "model": "gemini-3.5-flash",90        "input": "Explain how parallel agentic execution works in three sentences."91      }'9293## What's new9495- **Sustained frontier performance:** Our most intelligent Flash model, optimized for agentic and coding tasks at scale.96- **Agentic execution:** Sub-agent deployment, problem solving, and rapid agentic loops at scale.97- **Coding:** Iterative coding cycles, rapid exploration, and prototyping to test alternate paths and dynamically explore solutions.98- **Long horizon:** Multi-step workflows and tool use at scale.99- **Thought preservation:** The model maintains intermediate reasoning across multi-turn conversations automatically. No API changes needed.100- **New default effort level:** Default thinking effort changed from `high` to `medium`. See [New default effort level](https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.5#default-effort-level) for details.101- **Improved `low` thinking:** `low` is now significantly improved for code and agentic tasks that require fewer steps, offering strong quality at lower latency and cost.102- **GA release:** Stable model for scaled production use.103104### Choosing the right Flash model105106Gemini 3.5 Flash is our most intelligent and capable Flash model. However,107different use cases may have different cost and latency requirements.108109- **Gemini 3.1 Flash-Lite** : For low cost, high-volume tasks that don't require the advanced reasoning depth of 3.5 Flash, we recommend using [Gemini 3.1 Flash-Lite](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite). It is a stable, long-term model optimized for efficiency. See the [Flash-Lite developer guide](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite#developer_guide) for more details.110- **Gemini 3 Flash Preview** : While we recommend migrating to 3.5 Flash for GA stability and improved reasoning, [Gemini 3 Flash (Preview)](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview) remains available for developers who want to continue testing with the preview model.111112## Behavioral changes113114### New default effort level: `medium`115116The default thinking effort is now **`medium`** , changed from `high` in Gemini 3117Flash Preview. `medium` yields very good results across a wide range of tasks118while being faster and more cost-efficient. For complex problems, `high`119encourages the model to think more deeply.120121| Effort level | When to use |122|---|---|123| `minimal` | Optimized for response speed. Chat-like use cases, quick factual answers, simpler tool calls. |124| `low` | Code and agentic tasks that require lower latency and fewer steps. Also works well for analysis and writing tasks that require some thinking. |125| **`medium` (default)** | **Best quality for most tasks. Recommended for complex code and agentic use cases.** |126| `high` | Maximizes the model's ability to think and use tools. Best for complex reasoning, hard math, and the most difficult code or agent tasks. Allows extended thoughts and function calls. |127128To override the default, set `thinking_level` in your config:129130### Python131132    from google import genai133134    client = genai.Client()135136    interaction = client.interactions.create(137        model="gemini-3.5-flash",138        input="Prove that the square root of 2 is irrational.",139        generation_config={"thinking_level": "high"},140    )141    print(interaction.output_text)142143### JavaScript144145    import { GoogleGenAI } from "@google/genai";146147    const client = new GoogleGenAI({});148149    async function main() {150      const interaction = await client.interactions.create({151        model: "gemini-3.5-flash",152        input: "Prove that the square root of 2 is irrational.",153        generationConfig: { thinkingLevel: "high" },154      });155      console.log(interaction.output_text);156    }157158    main();159160### Java161162    import com.google.genai.Client;163    import com.google.genai.gaos.models.interactions.CreateModelInteraction;164    import com.google.genai.gaos.models.interactions.GenerationConfig;165    import com.google.genai.gaos.models.interactions.Interaction;166    import com.google.genai.gaos.models.interactions.InteractionsInput;167    import com.google.genai.gaos.models.interactions.Model;168    import com.google.genai.gaos.models.interactions.ThinkingLevel;169    import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;170171    Client client = new Client();172173    CreateModelInteraction params =174        CreateModelInteraction.builder()175            .model(Model.of("gemini-3.5-flash"))176            .input(InteractionsInput.of("Prove that the square root of 2 is irrational."))177            .generationConfig(GenerationConfig.builder().thinkingLevel(ThinkingLevel.HIGH).build())178            .build();179180    Interaction interaction =181        client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();182183    System.out.println(interaction.outputText().orElse(""));184185### REST186187    curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \188      -H "x-goog-api-key: $GEMINI_API_KEY" \189      -H 'Content-Type: application/json' \190      -d '{191        "model": "gemini-3.5-flash",192        "input": "Prove that the square root of 2 is irrational.",193        "generation_config": {"thinking_level": "high"}194      }'195196> [!TIP]197> **Tip:** Start with `medium`, it provides the best quality for the vast majority of tasks. Try `low` for a faster, cheaper experience with strong quality. Switch to `high` for complex reasoning, hard math, or difficult coding challenges. Use `minimal` to optimize for speed in simple queries.198199The following table shows which thinking levels are supported per model:200201| Thinking Level | Gemini 3.5 Flash | Gemini 3.1 Pro | Gemini 3.1 Flash-Lite | Gemini 3 Flash | Description |202|---|---|---|---|---|---|203| **`minimal`** | Supported | Not supported | Supported (Default) | Supported | Matches the "no thinking" setting for most queries. Note, `minimal` does not guarantee that thinking is off, the model may reason very minimally for complex tasks. |204| **`low`** | Supported | Supported | Supported | Supported | Minimizes latency and cost. |205| **`medium`** | Supported (Default) | Supported | Supported | Supported | Balanced thinking for most tasks. |206| **`high`** | Supported (Dynamic) | Supported (Default, Dynamic) | Supported (Dynamic) | Supported (Default, Dynamic) | Maximizes reasoning depth. |207208> [!IMPORTANT]209> **Important:** You cannot use both `thinking_level` and the legacy `thinking_budget` parameter in the same request. Doing so will return a 400 error.210211### Thought preservation212213The model maintains intermediate reasoning across multi-turn conversations214automatically. When present in the conversation history, reasoning context215carries forward, which improves performance on complex multi-step tasks216like iterative debugging and code refactoring. No API changes needed:217218- **Interactions API**: Thoughts are already preserved automatically. No change in behavior.219- **GenerateContent API** : Beginning with Gemini 3.5 Flash, the model uses reasoning context from all previous turns when thought signatures are present in the conversation history. To enable this, pass the full, unmodified conversation history (including [thought signatures](https://ai.google.dev/gemini-api/docs/thought-signatures)) in `contents`. The SDKs handle this automatically.220221## Parameter updates and best practices in Gemini 3.x222223The following apply to **all Gemini 3.x models**, including Gemini 3.5 Flash.224225- **`temperature`, `top_p`, `top_k`**: we strongly recommend not changing the default values. Gemini 3's reasoning capabilities are optimized for the default settings.226- Use `thinking_level` instead of `thinking_budget`.227- **Function calling response matching** : `id`, `name`, and response count must match the preceding calls.228- **Multimodal function responses**: include multimodal content inside the function response, not outside it.229- **Inline instructions in function responses**: append to the function response text, not as separate parts.230- **Reduce unnecessary tool calls**: Use lower thinking levels or experiment with system instructions to reduce tool calls in agentic workflows.231232See the sections below for how to update your code.233234### Sampling parameters (no longer recommended)235236`temperature`, `top_p`, and `top_k` are no longer recommended for all Gemini2373.x models. Gemini 3's reasoning capabilities are optimized for the default238settings. **Remove these parameters from all requests.**239240    # ⚠️ Remove these parameters (not recommended)241    generation_config = {242        "temperature": 0.7,243        "top_p": 0.9,244        "top_k": 40,245    }246247To ensure determinism, we recommend defining a system instruction with explicit rules for your specific use case.248249### `thinking_budget` (no longer recommended)250251The raw numeric `thinking_budget` parameter is no longer recommended across all252Gemini 3.x models. Use the `thinking_level` string enum instead.253254    # ⚠️ Before (not recommended)255    generation_config = {256        "thinking": {"thinking_budget": 7500},257    }258259    # ✅ After260    generation_config = {261        "thinking": {"thinking_level": "medium"},262    }263264Available values: `minimal`, `low`, `medium` (default), and `high`.265266### Function calling: strict response matching267268The Interactions API already errors on mismatched function responses. The269GenerateContent API does not yet error, but mismatched responses cause the model270to return empty responses with `finish_reason: STOP` in most cases. Always271follow these conventions:272273| Requirement | Details |274|---|---|275| Include `id` | Every `FunctionResponse` must include the `id` from the corresponding `FunctionCall` |276| Match `name` | The `name` in the response must match the `name` in the call |277| Match counts | Return exactly one `FunctionResponse` for each `FunctionCall` received |278279### Python280281    # ✅ Include matching call_id and name in the function_result282    final_interaction = client.interactions.create(283        model="gemini-3.5-flash",284        previous_interaction_id=interaction.id,285        tools=[my_tool],286        input=[{287            "type": "function_result",288            "name": fc_step.name,289            "call_id": fc_step.id,290            "result": [{"type": "text", "text": json.dumps(result)}],291        }],292    )293294### JavaScript295296    // ✅ Include matching call_id and name in the function_result297    const finalInteraction = await client.interactions.create({298      model: "gemini-3.5-flash",299      previousInteractionId: interaction.id,300      tools: [myTool],301      input: [{302        type: "function_result",303        name: fcStep.name,304        call_id: fcStep.id,305        result: [{ type: "text", text: JSON.stringify(result) }],306      }],307    });308309### Java310311    import java.util.Arrays;312    import com.google.genai.Client;313    import com.google.genai.gaos.models.interactions.CreateModelInteraction;314    import com.google.genai.gaos.models.interactions.Function;315    import com.google.genai.gaos.models.interactions.FunctionResultStep;316    import com.google.genai.gaos.models.interactions.FunctionResultStepResultUnion;317    import com.google.genai.gaos.models.interactions.Interaction;318    import com.google.genai.gaos.models.interactions.InteractionsInput;319    import com.google.genai.gaos.models.interactions.Model;320    import com.google.genai.gaos.models.interactions.TextContent;321    import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;322    import java.util.List;323324    Client client = new Client();325326    // Assumes interactionId, callId, functionName, myTool, and resultJson from previous step327    String interactionId = "interaction-id-123";328    String callId = "call-id-123";329    String functionName = "get_weather";330    Function myTool = Function.builder().name(functionName).build();331    String resultJson = "{\"temperature\": \"72F\"}";332333    // ✅ Include matching callId and name in the FunctionResultStep334    FunctionResultStep functionResult =335        FunctionResultStep.builder()336            .name(functionName)337            .callId(callId)338            .result(339                FunctionResultStepResultUnion.of(340                    Arrays.asList(TextContent.builder().text(resultJson).build())))341            .build();342343    CreateModelInteraction params =344        CreateModelInteraction.builder()345            .model(Model.of("gemini-3.5-flash"))346            .previousInteractionId(interactionId)347            .tools(Arrays.asList(myTool))348            .input(InteractionsInput.ofStep(Arrays.asList(functionResult)))349            .build();350351    Interaction finalInteraction =352        client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();353354### REST355356    curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \357      -H "x-goog-api-key: $GEMINI_API_KEY" \358      -H 'Content-Type: application/json' \359      -d '{360        "model": "gemini-3.5-flash",361        "previous_interaction_id": "<INTERACTION_ID>",362        "tools": [...],363        "input": [{364          "type": "function_result",365          "name": "my_function",366          "call_id": "<CALL_ID>",367          "result": [{"type": "text", "text": "..."}]368        }]369      }'370371### Multimodal function responses372373We often see clients provide images outside function response. This can lead to374unexpected model behavior (e.g. thought leakage) and result in lower quality375outputs. Follow the recommendation in376[Multimodal Function Responses API docs](https://ai.google.dev/gemini-api/docs/function-calling?example=meeting#multimodal)377instead and include multimodal content in the function response parts that you378send to the model. The model can process this multimodal content in its next379turn to produce a more informed response.380381### Python382383    # ✅ Include multimodal content in the function response384    final_interaction = client.interactions.create(385        model="gemini-3.5-flash",386        previous_interaction_id=interaction.id,387        input=[388            {389                "type": "function_result",390                "name": tool_call.name,391                "call_id": tool_call.id,392                "result": [393                    {"type": "text", "text": "instrument.jpg"},394                    {395                        "type": "image",396                        "mime_type": "image/jpeg",397                        "data": base64_image_data,398                    },399                ],400            }401        ],402    )403404### JavaScript405406    // ✅ Include multimodal content in the function response407    const finalInteraction = await client.interactions.create({408      model: "gemini-3.5-flash",409      previousInteractionId: interaction.id,410      input: [{411        type: "function_result",412        name: toolCall.name,413        call_id: toolCall.id,414        result: [415          { type: "text", text: "instrument.jpg" },416          {417            type: "image",418            mime_type: "image/jpeg",419            data: base64ImageData,420          },421        ],422      }],423    });424425### Java426427    import java.util.Arrays;428    import com.google.genai.Client;429    import com.google.genai.gaos.models.interactions.CreateModelInteraction;430    import com.google.genai.gaos.models.interactions.FunctionResultStep;431    import com.google.genai.gaos.models.interactions.FunctionResultStepResultUnion;432    import com.google.genai.gaos.models.interactions.ImageContent;433    import com.google.genai.gaos.models.interactions.ImageContentMimeType;434    import com.google.genai.gaos.models.interactions.Interaction;435    import com.google.genai.gaos.models.interactions.InteractionsInput;436    import com.google.genai.gaos.models.interactions.Model;437    import com.google.genai.gaos.models.interactions.TextContent;438    import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;439    import java.util.List;440441    Client client = new Client();442443    // Assumes interactionId, callId, functionName, and base64ImageData from previous step444    String interactionId = "interaction-id-123";445    String callId = "call-id-123";446    String functionName = "get_instrument_image";447    String base64ImageData = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=";448449    // ✅ Include multimodal content in the function response450    FunctionResultStep functionResult =451        FunctionResultStep.builder()452            .name(functionName)453            .callId(callId)454            .result(455                FunctionResultStepResultUnion.of(456                    Arrays.asList(457                        TextContent.builder().text("instrument.jpg").build(),458                        ImageContent.builder()459                            .mimeType(ImageContentMimeType.IMAGE_JPEG)460                            .data(base64ImageData)461                            .build())))462            .build();463464    CreateModelInteraction params =465        CreateModelInteraction.builder()466            .model(Model.of("gemini-3.5-flash"))467            .previousInteractionId(interactionId)468            .input(InteractionsInput.ofStep(Arrays.asList(functionResult)))469            .build();470471    Interaction finalInteraction =472        client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();473474### Inline instructions in function responses475476We often see clients provide additional instructions along with function responses477as subsequent `Parts`. This can lead to unexpected model behavior (e.g.478thought leakage) and result in lower quality outputs. Instead, append any extra479instructions to the end of the function response text separated by two newlines.480481### Python482483    # ✅ Append inline instructions to the end of the function response separated by two newlines484    result_text = f"{json.dumps(result)}\n\n<your inline instructions>"485486    final_interaction = client.interactions.create(487        model="gemini-3.5-flash",488        previous_interaction_id=interaction.id,489        tools=[my_tool],490        input=[{491            "type": "function_result",492            "name": fc_step.name,493            "call_id": fc_step.id,494            "result": [{"type": "text", "text": result_text}],495        }],496    )497498### JavaScript499500    // ✅ Append inline instructions to the end of the function response separated by two newlines501    const resultText = `${JSON.stringify(result)}\n\n<your inline instructions>`;502503    const finalInteraction = await client.interactions.create({504      model: "gemini-3.5-flash",505      previousInteractionId: interaction.id,506      tools: [myTool],507      input: [{508        type: "function_result",509        name: fcStep.name,510        call_id: fcStep.id,511        result: [{ type: "text", text: resultText }],512      }],513    });514515### Java516517    import java.util.Arrays;518    import com.google.genai.Client;519    import com.google.genai.gaos.models.interactions.CreateModelInteraction;520    import com.google.genai.gaos.models.interactions.Function;521    import com.google.genai.gaos.models.interactions.FunctionResultStep;522    import com.google.genai.gaos.models.interactions.FunctionResultStepResultUnion;523    import com.google.genai.gaos.models.interactions.Interaction;524    import com.google.genai.gaos.models.interactions.InteractionsInput;525    import com.google.genai.gaos.models.interactions.Model;526    import com.google.genai.gaos.models.interactions.TextContent;527    import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;528    import java.util.List;529530    Client client = new Client();531532    // Assumes interactionId, callId, functionName, myTool, and resultJson from previous step533    String interactionId = "interaction-id-123";534    String callId = "call-id-123";535    String functionName = "get_weather";536    Function myTool = Function.builder().name(functionName).build();537    String resultJson = "{\"temperature\": \"72F\"}";538539    // ✅ Append inline instructions to the end of the function response separated by two newlines540    String resultText = resultJson + "\n\n<your inline instructions>";541542    FunctionResultStep functionResult =543        FunctionResultStep.builder()544            .name(functionName)545            .callId(callId)546            .result(547                FunctionResultStepResultUnion.of(548                    Arrays.asList(TextContent.builder().text(resultText).build())))549            .build();550551    CreateModelInteraction params =552        CreateModelInteraction.builder()553            .model(Model.of("gemini-3.5-flash"))554            .previousInteractionId(interactionId)555            .tools(Arrays.asList(myTool))556            .input(InteractionsInput.ofStep(Arrays.asList(functionResult)))557            .build();558559    Interaction finalInteraction =560        client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();561562### Reducing unnecessary tool calls563564If you experience an overuse of tool calls, two techniques help minimize them:5655661. **Start by reducing the thinking level** (`medium`, `low`, or `minimal`):567   Higher thinking levels encourage the model to use more tools to explore and568   verify, so lowering the level can reduce tool calls.5695702. **Add a system instruction:** If overuse persists after adjusting the571   thinking level, consider a prompt that restricts tool usage. For example:572573       You have a limited action budget of <n> tool calls. Use them efficiently.574575## Migration checklist576577> [!NOTE]578> **Note:** **Automate this migration with a coding agent.** If you use a coding agent that supports skills (like Antigravity), install the [Gemini API skill](https://ai.google.dev/gemini-api/docs/coding-agents#gemini-api-dev) and run: `/gemini-api-dev migrate my app to Gemini 3.5 Flash`579580**We strongly recommend updating to `google-genai` SDK v2.0.0 or later.** This581version introduces breaking changes to the Interactions API. See the582[breaking changes migration guide](https://ai.google.dev/gemini-api/docs/interactions-breaking-changes-may-2026) for details.583584### Migrate from Gemini 3 Flash Preview585586- Update model name: `gemini-3-flash-preview` → `gemini-3.5-flash`587- Review pricing. Gemini 3.5 Flash is more expensive than Gemini 3 Flash Preview. If your use case is highly cost-sensitive, consider migrating to [Gemini 3.1 Flash-Lite](https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite) instead. See the [pricing page](https://ai.google.dev/gemini-api/docs/pricing#gemini-3.5-flash) for details.588- Remove `temperature`, `top_p`, `top_k` from your config (no longer recommended).589- Replace `thinking_budget` with `thinking_level`.590- Add `id` and matching `name` to all `FunctionResponse` parts.591- Test your prompts. Default effort changed from `high` → `medium`; verify quality, speed, and cost.592- Thought preservation is now on by default. Reasoning context carries forward across turns, which improves performance but may increase token usage.593- Reduce unnecessary tool calls: start by reducing the thinking level (`medium`, `low`, or `minimal`); add a system instruction to constrain tool usage if overuse persists.594- [Computer Use](https://ai.google.dev/gemini-api/docs/computer-use) is supported.595596### Migrate from Gemini 2.5597598All of the above, plus:599600- Simplify prompts. If you used chain-of-thought prompt engineering to force reasoning, try `thinking_level: "medium"` or `"high"` with simpler prompts instead.601- Test PDF and media workloads. If you relied on specific behavior for dense document parsing, test the `media_resolution_high` setting to ensure continued accuracy. Migrating to Gemini 3 defaults may also increase token usage for PDFs but decrease it for video; if requests exceed the context window, explicitly reduce the `media_resolution`. See the [media resolution](https://ai.google.dev/gemini-api/docs/media-resolution) docs for details.602- Leverage [combined tool use](https://ai.google.dev/gemini-api/docs/tool-combination). Google Search, URL context, code execution, and custom functions can be used in the same request.603- If using multimodal function responses, move multimodal content inside function response parts, not alongside them.604- If using inline instructions with function responses, append them to the function response text separated by two newlines, not as separate parts.605- Image segmentation is not supported in Gemini 3.x. For segmentation workloads, continue using Gemini 2.5 Flash with thinking off.606- Remove `candidate_count` from your config (not supported in Gemini 3.x)607608## Gemini 3 family features609610Gemini 3.5 Flash inherits all Gemini 3 family capabilities, including Computer Use.611Features introduced in Gemini 3 that carry forward:612613- [**Thinking**](https://ai.google.dev/gemini-api/docs/thinking)**:** Encrypted reasoning context preserved across API calls. Automatic in the Interactions API; implicit in GenerateContent.614- [**Structured outputs with tools**](https://ai.google.dev/gemini-api/docs/structured-output)**:** Combine JSON mode with built-in tools (Search, URL context, code execution, function calling).615- [**Multimodal function responses**](https://ai.google.dev/gemini-api/docs/function-calling#multimodal)**:** Return images, audio, and other media in function call results.616- [**Code execution with images**](https://ai.google.dev/gemini-api/docs/code-execution#images)**:** Execute code that processes and generates images.617- [**Combined tool use**](https://ai.google.dev/gemini-api/docs/tool-combination)**:** Use built-in tools and custom function calling in the same request.618- [**Media resolution**](https://ai.google.dev/gemini-api/docs/media-resolution)**:** Fine-grained control over token allocation for image, video, and PDF inputs. Gemini 3 models support per-content-item resolution settings (`low`, `medium`, `high`, `ultra_high`) for mixed-fidelity prompts.619- [**Thought signatures**](https://ai.google.dev/gemini-api/docs/thought-signatures)**:** Encrypted representations of the model's internal reasoning. Required for multi-turn function calling in stateless mode; managed automatically by the Interactions API and the official SDKs.620621## Prompting best practices622623Gemini 3.x models are reasoning models, which changes how you should prompt.624625- **Precise instructions:** Be concise. Gemini 3.x responds best to direct, clear instructions. Verbose or complex prompt engineering techniques designed for older models may cause the model to over-analyze.626- **Output verbosity:** By default, Gemini 3 and 3.1 is less verbose and prefers direct, efficient answers. If your use case requires a conversational tone, steer the model explicitly in your prompt (for example, "Explain this as a friendly, talkative assistant").627- **Context management:** When working with large datasets (such as entire books, codebases, or long videos), place your specific instructions or questions at the end of the prompt, after the data context. Anchor the model's reasoning by starting your question with a phrase like, "Based on the preceding information...".628629Learn more about prompt design strategies in the630[prompt engineering guide](https://ai.google.dev/gemini-api/docs/prompting-strategies).631632## Limitations633634- Image segmentation is not supported in Gemini 3.x. For segmentation workloads, continue using Gemini 2.5 Flash with thinking off.635636## FAQ6376381. **What is the knowledge cutoff for Gemini 3.5 Flash?** Gemini 3.5 Flash639   has a knowledge cutoff of January 2025. For more recent information, use the640   [Search Grounding](https://ai.google.dev/gemini-api/docs/google-search) tool.6416422. **What are the context window limits?** Gemini 3.5 Flash supports a 1643   million token input context window and up to 65k output tokens.6446453. **Will my old `thinking_budget` code still work?** Yes, `thinking_budget`646   is still supported for backward compatibility, but we recommend migrating to647   `thinking_level` for more predictable performance. Don't use both in the648   same request.6496504. **Does Gemini 3.5 Flash support the Batch API?** Yes. See the651   [Batch API](https://ai.google.dev/gemini-api/docs/batch-api) guide for details.6526535. **Is Context Caching supported?** Yes,654   [Context Caching](https://ai.google.dev/gemini-api/docs/caching) is supported.6556566. **Which tools are supported?** Gemini 3.5 Flash supports657   [Google Search](https://ai.google.dev/gemini-api/docs/google-search),658   [Grounding with Google Maps](https://ai.google.dev/gemini-api/docs/maps-grounding),659   [File Search](https://ai.google.dev/gemini-api/docs/file-search),660   [Code Execution](https://ai.google.dev/gemini-api/docs/code-execution),661   [URL Context](https://ai.google.dev/gemini-api/docs/url-context), and662   standard [Function Calling](https://ai.google.dev/gemini-api/docs/function-calling),663   including664   [combined tool use](https://ai.google.dev/gemini-api/docs/tool-combination), and665   [Computer Use](https://ai.google.dev/gemini-api/docs/computer-use).666667## Next steps668669- Learn more about prompt design strategies in the [prompt engineering guide](https://ai.google.dev/gemini-api/docs/prompting-strategies).670- Get started with the [Gemini 3 Cookbook](https://github.com/google-gemini/cookbook)671- Learn about [Gemini API optimization and inference](https://ai.google.dev/gemini-api/docs/optimization)
Files main
Menu

Theme