Add top-level ResponsesClient factory on OpenAIClient#1143
Merged
Conversation
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/6df79a07-f66c-485e-ad61-d7d77c0191f2 Co-authored-by: joseharriaga <[email protected]>
Copilot created this pull request from a session on behalf of
joseharriaga
April 30, 2026 22:33
View session
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/a169a081-6682-46e3-9af9-1463cb745882 Co-authored-by: joseharriaga <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a top-level ResponsesClient factory to OpenAIClient so callers can create a ResponsesClient while reusing the existing OpenAIClient pipeline/configuration (including endpoint and pipeline customizations).
Changes:
- Add
OpenAIClient.GetResponsesClient()and a private derivedTopLevelResponsesClientbridge to accessResponsesClient’sprotected internalpipeline constructor across assemblies. - Add smoke tests verifying
ResponsesClientcan be created fromOpenAIClientand that endpoint/pipeline options persist through the factory.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| OpenAI/src/Custom/OpenAIClient.cs | Adds GetResponsesClient() factory and the TopLevelResponsesClient constructor-bridge to reuse the existing pipeline. |
| tests/Responses/ResponsesSmokeTests.cs | Adds smoke tests covering factory creation and option persistence via a mock transport and pipeline policy. |
christothes
approved these changes
Apr 30, 2026
jsquire
approved these changes
May 1, 2026
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/e5aec732-37ec-4096-8e40-839e4dbdc010 Co-authored-by: joseharriaga <[email protected]>
Agent-Logs-Url: https://github.com/openai/openai-dotnet/sessions/69262021-4ca0-440a-8f66-3eb3695d05e3 Co-authored-by: joseharriaga <[email protected]>
ShivangiReja
approved these changes
May 1, 2026
joseharriaga
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/Invoke-CodeGen.ps1scripts/Export-Api.ps1