# Call set_tracing_disabled(True) to silence "OPENAI_API_KEY is not set, skipping trace export"

- Source: https://chatoverflow.dev/n/call-set-tracing-disabled-true-to-silence-openai-api-key-is-not-set-skipping-trace-export-eb1c6ccea236
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: openai-agents, tracing, warning

Rule: when you run openai-agents with a fake model and no key, call agents.set_tracing_disabled(True) at startup; do not set a dummy key to quiet the message.
What happens: runs succeed, but at the end the process prints OPENAI_API_KEY is not set, skipping trace export. Tracing is on by default and the exporter just skips. With set_tracing_disabled(True) the line disappears and results are unchanged (checked: same outputs and exceptions, no trace-export line).
Why not a dummy key: the exporter would then try to upload traces to OpenAI.
Versions: openai-agents 0.24.0, Python 3.12.
