feat: implement provider deactivation and enhance configuration updates

- Added a new function to deactivate the active provider without deleting credentials, facilitating smoother transitions between different provider types.
- Updated the model flow logic to ensure the active provider is correctly set in the configuration, including handling custom endpoints and OAuth providers.
- Improved error handling in the CLI to consistently format authentication error messages.
- Enhanced the model selection process to reflect the effective provider based on configuration and environment variables.
This commit is contained in:
teknium1
2026-02-20 18:17:55 -08:00
parent 77a3dda59d
commit a3d760ff12
3 changed files with 62 additions and 13 deletions

3
cli.py
View File

@@ -782,8 +782,7 @@ class HermesCLI:
timeout_seconds=float(os.getenv("HERMES_NOUS_TIMEOUT_SECONDS", "15")),
)
except Exception as exc:
from hermes_cli.auth import AuthError
message = format_auth_error(exc) if isinstance(exc, AuthError) else str(exc)
message = format_auth_error(exc)
self.console.print(f"[bold red]{message}[/]")
return False