Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.95 KB

File metadata and controls

55 lines (37 loc) · 2.95 KB

Connect Langfuse to CometAPI

Canonical docs: https://apidoc.cometapi.com/integrations/langfuse

Use this guide to connect Langfuse to CometAPI by setting the base URL, API key, and model or provider options. Langfuse provides LLM observability, prompt management, playgrounds, and evaluation workflows. Configure a Langfuse LLM Connection with CometAPI when you want Langfuse Playground or LLM-as-a-Judge evaluations to call CometAPI models.

Prerequisites

Configure the integration

Create a Langfuse LLM connection

In Langfuse, open Project Settings → LLM Connections. Start the flow for adding an LLM API key.

Choose the OpenAI adapter

Select OpenAI as the provider. Langfuse uses this adapter for model providers that support the OpenAI API schema.

Enter CometAPI credentials

Configure the connection with these values:

Field Value
API key Your CometAPI API key
Base URL https://api.cometapi.com/v1
Custom model IDs One or more model IDs from the CometAPI Models page

If Langfuse exposes the base URL field under Advanced Settings, expand that section before saving the connection.

Test in Playground

In Langfuse Playground, select the CometAPI LLM connection and one of the configured model IDs. Send a short prompt to confirm that Langfuse receives a response.

Use CometAPI for LLM-as-a-Judge

Langfuse LLM-as-a-Judge evaluators can use the same LLM connection. Select the CometAPI connection in the evaluator configuration, then choose a model ID that supports tool calling if your scoring prompt requires structured extraction.

Use provider options only when the selected CometAPI model supports those request fields. For model discovery, use the CometAPI Models page or the /v1/models API.

Troubleshooting

The model is not visible in Langfuse

Add the exact CometAPI model ID to the custom model IDs list in the LLM connection. Langfuse does not discover every model automatically for custom OpenAI-compatible providers.

The request uses the wrong API path

Use https://api.cometapi.com/v1 as the base URL. Langfuse appends the OpenAI-compatible path for the selected adapter.

Evaluator calls fail

Confirm that the selected model supports the request features used by the evaluator, such as tool calling or JSON output.

Related resources