models.json is a configuration file for customizing the model list and controlling the display of the model dropdown list. This configuration supports two levels:~/.codebuddy/models.json - Global configuration that applies to all projects.<workspace>/.codebuddy/models.json - Project-specific configuration that takes precedence over the user-level configuration.~/.codebuddy/models.json
<project-root>/.codebuddy/models.json
id field. For the availableModels field, the project-level configuration completely overrides the user-level configuration without merging.{"models": [{"id": "model-id","name": "Model Display Name","vendor": "vendor-name","apiKey": "sk-actual-api-key-value","maxInputTokens": 200000,"maxOutputTokens": 8192,"url": "https://api.example.com/v1/chat/completions","supportsToolCall": true,"supportsImages": true}],"availableModels": ["model-id-1", "model-id-2"]}
Array<LanguageModel>Field | Type | Required | Description |
id | string | Yes | Unique identifier of the model |
name | string | No | Model display name |
vendor | string | No | Model vendor (for example, OpenAI, Google) |
apiKey | string | No | API key (the actual key value, not the environment variable name) |
maxInputTokens | number | No | Maximum input tokens |
maxOutputTokens | number | No | Maximum output tokens |
url | string | No | API endpoint URL (must be the full API path, typically ending with /chat/completions) |
supportsToolCall | boolean | No | Tool call support or not |
supportsImages | boolean | No | Image input support or not |
supportsReasoning | boolean | No | Reasoning mode support or not |
url field must be the full API path, typically ending with /chat/completions.https://api.openai.com/v1/chat/completions or http://localhost:11434/v1/chat/completionsArray<string>{"models": [{"id": "my-custom-model","name": "My Custom Model","vendor": "OpenAI","apiKey": "sk-custom-key-here","maxInputTokens": 128000,"maxOutputTokens": 4096,"url": "https://api.myservice.com/v1/chat/completions","supportsToolCall": true}]}
{"models": [{"id": "gpt-4-turbo","name": "GPT-4 Turbo (Custom Endpoint)","vendor": "OpenAI","url": "https://my-proxy.example.com/v1/chat/completions","apiKey": "sk-your-key-here"}]}
{"availableModels": ["gpt-4-turbo","gpt-4o","my-custom-model"]}
.codebuddy/models.json):{"models": [{"id": "project-a-model","name": "Project A Model","vendor": "OpenAI","url": "https://project-a-api.example.com/v1/chat/completions","apiKey": "sk-project-a-key","maxInputTokens": 100000,"maxOutputTokens": 4096}],"availableModels": ["project-a-model", "gpt-4-turbo"]}
~/.codebuddy/models.json (user level)<workspace>/.codebuddy/models.json (project level)models.json are automatically tagged with the custom tag for easy identification and filtering in the UI.SmartMerge policy:availableModels filtering is performed after all merges are complete.url field for all custom models typically ends with /chat/completions.https://api.openai.com/v1/chat/completionshttps://api.myservice.com/v1/chat/completionshttp://localhost:11434/v1/chat/completionshttps://my-proxy.example.com/v1/chat/completions
https://api.openai.com/v1https://api.myservice.comhttp://localhost:11434
{"models": [{"id": "openai/gpt-4o","name": "open-router-model","url": "https://openrouter.ai/api/v1/chat/completions","apiKey": "sk-or-v1-your-openrouter-api-key","maxInputTokens": 128000,"maxOutputTokens": 4096,"supportsToolCall": true,"supportsImages": false}]}
{"models": [{"id": "deepseek-chat","name": "DeepSeek Chat","vendor": "DeepSeek","url": "https://api.deepseek.com/v1/chat/completions","apiKey": "sk-your-deepseek-api-key","maxInputTokens": 32000,"maxOutputTokens": 4096,"supportsToolCall": true,"supportsImages": false}]}
{"models": [{"id": "gpt-4o","name": "GPT-4o","vendor": "OpenAI","apiKey": "sk-your-openai-key","maxInputTokens": 128000,"maxOutputTokens": 16384,"supportsToolCall": true,"supportsImages": true},{"id": "my-local-llm","name": "My Local LLM","vendor": "Ollama","url": "http://localhost:11434/v1/chat/completions","apiKey": "ollama","maxInputTokens": 8192,"maxOutputTokens": 2048,"supportsToolCall": true}],"availableModels": ["gpt-4o","my-local-llm"]}
availableModels.models configuration is correct.id, name, provider) are provided.피드백