gain reordering

parent fe509751
...@@ -463,17 +463,7 @@ async def dashboard_providers(request: Request): ...@@ -463,17 +463,7 @@ async def dashboard_providers(request: Request):
broker_status_map = await _load_coderai_broker_status_map() broker_status_map = await _load_coderai_broker_status_map()
if is_config_admin: if is_config_admin:
# Config admin: prefer live in-memory config when available # Config admin: read provider order from the saved JSON file
live_config = _config
if live_config is None:
from aisbf.config import config as global_config
live_config = global_config
if live_config and getattr(live_config, 'providers', None):
providers_data = {
provider_id: (provider.model_dump() if hasattr(provider, 'model_dump') else dict(provider))
for provider_id, provider in live_config.providers.items()
}
else:
config_path = Path.home() / '.aisbf' / 'providers.json' config_path = Path.home() / '.aisbf' / 'providers.json'
if not config_path.exists(): if not config_path.exists():
config_path = Path(__file__).parent / 'config' / 'providers.json' config_path = Path(__file__).parent / 'config' / 'providers.json'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment