Skip to content

Comments

Remove OPENAI_API_KEY from recorded (playback) test steps#969

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/remove-openai-api-key
Draft

Remove OPENAI_API_KEY from recorded (playback) test steps#969
Copilot wants to merge 3 commits intomainfrom
copilot/remove-openai-api-key

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

  • Remove OPENAI_API_KEY env var from "Run recorded tests" step in .github/workflows/live-test.yml
  • Remove OPENAI_API_KEY env var from "Run recorded tests" step in .github/workflows/release.yml
  • Fix ResponsesTests.cs: replace 3 TestEnvironment.GetTestClient<ResponsesClient> calls with GetProxiedOpenAIClient<ResponsesClient>
  • Fix ResponsesToolTests.cs: replace 4 TestEnvironment.GetTestClient<ResponsesClient> calls with GetProxiedOpenAIClient<ResponsesClient>

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: joseharriaga <45773732+joseharriaga@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove OPENAI_API_KEY from recorded tests steps Remove OPENAI_API_KEY from recorded (playback) test steps Feb 22, 2026
Copilot AI requested a review from joseharriaga February 22, 2026 00:17
@joseharriaga joseharriaga added the live test Trigger: Begin a live test run on the associated pull request. label Feb 22, 2026
@joseharriaga
Copy link
Collaborator

@copilot Looking at the workflow runs for this PR, it looks like several of the Responses tests failed. They all have the same error in common: "Incorrect API key provided". Based on this error, it sounds like the tests were attempted to run in live mode rather than in playback mode, and because there is not API key available, the live service returned an error which makes sense. We must fix these tests to run fully in playback mode. By the looks of it, the problem is that these tests are calling TestEnvironment.GetTestClient<ResponsesClient> instead of GetProxiedOpenAIClient<ResponsesClient>, which means that they are skipping the recording framework instrumentation entirely. Please fix these tests accordingly.

…lient

Co-authored-by: joseharriaga <45773732+joseharriaga@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot Looking at the workflow runs for this PR, it looks like several of the Responses tests failed. They all have the same error in common: "Incorrect API key provided". Based on this error, it so...

Fixed in 6bacd1f. Replaced all 7 TestEnvironment.GetTestClient<ResponsesClient> calls with GetProxiedOpenAIClient<ResponsesClient> — 3 in ResponsesTests.cs and 4 in ResponsesToolTests.cs.

@joseharriaga joseharriaga added live test Trigger: Begin a live test run on the associated pull request. and removed live test Trigger: Begin a live test run on the associated pull request. labels Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live test Trigger: Begin a live test run on the associated pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants