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.

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.

1 participant