HERMES-GIELIE/api
Nathan Esquenazi b327103885
fix: model dropdown missing custom/configured models (#116, #117)
Two related bugs in get_available_models():

1. cfg_base_url undefined for string model configs (#117):
   cfg_base_url was defined inside 'elif isinstance(model_cfg, dict)'
   but referenced unconditionally at line 506. If model config was a
   plain string, NameError crashed model detection. Fix: initialize
   cfg_base_url='' before the conditional.

2. Configured default_model missing from dropdown (#116):
   The OpenRouter branch substituted _FALLBACK_MODELS without checking
   if the user's model.default was in the list. Models like
   'openrouter/free' or custom local models were invisible. Fix: after
   building all groups, check if default_model is present. If not,
   inject it at the top of the matching provider group.

Closes #116, closes #117

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 08:29:40 -07:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py fix: correct 9 inaccurate type hints 2026-04-04 23:54:58 -07:00
config.py fix: model dropdown missing custom/configured models (#116, #117) 2026-04-05 08:29:40 -07:00
helpers.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
models.py fix: correct 9 inaccurate type hints 2026-04-04 23:54:58 -07:00
profiles.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
routes.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
state_sync.py fix: correct 9 inaccurate type hints 2026-04-04 23:54:58 -07:00
streaming.py security: fix env race, signing key, upload traversal, password hash (#106) 2026-04-04 22:25:08 -07:00
upload.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
workspace.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00