fix(providers): honor Codex proxy config consistently

This commit is contained in:
chengyongru
2026-07-15 20:01:48 +08:00
committed by chengyongru
parent ba86dccc8d
commit 681edfa6f3
6 changed files with 145 additions and 3 deletions
+8 -1
View File
@@ -2687,7 +2687,7 @@ def _set_oauth_provider_as_main(
from nanobot.config.loader import get_config_path, load_config, save_config, set_config_path
resolved_config_path = Path(config_path).expanduser().resolve() if config_path else None
if resolved_config_path is not None:
if resolved_config_path is not None and get_config_path() != resolved_config_path:
set_config_path(resolved_config_path)
console.print(f"[dim]Using config: {resolved_config_path}[/dim]")
@@ -2731,6 +2731,13 @@ def provider_login(
console.print(f"[red]Login not implemented for {spec.label}[/red]")
raise typer.Exit(1)
if config:
from nanobot.config.loader import set_config_path
resolved_config_path = Path(config).expanduser().resolve()
set_config_path(resolved_config_path)
console.print(f"[dim]Using config: {resolved_config_path}[/dim]")
console.print(f"{__logo__} OAuth Login - {spec.label}\n")
handler()
if set_main or model: