finds.dev← search

// the find

OpenRouterTeam/ai-sdk-provider

★ 689 · TypeScript · Apache-2.0 · updated Sep 2026

The OpenRouter provider for the Vercel AI SDK contains support for hundreds of models through the OpenRouter chat and completion APIs.

The OpenRouter provider for Vercel's AI SDK v7, with pinned legacy installs for v5 and v6. It covers chat, completion, embedding, image and video models, plus an alpha evaluation model that routes experimental_evaluate calls through OpenRouter instead of the SDK's default gateway. It is aimed at people already on the AI SDK who want OpenRouter's model catalog behind the same interface.

- The README pins exact legacy versions for AI SDK v5 and v6, so someone on an older SDK can find the right install line without guessing.

- Request option precedence is spelled out (factory extraBody, then model extraBody, then typed settings, then providerOptions), and malformed evaluation questions throw before anything is sent or billed, which is the right order to fail in.

- The tests in e2e/issues are named after the issue they cover, so each odd behavior in the provider can be traced back to the report that caused it.

- Cost and token usage come back in providerMetadata, including the BYOK upstream cost breakdown, which makes per-call spend visible without a second API call.

- The evaluation section sits on an alpha endpoint and an experimental AI SDK function, and the README says the request and response shapes may change. Anyone building on decisionModel should expect to chase churn.

- The v7 line is ESM-only and requires Node 22 or newer. That is a hard stop for CommonJS codebases and older runtimes, and the README offers no path for those users beyond the v6 pin.

- Judging by example.env.e2e, the e2e suite needs live OpenRouter keys and spends real money on each run, so network-facing behavior is only as well covered as the most recent run with keys.

- The README is long and partly reads like a changelog pasted into reference docs. The evaluation section is dense enough that a first-time reader will skim past the contract details, and the heading 'Evaluation (Jev with AI SDK through OpenRouter)' looks unproofed.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →