Skip to content

[Bug]: LiteLLM/OpiK integration not working #1591

@jquinter

Description

@jquinter

What component(s) are affected?

  • Python SDK
  • Opik UI
  • Opik Server
  • Documentation

Opik version

  • Opik version: 1.6.5

Describe the problem

By following the integration guidelines on both Opik and LiteLLM, I am unable to succesfully connect these two platforms.

The observed issue is simple: despite having set up a valid Opik's api key (confirmed to work via another platform, and curl requests) and opik workspace, nothing is received at Opik.

Reproduction steps and code snippets

  • Use base docker image directly from ghcr.io/berriai/litellm:main-latest
  • Tried both a Google Cloud Kubernetes deployment (on GKE), as well as a container running locally on my laptop (using podman)
  • In both cases, these relevant environment variables were set: OPIK_API_KEY and OPIK_WORKSPACE
  • What I have checked inside the running pod container: if I run pip freeze|grep opik, nothing is returned (this is, python package for pip is not installed in base docker image)

Error logs or stack trace

No error or debug message is emmited at all, regarding tracking or sending messages.

I noticed just one ocurrence of the following, but it seems to be related to another different issue

INFO:     192.168.127.1:43289 - "POST /health/test_connection HTTP/1.1" 200 OK
22:21:25 - LiteLLM Proxy:ERROR: proxy_track_cost_callback.py:205 - Error in tracking cost callback - User API key and team id and user id missing from custom callback.
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/litellm/proxy/hooks/proxy_track_cost_callback.py", line 174, in _PROXY_track_cost_callback
    raise Exception(
        "User API key and team id and user id missing from custom callback."
    )
Exception: User API key and team id and user id missing from custom callback.

Healthcheck results

I am running hosted opik, no healthcheck applies.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions