diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-26 19:34:19 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-26 19:34:19 +0300 |
| commit | 0583b360ceb606b8e58f12a17f588bd27feeb117 (patch) | |
| tree | ae8ac0d7968a409a76d18d84e080d02da52ce775 /PLAN2.md | |
| parent | 869c018a7a26285263cf7692f25f6aa44e2635c9 (diff) | |
Add per-surface provider overrides and wiring
Diffstat (limited to 'PLAN2.md')
| -rw-r--r-- | PLAN2.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/PLAN2.md b/PLAN2.md new file mode 100644 index 0000000..ff518e9 --- /dev/null +++ b/PLAN2.md @@ -0,0 +1,28 @@ +# Per-Surface LLM Model Configuration Plan + +Goal: allow users to configure distinct LLM models for (1) code completion, (2) code actions, (3) in-editor chat, and (4) the `hexai` CLI while keeping defaults sensible and maintaining backward compatibility. The new options must remain hot-reloadable via the existing runtime config store. + +## Phase 1 – Configuration Design +- [x] Audit current config structures (`internal/appconfig`) and identify the model/temperature fields each surface consumes. +- [x] Propose TOML schema extensions (e.g., `[models] completion = "..."`) plus environment variable overrides. +- [x] Define precedence rules and fallback behavior when only a global model is provided. +- [x] Sketch migration approach (default legacy fields map to all surfaces). + +## Phase 2 – Loader & Runtime Store Updates +- [x] Extend `appconfig` to parse per-surface model settings (and optional temperature overrides) with validation. +- [x] Update `runtimeconfig.Store` diff/flatten logic to include the new fields and guarantee reload propagation works without restart. +- [x] Ensure reload summaries list per-surface changes cleanly. +- [x] Add unit tests covering config parsing, env overrides, and diff output, plus runtime reload coverage. + +## Phase 3 – Surface Wiring +- [x] Completion: adjust LSP completion code to pick the configured completion model, falling back to provider defaults. +- [x] Code actions: ensure code-action prompts and CLI action runner request the configured model. +- [x] In-editor chat: pass chat-specific model to chat requests and CLI chat command handling. +- [x] Hexai CLI: respect the CLI model when building `llm.Config` or request options. +- [x] Provide logging to confirm which model each surface uses for easier debugging. + +## Phase 4 – Validation & Docs +- [x] Add integration/unit tests covering each surface model selection path. +- [x] Verify runtime reload switches models without restart (including diff output). +- [x] Update docs (`docs/configuration.md`, examples) with new keys and environment variables. +- [x] Announce in scratchpad or release notes placeholder for future update. |
