Configuring LLM connections for Langfuse evaluations and the playground

Connecting a self-hosted Langfuse to judge and playground models is a scoped, encrypted configuration decision. This page explains the options, setup order, security and cost controls to plan before rollout.

On this page

Configuring Langfuse LLM connections for judges and the playground

A self-hosted Langfuse needs model credentials before its LLM-as-a-judge evaluators or playground runs can call a model. In Langfuse's terms, an LLM connection is a stored set of provider details (the provider, the API key or endpoint, and the models it may use) that Langfuse uses when it calls a model on your behalf. Teams need one when they want Langfuse itself to run a model: scoring production traces or experiment output with a judge, or replaying a prompt in the playground. Tracing does not need one. Application traces reach Langfuse from your own code through the SDKs or the OpenTelemetry endpoint, and the application keeps its own model keys. Keeping these two paths separate is the first decision: the platform team should not give the tracing path judge credentials, and judge credentials should not be left to whoever happens to set up the first evaluator.

Before configuring anything, confirm which models the judges and playground need, which provider accounts or internal endpoints serve them, and who is allowed to add or change a connection. The core features, including tracing, prompt management and evaluations, are available in the MIT-licensed open source version of Langfuse, so no Enterprise license key is required to add these connections. The Enterprise license adds controls such as project-level RBAC roles, which decide who can manage settings in each project, so check the Langfuse license key documentation against your access model before you rely on role separation. Write down the owner of each provider account, the spend limit you accept for judge runs, and the projects that will share each connection.

The sections that follow cover organization versus project connections, supported providers, OpenAI-compatible internal endpoints, credential encryption and cost control. Each of these depends on the connection model, so settle the scope and ownership of your connections first. Confirm in your own instance which connection types and provider options your Langfuse version offers, because these change between releases and the release you run is the one that matters.

Organization versus project connections and who should own them

Central platform teams usually own the Langfuse deployment itself and the provider accounts behind it. For them, an organization-level connection is the natural place to hold credentials that many projects share, because rotation, spend and approved-model decisions happen once rather than in every project. The trade-off is that a change at this level reaches every project that depends on it, so the platform team needs a change process that the product teams can predict.

  • Single point of rotation: one credential update covers every project that uses the shared connection, which reduces the number of places a leaked key can live.
  • Approved model list: the platform team can decide which providers and internal endpoints are available for judges and the playground.
  • Spend visibility: shared connections make it easier to see judge and playground cost in one place, though attribution per project still needs confirming in the current docs.
  • Change control: agree in advance who may edit an organization connection and how users are told about model changes.
  • Access to the platform itself: whoever administers the instance should be deliberate about who can see or edit connections, since the scope options depend on your license tier.

Before relying on any of this, confirm in the current Langfuse documentation which connection scopes exist in your version and which features each scope supports.

Which provider and endpoint option fits each situation

This table compares hosted provider connections, OpenAI-compatible internal endpoints and private model servers across data residency, credential handling, model choice and operator effort. Read each row against your data classification and who will run the model endpoint, then confirm the supported provider list and endpoint compatibility in the Langfuse documentation for your version.

Decision factorHosted provider connectionOpenAI-compatible internal endpointPrivate model server
Data residencyJudge and playground prompts leave your network for the provider's hosting regionPrompts stay in your network if the gateway runs therePrompts stay on hardware you control, including air-gapped sites
Credential handlingProvider API key is stored in Langfuse and must be rotated in both placesGateway issues scoped keys that can be revoked without changing the provider accountUsually no external key, but access to the model server still needs authentication and network controls
Model choiceBroad catalog of hosted models, with availability set by the providerLimited to models the gateway routes to, so the mapping must be maintainedLimited to models you download and serve, and their licenses apply
Operator effortLow, but usage and cost reporting depends on the provider accountModerate, because the gateway, its routing and its logs need an ownerHighest, covering GPU capacity, model updates, patching and monitoring
Cost controlSpend is set by provider billing and your usage limitsBudgets and rate limits can be enforced at the gateway if it supports themSpend is mainly hardware and staff time, and it recurs with capacity
Confirm before choosingProvider is on the supported list for your Langfuse versionEndpoint follows the OpenAI API shape that your version acceptsServer exposes an API the supported connection type can call

Setting up a model connection step by step

This sequence takes a self-hosted Langfuse instance from a version and network check to a working judge model and playground run, with a verification check at each stage. The result is a connection you can trust for evaluations and that you can retest after every upgrade.

  1. Confirm the Langfuse version and SDK versions

    The platform team records the running Langfuse version and compares it with the latest release on the GitHub releases page. It also confirms the Python and JS/TS SDK versions in use, because newer SDK majors require Langfuse v4.59.0 or later. Done when the version, SDK versions and any Helm chart version are written into the change record, and every item is on a version the team is prepared to support.

  2. Confirm the network path to the model endpoint

    The infrastructure team checks which Langfuse containers make outbound calls to the model endpoint in your deployment, and confirms that they can reach it through proxies, egress rules and DNS. If the team cannot confirm which containers make the call, it tests from both the web and worker containers. Done when a request from each relevant container reaches the endpoint and returns a successful response.

  3. Create the scoped model connection

    An administrator creates the connection at the level the use case needs: organization for shared access, or a single project when only one team should use it. The administrator selects the provider or OpenAI-compatible endpoint, enters the credential and restricts the models offered. Done when the connection appears under the intended scope and a user in a different project cannot see or select it. Confirm how project roles apply to connection management in your version, since some role controls depend on the Enterprise license key.

  4. Create and run a test judge evaluator

    The evaluation owner creates a simple judge with a short rubric that returns a boolean or categorical score, and attaches it to a small sample of existing traces. This tests the connection from the judge path, not the playground. Done when the judge runs on the sample, the score appears on each target trace, and any error is visible in the evaluator's execution history rather than silently missing.

  5. Run a playground call with the connection

    A user with access to the project opens the playground, selects the new connection and sends a short prompt with a known expected answer. This confirms that the interactive path uses the same credential and endpoint as the judge. Done when the response returns, the call is stored as a trace, and the model name shown matches the model you selected in the connection.

  6. Check traces and cost data

    The team reviews the judge and playground traces to confirm that the model name, input and output tokens are recorded. It then checks whether cost is calculated, which depends on pricing entries that match the model name your endpoint returns. Internal or self-hosted models often need custom pricing, so confirm this with your cost tracking setup. Done when token counts are present on each trace and the cost figure matches what your team expects, or a pricing gap is logged for follow-up.

  7. Retest the connection after each upgrade

    After any Langfuse upgrade, the operator repeats the judge and playground checks before opening access to users. Upgrades can change how connections, models or evaluator settings behave, so the team reads the release notes and the upgrade guide for the target version first. Done when the test judge and playground call pass on the upgraded instance and the results are recorded alongside the version change.

How Langfuse stores model credentials and what operators must protect

Provider API keys saved on an LLM connection are sensitive secrets, and a self-hosted Langfuse instance stores them on your behalf so that evaluators and the playground can call judge and test models. Treat every connection as a credential vault entry, not as a configuration field. Before you add the first key, confirm in your Langfuse deployment documentation how connection credentials are encrypted at rest, which encryption key the instance uses, and where that key is supplied at startup. The ENCRYPTION_KEY setting is the name to look for, but verify its required format and length against the version you deploy, because the key is what makes the stored ciphertext readable.

The encryption key is an instance secret that you own. Keep it in your own secrets manager, inject it into the Web and Worker containers at runtime, and keep it out of Helm values files, Compose files and source control. Losing it can make stored connections unreadable, and a leaked key together with a copy of the database exposes every saved provider key. Ask the vendor or your deployment documentation how key rotation is handled for existing connections, whether re-encryption is a supported procedure, and what must be tested in a staging copy before you rotate in production. Record who approved each rotation and when it happened.

Access control decides who can read or change these connections. Confirm which roles can create, edit or view LLM connections at the organization and project level, and whether a project administrator can see a stored key after saving it or only replace it. Restrict edit rights to a small group, review that group when people change roles, and rotate the provider keys themselves on a fixed schedule, since the platform cannot tell whether a key was copied elsewhere. Also check that database backups, log exports and support bundles do not expose connection values, because a backup inherits the same sensitivity as the live data.

Security and operational risks to control before judges go live

Judge and playground connections send prompts, traces and credentials from your Langfuse deployment to model providers you may not fully control. The cards below name the risk, the control and the team that should own it before any judge model is enabled.

Scope keys to one project

A provider key stored at organization level is visible to every project that can reach it, so a judge built for one product can spend against another product's budget or read its outputs. Create a separate key per project or per use case where the provider allows it, and give each key a spending limit. Platform engineering owns key creation, and each product team owns its budget. Check that no project inherits a key it does not need.

Limit personal data in judge prompts

A judge sees the full observation it scores, so user names, emails, account numbers or health details in a trace are sent to the judge provider with the rubric. Decide which fields a judge template may include, and mask or drop sensitive fields before evaluation. The product owner signs off on the data each judge receives, and the privacy team checks that the provider's terms match your data classification.

Control egress from worker containers

The Langfuse Worker runs evaluations, so it is the component that calls judge endpoints. Restrict its outbound network path to the specific provider or internal gateway hosts it needs, and block the rest. Platform or network security owns the firewall or egress policy, and the operator should confirm which hosts the Worker reaches by testing from the Worker network segment, not from a laptop.

Rotate keys after staff changes

Provider keys configured by a person who later leaves the team remain valid until someone rotates them, and nothing in Langfuse ties a key to its creator. Keep a register of which connection uses which key, its owner and its project. Rotate keys on staff changes and on a fixed schedule set by your security policy. Platform engineering owns the register and rotation, and the security team reviews the register at each access review.

Keep credentials out of logs

Application logs, container output and error traces can capture authorization headers or endpoint configuration when a judge call fails. Confirm how the deployment logs failed model calls, redact authorization headers in any log shipper, and test a deliberately broken connection to see what appears in output. Platform engineering owns the logging configuration, and the security team owns the test evidence.

Review who can edit connections

Anyone who can add or change a model connection can point judges at an endpoint they choose, which can route trace content to an unapproved destination. Limit connection changes to a small group, and record who changed each one. Self-hosted Langfuse role controls beyond the basics are part of the Enterprise license, so confirm with your license holder which roles you can enforce before go-live. Platform engineering owns the approval step.

License key docs

How a judge call and a playground call reach your model endpoint

A playground request starts in the Langfuse Web container, while a judge evaluation is picked up and run by the Langfuse Worker. Both read the stored LLM connection from the self-hosted PostgreSQL database, then send the model call out through your network. Check that the egress path is the one you approved, because the provider or internal OpenAI-compatible endpoint sees the request that leaves the trust boundary.

Playground and judge calls share one stored connection and leave through a single egress point.

Limits to confirm in your environment

The connection setup depends on details that change between Langfuse versions, providers and network layouts. The cards below list what to confirm in your own environment before judge and playground models go live, and which supplied sources to read first.

Provider and model support for your version

Supported providers and model names depend on the Langfuse version you run, so confirm both against the release you deploy rather than copying a list from a blog post or an older install. Check each model you plan to use for judge scoring and playground testing, and record the version you validated. Re-check after every upgrade, since the connection options can change with the release.

Current release reference
v4.63.0
Langfuse releases

Internal gateway endpoint compatibility

An internal endpoint that speaks the OpenAI API format is not automatically compatible with every route Langfuse calls. Test the exact base URL, authentication header, model name mapping and streaming behavior from the Langfuse web and worker containers, not from your laptop. Ask your gateway team which endpoints are exposed and whether they accept the request shapes the playground and evaluators send.

Feature availability by license scope

Some governance features need an Enterprise license key, and the scope at which you set a connection may change what a team member can see or change. Confirm which settings are available at organization level, which at project level, and which require a license key in your deployment. Verify this with the current license key documentation before you design role boundaries around judge model access.

License key docs

Network egress from workers and web

Judge calls run from the Langfuse worker, and playground calls run from the web container, so both need outbound routes to every model endpoint you configure. Map which subnets, proxies and firewall rules apply to each container, and test a request from each one. Check whether your policy allows traffic to public provider endpoints or only to an internal gateway, and document the answer before the first evaluator runs.

Behavior after a major upgrade to v4

The v3 to v4 upgrade moves to an observations-first ClickHouse data model and has its own prerequisites, so existing connection settings and evaluator jobs should be retested after the change. Read the v4 upgrade guide, confirm your ClickHouse, PostgreSQL and Redis versions meet its requirements, and run a judge job and a playground request on a staging copy before you cut over.

Upgrade v3 to v4 guide

Spend limits at the provider account

Langfuse does not treat a missing budget as a stop, so judge runs and playground sessions can keep billing your provider account. Ask each provider whether it offers spending caps, per-key limits or usage alerts, and confirm whether your internal gateway can enforce them. Decide who owns the provider account, who receives billing alerts and how quickly a runaway evaluator can be paused.

Questions teams ask before configuring LLM connections

How much effort does configuring an LLM connection take?

For a single provider with a key you already hold, the connection itself is a short configuration task in the Langfuse settings. The effort grows with the number of providers, the number of projects that need access, and how much validation you run before judges and playground users depend on the models. Most of the time goes into confirming which models each team may use, testing that judge prompts return parseable scores, and agreeing who owns each credential. Ask any partner to split the work into configuration, testing and handover so you can see where the hours sit.

What drives the cost of setting up LLM connections?

The cost is mostly labor, and it is driven by scope rather than by the connection itself. The main drivers are the number of providers and internal endpoints, whether you need organization-level or project-level connections, how many teams and environments are involved, and whether private models need network paths through your firewalls. Your ongoing costs come from the model provider invoices for judge and playground calls, which recur with usage. Ask a quote to separate one-time setup labor from any retainer, and to state which model usage costs you will pay directly.

Can an internal team configure LLM connections without outside help?

Yes, if the team already runs the self-hosted Langfuse instance and has someone who can manage secrets and network routes. The configuration steps are documented and the team does not need a vendor partnership to use them. The harder parts are usually organizational: deciding which projects get which keys, who approves spend limits, and how judge model choices are recorded. A team with a working instance, a named key owner and a small test set can often do the core setup alone. Teams without those pieces often benefit from a short external review.

What do we need to provide before the work starts?

Plan to provide four things: network access from the Langfuse containers to each model endpoint, the people who own each provider key, a list of projects and teams that will use judges or the playground, and a small test dataset. The test dataset should include representative prompts and expected outcomes, with sensitive data removed. For internal OpenAI-compatible endpoints, you also need the base URL, the supported model names and the certificate chain your network uses. Confirm each item with the owners before scheduling, because missing access is the most common reason setup stalls.

How long does validation take after the connection is configured?

Validation time depends on how many models and projects you test, and on how many judge prompts you need to check. A reasonable validation pass confirms that each connection authenticates, that each model returns output in the format your evaluator expects, that errors are visible in the logs, and that spend limits behave as set. Build time into the plan for one round of fixes, because the first judge runs often reveal prompt or output format issues. Ask for the validation steps in writing so you can judge when the connection is ready for production judges.

How are provider credentials stored and who can see them?

Self-hosted Langfuse stores connection credentials in its database, and you should confirm how the instance encrypts them and which encryption key your deployment uses. Restrict who can create or edit connections, because anyone who can view a connection may be able to use its credential. Keep provider keys scoped to the minimum models and spend your teams need, and rotate them through a documented process. Confirm the encryption behavior, key storage and role settings for your version in the official self-hosting documentation before you approve the design.

When is a partner's help worth paying for?

A partner is most useful when several teams share one instance, when judge output drives release decisions, when private model endpoints sit behind controls that your team cannot change quickly, or when a security or compliance review will examine the setup. Partner help is also useful when you need someone to write the test plan, check the cost controls and document the design so auditors and new operators can follow it. DeployOpen plans, implements and documents self-hosted platforms in your own infrastructure, and provides fixed-scope engagements with the scope agreed in writing before work starts.

Official Langfuse sources for connection and SSO setup

Use the official Langfuse documentation next to this guide, because the platform's own pages define what a self-hosted instance can do and which settings need a paid key. Start with the Langfuse self-hosting overview to confirm the component layout your deployment will run, including the web and worker containers and the data stores that hold connection-related configuration. Check the version you are running against the Langfuse releases page, because connection settings and provider lists can change between releases. Before you rely on any setting described here, confirm it against the release notes and docs for your exact version.

Read the Langfuse authentication and SSO page before you decide who can create and edit model connections. It covers the supported identity providers, the option to disable password sign-in, and enforcement of SSO for specific email domains. Those settings determine who can reach the connection screens in the first place, so map your administrators and project members to identity groups in that step. Also confirm which roles can view or change connection credentials in your version, since the docs and the role model are the authority on that question.

Read the Langfuse license key documentation before you plan any connection governance that depends on Enterprise features. Project-level RBAC roles, audit logs and the organization management API are among the features that need an Enterprise license key, and they affect how you separate organization-wide connections from project connections and how you prove who changed them. If your design depends on one of these controls, ask Langfuse to confirm in writing which features your license covers. Keep the license key itself in your secrets manager and record who holds it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.