fix(auth): auto-select provider flagship after login, not first catalog route
After a direct Anthropic/OpenAI login that supplies no activated model, provider_model_to_select_after_auth fell back to matching_routes.first(). Live catalogs list claude-haiku-4-5 ahead of claude-opus-4-8, so an Anthropic API-key login auto-selected Haiku instead of the flagship default. When a provider has a curated flagship-first order (ALL_CLAUDE_MODELS / ALL_OPENAI_MODELS), pick the highest-ranked matching route; unranked providers (OpenAI-compatible, Copilot, ...) keep live-catalog order. Model ids are normalized (lowercase, strip [1m] and trailing -YYYYMMDD date) so dated catalog ids match canonical ids. Adds regression tests covering the live Anthropic bug, Claude OAuth, OpenAI, and unranked-provider catalog-order preservation.
J
jeremy committed
48adf15c2b4a6e3e11a85e426cd98db66b0beadc
Parent: a9a8282