- AgentDetailModal: load real models from API with loading indicator;
fallback to current agent model when API unavailable; show count badge
- AgentCreateModal: remove broken provider-filter on models list;
add loading indicator and disabled state during fetch; show count badge
- gateway/orchestrator: add resolveModel() — validates desired model
against LLM API before use; auto-fallback to first available model
to prevent 401/404 errors (fixes glm-5 unauthorized in chat)
- gateway/orchestrator: add ModelWarning field to ChatResult struct
- gateway-proxy.ts: add modelWarning field to GatewayChatResult
- Chat.tsx: display modelWarning as amber badge next to model name
- todo.md: add Phase 16 section with bug fixes and tech debt notes