Frameworks
Keep your framework—override the OpenAI-compatible (or Anthropic) base URL and use provider/model ids where the client speaks Chat Completions.
Unified vs passthrough for frameworks
| Framework pattern | Recommended surface |
|---|---|
LangChain / Vercel AI / CrewAI / ADK with provider/model | Unified /gateway/v1 (examples below) |
| OpenAI Agents SDK / Agno OpenAIChat / ADK→OpenAI only | OpenAI passthrough /gateway/openai/v1 — Passthrough |
| Claude Agent SDK / Agno Claude | Anthropic passthrough /gateway/anthropic |
| Cursor / Claude Code IDEs | Cursor / Claude Code |
Decision guide: Choose your surface.
LangChain
from langchain_openai import ChatOpenAI
import os
llm = ChatOpenAI(
model="anthropic/claude-sonnet-4-6",
api_key=os.environ["EXEMPLAR_API_KEY"],
base_url=os.environ.get(
"EXEMPLAR_GATEWAY_URL",
"https://production-api.exemplar.dev/gateway/v1",
),
)
llm.invoke("Summarize open incidents")import { ChatOpenAI } from "@langchain/openai";
const llm = new ChatOpenAI({
model: "anthropic/claude-sonnet-4-6",
apiKey: process.env.EXEMPLAR_API_KEY!,
configuration: {
baseURL:
process.env.EXEMPLAR_GATEWAY_URL ??
"https://production-api.exemplar.dev/gateway/v1",
},
});
await llm.invoke("Summarize open incidents");Vercel AI SDK
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const gateway = createOpenAI({
apiKey: process.env.EXEMPLAR_API_KEY!,
baseURL:
process.env.EXEMPLAR_GATEWAY_URL ??
"https://production-api.exemplar.dev/gateway/v1",
});
const { text } = await generateText({
model: gateway("openai/gpt-4o-mini"),
prompt: "One-line SRE tip",
});Claude Agent SDK
Point the Agent SDK at the Anthropic passthrough (/gateway/anthropic). The SDK speaks Anthropic Messages; set ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY (use your eis_* key).
import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
prompt: "Summarize open incidents",
options: {
model: "claude-sonnet-4-6",
env: {
...process.env,
ANTHROPIC_BASE_URL: "https://production-api.exemplar.dev/gateway/anthropic",
ANTHROPIC_API_KEY: process.env.EXEMPLAR_API_KEY!,
},
},
})) {
console.log(message);
}import os
from claude_agent_sdk import query, ClaudeAgentOptions
options = ClaudeAgentOptions(
model="claude-sonnet-4-6",
env={
"ANTHROPIC_BASE_URL": "https://production-api.exemplar.dev/gateway/anthropic",
"ANTHROPIC_API_KEY": os.environ["EXEMPLAR_API_KEY"],
},
)
async for message in query(prompt="Summarize open incidents", options=options):
print(message)TypeScript options.env replaces the process environment—spread process.env as shown. Python ClaudeAgentOptions(env=…) merges on top of the inherited environment. Enable the anthropic provider under Management → Providers.
Google ADK
Use ADK’s LiteLLM / OpenAI-compatible shim against /gateway/v1. LiteLLM expects an openai/ prefix before the gateway model id.
from google.adk.models.lite_llm import LiteLlm
import os
llm = LiteLlm(
model="openai/gemini/gemini-2.5-flash", # LiteLLM + gateway provider/model
api_base=os.environ.get(
"EXEMPLAR_GATEWAY_URL",
"https://production-api.exemplar.dev/gateway/v1",
),
api_key=os.environ["EXEMPLAR_API_KEY"],
)
# Attach llm to your ADK LlmAgent / root agent as usual.import { createOpenAI } from "@ai-sdk/openai";
// JS/TS ADK stacks that take an OpenAI-compatible provider:
const gateway = createOpenAI({
apiKey: process.env.EXEMPLAR_API_KEY!,
baseURL:
process.env.EXEMPLAR_GATEWAY_URL ??
"https://production-api.exemplar.dev/gateway/v1",
});
// model: gateway("gemini/gemini-2.5-flash") or gateway("openai/gpt-4o-mini")OpenAI Agents SDK
import { Agent, run } from "@openai/agents";
process.env.OPENAI_BASE_URL =
process.env.EXEMPLAR_GATEWAY_URL ??
"https://production-api.exemplar.dev/gateway/v1";
process.env.OPENAI_API_KEY = process.env.EXEMPLAR_API_KEY!;
const agent = new Agent({
name: "Platform copilot",
model: "openai/gpt-4o-mini",
instructions: "You are an SRE assistant.",
});
await run(agent, "Summarize open incidents");import os
from agents import Agent, Runner
os.environ["OPENAI_BASE_URL"] = os.environ.get(
"EXEMPLAR_GATEWAY_URL",
"https://production-api.exemplar.dev/gateway/v1",
)
os.environ["OPENAI_API_KEY"] = os.environ["EXEMPLAR_API_KEY"]
agent = Agent(
name="Platform copilot",
model="openai/gpt-4o-mini",
instructions="You are an SRE assistant.",
)
Runner.run(agent, "Summarize open incidents")CrewAI
from crewai import LLM, Agent, Crew, Task
import os
llm = LLM(
model="openai/gpt-4o-mini",
base_url=os.environ.get(
"EXEMPLAR_GATEWAY_URL",
"https://production-api.exemplar.dev/gateway/v1",
),
api_key=os.environ["EXEMPLAR_API_KEY"],
)
researcher = Agent(role="SRE Analyst", goal="Triage incidents", llm=llm)
crew = Crew(
agents=[researcher],
tasks=[Task(description="Summarize open alerts", expected_output="A short triage note")],
)
crew.kickoff()Related
- Choose your surface — Unified vs passthrough vs Cursor vs Claude
- Getting started — auth and quickstart
- Provider passthrough — OpenAI / Anthropic mounts plus Agents SDK, Agno, and Google ADK examples
- Frameworks with Marshal SDK —
harness.tools()for LangChain, Agno, Google ADK - Cursor IDE — IDE override via
/gateway/cursor - Claude Code — CLI / VS Code via
/gateway/anthropic
Last updated on