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-chat, 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:
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:
If the primary endpoint is unavailable, change url to:
The interface only needs the /v1 endpoint; models.json needs the complete /chat/completions path. Restart CodeBuddy or reopen the model picker after saving. To avoid storing the key in plain text, use an environment variable:

CodeBuddy CLI

The command-line version is called CodeBuddy Code. Install it with npm, then run codebuddy to start it:
Set the API key, endpoint, and default model with environment variables. AIHubMix’s Anthropic-compatible interface uses the root URL for CODEBUDDY_BASE_URL:
To keep these settings, add them to %USERPROFILE%\.codebuddy\settings.json:
The CLI uses the Anthropic-compatible protocol, while desktop custom models use the OpenAI-compatible endpoint. For a 404 error, check that CODEBUDDY_BASE_URL was not set to an OpenAI path such as /v1/chat/completions.

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? Not exactly. Desktop custom models use models.json; the CLI reads environment variables or the env object in settings.json. Last updated: 2026-07-10