Skip to content

Conversation

@richardpark-msft
Copy link
Member

@richardpark-msft richardpark-msft commented Dec 6, 2025

  • Re-enabling tests that weren't previously working with recordings. We'd temporarily disabled some of them while we were transitioning over to use the Stainless client, and they hadn't been re-enabled yet.
  • Some tests needed some changes to work consistently in recordings, so those have been fixed as well.
  • Some other tests were a bit inconsistent (but within spec) so those have been made more forgiving on results.

Fixes #25727

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes brittle assertions that checked for exact token counts in chat completion tests. The test now validates that token usage values are populated (greater than zero) rather than matching specific values, making the tests more resilient to model changes.

Key Changes:

  • Replaced exact token count assertions with checks that verify token counts are positive values
  • Removed model-specific hard-coded values that could cause test failures when models change

@richardpark-msft
Copy link
Member Author

/azp run go - azopenai

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft
Copy link
Member Author

/azp run go - azopenai

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft
Copy link
Member Author

/azp run go - azopenai

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft richardpark-msft changed the title [azopenai] Token counts aren't contractual for our client, no need to test for it. [azopenai] Fixing tests and re-enabling relevant recordings Dec 9, 2025
ripark added 2 commits December 9, 2025 01:26
…deprecated, and we don't have a replacement.

We can (and will) continue to test with recordings for now, just to make sure the code is correct.
@richardpark-msft
Copy link
Member Author

/azp run go - azopenai

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft richardpark-msft merged commit 4f9b2da into Azure:main Dec 9, 2025
25 checks passed
@richardpark-msft richardpark-msft deleted the openai-fix-tests branch December 9, 2025 19:50
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.

[azopenai] Fix pipeline failures

2 participants