diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-26 20:19:41 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-26 20:19:41 +0300 |
| commit | 1731126b52e406a300270c8fc8ac1061a4422b27 (patch) | |
| tree | c74768df49994aa9676cbc69ebfb461ed0422e01 /PLAN3.md | |
| parent | 0583b360ceb606b8e58f12a17f588bd27feeb117 (diff) | |
Refactor surface config to support multi-provider arrays
Diffstat (limited to 'PLAN3.md')
| -rw-r--r-- | PLAN3.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/PLAN3.md b/PLAN3.md new file mode 100644 index 0000000..c03405c --- /dev/null +++ b/PLAN3.md @@ -0,0 +1,24 @@ +# Parallel Provider/Model Comparison Plan + +Goal: allow configuring multiple provider:model pairs per surface so users can run a local and cloud LLM side-by-side for manual comparison. Completions should fan out and show one suggestion per configured entry; Hexai CLI should emit one response per entry; code actions remain single-provider. + +## Phase 1 – Configuration & Schema +- [x] Audit existing per-surface config to support arrays of provider:model entries (preserving current single-entry behavior by default). +- [x] Design updated TOML and env schema (e.g., `[[models.completion]] provider="openai" model="gpt-4o"`). +- [x] Define merge, validation, and backward-compatibility rules (single entry auto-wraps into list). + +## Phase 2 – Runtime Plumbing +- Extend appconfig/runtime store to emit ordered slices for multi-entry surfaces, including diff output. +- Update request-spec helpers to iterate across configured entries, building dedicated request specs (and caching clients per provider/model combo). +- Ensure logging/stats capture provider/model context per entry. + +## Phase 3 – Surface Implementations +- Completion: fan out requests sequentially, gather one suggestion per entry, and surface them distinctly to the editor (label with provider/model). +- CLI: stream or print separate responses per entry, with clear headers and stats per run. +- Code actions: keep single-provider flow but ensure config ignores extra entries with validation warnings. +- Add reasonable concurrency limits / timeouts so multi-provider usage stays responsive. + +## Phase 4 – UX & Validation +- Tests covering multi-entry parsing, diffing, and surface-specific behavior (mock providers to simulate dual responses). +- Update docs and example TOML with new array syntax, including env override strategy. +- Capture lessons/issues in scratchpad for follow-up polishing. |
