Skip to content

Add tracing guide for non-OpenAI LLMs in docs/tracing.md #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2025

Conversation

UmmeHabiba1312
Copy link
Contributor

Add guide for free tracing with non-OpenAI LLMs. Fixes #1327

  • Updated docs/tracing.md.
  • Tested with mkdocs serve, code.

docs/tracing.md Outdated
@@ -39,7 +39,7 @@ By default, the SDK traces the following:
- Audio outputs (text-to-speech) are wrapped in a `speech_span()`
- Related audio spans may be parented under a `speech_group_span()`

By default, the trace is named "Agent workflow". You can set this name if you use `trace`, or you can configure the name and other properties with the [`RunConfig`][agents.run.RunConfig].
By default, the trace is named "Agent trace". You can set this name if you use `trace`, or you can can configure the name and other properties with the [`RunConfig`][agents.run.RunConfig].
Copy link
Member

Choose a reason for hiding this comment

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

"Agent workflow" is the correct default name.

Suggested change
By default, the trace is named "Agent trace". You can set this name if you use `trace`, or you can can configure the name and other properties with the [`RunConfig`][agents.run.RunConfig].
By default, the trace is named "Agent workflow". You can set this name if you use `trace`, or you can can configure the name and other properties with the [`RunConfig`][agents.run.RunConfig].

docs/tracing.md Outdated
set_tracing_export_api_key(os.getenv("OPENAI_API_KEY"))
gemini_api_key = os.getenv("GEMINI_API_KEY")

external_client = AsyncOpenAI(
Copy link
Member

Choose a reason for hiding this comment

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

The compatible API layer provided by other platforms are not perfectly compatible. So, we'd like to avoid recommending those endpoints. Instead, can you use code examples using LiteLLM + Chat Completions? Also, rather than mentioning a specific model / endpoint, we would like to simply show how to set up with a non-OpenAI model in general.

See also: https://openai.github.io/openai-agents-python/models/litellm/

model = "your model name here"
api_key = "your api key here"
model=LitellmModel(model=model, api_key=api_key),

docs/tracing.md Outdated
@@ -117,4 +152,3 @@ To customize this default setup, to send traces to alternative or additional bac
- [Okahu-Monocle](https://github.com/monocle2ai/monocle)
- [Galileo](https://v2docs.galileo.ai/integrations/openai-agent-integration#openai-agent-integration)
- [Portkey AI](https://portkey.ai/docs/integrations/agents/openai-agents)
- [LangDB AI](https://docs.langdb.ai/getting-started/working-with-agent-frameworks/working-with-openai-agents-sdk)
Copy link
Member

Choose a reason for hiding this comment

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

please revert this change

@seratch seratch added documentation Improvements or additions to documentation feature:lite-llm labels Jul 31, 2025
@seratch seratch enabled auto-merge (squash) August 1, 2025 07:20
@seratch seratch merged commit 32fe6cc into openai:main Aug 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature:lite-llm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Unclear Docs for Tracing with Non-OpenAI LLMs
2 participants