Integrate custom models via BYOK in Qoder CLI and select models per task.
In addition to the standard models built into Qoder CLI, you can also integrate your own third-party models via BYOK (Bring Your Own Key): use your own API key to call a provider's model and use it in Qoder CLI just like a standard model.This page covers standard models, how to configure BYOK custom models, how to select models per task, and the related model alias mechanism. For basic model switching, see Models.
BYOK allows you to integrate third-party models using your own keys. Custom models are declared in the modelConfigs.customModels array of the configuration file, with each entry describing a single model.
apiKey is stored in plain text within the configuration file. Please be mindful of where you store it:
Do not write configurations containing keys into the project-level settings.json (<project>/.qoder/settings.json), as it will be committed to the repository, leading to key leakage.
Prefer placing BYOK configurations in the user-level ~/.qoder/settings.json, or the local-level settings.local.json within the project that is not committed to the repository.
If you need to share the structure across teams without exposing keys, combine it with environment variable references and store the actual keys in environment variables.
Enabling Environment Variable Masking (security.environmentVariableRedaction.enabled) can further reduce the risk of keys being exposed during tool execution. See Configuration Files and Application Order.
Internally, Qoder CLI uses "model aliases" to map different tasks to different model tiers. An alias is a named set of Model Configuration Presets that can inherit from other aliases via extends, and can be extended or overridden in modelConfigs.aliases / modelConfigs.customAliases.This mechanism allows internal tasks for different purposes (such as Title Generation, context compression, Quick Completion, etc.) to use lighter or more appropriate model tiers, thereby controlling costs while ensuring quality. Most users do not need to modify aliases; for fine-grained control, refer to the following key points:
modelConfigs.aliases: Built-in named presets that can be used wherever a model name is required, supporting inheritance via extends.
modelConfigs.customAliases: Custom presets that merge with built-in aliases and override items with the same name.
modelConfigs.overrides / customOverrides: Apply configuration overrides based on matching conditions (with the model or alias as the primary key); the most specific match takes precedence.