feat: add OpenRouter model provider - #395
Open
vivekascoder wants to merge 2 commits into
Open
Conversation
vivekascoder
requested review from
bhaveshpatel640,
chiragjn,
debajyoti-truefoundry,
govindavashishtha,
heerambavi1998,
kumarsks619,
qaifi-tf,
sajal-truefoundry,
sayan-truefoundry,
sr07asthana,
thesujai and
vinit-truefoundry
as code owners
August 21, 2026 11:45
🦋 Changeset detectedLatest commit: 6d1952a The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds openrouter support in connectors.
Closes #342
Preview of the changes it does:
Screen.Recording.2026-08-21.at.3.50.12.PM.mov
Changes
How was this tested?
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci,pnpm format:check,pnpm test:store:local,pnpm smokeandpnpm pack:dry.Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PR omits SDK regen.env.exampleupdated if configuration or behavior changed — not neededNote
Medium Risk
Introduces a new LLM provider path and an outbound OpenRouter catalog fetch on catalog list, plus request attribution headers. Failures fall back to shipped presets, but catalog listing now depends on a remote API.
Overview
Adds OpenRouter as a well-known model provider (OpenAI-compatible adapter, default
https://openrouter.ai/api/v1) so it can be configured like other built-in connectors.The catalog ships a small OpenRouter preset list, then
GETmodel-provider catalog syncs the live OpenRouter model list (5-minute TTL) via@openrouter/sdk. Empty/failed fetches keep the shipped presets. Runtime requests attach TrueForge app-attribution headers (HTTP-Referer,X-OpenRouter-Title).Settings and the draft model picker now use fuzzysort so large catalogs (especially OpenRouter) can be searched by name/id/provider, including a per-provider “available to add” search.
Reviewed by Cursor Bugbot for commit 6d1952a. Bugbot is set up for automated code reviews on this repo. Configure here.