> For the complete documentation index, see [llms.txt](https://docs.tensorx.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tensorx.ai/ai-coding-assistants/proxyai.md).

# ProxyAI (JetBrains)

Configure [ProxyAI](https://tryproxy.io/) to use TensorX in a JetBrains IDE.

***

## Overview

ProxyAI is an open-source coding assistant with chat, inline editing and commit-message features. Its **Custom OpenAI** provider can use the TensorX API.

### 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 TensorX API key from [app.tensorx.ai](https://app.tensorx.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.tensorx.ai/v1/chat/completions` |
| **API Key** | Your TensorX 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      | An ID returned by `GET /v1/models`                       |
| `messages`    | Placeholder | `$OPENAI_MESSAGES`                                       |
| `stream`      | Boolean     | `true`                                                   |
| `temperature` | Number      | `0.1`                                                    |
| `max_tokens`  | Number      | Omit unless the feature needs an explicit response limit |

### 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 TensorX 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.

***

## Model selection

Call `GET /v1/models` with your TensorX API key and use one of the returned IDs. If the integration depends on a capability or token limit, query `GET /v1/model/info` before selecting the model. See [Models](/api-reference/models.md) for examples.

***

## Note on Code Completions (Autocomplete)

The configuration above covers chat, inline editing and commit-message generation. ProxyAI autocomplete uses a separate fill-in-the-middle model configuration and is not configured by these steps.

***

## 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.tensorx.ai](https://app.tensorx.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. `z-ai/glm-5.2`, not just `deepseek`)            |

***

## See Also

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tensorx.ai/ai-coding-assistants/proxyai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
