Skip to content

Support OPENAI_BASE_URL in tracing #997

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tabletcorry
Copy link

Agent tracing was hardcoded against the API endpoint, so any client using a proxy or alternate route to the OpenAI AI endpoint would encounter errors.

So this modify the tracing init code to use OPENAI_BASE_URL when present, if the local environment hasn't overridden anything.

Note: Because this code path is generally executed at import time, the environment variable needs to be set prior to importing any openai-agents code.

@seratch seratch added enhancement New feature or request feature:tracing labels Jul 8, 2025
@seratch seratch requested a review from rm-openai July 8, 2025 13:12
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants