# ProxyAI (JetBrains)

Connect [ProxyAI](https://tryproxy.io/) to Tensorix and use open-source models directly inside any JetBrains IDE — IntelliJ IDEA, PyCharm, WebStorm, GoLand, and more.

***

## Overview

ProxyAI is an open-source AI coding assistant for JetBrains IDEs. It provides chat, inline editing, AI commit messages, and code completions — all from a single plugin. By pointing ProxyAI's **Custom OpenAI** provider at Tensorix, you get access to models like GLM-5.1, MiniMax M2.5, DeepSeek V3.2, and Llama without leaving your IDE.

### What You Can Do

* Chat with AI about your codebase using `@` context (files, folders, docs, git history)
* Inline code editing with natural language instructions
* AI-generated commit messages
* Use personas to tailor AI behaviour for different tasks

***

## Prerequisites

* A JetBrains IDE (IntelliJ IDEA, PyCharm, WebStorm, etc.)
* ProxyAI plugin installed from the [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/21056-codegpt)
* A Tensorix API key from [app.tensorix.ai](https://app.tensorix.ai)

***

## Setup

### Step 1: Open ProxyAI Provider Settings

1. In your JetBrains IDE, go to **File → Settings** (or **Preferences** on macOS)
2. Navigate to **Tools → ProxyAI → Providers → Custom OpenAI**

### Step 2: Configure Chat Completions

Set up the **Chat Completions** tab with the following:

| Field       | Value                                         |
| ----------- | --------------------------------------------- |
| **URL**     | `https://api.tensorix.ai/v1/chat/completions` |
| **API Key** | Your Tensorix API key                         |

In the **Headers** section, ensure these are set:

| Header          | Value                            |
| --------------- | -------------------------------- |
| `Authorization` | `Bearer $CUSTOM_SERVICE_API_KEY` |
| `Content-Type`  | `application/json`               |

In the **Body** section, configure:

| Property      | Type        | Value              |
| ------------- | ----------- | ------------------ |
| `model`       | String      | `z-ai/glm-5.1`     |
| `messages`    | Placeholder | `$OPENAI_MESSAGES` |
| `stream`      | Boolean     | `true`             |
| `temperature` | Number      | `0.1`              |
| `max_tokens`  | Number      | `8192`             |

### Step 3: Test and Save

1. Click the **Test Connection** button to verify the setup
2. Click **Apply** or **OK** to save

***

## Usage

Once configured, you can use Tensorix models through ProxyAI's features:

* **Chat**: Open the ProxyAI tool window and start a conversation. Use `@` to reference files, folders, documentation, or git history for context.
* **Inline Edit**: Select code, right-click, and choose ProxyAI's inline edit option to modify code with natural language.
* **AI Commit Messages**: When committing, click the AI icon to generate a commit message based on your staged changes.

***

## Switching Models

To change the model, go back to **Tools → ProxyAI → Providers → Custom OpenAI** and update the `model` value in the Body section.

***

## Recommended Models

| Use Case       | Model                         |
| -------------- | ----------------------------- |
| General / Chat | `z-ai/glm-5.1`                |
| Coding         | `minimax/minimax-m2.5`        |
| Reasoning      | `deepseek/deepseek-r1-0528`   |
| Fast responses | `deepseek/deepseek-v3.2`      |
| Long context   | `meta-llama/llama-4-maverick` |

***

## Note on Code Completions (Autocomplete)

ProxyAI's autocomplete feature uses **fill-in-the-middle (FIM)** — a specialised completion method that requires dedicated infill models. Tensorix does not currently offer FIM-capable models, so **autocomplete/tab completions are not supported** at this time.

Chat, inline editing, and all other ProxyAI features work fully with Tensorix.

***

## Troubleshooting

| Issue                 | Fix                                                                                            |
| --------------------- | ---------------------------------------------------------------------------------------------- |
| Connection test fails | Double-check the URL ends with `/v1/chat/completions` (not just `/v1`)                         |
| "Unauthorized" error  | Verify your API key is correct at [app.tensorix.ai](https://app.tensorix.ai)                   |
| No response           | Make sure `stream` is set to `true` and `messages` uses the `$OPENAI_MESSAGES` placeholder     |
| Model not found       | Check the model name matches exactly (e.g. `deepseek/deepseek-chat-v3.1`, not just `deepseek`) |

***

## See Also

* [Quickstart](/quickstart.md)
* [Chat Completions API](/api-reference/chat-completions.md)
* [Models](/api-reference/models.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tensorix.ai/ai-coding-assistants/proxyai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
