You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please support OpenAI models (API) directly, as that opens up many options including ollama in a way compatible with opentelemetry. LiteLLM's telemetry support is callback based, so it requires manual setup, etc. If you used the OpenAI SDK or wrote direct HTTP calls, we could get better traces than we do today.
Right now, you can carefully re-route config to litellm, but it requires more dependencies and setup.
# LiteLLM uses different ENV variables for OpenAI and OpenTelemetry fields.os.environ["OPENAI_API_BASE"] =os.getenv("OPENAI_BASE_URL")
otlp_endpoint=os.getenv("OTEL_EXPORTER_OTLP_ENDPOINT") +"/v1/traces"otel_config=OpenTelemetryConfig(exporter="otlp_http", endpoint=otlp_endpoint)
litellm.callbacks= [OpenTelemetry(otel_config)]
...
agent=Agent(name=app_name, model=LiteLlm(model="openai/"+model), ...
Thanks for opening the discussion @codefromthecrypt. I'm wondering if this topic has been brought up with LiteLLM as well. If they had cleaner support for OTel and followed the semantic conventions, is there any benefit of using OpenAI SDK directly?
Hi @codefromthecrypt and thanks to everyone who participated in this thread.
We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.
If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.
Activity
codefromthecrypt commentedon Apr 10, 2025
cc @aabmass in case interested
docs: Enhanced Documentation for LangGraph and CrewAI (google#27)
aabmass commentedon Apr 30, 2025
Thanks for opening the discussion @codefromthecrypt. I'm wondering if this topic has been brought up with LiteLLM as well. If they had cleaner support for OTel and followed the semantic conventions, is there any benefit of using OpenAI SDK directly?
codefromthecrypt commentedon Apr 30, 2025
@aabmass made a comment here about the status quo as I understand it! BerriAI/litellm#9972 (comment)
klateefa commentedon Oct 7, 2025
Hi @codefromthecrypt and thanks to everyone who participated in this thread.
We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.
If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.
Thanks for your contribution and understanding!