Skip to content

Conversation

@waldekmastykarz
Copy link
Collaborator

Fixes creating .csv file in OpenAIUsageDebuggingPlugin. Closes #1460

@waldekmastykarz waldekmastykarz requested a review from a team as a code owner November 28, 2025 14:47
Copilot AI review requested due to automatic review settings November 28, 2025 14:47
Copilot finished reviewing on behalf of waldekmastykarz November 28, 2025 14:50
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 addresses issue #1460 by moving CSV file creation logic from InitializeAsync to AfterResponseAsync in the OpenAIUsageDebuggingPlugin. The change ensures the output file is created on-demand when the first OpenAI request is processed, rather than during plugin initialization.

Key changes:

  • Removed the InitializeAsync override that created the CSV file with headers during plugin initialization
  • Added file existence check and header creation logic directly in AfterResponseAsync before appending usage data

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@waldekmastykarz waldekmastykarz merged commit bb09f96 into dotnet:main Dec 1, 2025
10 checks passed
@waldekmastykarz waldekmastykarz deleted the fix-openusagedebug-file branch December 1, 2025 10:33
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.

[BUG]: Dev Proxy creates .csv files without intercepting results

2 participants