Skip to content

Gemini 3.1 Pro Preview

Gemini 3.1 Pro Preview advances software engineering and agentic workflows with targeted quality improvements for finance and spreadsheet applications, plus more efficient thinking that reduces token consumption while maintaining performance.

File InputTool UseReasoningVision (Image)Web Searchtiered-costImplicit Caching
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'google/gemini-3.1-pro-preview',
prompt: 'Why is the sky blue?'
})

Frequently Asked Questions

  • What improvements does Gemini 3.1 Pro Preview have over Gemini 3 Pro?

    Three areas: quality improvements for software engineering and agentic workflows, enhanced usability for finance and spreadsheet applications, and more efficient thinking that reduces token consumption while maintaining performance.

  • Does more efficient thinking mean lower quality outputs?

    No. Performance stays the same while token consumption decreases. The model uses fewer tokens to reason through a problem without degrading output quality, which reduces cost per task.

  • What thinking level does this model support?

    medium thinking level, configured via thinking_level in providerOptions.google. This provides finer control over the cost, performance, and speed tradeoff.

  • Is this model suitable for automated code review?

    Yes. Software engineering quality improvements are a primary focus of the 3.1 update, making it well suited for code review, security analysis, and test generation.

  • How do I set the thinking level in the AI SDK?

    Under providerOptions.google in your streamText or generateText call, set thinking_level to low, medium, or high.

  • Does Gemini 3.1 Pro Preview require its own Google API account?

    No. AI Gateway manages all provider credentials. You connect using a Vercel API key or OIDC token.

  • What makes this model well-suited for finance and spreadsheet tasks?

    Gemini 3.1 Pro specifically improves on finance and spreadsheet usability. These tasks involve structured numerical analysis, formula generation, and multi-step calculation that benefit from pro-tier reasoning.

  • When should I use Gemini 3.1 Pro versus Gemini 3.1 Flash for engineering tasks?

    For complex multi-step engineering tasks where correctness of the reasoning chain matters, security audits, architectural planning, test generation, the Pro tier provides more thorough reasoning. For high-volume, more repetitive engineering tasks like code completion or linting at scale, Flash-tier models offer a better cost-to-quality ratio.