The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(hermes_cli): join remaining closer lines in setup flows
Teknium3709a7334eff
diff --git a/hermes_cli/main_platform_setup.py b/hermes_cli/main_platform_setup.pyindex 41e725b23a9..c4b214623b2 100644--- a/hermes_cli/main_platform_setup.py+++ b/hermes_cli/main_platform_setup.py@@ -337,8 +337,7 @@ _SYNC_GATED = {"pull": _sync_pull,"push": lambda ssc, identity: ssc.push_skills(identity=identity, message="hermes sync push"),"now": lambda ssc, identity: {"pull": ssc.pull_skills(identity=identity),- "push": ssc.push_skills(identity=identity, message="hermes sync now")},-}+ "push": ssc.push_skills(identity=identity, message="hermes sync now")}}def cmd_sync(args):diff --git a/hermes_cli/model_setup_flows.py b/hermes_cli/model_setup_flows.pyindex 925d5460f73..8acdfa6e068 100644--- a/hermes_cli/model_setup_flows.py+++ b/hermes_cli/model_setup_flows.py@@ -19,14 +19,12 @@ from hermes_cli.model_setup_flows_common import ( # noqa: F401_ensure_dict_section, _ensure_flow_api_key, _existing_api_key_for_model_flow, _finish_model,_load_config_model_section, _models_dev_merged, _oauth_gate, _persist_model, _pick_model_or_prompt,_print_numbered, _prompt_auth_credentials_choice, _prune_replaced_custom_model_config_credentials,- _run_login, _say, _show_curated,-)+ _run_login, _say, _show_curated)from hermes_cli.model_setup_flows_custom import _model_flow_custom, _model_flow_named_custom # noqa: F401from hermes_cli.model_setup_flows_azure import _model_flow_azure_foundry # noqa: F401from hermes_cli.model_setup_flows_bedrock import ( # noqa: F401BEDROCK_GEO_PREFIXES, bedrock_region_geo_prefix, bedrock_model_routable_from_region,- _model_flow_bedrock_api_key, _model_flow_bedrock,-)+ _model_flow_bedrock_api_key, _model_flow_bedrock)def _env_base_url(base_url_env: str) -> str:@@ -236,8 +234,7 @@ def _nous_verified_credentials(creds_or_none=None):"""Resolve Nous runtime credentials; on failure print the diagnosis (re-login when thesession expired) and return None."""from hermes_cli.auth import (- AuthError, PROVIDER_REGISTRY, _login_nous, format_auth_error, resolve_nous_runtime_credentials,- )+ AuthError, PROVIDER_REGISTRY, _login_nous, format_auth_error, resolve_nous_runtime_credentials)try:return resolve_nous_runtime_credentials()@@ -373,8 +370,7 @@ def _model_flow_openai_codex(config, current_model=""):from hermes_cli.codex_models import get_codex_model_idsif not _oauth_gate(bool(get_codex_auth_status().get("logged_in")), "OpenAI Codex", _login_openai_codex, argparse.Namespace(),- PROVIDER_REGISTRY["openai-codex"], recheck=lambda: get_codex_auth_status().get("logged_in"),- ):+ PROVIDER_REGISTRY["openai-codex"], recheck=lambda: get_codex_auth_status().get("logged_in")):return# Prefer the credential pool (where `hermes auth` stores device_code tokens),diff --git a/hermes_cli/model_setup_flows_bedrock.py b/hermes_cli/model_setup_flows_bedrock.pyindex 3b0f5705ee5..5028edbb29e 100644--- a/hermes_cli/model_setup_flows_bedrock.py+++ b/hermes_cli/model_setup_flows_bedrock.py@@ -119,8 +119,7 @@ _BEDROCK_PROFILE_PREFIXES = BEDROCK_GEO_PREFIXES + ("global.",)# picker pins its own region's profile rather than a us.* one._BEDROCK_RECOMMENDED_BASES = ("anthropic.claude-sonnet-4-6", "anthropic.claude-opus-4-6", "anthropic.claude-haiku-4-5", "amazon.nova-pro",- "amazon.nova-lite", "amazon.nova-micro", "deepseek.v3", "meta.llama4-maverick", "meta.llama4-scout",-)+ "amazon.nova-lite", "amazon.nova-micro", "deepseek.v3", "meta.llama4-maverick", "meta.llama4-scout")def _bedrock_text_model_ids(live_models: list, region: str) -> list[str]:diff --git a/hermes_cli/model_setup_flows_common.py b/hermes_cli/model_setup_flows_common.pyindex c58f0a46c28..1152f33f3bf 100644--- a/hermes_cli/model_setup_flows_common.py+++ b/hermes_cli/model_setup_flows_common.py@@ -232,8 +232,7 @@ def _prune_replaced_custom_model_config_credentials(base_url: str, *, provider_n# endpoint may occupy must be skipped or its own legacy pool gets pruned.active_pool_keys = {str(key).strip().lower()- for key in custom_provider_pool_key_candidates(base_url, provider_name=provider_name or None)- }+ for key in custom_provider_pool_key_candidates(base_url, provider_name=provider_name or None)}if not active_pool_keys:returnpools = read_credential_pool(None)