-
Notifications
You must be signed in to change notification settings - Fork 2
Add provider selection picker command #7
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add a :AICommitSelectProvider command that displays a picker allowing users to switch between configured AI providers.
Motivation
- Quick switching between providers without editing configuration
- Test different providers on the same commit
- Use cheaper models for simple commits, premium models for complex ones
- Better developer experience for multi-provider setups
Proposed Implementation
Command
:AICommitSelectProviderUI Behavior
- Reuse existing picker UI style (
ui/picker.lua) - Display list of available providers from
providers.list() - Show enabled/disabled status for each provider
- Highlight currently active provider
- Same keybindings:
j/knavigate,Enterselect,qcancel
Provider Selection Scope
Two options to consider:
Option 1: Session-scoped (simpler)
- Use
config.set("active_provider", selected) - Applies for current Neovim session only
- Reverts to configured default on restart
Option 2: Persistent across sessions
- Save selection to
~/.local/share/nvim/aicommits-provider.json - Load on plugin initialization
- Override configured default until changed again
- More complex but provides true persistence
Example Picker Display
Select AI Provider
● openai (gpt-4.1-nano)
anthropic (claude-3-5-haiku-20241022)
vertex (gemini-2.0-flash-lite)
[Enter] Select [q] Cancel [j/k] Navigate
Acceptance Criteria
-
:AICommitSelectProvidercommand implemented - Picker displays all registered providers
- Shows current active provider indicator
- Selection updates
active_providerconfig - Decide on session-scoped vs persistent behavior
- Works with existing picker UI style
- Handles case where no providers configured
- Tests for provider switching
- Documentation in README
Technical Notes
- Provider registry:
lua/aicommits/providers/init.lua - Existing picker:
lua/aicommits/ui/picker.lua - Config management:
lua/aicommits/config.lua(set()method) - Could display provider config (model name) in picker for context
Related
- Provider system: feat: extensible AI provider system for multiple API support #2
- Future providers: Add Anthropic Claude provider support #4 (Anthropic), Add Google Vertex AI provider support #5 (Vertex)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request