Add OpenRouter as a new AI provider#12626
Conversation
|
@RemiKalbe is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eaa15c57d3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks a lot for contributing! At first glance it does look like a run-of-the-mill integration that might do the trick, but I didn't test it locally, nor am I aware of any gotchas to look out for. Hence, let's pass this on to @estib-vega for proper validation. PS: |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e05843155
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce2d869866
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
The fmt should pass now! Could you re run ci? |
|
Sorry for the wait! CI is running and I hope it will pass. Maybe from there we can get it merged, OpenRouter support seems very useful. |
|
Okay it should be good for real 😭 |
Adds checks to verify that retrieved API keys are not empty or solely whitespace. This prevents attempts to use invalid credentials, improving reliability.
- Removes leading and trailing whitespace from keys - Prevents validation errors caused by accidental spaces
|
Looks like a lot changed upstream since I opened this PR, specifically the new but CLI config system for AI providers ( |
|
Thanks again for updating it. I will do my best to get it reviewed. |
- Prefer setting the type at the key extraction level than casting - Deduplicate the git config keys for Open Router (prefer the exported ones from lib)
estib-vega
left a comment
There was a problem hiding this comment.
Looks good!
Thanks for adding this :)
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
🧢 Changes
Add OpenRouter as a new AI provider. OpenRouter exposes an OpenAI-compatible API, so the frontend reuses OpenAIClient with the OpenRouter base URL. The model name is a free-form text input since OpenRouter supports hundreds of models in
provider/modelformat (e.g.openai/gpt-4.1-mini).Frontend: new
OpenRoutervariant inModelKind, config keys, secret handle, service methods, settings panel with API key and model inputs, and two new tests.Backend: new
OpenRouterProviderfollowing the LM Studio pattern which implementsOpenAIClientProvider + LLMClient, reads API key from secret storage withOPENROUTER_API_KEYenv var fallback.CSP: added
https://openrouter.aitoconnect-src.🎫 Affected issues
Fixes: #12070
Preview