Lucidic integrates with LiteLLM via a custom callback bridge that maps LiteLLM events into Lucidic sessions/steps/events. This enables automatic tracking for any provider supported by LiteLLM.
import lucidicai as lai# Initialize with the LiteLLM provider enabledlai.init(session_name="LiteLLM Demo", providers=["litellm"]) # Configure LiteLLM (example: OpenAI-compatible model)import litellmlitellm.set_verbose = Falseresponse = litellm.completion( model="gpt-4o-mini", messages=[{"role": "user", "content": "Say 'hello from litellm'"}])# Event is auto-created. Close the session when done.lai.end_session()