SDK catalog / Model Router
Model Router
alpha 0.3.0-alpha.4
Published release candidate for @wf/model-router@0.3.0-alpha.4. Follow the registry guide and review compatibility before installing.
Join the alpha Sign in with Google, then add your name. We review alpha access requests.
Choose an eligible model and apply request preferences across supported providers.
Availability and installation
This guide covers @wf/model-router version 0.3.0-alpha.4. Configure the BrightOps registry in your project’s .npmrc; keep the license key in your local or CI secret store:
@wf:registry=https://store.brightops.io/npm/
//store.brightops.io/npm/:_authToken=${WF_SDK_LICENSE_KEY}Install with npm install --save-exact @wf/model-router@0.3.0-alpha.4. Core installs automatically under the same Router license. A paid download preserves access to those exact versions for later rebuilds after cancellation; revocation blocks access. Installed applications do not contact this registry at runtime. Provider usage is separate from the SDK license. This remains a preview API.
The supported runtime, exported entry points, and compatibility commitments are listed in Compatibility. Check Release notes before upgrading.
Configure and use
Keep SDK settings in a YAML file and pass its path to the package’s public client. Keep credentials in application-owned secret storage; configuration examples contain references, not secret values.
- realtime.yaml — configuration example for this preview.
- model-router.yaml — configuration example for this preview.
The package owns model selection, provider adapters, retries and fallback. Your host supplies credentials matching the references in YAML:
import { createModelRouter } from '@wf/model-router'
const secrets = new Map([
['nvidia-api-key', process.env.NVIDIA_API_KEY],
['openrouter-api-key', process.env.OPENROUTER_API_KEY],
])
const router = createModelRouter('./model-router.yaml', {
resolveSecret: reference => secrets.get(reference),
})
const answer = await router.complete([{ role: 'user', content: 'Explain connection pooling.' }])
console.log(answer.content)This example makes provider requests when credentials are supplied. Environment variables here belong to the host’s credential adapter; all SDK settings come from YAML. Use the supported entry points listed in Compatibility.
Integration responsibilities
The application owns user authorization, credential storage, and permission to make external calls. Review the example before running it: a connected provider or an update action can have real effects. Preserve the package’s cancellation and disposal behavior where those APIs are exposed.
Preview compatibility is limited to the combinations actually recorded in Compatibility. An empty verified-combinations list is not a promise that every platform or client has been tested.