Every AI framework worth using converged on the same client shape: an OpenAI-compatible API, a base URL you can set, a key you can pass. LangChain, LlamaIndex, CrewAI, AutoGen, the Vercel AI SDK, Instructor — different orchestration philosophies, identical plumbing.
That convergence means the integration question is smaller than it looks. You do not integrate each framework with each provider. You point each framework at one endpoint, once:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://api.nrouter.ai/v1",
api_key="sk-nrouter-...",
model="nrouter/auto",
)
CrewAI's LLM takes a base_url the same way. LlamaIndex's OpenAI-compatible class takes an api_base. Instructor wraps a standard client, so it inherits whatever the client points at. The per-framework settings are collected in nRouter's AI Framework Integrations guide: https://nrouter.ai/docs/frameworks (Claude Code and Cursor included, for editor traffic).
What sits behind that endpoint is the part frameworks shouldn't have to reimplement per repo:
- Guardrails, server-side. PII detection and redaction, prompt-injection filtering, keyword blocks — executed before the request reaches a provider, identically for every framework.
- Budgets that bind. Per-key and per-organization RPM/TPM limits with hard spend ceilings. A looping crew hits its own ceiling, not the team's.
- Fallbacks underneath. Configured chains re-route when a provider returns admission failures or rate limits; the framework never handles the incident.
- A receipt on every call. Priced responses return the exact provider list rate in x-nr-request-cost (x-nr-cost-status reports exact or unpriced), zero token markup — so a LangChain eval and an Instructor extraction reconcile in one ledger.
Plus the housekeeping: centrally managed prompt templates injected at the gateway, and edge caching for repeat prompts.
None of this is an argument against frameworks. Orchestration is their job and they do it well. It is an argument against making each framework integration separately carry policy, budgets and failover — nine implementations of the same three ideas, drifting apart in nine repos.
Set the base URL. Keep the framework.
Top comments (0)