How-to Guides

How do I migrate from LiteLLM, Langfuse, or Helicone to Cognocient?

One URL change replaces your existing proxy. Cognocient works alongside or instead of LiteLLM, Langfuse, and Helicone — all your existing calls continue working with no code changes.

Goal: Swap your existing LLM proxy or observability tool for Cognocient — or run Cognocient alongside it — without changing your application code beyond the base URL.

Time: 15 minutes for the URL swap. Full attribution setup takes an additional 5–10 minutes.


What Cognocient adds vs. each tool

CapabilityHeliconeLiteLLMLangfuseCognocient
Proxy-based (URL change only)
Per-call cost tracking
Cost by feature / teamPartialPartial
Pre-call budget enforcementPartial
Model degradation on budget hit
Automatic waste detection
Investment vs. waste classification
Board-ready PDF reports
FOCUS 1.1 export
AI Efficiency Score
MCP / A2A agent attributionPartial

Migrating from Helicone

Helicone is also a proxy — migration is a single URL change.

Before (Helicone):

client = OpenAI(
    api_key="sk-openai-YOUR-KEY",
    base_url="https://oai.helicone.ai/v1",
    default_headers={"Helicone-Auth": f"Bearer {HELICONE_API_KEY}"},
)

After (Cognocient):

client = OpenAI(
    api_key="sk-cog-YOUR-PROXY-KEY",   # ← your Cognocient proxy key
    base_url="https://api.cognocient.com/v1",
)

Your OpenAI provider key moves to Cognocient Settings → Providers — enter it there once, and Cognocient injects it automatically on every forwarded call.

If you were using Helicone custom properties for attribution (e.g., Helicone-Property-Feature: chatbot), replace them with Cognocient's standard headers: X-Cost-Feature: chatbot and X-Cost-Department: engineering. The naming is different but the concept is identical.


Migrating from LiteLLM

Option A: Replace the LiteLLM proxy server with Cognocient

If you're running LiteLLM as a proxy server and pointing your app at it:

# Before (LiteLLM proxy)
client = OpenAI(
    api_key="sk-your-litellm-key",
    base_url="http://localhost:4000",
)
 
# After (Cognocient proxy)
client = OpenAI(
    api_key="sk-cog-YOUR-PROXY-KEY",
    base_url="https://api.cognocient.com/v1",
)

Option B: Keep using LiteLLM as a router, add Cognocient for cost attribution

If you depend on LiteLLM's model routing or fallback features, you can chain them: point LiteLLM at Cognocient as the upstream provider.

# LiteLLM config pointing at Cognocient
model_list = [
  {
    "model_name": "gpt-4o",
    "litellm_params": {
      "model": "openai/gpt-4o",
      "api_base": "https://api.cognocient.com/v1",
      "api_key": "sk-cog-YOUR-PROXY-KEY",
    }
  }
]

All calls routed through LiteLLM will pass through Cognocient's proxy for attribution and budget enforcement.


Migrating from Langfuse

Langfuse uses SDK-level tracing (wrapping SDK calls), not a proxy. Migration is a different pattern — you're adding a proxy URL rather than removing an SDK wrapper.

Before (Langfuse SDK tracing):

from langfuse.openai import openai   # Langfuse-wrapped client
 
response = openai.chat.completions.create(
    model="gpt-4o",
    messages=[...],
)

After (Cognocient proxy — keeps Langfuse for tracing):

from langfuse.openai import openai   # keep Langfuse if you want traces
 
# Point the underlying client at Cognocient
import openai as _openai
_openai.base_url = "https://api.cognocient.com/v1"
_openai.api_key  = "sk-cog-YOUR-PROXY-KEY"
 
response = openai.chat.completions.create(
    model="gpt-4o",
    messages=[...],
    # Cognocient attribution headers still work
    extra_headers={"X-Cost-Feature": "my-feature"},
)

You can run Cognocient and Langfuse simultaneously. Cognocient handles cost attribution, budget enforcement, and financial reporting. Langfuse handles prompt traces, LLM evaluation, and debugging. They are complementary — Cognocient is the finance layer, Langfuse is the engineering observability layer.


After switching — first 5 minutes checklist

  1. Make one test call and verify it appears in Dashboard → Live Calls within seconds
  2. Add your provider key in Settings → Providers if you haven't already (sk-openai-..., sk-ant-..., etc.)
  3. Add X-Cost-Feature headers to your top 3 features so spend is attributed immediately — see Tag Your First AI Call
  4. Set a budget for your most expensive feature as a safety net — see Set a Monthly Spending Limit

Related: Quickstart · Tag Your First AI Call · Attribution Headers

On this page