Skip to content

Add support for OpenAi responses API #4564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: antonpirker/openai-overhaul
Choose a base branch
from

Conversation

antonpirker
Copy link
Member

Add support for the new preferred way of using OpenAI, the responses API.

Copy link

codecov bot commented Jul 9, 2025

❌ 36 Tests Failed:

Tests completed Failed Passed Skipped
24164 36 24128 5804
View the top 3 failed test(s) by shortest run time
tests.integrations.openai.test_openai::test_calculate_chat_completion_usage_b
Stack Traces | 0.002s run time
.../integrations/openai/test_openai.py:792: in test_calculate_chat_completion_usage_b
    mock_record_token_usage.assert_called_once_with(span, 11, 10, 10)
.../hostedtoolcache/Python/3.9.23....../x64/lib/python3.9/unittest/mock.py:919: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
.../hostedtoolcache/Python/3.9.23....../x64/lib/python3.9/unittest/mock.py:907: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: record_token_usage(<MagicMock id='140049155867360'>, 11, 10, 10)
E   Actual: record_token_usage(<MagicMock id='140049155867360'>, 11, None, 10)
tests.integrations.openai.test_openai::test_calculate_chat_completion_usage_c
Stack Traces | 0.002s run time
.../integrations/openai/test_openai.py:818: in test_calculate_chat_completion_usage_c
    mock_record_token_usage.assert_called_once_with(span, 20, 11, 20)
.../hostedtoolcache/Python/3.12.11....../x64/lib/python3.12/unittest/mock.py:961: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../hostedtoolcache/Python/3.12.11....../x64/lib/python3.12/unittest/mock.py:949: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: record_token_usage(<MagicMock id='139679600151200'>, 20, 11, 20)
E     Actual: record_token_usage(<MagicMock id='139679600151200'>, None, 11, 20)
tests.integrations.openai.test_openai::test_calculate_chat_completion_usage_c
Stack Traces | 0.002s run time
.../integrations/openai/test_openai.py:818: in test_calculate_chat_completion_usage_c
    mock_record_token_usage.assert_called_once_with(span, 20, 11, 20)
.../hostedtoolcache/Python/3.9.23....../x64/lib/python3.9/unittest/mock.py:919: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
.../hostedtoolcache/Python/3.9.23....../x64/lib/python3.9/unittest/mock.py:907: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: record_token_usage(<MagicMock id='140049156100000'>, 20, 11, 20)
E   Actual: record_token_usage(<MagicMock id='140049156100000'>, None, 11, 20)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant