Langfuse
Prompt and generation observability on TheRouter.ai traffic
Langfuse's OpenAI wrapper can ingest TheRouter.ai calls with minimal changes, making it easy to keep historical trace continuity during migration.
Overview
Use the TheRouter API endpoint and a model ID from the current model catalog. Framework capabilities and configuration differ; test your integration before production.
Installation
Install the required SDKs and keep your TheRouter.ai key in environment variables.
pip install langfuse openaiConfiguration
Configure the TheRouter API base URL and keep your API key on a trusted server.
import OpenAI from "openai";
const openai = new OpenAI({ baseURL: "https://api.therouter.ai/v1", apiKey: process.env.THEROUTER_API_KEY });The client configuration below connects to TheRouter, but does not by itself enable tracing. Configure and verify instrumentation separately with your observability provider.
Caveats
For production rollouts, pin SDK versions and validate model compatibility in staging before broad rollout.