PyCharm 2025.2 Help

AI Playground

View | Tool Windows | AI Playground

Enable the AI Playground plugin

This functionality relies on the AI Playground plugin, which is bundled and enabled in PyCharm by default. If the relevant features are not available, make sure that you did not disable the plugin. For more information, refer to Open plugin settings.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the AI Playground plugin, and select the checkbox next to the plugin name.

AI Playground is a built-in tool that allows you to experiment with AI models right inside your IDE. It is designed for fast, simple, and seamless prompt testing and model comparison—no complex setup or context switching is required.

Compare multiple models

Send the same prompt to up to five models at once and compare model responses:

  1. Open the AI Playground tool window (View | Tool Windows | AI Playground).

    AI Playground tool window opened
  2. Click Create Playground to create a new playground.

  3. Click Add Model and select a model from the list:

  4. Configure prompt settings for each model.

  5. In the input field, type your message and click Send or press Enter. The responses from each model will appear in the AI Playground chat.

    The responses from two models in the chat

Use your own models

If you have configured one or more API keys from major LLM providers globally or by using a .env file, AI Playground will detect them and prompt you to import the keys into the Playground.

Suggestion to import API keys

To connect a provider manually:

  1. Click Add Model, then select Connect Provider.

  2. In the dialog that opens:

    1. Select the provider from the list of available providers.

    2. Specify the name of the provider.

    3. Enter the API key or endpoint if required and click Test Connection to ensure that the connection is successful.

    4. Click OK.

    Adding your own model to comparison

Configure prompt settings

If PyCharm detects a text prompt, a gutter icon will appear next to it in the editor. Click the icon to import the prompt into AI Playground and test it directly.

Suggestion to import prompt into AI Playground

You can customize settings individually for each model, except for system prompts, which are global across all models.

Customize prompt settings

Available settings

System prompt

Describe the context or behavior for the model.

Max response length (tokens)

Set the maximum number of tokens the model can generate in a response.

Temperature

Control randomness: lower values produce more focused outputs, higher values generate more diverse responses.

Top-p

Control nucleus sampling: limit the model’s choices to a subset of the most likely tokens, improving response relevance.

Apply to All

Apply current settings to all models. Unsupported settings for some models will be ignored.

    25 September 2025