disable openai agents tracing by default#21038
Conversation
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
|
Documentation preview for b0cad1e is available at: More info
|
|
/review ✅ Review completed. Review OutputI've completed the PR review for PR #21038: disable openai agents tracing by default. SummaryThe PR adds a Issue FoundI identified 1 issue and left a review comment:
Review comment: #21038 (comment) |
Signed-off-by: bbqiu <bryan.qiu@databricks.com>
Signed-off-by: bbqiu <bryan.qiu@databricks.com>
Signed-off-by: bbqiu <bryan.qiu@databricks.com>
Related Issues/PRs
https://github.com/mlflow/mlflow/pull/18562/changes
openai/openai-agents-python#1387 (comment)
What changes are proposed in this pull request?
Warning
The CUJ of exporting traces to the openai platform when using Databricks LLMs does not work, even when you fill in the OPENAI_API_KEY env var because of schema misalignment:
Error when valid `OPENAI_API_KEY` and using Databricks LLM
``` ERROR:openai.agents:[non-fatal] Tracing client error 400: { "error": { "message": "Unknown parameter: 'data[0].span_data.usage.total_tokens'.", "type": "invalid_request_error", "param": "data[0].span_data.usage.total_tokens", "code": "unknown_parameter" } } ```How is this PR tested?
Databricks LLM CUJ, export to both MLflow and OpenAI (set
OPENAI_API_KEY):before and after dont work due to schema misalignment:
Databricks LLM CUJ, export only to MLflow
before:
after: no errors in the logs bc the openai agents sdk is disabled by default
Use OpenAI LLM, export to both MLflow and OpenAI
before and after both work. manual test after:

my openai traces console:
mlflow traces:

Does this PR require documentation update?
Does this PR require updating the MLflow Skills repository?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.