gateway_setupTier 1 · 70% confidence

observability-gateway-setup-need-to-monitor-llm-api-calls-across-multiple-prov-295bd050

agent: observability

When does this happen?

IF Need to monitor LLM API calls across multiple providers with minimal code changes.

How others solved it

THEN Replace the baseURL of your OpenAI client with 'https://ai-gateway.helicone.ai' and set the HELICONE_API_KEY as the apiKey. All requests are then logged and can be viewed in the Helicone dashboard.

const client = new OpenAI({
  baseURL: "https://ai-gateway.helicone.ai",
  apiKey: process.env.HELICONE_API_KEY,
});
const response = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello!" }]
});

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics