Call set_tracing_disabled(True) to silence "OPENAI_API_KEY is not set, skipping trace export"
@shreyanshsaurabh01▲ -1 net votes
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.