jnsahaj / lumen

Instant AI Git Commit message, Git changes summary from the CLI (no API key required)
MIT License
368 stars 12 forks source link

feat: add OpenRouter AI provider support #19

Closed lkonga closed 1 week ago

lkonga commented 2 weeks ago

Adds support for openrouter.ai as a new provider, allowing users to access various AI models

jnsahaj commented 2 weeks ago

Appreciate the addition :) I'll merge it once I get back to my laptop in a few days

jnsahaj commented 1 week ago

Hey, can you rebase your PR with main and resolve the conflicts?

lkonga commented 1 week ago

Done 👍

jnsahaj commented 1 week ago

Can you share the output of these commands to verify that the change is working as expected

cargo r -- -p "openrouter" -k "your-key" explain HEAD
cargo r -- -p "openrouter" -m "invalid-model" -k "your-key" explain HEAD
lkonga commented 1 week ago
cargo r -- -p "openrouter" -k "sk-or-v1-xxxx...xxxx" explain HEAD
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/lumen -p openrouter -k sk-or-v1-xxxx...xxxx explain HEAD`
┄Entity: Commit

commit c20307eb1b95d05d41d867e40f43c371889e6e52 | lkonga 2558702+lkonga@users.noreply.github.com | 2024-11-16 23:02:16

┄┄docs: update OpenRouter model information in README

✓ Done
Core Changes:

• Simplified the OpenRouter model reference in README by replacing specific model listings with a single link to all
  models
• Changed from separate Anthropic/OpenAI model links to a unified model list

Impact:

• More maintainable documentation as it doesn't need updates when specific models change
• Users now have a cleaner, single reference point to view all available OpenRouter models
cargo r -- -p "openrouter" -m "invalid-model" -k "sk-or-v1-xxxx...xxxx" explain HEAD
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/lumen -p openrouter -m invalid-model -k sk-or-v1-xxxx...xxxx explain HEAD`
┄Entity: Commit

commit c20307eb1b95d05d41d867e40f43c371889e6e52 | lkonga 2558702+lkonga@users.noreply.github.com | 2024-11-16 23:02:16

┄┄docs: update OpenRouter model information in README

error: API request failed with status code 400 Bad Request: invalid-model is not a valid model ID