fix(models): fix builtin provider detection and model matching (#120)
- Add glm-coding-plan to PROVIDER_ENV_MAP for proper env mapping - Rename GLMCodingPlan value from 'glm' to 'glm-coding-plan' (kebab-case) - Match custom providers against PROVIDER_PRESETS to reuse builtin models - Fix provider key matching in create/update (use entry.name consistently) - Clear stale base_url/api_key from config on provider create - Clear model config when all providers are removed - Add gateway restart on provider remove Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,8 +59,8 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
||||
models: ['glm-5.1', 'glm-5', 'glm-5v-turbo', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
||||
},
|
||||
{
|
||||
label: 'GLMCodingPlan',
|
||||
value: 'glm',
|
||||
label: 'GLM-Coding-Plan',
|
||||
value: 'glm-coding-plan',
|
||||
builtin: true,
|
||||
base_url: 'https://api.z.ai/api/anthropic',
|
||||
models: ['glm-5.1', 'glm-5', 'glm-5-turbo', 'glm-4.7', 'glm-4.5', 'glm-4.5-flash'],
|
||||
|
||||
Reference in New Issue
Block a user