Add support for large language model diagnostics in API and common modules #801
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.
Resolves #785
This pull request adds support for configuring and testing Large Language Model (LLM) diagnostics in the API and workspace diagnostic systems. The changes introduce new model and contract types to represent LLM settings, update test data generation, and refactor integration test helpers to handle these new structures.
Details
Large Language Model diagnostics support
LargeLanguageModelSettingsandLargeLanguageModelMessageSettings) toApiDiagnostic.cs,Diagnostic.cs, andWorkspaceDiagnostic.csfor serializing LLM diagnostic options, including logs, requests, and responses.ApiDiagnosticModel,DiagnosticModel) and their test generators to include an optionalLargeLanguageModelproperty and generation logic for LLM settings.Integration test refactoring
ApiDiagnostic.csandDiagnostic.csto use a newMapToDtofunction, which maps the extended model to DTOs including LLM settings, replacing the previousgetDtoimplementation.Test data generation
Results
Here is the screenshot of extracted properties from my APIM resource.
