Where
arena/app.py — _selectors_interactive() (line ~596), MODEL_CATALOG_STATUS, _load_model_catalog() in arena/core/models.py.
Problem
Whether the entire Arena UI is interactive (model dropdowns, Send button, reasoning controls) is decided by string-parsing a human-readable status message:
def _selectors_interactive() -> bool:
return not MODEL_CATALOG_STATUS.lower().startswith("warning:")
_load_model_catalog() encodes readiness by prefixing its message with "Warning: ...". This is a stringly-typed sentinel: any future rewording of a status message (or a localized/reworded warning that drops the prefix) silently flips the app into "ready" mode without an API key, and conversely a success message that happens to start with "warning" would lock the UI. Nothing type-checks or tests the coupling between the message text in models.py and the parser in app.py — they live in different modules.
Suggested fix
Have _load_model_catalog() return an explicit readiness flag, e.g. (catalog, status_message, api_key, ready: bool) or a small dataclass/NamedTuple (CatalogState), and store that flag in the module state. _selectors_interactive() then returns the flag directly, and the status text becomes purely presentational. This also simplifies _openrouter_status_banner(), which currently piggybacks on the same string check.
Where
arena/app.py—_selectors_interactive()(line ~596),MODEL_CATALOG_STATUS,_load_model_catalog()inarena/core/models.py.Problem
Whether the entire Arena UI is interactive (model dropdowns, Send button, reasoning controls) is decided by string-parsing a human-readable status message:
_load_model_catalog()encodes readiness by prefixing its message with"Warning: ...". This is a stringly-typed sentinel: any future rewording of a status message (or a localized/reworded warning that drops the prefix) silently flips the app into "ready" mode without an API key, and conversely a success message that happens to start with "warning" would lock the UI. Nothing type-checks or tests the coupling between the message text inmodels.pyand the parser inapp.py— they live in different modules.Suggested fix
Have
_load_model_catalog()return an explicit readiness flag, e.g.(catalog, status_message, api_key, ready: bool)or a small dataclass/NamedTuple(CatalogState), and store that flag in the module state._selectors_interactive()then returns the flag directly, and the status text becomes purely presentational. This also simplifies_openrouter_status_banner(), which currently piggybacks on the same string check.