refactor: collapse provider registry facades #356

Closed
opened 2026-05-11 21:02:04 +00:00 by barrettruth · 0 comments
Owner

Parent: #355

Problem

Provider definitions are centralized in src/core/provider-registry.ts, but code still imports through thin src/lib/geocoding-providers.ts and src/lib/nlp-models.ts facades. Some core code imports provider constants through lib, reversing the intended dependency direction.

Solution

Make core/provider-registry.ts the single provider-definition owner:

  • update app/core/tests to import provider definitions directly from the registry
  • remove thin compatibility facade files if no call sites remain
  • preserve Photon, Mapbox, Google Maps, Anthropic, OpenAI, and built-in NLP behavior
  • do not add old-token aliases or runtime compatibility shims

Acceptance criteria

  • No src/core/* file imports provider definitions from src/lib/*.
  • Provider behavior and settings UI are unchanged.
  • Provider/geocoding/NLP tests cover the preserved contract.
Parent: #355 ## Problem Provider definitions are centralized in `src/core/provider-registry.ts`, but code still imports through thin `src/lib/geocoding-providers.ts` and `src/lib/nlp-models.ts` facades. Some core code imports provider constants through `lib`, reversing the intended dependency direction. ## Solution Make `core/provider-registry.ts` the single provider-definition owner: - update app/core/tests to import provider definitions directly from the registry - remove thin compatibility facade files if no call sites remain - preserve Photon, Mapbox, Google Maps, Anthropic, OpenAI, and built-in NLP behavior - do not add old-token aliases or runtime compatibility shims ## Acceptance criteria - No `src/core/*` file imports provider definitions from `src/lib/*`. - Provider behavior and settings UI are unchanged. - Provider/geocoding/NLP tests cover the preserved contract.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta#356
No description provided.