Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds OpenRouter as a first-class provider across the shared auth registry, LLM provider configuration, AI runtime provider implementations, and CLI onboarding/auth flows.
Changes:
- Register a new OpenRouter OAuth/API-key auth provider in
libs/sharedand expose it through the provider registry. - Add
ProviderConfig::OpenRoutersupport (config parsing/helpers) and wire OpenRouter into the StakAI adapter/provider registry. - Add an OpenRouter provider implementation to
libs/ai, plus CLI templates/onboarding/auth updates to surface OpenRouter as a built-in provider.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/shared/src/oauth/registry.rs | Registers OpenRouter in the shared OAuth provider registry. |
| libs/shared/src/oauth/providers/openrouter.rs | Adds shared OAuth “API key” provider for OpenRouter header application/env var. |
| libs/shared/src/oauth/providers/mod.rs | Exposes the new OpenRouter OAuth provider module. |
| libs/shared/src/models/stakai_adapter.rs | Wires OpenRouter into inference config + direct provider registry building. |
| libs/shared/src/models/llm.rs | Adds ProviderConfig::OpenRouter and integrates it into helpers. |
| libs/ai/src/providers/openrouter/types.rs | Introduces OpenRouterConfig (key/base_url/referer/title). |
| libs/ai/src/providers/openrouter/provider.rs | Implements OpenRouter generate/stream/model listing using OpenAI-compatible endpoints. |
| libs/ai/src/providers/openrouter/mod.rs | Declares and exports the OpenRouter provider module. |
| libs/ai/src/providers/mod.rs | Exposes OpenRouter provider from the AI providers module. |
| libs/ai/src/client/config.rs | Adds openrouter_config to InferenceConfig and builder helpers. |
| libs/ai/src/client/builder.rs | Registers OpenRouter provider when configured. |
| cli/src/onboarding/config_templates.rs | Adds OpenRouter profile template + TOML preview support. |
| cli/src/onboarding/auth_flow.rs | Adds OpenRouter to onboarding provider selection/defaults/order. |
| cli/src/config/profile.rs | Cleans OpenRouter endpoints similarly to other providers. |
| cli/src/config/app.rs | Treats OpenRouter as a built-in provider for auth resolution. |
| cli/src/commands/auth/login.rs | Enables non-interactive API-key setup for OpenRouter and updates supported list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.