Use Claude in CodeBuddy Code with a custom endpoint

Run Tencent's CodeBuddy Code CLI on Claude Opus 5.5, Sonnet 5.5, or Haiku 4.5 through AI in IDE by setting three environment variables.

Tested on 2026-11-06 with @tencent-ai/codebuddy-code 2.180.0: codebuddy -p returned a reply from claude-sonnet-5-5 and claude-haiku-4-5-20251001 with the settings below.

Setup at a glance

  1. Install the CLI. npm install -g @tencent-ai/codebuddy-code, then codebuddy --version.
  2. Create the API key. Open API Keys, create a key, and choose the AWSQ or CCMAX channel.
  3. Set the environment. Add to ~/.zshrc or ~/.bashrc, then open a new terminal:
1
export CODEBUDDY_BASE_URL="https://api.aiinide.com/v1"
2
export CODEBUDDY_API_KEY="YOUR_DASHBOARD_API_KEY"
3
export CODEBUDDY_MODEL="claude-sonnet-5-5"

On Windows PowerShell, use setx CODEBUDDY_BASE_URL "https://api.aiinide.com/v1" and the same for the other two, then open a new window.

  1. Verify. Run codebuddy -p "Reply with exactly: OK". The reply is OK, and the request appears in Usage.

The base URL must end in /v1

CodeBuddy Code speaks the OpenAI Chat Completions format and appends /chat/completions. With https://api.aiinide.com/v1 it calls /v1/chat/completions, which accepts AWSQ and CCMAX keys. With the bare host it calls /chat/completions, the Codex-channel route, and fails with 400 This endpoint requires a CODEX API key.

CodeBuddy's documentation says CODEBUDDY_API_KEY is always used in non-interactive -p mode. If an interactive session's requests do not show up in your AI in IDE usage, check which account or model the session picked with /model.

Models

CODEBUDDY_MODELChannelUse it for
claude-opus-5-5AWSQ, CCMAXhard refactors, long agent runs
claude-sonnet-5-5AWSQ, CCMAXeveryday coding
claude-haiku-4-5-20251001AWSQ, CCMAXquick edits, cheap checks

According to CodeBuddy's documentation, CODEBUDDY_SMALL_FAST_MODEL and CODEBUDDY_CODE_SUBAGENT_MODEL set the background and subagent models; claude-haiku-4-5-20251001 keeps them cheap. Rates are on Models and pricing.

FAQ

Which base URL does CodeBuddy Code need for AI in IDE?

https://api.aiinide.com/v1. CodeBuddy appends /chat/completions; the bare host reaches the Codex route and returns 400.

Does this work in the CodeBuddy IDE plugin?

This page covers the CodeBuddy Code CLI only. The IDE plugin's model settings were not tested.

Does Claude-specific tooling work through this endpoint?

Text, streaming, and client function tools work on the OpenAI-compatible endpoint. It does not support Claude extensions such as Fast mode or hosted tools; use Claude Code for those.

Related

Use Claude in CodeBuddy Code with a custom endpoint | AI in IDE