Commit 4403559
committed
Fix AttributeError when tool fields are None in OpenAI Agents SDK instrumentation
In get_response_tool_web_search_attributes() and get_response_tool_file_search_attributes(), hasattr() returns True for optional fields set to None, but accessing .__dict__ on None raises AttributeError. Added is not None guard for user_location, filters, and ranking_options fields.
Fixes #12851 parent 7ba4fb8 commit 4403559
File tree
2 files changed
+701
-0
lines changed- agentops/instrumentation/providers/openai/attributes
- tests/unit/instrumentation/providers/openai
2 files changed
+701
-0
lines changed
0 commit comments