Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A command-line tool that uses AI to streamline your git workflow - generate comm
- **Git History Insights**: Understand what changed in any commit, branch, or your current work
- **Interactive Search**: Find and explore commits using fuzzy search
- **Change Analysis**: Ask questions about specific changes and their impact
- **Multiple AI Providers**: Supports OpenAI, Claude, Groq, Ollama, and more
- **Multiple AI Providers**: Supports OpenAI, Claude, Groq, Poe, Ollama, and more
- **Flexible**: Works with any git workflow and supports multiple AI providers
- **Rich Output**: Markdown support for readable explanations and diffs (requires: mdcat)

Expand Down Expand Up @@ -288,6 +288,7 @@ export LUMEN_AI_MODEL="gpt-5-mini"
| [OpenCode Zen](https://opencode.ai/docs/zen) `opencode-zen` | Yes | [see list](https://opencode.ai/docs/zen#models) (default: `claude-sonnet-4-5`) |
| [Ollama](https://github.com/ollama/ollama) `ollama` | No (local) | [see list](https://ollama.com/library) (default: `llama3.2`) |
| [OpenRouter](https://openrouter.ai/) `openrouter` | Yes | [see list](https://openrouter.ai/models) (default: `anthropic/claude-sonnet-4.5`) |
| [Poe](https://creator.poe.com/docs/external-applications/openai-compatible-api) `poe` | Yes | [see list](https://poe.com/api/models) (default: `claude-sonnet-4.5`) |
| [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) `vercel` | Yes | [see list](https://vercel.com/docs/ai-gateway/supported-models) (default: `anthropic/claude-sonnet-4.5`) |

## Advanced Configuration 🔅
Expand Down
2 changes: 2 additions & 0 deletions src/config/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub enum ProviderType {
Ollama,
OpencodeZen,
Openrouter,
Poe,
Deepseek,
Gemini,
Xai,
Expand All @@ -63,6 +64,7 @@ impl FromStr for ProviderType {
"ollama" => Ok(ProviderType::Ollama),
"opencode-zen" => Ok(ProviderType::OpencodeZen),
"openrouter" => Ok(ProviderType::Openrouter),
"poe" => Ok(ProviderType::Poe),
"deepseek" => Ok(ProviderType::Deepseek),
"gemini" => Ok(ProviderType::Gemini),
"xai" => Ok(ProviderType::Xai),
Expand Down
7 changes: 7 additions & 0 deletions src/config/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ pub const ALL_PROVIDERS: &[ProviderInfo] = &[
default_model: "anthropic/claude-sonnet-4.5",
env_key: "OPENROUTER_API_KEY",
},
ProviderInfo {
id: "poe",
provider_type: ProviderType::Poe,
display_name: "Poe",
default_model: "claude-sonnet-4.5",
env_key: "POE_API_KEY",
},
ProviderInfo {
id: "deepseek",
provider_type: ProviderType::Deepseek,
Expand Down
14 changes: 11 additions & 3 deletions src/provider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct LumenProvider {
provider_name: String,
}

/// Provider configuration for custom endpoint providers (OpenCode Zen, OpenRouter, Vercel)
/// Provider configuration for custom endpoint providers (OpenCode Zen, OpenRouter, Poe, Vercel)
struct CustomProviderConfig {
endpoint: &'static str,
env_key: &'static str,
Expand All @@ -48,8 +48,11 @@ impl LumenProvider {
model: Option<String>,
) -> Result<Self, LumenError> {
let (backend, provider_name) = match provider_type {
// Custom endpoint providers (OpenCode Zen, OpenRouter, Vercel) - use ServiceTargetResolver
ProviderType::OpencodeZen | ProviderType::Openrouter | ProviderType::Vercel => {
// Custom endpoint providers (OpenCode Zen, OpenRouter, Poe, Vercel) - use ServiceTargetResolver
ProviderType::OpencodeZen
| ProviderType::Openrouter
| ProviderType::Poe
| ProviderType::Vercel => {
let defaults = ProviderInfo::for_provider(provider_type);
let config = match provider_type {
ProviderType::OpencodeZen => CustomProviderConfig {
Expand All @@ -62,6 +65,11 @@ impl LumenProvider {
env_key: defaults.env_key,
adapter_kind: AdapterKind::OpenAI,
},
ProviderType::Poe => CustomProviderConfig {
endpoint: "https://api.poe.com/v1/",
env_key: defaults.env_key,
adapter_kind: AdapterKind::OpenAI,
},
ProviderType::Vercel => CustomProviderConfig {
// Trailing slash is required for URL joining to work correctly
endpoint: "https://ai-gateway.vercel.sh/v1/",
Expand Down