Skip to content

feat: add OrcaRouter as a first-class model provider - #503

Open
zsanig22-dotcom wants to merge 1 commit into
truefoundry:mainfrom
zsanig22-dotcom:feat/orcarouter-provider
Open

feat: add OrcaRouter as a first-class model provider#503
zsanig22-dotcom wants to merge 1 commit into
truefoundry:mainfrom
zsanig22-dotcom:feat/orcarouter-provider

Conversation

@zsanig22-dotcom

@zsanig22-dotcom zsanig22-dotcom commented Aug 30, 2026

Copy link
Copy Markdown

Summary

TrueForge is "the open-source agent harness — the runtime layer that turns an LLM into a working agent", and its model layer already speaks "OpenAI, Anthropic, Google Gemini, and other catalog providers, or any OpenAI-compatible endpoint." This PR adds OrcaRouter as a first-class, named catalog provider, mirroring how the existing well-known providers (OpenAI, Anthropic, Together, Z AI, …) are wired end-to-end — not as an anonymous custom base URL.

OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding orcarouter as a first-class provider means TrueForge users can use that stack directly, without treating OrcaRouter as a bare custom endpoint. It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.

Changes

Every well-known provider in TrueForge touches five places, and this PR follows that same parallel structure for orcarouter:

Existing provider wiring (e.g. together) New orcarouter change
packages/trueforge-core/src/core/llm/VercelAILLM.tsVERCEL_AI_PROVIDER_NAMES entry + buildLanguageModel case (OpenAI-compatible adapter) orcarouter added to the provider registry and to the same compatibleModel case shared by Fireworks / Z AI / Together
packages/trueforge/src/schemas/modelProvider.tswellKnownProviderSchema with a default base_url OrcaRouterModelProviderSchema (https://api.orcarouter.ai/v1), registered in the ModelProviderManifest discriminated union
packages/trueforge/catalog/model-catalog.yaml — discovery presets orcarouter preset with its gateway-native models (orcarouter/auto, orcarouter/fusion, orcarouter/fusion-mini, orcarouter/fusion-flash)
docs/models.mdx — "Supported providers" table orcarouter row with the provider link
.changeset/*.md orcarouter-provider.md (minor for @truefoundry/trueforge and @truefoundry/trueforge-core)

No new dependencies: OrcaRouter speaks the OpenAI-compatible protocol, so it reuses the existing @ai-sdk/openai-compatible adapter that Fireworks and Together already go through. packages/trueforge-sdk is generated in CI from the OpenAPI spec, so this fork PR omits SDK regeneration per the contributing guide.

How was this tested?

  • pnpm --filter @truefoundry/trueforge-core typecheck and pnpm --filter @truefoundry/trueforge typecheck pass (includes the tests tsconfigs).
  • pnpm --filter @truefoundry/trueforge-core test — 388 tests pass, including VercelAILLM.model.test.ts and the manifest schema tests that iterate every VERCEL_AI_PROVIDER_NAMES entry.
  • pnpm --filter @truefoundry/trueforge test — 293 tests pass, including the catalog presets are configurable suite that PUTs every shipped catalog preset (the new orcarouter one included) and the "can configure every adapter the harness can build" schema test.
  • ESLint and Prettier pass on all changed files.
  • Live integration: a real streaming completion through the new buildLanguageModel orcarouter path against https://api.orcarouter.ai/v1 with orcarouter/fusion-flash returned a successful turn.

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally (see note below)
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note: pnpm lint:ci surfaces pre-existing @typescript-eslint/no-unsafe-* errors in packages/frontend/src/{App,LogoutButton,authSession}. These are untouched by this PR (the diff only touches trueforge-core, trueforge schemas/catalog, docs/models.mdx, and a changeset); ESLint on every changed file passes clean.


I'm an engineer on the OrcaRouter team. Feedback welcome — Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter


Note

Low Risk
Additive provider registration and catalog/docs only; reuses the existing OpenAI-compatible adapter with no changes to auth, persistence, or agent runtime logic.

Overview
Adds orcarouter as a named catalog provider so users can configure OrcaRouter with a default API base URL instead of a generic custom endpoint.

Wiring matches other OpenAI-compatible well-known providers: it is registered in VERCEL_AI_PROVIDER_NAMES, routed through the shared compatibleModel path in buildLanguageModel, and exposed via OrcaRouterModelProviderSchema (https://api.orcarouter.ai/v1) in the model-provider manifest union. The shipped catalog gains presets for orcarouter/auto, fusion, fusion-mini, and fusion-flash (with context/reasoning metadata where applicable). Docs and a minor changeset for @truefoundry/trueforge and @truefoundry/trueforge-core are included; no new dependencies.

Reviewed by Cursor Bugbot for commit 3bc7d42. Bugbot is set up for automated code reviews on this repo. Configure here.

Wire OrcaRouter into the existing well-known provider registry as an
OpenAI-compatible gateway: core adapter case, manifest schema with a
default base URL, shipped catalog presets, and docs entry.

Co-Authored-By: Claude <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3bc7d42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge Minor
@truefoundry/trueforge-core Minor

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

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