Skip to content

Conversation

@xzrderek
Copy link
Contributor

@xzrderek xzrderek commented Jan 27, 2026

Note

Moves the gateway from HTTP proxying to direct LiteLLM SDK usage with Langfuse OTEL, simplifying deployment and unifying tracing.

  • Proxy runtime: litellm.py now calls litellm.acompletion directly (supports SSE streaming), injects api_key, builds Langfuse metadata/tags (incl. UUID7 insertion_id), maps user_idtrace_user_id, and registers insertions in Redis after success
  • App wiring: On startup, sets LANGFUSE_* env and litellm.callbacks=["langfuse_otel"]; removes catch‑all proxy route and drops litellm_url from ProxyConfig
  • Container/compose: Dockerfile builds package locally and runs only the gateway; docker‑compose removes litellm-backend service and network; config updates to callbacks: ["langfuse_otel"]
  • Docs: README updated to reflect SDK‑direct flow, new env defaults (LANGFUSE_HOST), and simplified setup
  • Deps: Bump litellm (>=1.81,<1.82), add OTEL packages for proxy extra, update lockfile; remove langchain-fireworks extra
  • Tracing adapter: Generalize OTEL attribute parsing and provider‑agnostic *.choices extraction to set finish_reason

Written by Cursor Bugbot for commit 4a3cc04. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@xzrderek xzrderek merged commit acba670 into main Jan 27, 2026
20 of 33 checks passed
@xzrderek xzrderek deleted the derekx/use-litellm-sdk branch January 27, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants