Integrations
TrueFoundry
Trace LLM calls routed through TrueFoundry's enterprise AI gateway in Muster.
TrueFoundry's AI Gateway routes LLM requests through a unified OpenAI-compatible endpoint with enterprise-grade rate limits, budgets, and analytics. Trace its calls in Muster via the OpenAI wrapper.
Setup
%pip install openai langfuseimport os
os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-..."
os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-..."
os.environ["LANGFUSE_BASE_URL"] = "https://app.getmuster.io"
os.environ["TRUEFOUNDRY_API_KEY"] = "your-token"
os.environ["TRUEFOUNDRY_BASE_URL"] = "https://your-control-plane.truefoundry.cloud/api/llm"from langfuse.openai import OpenAI
client = OpenAI(
api_key=os.environ["TRUEFOUNDRY_API_KEY"],
base_url=os.environ["TRUEFOUNDRY_BASE_URL"],
)Example
response = client.chat.completions.create(
model="openai-main/gpt-4o",
messages=[{"role": "user", "content": "Your query"}],
max_tokens=500,
)
print(response.choices[0].message.content)The integration captures token usage, latency, cost analytics, and the gateway's rate-limit and budget metadata.