Skip to content

Add WRouter provider - #3897

Open
Jaykebc1 wants to merge 3 commits into
anomalyco:devfrom
Jaykebc1:add-wrouter-provider
Open

Add WRouter provider#3897
Jaykebc1 wants to merge 3 commits into
anomalyco:devfrom
Jaykebc1:add-wrouter-provider

Conversation

@Jaykebc1

@Jaykebc1 Jaykebc1 commented Jul 31, 2026

Copy link
Copy Markdown

Adds WRouter, an OpenAI-compatible AI gateway.

Provider

  • Endpoint https://wrouter.ai/v1 (OpenAI-compatible), env WROUTER_API_KEY, @ai-sdk/openai-compatible.
  • Logo uses currentColor only.

Models

12 headline models referencing canonical base_models (Anthropic Claude, OpenAI GPT, Google Gemini).

Pricing

Prices are WRouter's own list prices, taken from WRouter's public pricing API (https://wrouter.ai/api/pricing) and shown on https://wrouter.ai/pricing . As a gateway, WRouter sets its own USD rates, so some differ from the upstream providers' list prices (e.g. gemini-2.5-pro output is $5/M on WRouter). Values verified: claude-sonnet-5 $3/$15, claude-opus-4-8 $5/$25, gpt-4o $2.5/$10, gpt-4o-mini $0.15/$0.60, matching the underlying models.

Reasoning controls

  • GPT-5 / mini / nano: OpenAI reasoning_effort (minimal|low|medium|high), passed through the OpenAI-compatible endpoint.
  • Claude / Gemini: left as reasoning_options = [] — reasoning-control mapping through the OpenAI-compatible gateway is not yet documented per-model; will add once verified against WRouter's API docs.

WRouter (https://wrouter.ai) is an OpenAI-compatible AI gateway. Adds the
provider plus 12 headline models referencing canonical base models, with
WRouter's per-model pricing.
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/wrouter/logo.svg:3 - Check: New providers must ship a logo that uses currentColor with no fixed size or hardcoded colors. Why: The SVG hardcodes brand colors (#0C2E26, #5EF1A0) on strokes and fills, so it will not adapt to light/dark themes and fails the contribution logo guidelines (merge blocker). Action: Rewrite providers/wrouter/logo.svg to use currentColor only (no hardcoded fills/strokes), keep a square viewBox, and avoid fixed width/height.
  • [high] [violation] providers/wrouter/models/claude-haiku-4-5.toml:1 - Check: Provider models with reasoning = true must declare reasoning_options for that inference surface. Why: These entries inherit reasoning = true from their base_models but omit reasoning_options: claude-haiku-4-5, claude-opus-4-8, claude-sonnet-5, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gpt-5, gpt-5-mini, gpt-5-nano. Omission is not an audited empty list and blocks merge. WRouter is @ai-sdk/openai-compatible at /v1; comparable OpenAI-compatible gateways author explicit options or [] when no caller control is verified. Action: For each of those nine models, add provider-verified reasoning_options (with API syntax comments if nonstandard), or set reasoning_options = [] when the model reasons but no WRouter control is verified. Cite WRouter docs/API evidence in the PR body for any non-empty options.
  • [low] [possible mistake] providers/wrouter/models/claude-haiku-4-5.toml:4 - Check: Data-changing PRs should cite direct provider pricing/docs mapped to claims. Why: The PR body says pricing comes from “WRouter's public pricing” and underlying providers but does not link a WRouter pricing/docs URL or map rates to each model, so the new [cost] values cannot be reviewed from the PR alone. Action: Add first-party links (e.g. WRouter pricing and/or model/API docs) in the PR body and note what each URL supports for the listed costs.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [critical] [violation] providers/wrouter/logo.svg:3 - Check: New-provider logo must use currentColor with no hardcoded colors. Why: The SVG hardcodes brand colors (#0C2E26, #5EF1A0) on strokes/fills, so it will not adapt to light/dark themes and fails the contribution checklist blocker. Action: Rewrite logo.svg to use currentColor only (no fixed hex fills/strokes), keep a square viewBox, and omit fixed width/height.
  • [high] [possible mistake] providers/wrouter/models/gpt-5.toml:2 - Check: reasoning_options must match WRouter’s OpenAI-compatible request surface, not a blanket toggle. Why: All nine reasoning models claim [{ type = "toggle" }], but same-model peers on comparable OpenAI-compatible gateways (e.g. OpenRouter, LLM Gateway, FastRouter) expose effort for GPT-5/mini/nano, and Claude/Gemini peers commonly use effort and/or budget_tokens rather than toggle-only. A universal toggle is unsupported by the PR and contradicts those surfaces. Action: Verify each control against WRouter’s docs/API (exact request fields). Replace incorrect options with verified controls (and adjacent # API: ... comments where needed), or use reasoning_options = [] when no caller control is verified; cite the evidence in the PR body.
  • [low] [possible mistake] .pr-review/pull-request.json (PR body) - Check: Data-changing PRs should cite direct provider pricing/docs mapped to claims. Why: The body asserts WRouter USD pricing and cross-checks but links only the homepage/docs, with no pricing URL or per-claim mapping (e.g. gemini-2.5-pro output 5 vs common upstream 10). Action: Add first-party pricing (and reasoning-control) links and state what each supports.

…icing

- logo.svg: use currentColor only (no hardcoded brand colors), square viewBox.
- reasoning_options: GPT-5/mini/nano expose OpenAI reasoning_effort; Claude/
  Gemini via the OpenAI-compatible gateway left as [] (control not verified).
- Pricing is WRouter's own list price (see PR body).
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/wrouter/models/claude-sonnet-5.toml:5 - Check: Provider cost must match WRouter's actual list price for this model ID. Why: input = 3 / output = 15 matches Anthropic Claude Sonnet 4.5, not Claude Sonnet 5 (2 / 10 in providers/anthropic and OpenRouter). That looks like a wrong-generation copy rather than intentional WRouter markup. Action: Confirm against WRouter's pricing page; if this is Sonnet 5, correct to the listed rate (likely 2/10 if pass-through), or keep 3/15 only with a first-party citation that maps those figures to claude-sonnet-5.
  • [medium] [possible mistake] providers/wrouter/models/gemini-2.5-pro.toml:6 - Check: Provider cost must match WRouter's actual list price for this model ID. Why: output = 5 is half the Google/OpenRouter Gemini 2.5 Pro output rate (10); input 1.25 matches upstream. No other catalog entry uses 5 for this model, so this needs verification. Action: Confirm on WRouter's pricing page and correct if wrong, or cite the exact WRouter rate that supports output = 5.
  • [low] [possible mistake] providers/wrouter/provider.toml:1 - Check: Data-changing PRs should cite direct first-party pricing/docs mapped to claims. Why: The PR asserts WRouter list pricing and cross-checks vs upstream, but does not link a pricing or model catalog URL, so the two divergent rates above cannot be reviewed from the PR alone. Action: Add a first-party WRouter pricing (or models) URL in the PR body and note which models/rates it supports.

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.

1 participant