fabro/lib
Bryan Helmkamp 05e6507095
refactor: unify model selection and legacy-model normalization
Consolidate duplicated resolution logic introduced by the provider-aware
model alias work:

- Add Catalog::resolve_selection (with SelectedModel and ready_provider)
  as the single home for the select -> passthrough -> default-fallback
  policy, replacing six hand-rolled copies across fabro-server,
  fabro-workflow, and fabro-llm.
- Move legacy [models] row resolution into a shared LegacyModelIndex and
  LegacyModelError in fabro-model; delete fabro-config's parallel
  implementation and its LlmNormalizationError enum, plus the now-unused
  builtin_* catalog helpers.
- Drop redundant client.resolve_request calls (and their full-request
  clones) from the completions and playground handlers.
- Remove the redundant resolve_provider_context round-trip in
  resolve_start_llm and make resolve_run_model return a ProviderId
  instead of a never-None Option.
- Replace the "<default model>" sentinel selector with a dedicated
  ModelSelectionError::NoDefaultModel variant.
- Add a CatalogRoute trait so provider adapters call
  self.api_model_id(...) instead of threading catalog/provider args.
- Delete the unused FromStr impl for ModelId; dedupe the CLI's
  id-or-alias predicate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:07:47 -04:00
..
crates refactor: unify model selection and legacy-model normalization 2026-07-23 11:07:47 -04:00
packages/fabro-api-client feat: make model aliases provider-aware 2026-07-23 10:12:25 -04:00