Skip to content

feat: Add openRouter integration#3281

Open
harxhist wants to merge 1 commit intosuperplanehq:mainfrom
harxhist:feat/open-router-integration
Open

feat: Add openRouter integration#3281
harxhist wants to merge 1 commit intosuperplanehq:mainfrom
harxhist:feat/open-router-integration

Conversation

@harxhist
Copy link
Contributor

Closes #3205

Description

This PR adds the OpenRouter integration to SuperPlane, so users can use a single API key to call many LLM providers (OpenAI, Anthropic, Google, etc.) via OpenRouter’s unified API.

It includes the base integration and three components:

  • Text Prompt (Action): Calls OpenRouter’s chat completions API with a user prompt and optional system message and returns a single assistant reply. Config: Model (required), Prompt (required), System message, Max tokens, Temperature. Output: id, model, text, usage, finishReason. Use cases: run summaries, PR analysis, incident summaries, docs.
  • Get Remaining Credits (Action): Returns total credits purchased and used for the account. No config; uses the base API key. Management API key required (standard keys get 403). Output: totalCredits, totalUsage, remaining. Use cases: cost tracking, low-credit alerts.
  • Get Current Key Details (Action): Returns key metadata for the authenticated API key. No config. Output: label, usage, usageDaily / usageWeekly / usageMonthly, limit, limitRemaining, limitReset, isFreeTier, isManagementKey, expiresAt (if any). Use cases: usage reporting, limit checks.

Implementation Notes

  • Authentication: API key in header Authorization: Bearer <key>. Requests go to https://openrouter.ai/api/v1/.
  • Model picker: Optional model resource type backed by GET /models for the Text Prompt component.
  • No OAuth or webhooks.

Loom Video

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have signed off my commits (git commit -s)

Signed-off-by: Harsh <harxhist@gmail.com>
@cursor
Copy link

cursor bot commented Feb 26, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 12.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@AleksandarCole AleksandarCole self-requested a review February 26, 2026 12:58
@AleksandarCole AleksandarCole self-assigned this Feb 26, 2026
@AleksandarCole AleksandarCole added the pr:stage-2/3 Needs to pass functional review label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:stage-2/3 Needs to pass functional review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OpenRouter] Base + Components

2 participants