Skip to content
Longterm Wiki

Gemini 1.5 Pro 2M context window, code execution capabilities, and ...

web

Metadata

1 FactBase fact citing this source

EntityPropertyValueAs Of
Google DeepMindContext Window2 millionMay 2024

Cached Content Preview

HTTP 200Fetched Apr 30, 20269 KB
[Gemini](https://developers.googleblog.com/en/search/?product_categories=Gemini)

# Gemini 1.5 Pro 2M context window, code execution capabilities, and Gemma 2 are available today

JUNE 27, 2024

[Logan Kilpatrick](https://developers.googleblog.com/en/search/?author=Logan+Kilpatrick) Group Product Manager

[Shrestha Basu Mallick](https://developers.googleblog.com/en/search/?author=Shrestha+Basu+Mallick) ProductGoogle DeepMind

[Ronen Kofman](https://developers.googleblog.com/en/search/?author=Ronen+Kofman) Group Product ManagerGemini API

Share

- [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://developers.googleblog.com/en/new-features-for-the-gemini-api-and-google-ai-studio/ "Share on Facebook")
- [Twitter](https://twitter.com/intent/tweet?text=https://developers.googleblog.com/en/new-features-for-the-gemini-api-and-google-ai-studio/ "Share on Twitter")
- [LinkedIn](https://www.linkedin.com/shareArticle?url=https://developers.googleblog.com/en/new-features-for-the-gemini-api-and-google-ai-studio/&mini=true "Share on LinkedIn")
- [Mail](mailto:name@example.com?subject=Check%20out%20this%20site&body=Check%20out%20https://developers.googleblog.com/en/new-features-for-the-gemini-api-and-google-ai-studio/ "Send via Email")
- [Get shareable link](https://developers.googleblog.com/en/new-features-for-the-gemini-api-and-google-ai-studio/# "Get shareable link")

![Text-highlight hero](https://storage.googleapis.com/gweb-developer-goog-blog-assets/images/Text-highlight_hero.original.png)

Today, we are giving developers access to the **2 million context window for Gemini 1.5 Pro**, **code execution capabilities** in the Gemini API, and adding **Gemma 2 in Google AI Studio**.

## **Long context and context caching**

At I/O, we announced the longest ever context window of [2 million tokens in Gemini 1.5 Pro](https://blog.google/technology/developers/gemini-gemma-developer-updates-may-2024/) behind a waitlist. Today, we’re opening up access to the 2 million token context window on Gemini 1.5 Pro for all developers.

As the context window grows, so does the potential for input cost. To help developers reduce costs for tasks that use the same tokens across multiple prompts, we’ve launched [context caching](https://ai.google.dev/gemini-api/docs/caching) in the Gemini API for both Gemini 1.5 Pro and 1.5 Flash.

## **Code execution**

LLMs have historically struggled with math or data reasoning problems. Generating and executing code that can reason through such problems helps with accuracy. To unlock these capabilities for developers, we have enabled [code execution for both Gemini 1.5 Pro and 1.5 Flash](https://ai.google.dev/gemini-api/docs/code-execution). Once turned on, the code-execution feature can be dynamically leveraged by the model to generate and run Python code and learn iteratively from the results until it gets to a desired final output. The execution sandbox is not connected to the internet, comes standard with a few numerical libr

... (truncated, 9 KB total)
Resource ID: c5e7ff958d061a89 | Stable ID: sid_eVBeGM5Npw