Skip to content

Feat/add openrouter provider#710

Open
shehab299 wants to merge 4 commits intomainfrom
feat/add-openrouter-provider
Open

Feat/add openrouter provider#710
shehab299 wants to merge 4 commits intomainfrom
feat/add-openrouter-provider

Conversation

@shehab299
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/shared and expose it through the provider registry.
  • Add ProviderConfig::OpenRouter support (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.

Comment thread libs/shared/src/models/llm.rs Outdated
Comment thread libs/shared/src/models/llm.rs
Comment thread libs/ai/src/providers/openrouter/provider.rs
Comment thread libs/ai/src/providers/openrouter/provider.rs
Comment thread libs/ai/src/providers/openrouter/provider.rs
shehab299 and others added 2 commits April 27, 2026 13:26
@shehab299 shehab299 requested a review from ahmedhesham6 April 27, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants