Google unlocks 2M context and code execution for Gemini
Google just opened up Gemini 1.5 Pro's 2-million-token context window to all developers, removing the waitlist. Both 1.5 Pro and Flash now also feature built-in Python code execution in an offline sandbox to tackle math and data reasoning, alongside Gemma 2 landing in Google AI Studio. Why it matters: developers can now feed entire codebases into Gemini while letting the model verify its own math by running code.

Pushing an entire codebase or hours of raw video into an LLM used to result in either an out-of-memory error or a massive hallucination. Google wants to change that.
Google removed the waitlist for Gemini 1.5 Pro's 2 million token context window, making it generally available to all developers through the Gemini API and Google AI Studio.
A massive context window with a built-in sandbox
A 2 million token prompt sounds great until you get the bill. To keep developers from going broke on repeated inputs, Google rolled out context caching for both Gemini 1.5 Pro and the faster 1.5 Flash.
If you are sending multiple prompts against the same giant document or codebase, context caching stores those tokens so you do not pay for them over and over.
Google also tackled one of the biggest weaknesses in frontier models: bad math and clumsy data analysis. Both 1.5 Pro and 1.5 Flash now have native code execution.
When enabled, the model writes its own Python code, runs it in an isolated sandbox, looks at the output, and iterates on errors until it gets the right answer. The environment comes with standard numerical libraries, has zero internet access for security, and Google only bills for the output tokens generated, not for execution time.
On top of that, Google added the open-weights Gemma 2 model to Google AI Studio for quick prototyping. It also kicked off red-teaming for Gemini 1.5 Flash text tuning, with full rollout scheduled for mid-July.
Why it matters
We think this release proves Google understands that raw context length is useless without practical infrastructure around it.
Unlocking 2 million tokens without caching would be like buying a supercar with no affordable gas. Context caching turns what used to be an expensive party trick into a viable daily workflow for developers analyzing entire software repos, audio archives, or complex legal binders.
Making code execution a native model loop is another huge win. Instead of forcing developers to build complicated tool-calling chains and run their own external code interpreters, Gemini now handles the trial-and-error reasoning itself. Billing purely on output tokens makes it surprisingly cost-effective for quantitative tasks.
Against rivals like OpenAI and Anthropic, Google is firmly locking down the high-capacity, multi-modal territory. The limitation, of course, is the sandboxed environment. Without internet access or custom external dependencies, deep data pipelines will still require homegrown infrastructure, but for everyday reasoning, this sets a high bar.
Sources (1)
- developers.googleblog.com(opens in a new tab)Originaldevelopers.googleblog.com
Topic trackerGoogle Gemma model family
- Google drops Gemma 2 with giant-killing 27B model
- Google unlocks 2M context and code execution for GeminiThis story
- Google drops CodeGemma for lightweight code completion
- Google drops Gemma, a powerful open-source model you can run locally