Skip to main content
CodeBuddy supports custom OpenAI-compatible models. After adding AIHubMix, you can use GPT, Claude, Gemini, DeepSeek, GLM, and other AIHubMix models in CodeBuddy.

Before you start

  • Install and open CodeBuddy.
  • Create an API key in the AIHubMix Console. It usually starts with sk-***.
  • Copy the model ID you want to use, such as gpt-5.5, gemini-3.5-flash, or deepseek-v4.1-flash, from the AIHubMix model list.

Configure AIHubMix in the interface

Open CodeBuddy and click the current model name below the input box, for example Default. Open the CodeBuddy model picker Scroll to the bottom of the model list and select Configure custom models. Open custom model settings in CodeBuddy Click Add Model, then choose Custom from the Provider menu. Select the Custom provider in CodeBuddy Complete the following fields:
  • Endpoint: Use https://aihubmix.com/v1. If it is temporarily unavailable, use the backup endpoint https://api.inferera.com/v1.
  • API Key: Enter the key created in the AIHubMix Console.
  • Model Name: Enter the model ID, such as gpt-5.5.
  • Advanced Settings: Enable Tool Calling, Image Input, or Reasoning only when the selected model supports that capability.
Click Save. Enter the endpoint, API key, and model name in CodeBuddy Return to the model picker and select the model from Custom Models. Select the custom model in CodeBuddy

Add a model through a configuration file

CodeBuddy stores custom models locally. Edit the following file when configuring through the interface is inconvenient:
On macOS and Linux, the path is ~/.codebuddy/models.json. You can also set a project-level configuration here:
The project-level setting takes precedence. When editing models.json, use the full Chat Completions URL:
availableModels limits which models appear in the model picker, so only the listed models are shown. A project-level configuration replaces the user-level configuration entirely. If the primary endpoint is unavailable, change url to:
The interface only needs the /v1 endpoint; models.json needs the complete /chat/completions path. models.json reloads automatically, so changes take effect after you save. You can also reopen the model picker to check. To avoid storing the key in plain text, use an environment variable:

CodeBuddy CLI

The command-line version is called CodeBuddy Code and requires Node.js 18.0 or later. Install it with npm, then run codebuddy to start it:
After installation, run codebuddy --version to confirm that it works. Set the API key, endpoint, and default model with environment variables. The CLI uses the OpenAI-compatible protocol and sends requests to <CODEBUDDY_BASE_URL>/chat/completions. For AIHubMix, set CODEBUDDY_BASE_URL to https://aihubmix.com/v1:
To keep these settings, add them to %USERPROFILE%\.codebuddy\settings.json (on macOS and Linux, ~/.codebuddy/settings.json):
The CLI and desktop custom models both use the OpenAI-compatible protocol. For a 404 error, first check that CODEBUDDY_BASE_URL includes /v1. The CLI adds /chat/completions automatically, so do not include it in CODEBUDDY_BASE_URL.

Verify the setup

Select the custom model and send a short message, such as asking CodeBuddy to introduce AIHubMix. A successful reply confirms the configuration. Verify a text response in CodeBuddy For a model that supports image input, upload an image to test that capability. Verify image input in CodeBuddy

FAQ

The model is unavailable after saving. What should I check? Confirm that the endpoint includes /v1, the API key is complete, and the model name matches the AIHubMix model ID. For models.json, also confirm that url includes /chat/completions. Why are two similar model names shown? CodeBuddy may display a custom model as model-name:model-name. This is normal as long as it responds correctly. Do the CLI and desktop app use the same settings? Both read models.json: the user-level file is ~/.codebuddy/models.json, and the project-level file is .codebuddy/models.json. The CLI can also set the key and endpoint with environment variables or the env object in settings.json. Last updated: 2026-10-17