Remove typed ProcessMessageAsync methods#1132
Open
christothes wants to merge 3 commits intoopenai:mainfrom
Open
Remove typed ProcessMessageAsync methods#1132christothes wants to merge 3 commits intoopenai:mainfrom
christothes wants to merge 3 commits intoopenai:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the client-typed ProcessMessage<TClient> / ProcessMessageAsync<TClient> pipeline extension methods and standardizes error message formatting across feature areas, addressing #1116.
Changes:
- Deleted the typed
ProcessMessage<TClient>/ProcessMessageAsync<TClient>overloads and switched custom protocol code to call the non-genericProcessMessageAPIs. - Updated TypeSpec + generated models to include
paramandtypein Responses/Evals error shapes. - Added mock tests ensuring formatted error messages consistently surface
type/code/paramand don’t swallow type-only payloads.
Reviewed changes
Copilot reviewed 18 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Miscellaneous/ErrorHandlingMockTests.cs | Adds regression tests validating consistent formatted error messages across feature areas. |
| src/Generated/OpenAIModelFactory.cs | Updates factory for ResponseError to accept param and kind (type). |
| src/Generated/Models/Responses/ResponseError.cs | Adds Param and Kind properties to the public Responses error model. |
| src/Generated/Models/Responses/ResponseError.Serialization.cs | Updates (de)serialization to read/write param and type. |
| src/Generated/Models/Evals/InternalEvalApiError.cs | Adds Param and Kind to the internal Evals error model. |
| src/Generated/Models/Evals/InternalEvalApiError.Serialization.cs | Updates Evals error (de)serialization for param and type. |
| src/Custom/Responses/ResponsesClient.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Moderations/ModerationClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Internal/ClientPipelineExtensions.cs | Deletes typed overloads and consolidates error parsing/formatting in the non-generic path. |
| src/Custom/FineTuning/Internal/Pagination/FineTuningJobCollectionResult.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/FineTuning/Internal/Pagination/AsyncFineTuningJobCollectionResult.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/FineTuning/FineTuningJob.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/FineTuning/FineTuningJob.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/FineTuning/FineTuningClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Files/OpenAIFileClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Evals/EvaluationClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Batch/CreateBatchOperation.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Batch/BatchClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Assistants/Internal/InternalAssistantThreadClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Assistants/Internal/InternalAssistantRunClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| src/Custom/Assistants/Internal/InternalAssistantMessageClient.Protocol.cs | Removes generic typed pipeline processing call sites. |
| specification/base/typespec/responses/models.tsp | Adds param and type to ResponseError schema. |
| specification/base/typespec/evals/models.tsp | Adds param and type to EvalApiError schema. |
Comment on lines
+46
to
+48
| public string Param { get; } | ||
|
|
||
| public string Kind { get; } |
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.
fixes #1116