You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(registry): add provider registry and defaults
- Introduce a registry system for AI providers with Factory, Register, Get, Has, Names
- Add default provider settings storage and per-provider API key requirement tracking
- Centralize provider creation via factories and register defaults for each provider
- Add helper methods GetDefaults and RequiresAPIKey to registry
- Extend config to support a Providers map with per-provider settings and limits
- Add GetProviderSettings on Config to fetch provider settings with defaults (env/flag overrides)
- Update provider wiring to use registry-based registration (phind, openai, google, anthropic, deepseek, ollama, openrouter)
- BREAKING CHANGE: migrates to registry-based provider loading; config format and wiring changed (Providers map required, direct provider fields deprecated)
-**Interactive Commit Splitting (`--interactive-split`)**: Gain granular control over your commits with chunk-based staging and commit message generation for partial commits.
67
68
-**Emoji Support (`--emoji`)**: Add a touch of visual flair to your commit history with automatically included emojis based on commit types.
68
69
-**Customizable Templates (`--template`)**: Tailor commit messages to your team's style with custom templates, incorporating dynamic values like branch names.
69
-
-**Multi-Provider AI Support**: Choose the best AI for each task by switching seamlessly between OpenAI, Google, Anthropic, DeepSeek, and Phind.
70
+
-**Multi-Provider AI Support**: Choose the best AI for each task by switching seamlessly between OpenAI, Google, Anthropic, DeepSeek, OpenRouter, and Phind.
70
71
-**Configurable and Filterable**: Adapt AI-Commit to your projects with customizable commit types and prompt templates. Filter lock file diffs for cleaner, AI-focused message generation and reviews.
71
72
-**Diff View in TUI**: Inspect complete Git diffs within the TUI (`l` key) for thorough pre-commit reviews.
72
73
-**Enhanced Splitter UI**: Benefit from improved interactive splitting with chunk selection inversion and clear status updates.
@@ -83,30 +84,51 @@ authorName: "Your Name"
83
84
authorEmail: "youremail@example.com"
84
85
85
86
provider: "phind"
86
-
87
-
phindApiKey: ""# Phind does not require an API key by default
88
-
phindModel: "Phind-70B"# Current Phind model is free
apiKey: ""# Ollama does not require an API key by default
123
+
model: "llama3"
124
+
baseURL: "http://localhost:11434"
125
+
limits:
126
+
diff:
127
+
enabled: false
128
+
maxChars: 0
129
+
prompt:
130
+
enabled: false
131
+
maxChars: 0
110
132
semanticRelease: false
111
133
interactiveSplit: false
112
134
enableEmoji: false
@@ -142,15 +164,10 @@ lockFiles: # Specify lock files to be ignored in diffs for commit messages and r
142
164
143
165
> **Note**: Command-line flags always take precedence over configuration file values. API keys can be set via environment variables or within `config.yaml`. You can now also customize the `promptTemplate` in this file to adjust the behavior of both commit message generation and code reviews.
144
166
145
-
API Keys via Environment Variables:
167
+
Environment Overrides
146
168
147
-
- `OPENAI_API_KEY`
148
-
- `GOOGLE_API_KEY`
149
-
- `ANTHROPIC_API_KEY`
150
-
- `DEEPSEEK_API_KEY`
151
-
- `PHIND_API_KEY`
152
-
153
-
---
169
+
- `${PROVIDER}_API_KEY`and `${PROVIDER}_BASE_URL`, with `PROVIDER` in uppercase.
* `--model`: Specific model choice per provider (e.g., `gpt-4`, `models/google-2.0-flash`, `claude-3-5-sonnet-latest`, `deepseek-chat`, `Phind-70B`, `llama2`).
186
-
* `--apiKey`, `--googleApiKey`, `--anthropicApiKey`, `--deepseekApiKey`, `--phindApiKey`: API keys for each provider.
187
-
* `--openaiBaseURL`, `--googleBaseURL`, `--anthropicBaseURL`, `--deepseekBaseURL`, `--phindBaseURL`, `--ollamaBaseURL`: Base URLs for each provider (Ollama defaults to http://localhost:11434).
0 commit comments