Skip to content

test(openai-agents): Do not fail on new tool fields #16650

test(openai-agents): Do not fail on new tool fields

test(openai-agents): Do not fail on new tool fields #16650

Triggered via pull request March 10, 2026 08:31
Status Cancelled
Total duration 1m 7s
Artifacts

codeql-analysis.yml

on: pull_request
Matrix: Analyze
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 2 warnings
Analyze (python)
Canceling since a higher priority waiting request for CodeQL-webb/openai-agents/include-list exists
Analyze (python)
The operation was canceled.
CodeQL
Canceling since a higher priority waiting request for CodeQL-webb/openai-agents/include-list exists
Test reads from wrong span - ai_client_span2 assertion reads from tool_span: tests/integrations/openai_agents/test_openai_agents.py#L1354
The variable `ai_client_span2_available_tools` is extracted from `tool_span["data"]["gen_ai.request.available_tools"]` but is intended to validate `ai_client_span2` assertions (as shown by the variable name and surrounding assertions like `ai_client_span2["data"]["gen_ai.request.max_tokens"]`). This is a copy-paste error from line 1334-1335. The test will pass incorrectly by validating the wrong span's data, defeating the purpose of the test coverage for `ai_client_span2`.
Test reads from wrong span - verifies tool_span instead of ai_client_span2: tests/integrations/openai_agents/test_openai_agents.py#L1354
At lines 1354-1355, the test creates `ai_client_span2_available_tools` but reads from `tool_span["data"]["gen_ai.request.available_tools"]` instead of `ai_client_span2["data"]["gen_ai.request.available_tools"]`. This is a copy-paste error from lines 1334-1336. The assertion block at lines 1357-1359 is meant to verify `ai_client_span2` data but actually verifies `tool_span` data, meaning the actual `ai_client_span2.available_tools` is never validated.