fix: model switch reset, custom provider resolution and base_url_env cleanup (#212)
* fix: reset entire config.model on model switch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve custom provider from CLI config and clean base_url_env on delete - When config.model.provider is "custom" (set by hermes CLI), match base_url + model against custom_providers to resolve custom:name - Clear base_url_env from .env when deleting a builtin provider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -143,6 +143,7 @@ export async function remove(ctx: any) {
|
||||
const envMapping = PROVIDER_ENV_MAP[poolKey]
|
||||
if (envMapping?.api_key_env) {
|
||||
await saveEnvValue(envMapping.api_key_env, '')
|
||||
if (envMapping.base_url_env) { await saveEnvValue(envMapping.base_url_env, '') }
|
||||
} else if (!envMapping?.api_key_env) {
|
||||
try {
|
||||
const authPath = getActiveAuthPath()
|
||||
|
||||
Reference in New Issue
Block a user