feat(llm): split LLM config into per-pipeline sections#575
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
+ Coverage 75.90% 76.18% +0.28%
==========================================
Files 63 63
Lines 18469 18638 +169
==========================================
+ Hits 14018 14200 +182
+ Misses 3784 3763 -21
- Partials 667 675 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9d36f78 to
8b7de15
Compare
Add [llm.chat] and [llm.extraction] TOML sub-sections so each pipeline can have its own provider, base_url, model, api_key, timeout, and thinking level. The base [llm] section serves as the default; non-empty override fields take precedence. - LLMChatOverride / LLMExtractionOverride types with per-pipeline env vars (MICASA_LLM_CHAT_*, MICASA_LLM_EXTRACTION_*) - ResolvedLLM type and ChatConfig() / ExtractionConfig() merge methods - Auto-detect provider when override has its own connection settings - Per-pipeline validation for provider, thinking, timeout - Deprecation migration: extraction.model -> llm.extraction.model, extraction.thinking -> llm.extraction.thinking (TOML + env vars) - extractionLLMClient() creates an independent client when extraction has its own provider, falls back to chat client otherwise - 25+ new config tests covering merging, overrides, deprecation closes #569 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Exercise the per-pipeline LLM config through the extraction overlay UI using sendExtractionKey keypresses rather than internal API calls: - Model picker shows extraction-specific model (not chat model) - Model picker falls back to chat model when no extraction model set - Model selection with independent provider rebuilds client correctly - Extraction client is independent when extraction has its own provider - Extraction client falls back to chat config for missing fields - extractionLLMClient() returns nil when no config exists closes #569
8b7de15 to
b0b5555
Compare
cpcloud
added a commit
that referenced
this pull request
Mar 19, 2026
## Summary - Add `[llm.chat]` and `[llm.extraction]` TOML sub-sections so each pipeline can use its own LLM provider, model, API key, base URL, timeout, and thinking level - Base `[llm]` section serves as the default; non-empty override fields take precedence per-pipeline - Deprecate `[extraction].model` and `[extraction].thinking` in favor of `[llm.extraction].model` / `[llm.extraction].thinking` with migration + warnings ## Test plan - [ ] Set up a config with `[llm]` only (no sub-sections) and verify both chat and extraction work as before - [ ] Set up `[llm.extraction]` pointing to a different cloud provider (e.g. Anthropic) while `[llm]` uses Ollama; verify extraction uses the cloud model and chat uses Ollama - [ ] Set the deprecated `[extraction].model` key and verify the deprecation warning appears on startup - [ ] Run `micasa config llm.extraction.model` and `micasa config llm.chat.provider` to verify new config keys are accessible closes #569 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[llm.chat]and[llm.extraction]TOML sub-sections so each pipeline can use its own LLM provider, model, API key, base URL, timeout, and thinking level[llm]section serves as the default; non-empty override fields take precedence per-pipeline[extraction].modeland[extraction].thinkingin favor of[llm.extraction].model/[llm.extraction].thinkingwith migration + warningsTest plan
[llm]only (no sub-sections) and verify both chat and extraction work as before[llm.extraction]pointing to a different cloud provider (e.g. Anthropic) while[llm]uses Ollama; verify extraction uses the cloud model and chat uses Ollama[extraction].modelkey and verify the deprecation warning appears on startupmicasa config llm.extraction.modelandmicasa config llm.chat.providerto verify new config keys are accessiblecloses #569
🤖 Generated with Claude Code