> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corvex.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect PyCharm AI Assistant to Token Factory

> Configure PyCharm AI Assistant with Token Factory and troubleshoot tool-calling and concurrency errors.

Connect PyCharm AI Assistant to Token Factory through its native
OpenAI-compatible provider. You can use it to read project files, suggest edits,
and continue working in the same conversation.

PyCharm 2026.2.2 with AI Assistant 262.10315.187 passed five read/edit turns with
`zai-org/GLM-5.3` and the gateway tool-argument compatibility fix. This validation
used a local patched gateway connected to our development endpoint; it does not
establish availability of the fix on every endpoint.

For a separate agent route, see
[Claude Code and ACP](#claude-code-and-acp).

## Configure the native provider

You need PyCharm with the JetBrains AI Assistant plugin, a Token Factory
[API key](/getting-started/authentication), and a model ID from the
[model catalog](/models/overview). The settings below follow the reported
PyCharm 2026.2.2 configuration; labels can differ between IDE versions.

1. Open **Settings → Tools → AI Assistant → Third-party AI providers**.
2. Add an **OpenAI-compatible** provider.
3. Set the URL to `https://api.tokenfactory.corvex.cloud/v1` and enter your Token
   Factory API key.
4. Select `zai-org/GLM-5.3` for **Core features**. When checking tool calling, use
   the same model for **Instant helpers** so both request types use the intended
   provider.
5. Enable **Tool calling** when evaluating file reads or edits.

Start with a disposable project. Ask AI Assistant to read a file and make a
small edit, then continue the same conversation with another read and edit.
In native Chat, use **Apply**, **Accept**, or **Create File** when offered, then
save and inspect the files. A suggested snippet is not a saved file change.

## Follow-up tool calls return 400

The affected client can encode `function.arguments` twice when it replays an
assistant tool call. The next request may fail with:

```text theme={null}
Assistant tool call function.arguments must be a JSON object.
```

This issue is tracked by JetBrains as
[LLM-30278](https://youtrack.jetbrains.com/issue/LLM-30278). An upstream code fix
alone does not confirm that a particular installed plugin contains it.

The gateway compatibility fix removes one redundant encoding layer when the
result is a valid JSON object. If your endpoint still returns this error,
contact support with your PyCharm build, AI Assistant plugin version, model ID,
error text and request ID if available so we can check your endpoint's status.
Do not include your API key or private project contents.

## Concurrent requests return 429

AI Assistant can send several helper requests alongside the main chat request.
A `429 Concurrent request limit exceeded` error is separate from the tool
argument failure above. Respect `Retry-After`, avoid immediately repeating the
whole request burst. This message can come from your key's concurrency limit
or a model capacity guard; it does not by itself mean your key needs a higher
limit. Ask support to review the error text, timing and request ID so we can
identify the guard involved. Other 429 errors can have different quota causes.

## Claude Code and ACP

The [Claude Code guide](/integrations/claude-code) provides an isolated
`claude-corvex` launcher for Token Factory. Verify that configuration in a
terminal first.

PyCharm can also run external agents through the Agent Client Protocol (ACP).
Connecting Claude Code this way requires an ACP-compatible adapter and its
configuration; the terminal launcher alone is not an ACP server. Follow
[JetBrains' custom-agent setup](https://www.jetbrains.com/help/ai-assistant/activate-agents.html)
and the adapter's instructions, and confirm it uses your Token Factory endpoint
and model. Contact support for the Token Factory configuration appropriate to
your IDE and adapter versions. This is a separate path from AI Assistant's native
OpenAI-compatible provider.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.