Skip to content

Add OpenRouter BYOK model support - #9253

Closed
Vic563 wants to merge 2 commits into
warpdotdev:masterfrom
Vic563:dt/openrouter-byok-models
Closed

Vic563 wants to merge 2 commits into
warpdotdev:masterfrom
Vic563:dt/openrouter-byok-models

Conversation

@Vic563

@Vic563 Vic563 commented Apr 28, 2026 •

Copy link
Copy Markdown

Summary

  • Add OpenRouter as a recognized LLM provider for BYOK model selection.
  • Add an OpenRouter API key field to AI settings and refresh model choices after the key is saved.
  • Treat server-approved OpenRouter models as BYOK-capable in the model picker.

Note

This intentionally does not fetch arbitrary OpenRouter catalog models client-side. Warp's agent backend currently validates selected model IDs against the account's server-approved model list, so showing unsupported OpenRouter model IDs causes requests like /agent to fail with the requested base model ... is not allowed for your account.

Testing

  • cargo fmt --check
  • cargo check -p warp_graphql -p ai -p warp --lib
  • cargo clippy -p warp_graphql -p ai -p warp --lib -- -D warnings
  • Built and launched target/debug/warp-oss for manual validation.

Server API dependencies

  • Is this change necessary to make the client compatible with a desired server API breaking change?
  • Does this change rely on a new server API?
  • Is this change enabling the use of a server API on client channels that rely on the production server (e.g. WarpStable)?

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Warp [email protected]

Fetch OpenRouter models when users save an OpenRouter API key so BYOK users can select provider models from the existing model picker.

Co-Authored-By: Warp <[email protected]>
Made-with: Cursor
@cla-bot

cla-bot Bot commented Apr 28, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: dt232381.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Avoid showing arbitrary OpenRouter catalog entries until the backend can accept dynamic BYOK model IDs.

Co-Authored-By: Warp <[email protected]>
Made-with: Cursor
@cla-bot

cla-bot Bot commented Apr 28, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: dt232381.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@captainsafia captainsafia added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Apr 30, 2026 — with Warp Agent Staging
@Vic563 Vic563 closed this by deleting the head repository Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants