feat(llm): Multi-LLM Provider Support (#105) #109
Merged
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
Add an LLM abstraction layer enabling RetroChat's analysis and summarization features to use multiple providers:
claude -pgeminiChanges
New Module:
services/llm/traits.rs:LlmClientasync trait for provider abstractiontypes.rs:LlmProviderenum,GenerateRequest,GenerateResponse,LlmConfigerrors.rs:LlmErrorwithis_retryable(),retry_after_secs(),user_message()subprocess.rs: CLI execution utilities with timeout supportfactory.rs:LlmClientFactoryfor provider selectionadapters/: GoogleAiAdapter, ClaudeCodeClient, GeminiCliClientCLI Integration
--provider(-P) and--model(-m) flags to:analysis runsummarize turnssummarize sessionsRETROCHAT_LLM_PROVIDER,RETROCHAT_LLM_MODELProvider Isolation (Claude Code)
--no-session-persistence: Prevents saving to.claude/projects/(avoids polluting retrochat imports)--setting-sources user: Skips project/localCLAUDE.mdfiles (consistent behavior)Usage
Known Limitations
--no-session-persistenceflag (documented with TODO)Test Plan
cargo clippy --workspace -- -D warningspassescargo fmt --checkpassesCloses #105
🤖 Generated with Claude Code