CodeBuddy
Connect to aicentos' OpenAI-compatible endpoint in CodeBuddy (IDE / CLI) through models.json
Last updated:
CodeBuddy supports custom models: through a user-level or project-level models.json you can point requests at aicentos' OpenAI-compatible endpoint. The IDE and the CodeBuddy Code CLI share the same configuration.
Prerequisites
First create a dedicated key for CodeBuddy on the console's "API Keys" page (naming it codebuddy is recommended).
- Console: https://aicentos.com
- Create a key: https://aicentos.com/keys
- Wallet top-up: https://aicentos.com/wallet
Configuration to fill in
| Field | Value |
|---|---|
| Base URL | https://aicentos.com/v1 |
Endpoint URL (url field) | https://aicentos.com/v1/chat/completions |
API Key (apiKey) | The key created in the console |
Model ID (id) | A model name from the Model Gallery in the console |
supportsToolCall | true |
maxInputTokens / maxOutputTokens | Set according to the chosen model |
Note: the url field in models.json requires the full endpoint path and must end with /chat/completions.
Setup steps
- Open CodeBuddy once so it generates the configuration directory.
- Create or edit the user-level configuration file:
- macOS / Linux:
~/.codebuddy/models.json - Windows:
C:\Users\<username>\.codebuddy\models.json - If it should only apply to a single project, use the project-level
<project root>/.codebuddy/models.jsoninstead, which takes precedence over the user-level file.
- macOS / Linux:
- Write the following, replacing
idwith a model name you have confirmed works in the console:
{
"models": [
{
"id": "gpt-5",
"name": "GPT-5 (aicentos)",
"vendor": "aicentos",
"apiKey": "${AICENTOS_API_KEY}",
"url": "https://aicentos.com/v1/chat/completions",
"maxInputTokens": 128000,
"maxOutputTokens": 16384,
"supportsToolCall": true,
"supportsImages": false,
"supportsReasoning": false
}
]
}- Set the environment variable (both
apiKeyandurlsupport${VAR_NAME}references):
export AICENTOS_API_KEY="sk-your-aicentos-key"- Quit CodeBuddy completely and reopen it (restarting the IDE panel is enough).
- Select the newly configured model in the model picker.
If you would rather not edit files, click the model picker below the chat panel in the CodeBuddy IDE → Configure custom model → choose Custom as the provider, then fill in the Base URL https://aicentos.com/v1, the API Key and the model name.
Test
After saving, start a new conversation or coding task and run a lightweight test with a simple prompt first; only start real use once responses come back normally.
Notes
- Only APIs in OpenAI interface format are currently supported.
urlmust be written as the full/v1/chat/completionspath;https://aicentos.com/v1will not work.- The outermost structure must be
{"models": [...]};modelsis a required top-level field. availableModelsis a whitelist: once set, the model dropdown only shows the listed models and built-in models disappear as well. Omit the field if you do not need the restriction.- Save the file as UTF-8 without BOM; JSON with a BOM breaks reading of the local model configuration.
- Environment variables are resolved at startup; if a variable does not exist,
${AICENTOS_API_KEY}in the configuration file is kept literally and calls fail. - Set
models.jsonpermissions to600and do not commit it to version control. - The CLI can also be configured with environment variables:
CODEBUDDY_API_KEY,CODEBUDDY_BASE_URL,CODEBUDDY_MODEL. When settingCODEBUDDY_BASE_URLdirectly, do not include/chat/completions— the CLI appends it itself. - See the docs site for more details: https://docs.aicentos.com