"Get Code" issue

There is an issue with getcode, a feature that used to be supported in the Gemini AI Studio web interface. Previously, it provided complete code including the conversation history, but now it only provides a basic template and the conversation content has disappeared. We need a getcode feature that includes both the user’s questions and the AI’s answers so we can quickly integrate what we built in AI Studio into our APIs.

At the moment, when using the share feature, it only adds various files and an AI Studio shortcut to Google Drive. These are not interpretable by the model and are not suitable for coding.

Below is the current output of getcode.

# To run this code you need to install the following dependencies:
# pip install google-genai

import base64
import os
from google import genai
from google.genai import types


def generate():
    client = genai.Client(
        api_key=os.environ.get("GEMINI_API_KEY"),
    )

    model = "gemini-2.5-pro"
    contents = [
        types.Content(
            role="user",
            parts=[
                types.Part.from_text(text="""INSERT_INPUT_HERE"""),
            ],
        ),
    ]
    generate_content_config = types.GenerateContentConfig(
        temperature=1.3,
        thinking_config = types.ThinkingConfig(
            thinking_budget=-1,
        ),
    )

    for chunk in client.models.generate_content_stream(
        model=model,
        contents=contents,
        config=generate_content_config,
    ):
        print(chunk.text, end="")

if __name__ == "__main__":
    generate()
3 Likes

Hello,

Welcome to the forum!

Thank you for sharing your issue. We will discuss this internally with our team and get back to you with more accurate information.

Thank you for your patience.

4 Likes

Totally agree—this is a regression from the previous Gemini AI Studio behavior.
The new getcode only returns a bare template and drops both user prompts and model replies, forcing us to reconstruct context manually. This significantly slows coding efficiency.

There could be toggles to include/exclude conversation history and to choose streaming vs one-time responses.

3 Likes

Is it possible to get a response from the studio team? Otherwise, the reason is unknown, and it is unclear whether it was done intentionally or not. The inability to access the chat history is frustrating.