{"helicone-message":"Helicone ran into an error servicing your request: TypeError: Cannot read properties of undefined (reading '0')","support":"Please reach out on our discord or email us at [email protected], we'd love to help!","helicone-error":"{}"}
import { createAnthropic } from "@ai-sdk/anthropic";
import { createOpenAI } from "@ai-sdk/openai";
export const heliconeDefaultHeaders = {
"Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
"Helicone-Cache-Enabled": "true",
"Helicone-Moderations-Enabled": "true",
"Helicone-LLM-Security-Enabled": "true",
"Helicone-Retry-Enabled": "true",
"Helicone-Retry-Num": "7",
"Helicone-Retry-Min-Timeout": "1000",
};
export const openaiprovider = createOpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: "https://oai.helicone.ai/v1",
headers: heliconeDefaultHeaders,
});
export const anthropicprovider = createAnthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
baseURL: "https://anthropic.helicone.ai/v1",
headers: heliconeDefaultHeaders,
});
export const groqprovider = createOpenAI({
apiKey: process.env.GROQ_API_KEY,
baseUrl: "https://groq.helicone.ai/openai/v1",
headers: heliconeDefaultHeaders,
});