OpenRouter LLM provider
OpenRouter as the LLM provider for a TypeScript project: an optional API key, model discovery with a ten-minute cache, routing settings, bounded retries with safe upstream errors, a scriptable local stub server for tests, and an eval report format with a dry-run checker.
Category: vendor
In your existing repository
Ask your agent to check compatibility, follow this fragment’s brief, and verify the resulting project. What happens next
- Applies to:
- typescript-api, react-router, typescript-cli
Add to your project
Paste the prompt into the coding agent working on your project.
View prompt
Or use the terminal
npx @steamfield/stacks add openrouter-ai| Step | Phase | Layer | Command |
|---|
No additional verify steps declared. Run the project’s existing verification after applying the brief.
Use with a new stack
Starting fresh instead? These stacks support this fragment.
- react-routeroptional
npx @steamfield/stacks new react-router --with openrouter-ai - typescript-clioptional
npx @steamfield/stacks new typescript-cli --with openrouter-ai - typescript-apioptional
npx @steamfield/stacks new typescript-api --with openrouter-ai
Alternatives in vendor
- PostHog analytics
PostHog analytics in the web client, disabled when no key is set so tests, CI, and sandboxes need no account, with a typed event catalog and a pre-init buffer.
Also applies to: react-router
Files
- docs/eval-report.md
- scripts/check-eval-dry-run.ts
- scripts/lib/eval-report.ts
Usage
Among stacks projects in the 28 days through 30 Oct 2026: 1,845 projects; Green rate: not enough runs yet.
Weekly projects by stack
Projects whose final fragment set included this fragment, grouped by stack.
- typescript-api
- typescript-api
Stacks projects per UTC week through 30 Oct 2026. Published stack counts only.
Data table
| Week ending | Stack | Projects |
|---|---|---|
| 5 Jul 2026 | typescript-api | 75 |
| 12 Jul 2026 | typescript-api | 145 |
| 19 Jul 2026 | typescript-api | 190 |
| 26 Jul 2026 | typescript-api | 245 |
| 2 Aug 2026 | typescript-api | 225 |
| 9 Aug 2026 | typescript-api | 265 |
| 16 Aug 2026 | typescript-api | 305 |
| 23 Aug 2026 | typescript-api | 340 |
| 30 Aug 2026 | typescript-api | 365 |
| 6 Sept 2026 | typescript-api | 330 |
| 13 Sept 2026 | typescript-api | 375 |
| 20 Sept 2026 | typescript-api | 430 |
| 27 Sept 2026 | typescript-api | 405 |
| 4 Oct 2026 | typescript-api | 440 |
| 11 Oct 2026 | typescript-api | 505 |
| 18 Oct 2026 | typescript-api | 515 |
| 25 Oct 2026 | typescript-api | 520 |
By stack
How often this fragment stays in a default composition, or gets attached as an option.
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Data table
| Stack | Projects | Role | Share |
|---|---|---|---|
| typescript-api | 1,845 | Optional · attached | 18% |
Green rate with and without it
This compares projects; it isn't an effect of the fragment.
Not enough runs in this breakdown yet.
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Often used with
Co-occurrence above the baseline, within a stack. Required fragment pairs are excluded.
Not enough runs in this breakdown yet.
Stacks projects · 28 days through 30 Oct 2026. Counts rounded to 5.
Computed 31 Oct 2026, through 30 Oct 2026. Numbers describe stacks projects, not the ecosystem.