Skip to content

Add OpenRouter as an OpenAI-compatible provider option - #630

Open
jaymin7359 wants to merge 1 commit into
abi:mainfrom
jaymin7359:feat/openrouter-support
Open

Add OpenRouter as an OpenAI-compatible provider option#630
jaymin7359 wants to merge 1 commit into
abi:mainfrom
jaymin7359:feat/openrouter-support

Conversation

@jaymin7359

Copy link
Copy Markdown

Summary

  • Closes Support OpenRouter #15 by documenting and wiring OpenRouter through the existing OpenAI base URL path.
  • Settings now has an OpenRouter shortcut that fills https://openrouter.ai/api/v1; paste the OpenRouter key in the OpenAI API key field.
  • The backend completes incomplete OpenRouter URLs (https://openrouter.ai/api/v1) and adds OpenRouter's recommended referer/title headers.

Test plan

  • Open Settings (local, not hosted) and click OpenRouter — the base URL field should become https://openrouter.ai/api/v1
  • Put an OpenRouter key in the OpenAI API key field, generate once, and confirm OpenAI-compatible variants go through OpenRouter
  • Confirm Anthropic/Gemini keys still call those providers directly
  • cd backend && poetry run pytest
  • cd backend && poetry run pyright

Made with Cursor

People already using a custom OpenAI base URL can now point at OpenRouter without guessing the /api/v1 path, and Settings documents the key + URL setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Support OpenRouter

1 participant