Overview
CodeBuddy and WorkBuddy are AI-powered coding assistants developed by Tencent Cloud that integrate directly into your IDE. By connecting them to AihubMax, you can leverage a wide selection of AI models through AihubMax’s unified API.CodeBuddy and WorkBuddy use a
models.json configuration file to define custom model providers. AihubMax’s OpenAI-compatible endpoint works seamlessly with this configuration method.Prerequisites
AihubMax API Key
An active AihubMax API key with access to the models you want to use.
CodeBuddy / WorkBuddy
The CodeBuddy or WorkBuddy extension installed in your IDE (VS Code, JetBrains, etc.).
Configuration
CodeBuddy and WorkBuddy read model definitions from amodels.json file. There are two levels of configuration:
- User-level (applies to all projects): stored in your home directory
- Project-level (higher priority, applies to a single project): stored in the project root
1
Locate the Configuration File
Choose the appropriate path based on your tool and operating system:
- CodeBuddy
- WorkBuddy
2
Create the models.json File
Create the Replace
models.json file at the path from the previous step. Here is a basic example with one model:sk-your-foxapi-api-key with your actual AihubMax API key.3
Add More Models (Optional)
You can define multiple models in the Refer to AihubMax’s model list for all available model IDs.
models array. Each entry appears as a selectable model in the extension:4
Select the Model in Your IDE
After saving the
models.json file, the extension auto-detects the changes — no restart required. Open CodeBuddy or WorkBuddy in your IDE and select one of the AihubMax models you configured from the model dropdown.Configuration Reference
Each model entry inmodels.json supports the following fields:
Verify the Connection
After configuringmodels.json:
- Open any code file in your IDE.
- Select one of your AihubMax models from the model dropdown.
- Trigger the AI assistant (e.g., select code and ask for an explanation, or start an inline chat).
- If the response is generated successfully, the connection is working.
Troubleshooting
No response from the AI assistant
No response from the AI assistant
- Verify your API key is correct and has sufficient balance.
- Check that the
urlfield is exactlyhttps://api.aihubmax.com/v1/chat/completions. - Ensure the
idfield matches a model available on AihubMax. - Validate the JSON syntax of your
models.jsonfile (no trailing commas, proper quoting).
Models not appearing in the dropdown
Models not appearing in the dropdown
- Confirm the
models.jsonfile is in the correct directory (see Locate the Configuration File). - The extension auto-detects file changes, but try restarting the extension or IDE if models still do not appear.
- Ensure the JSON file is valid. You can check with:
Slow response times
Slow response times
- Try switching to a faster model (e.g.,
claude-sonnet-4-20250514instead ofclaude-opus-4-20250514). - Check your network connection.
Tool calling or image features not working
Tool calling or image features not working
- Ensure
supportsToolCalland/orsupportsImagesare set totruein your model entry. - Not all models support these features. Check the model’s capabilities on AihubMax’s model list.
Security Best Practices
- Never commit
models.jsonto version control if it contains your API key. Add.codebuddy/and.workbuddy/to your.gitignorefile. - Use project-level config with caution. If working in a shared repository, prefer user-level configuration to avoid accidentally exposing your API key.
- Monitor usage on your AihubMax dashboard to detect any unexpected consumption.