feat!: Nest AI config payload types under LdAiConfigTypes#284
Merged
Conversation
Group Message, Role, ModelConfig, and ProviderConfig into a static partial class to reduce naming collisions with common BCL types while keeping cross-SDK type names aligned. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep all nested config payload types in one static class instead of splitting them across partial class files. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the Base suffix from LdAiConfig and LdAiConfigDefault per Framework Design Guidelines. Update the docs-src getting-started example to use CompletionConfig and LdAiCompletionConfigDefault.Disabled. Co-authored-by: Cursor <cursoragent@cursor.com>
mattrmc1
approved these changes
Jun 5, 2026
Contributor
mattrmc1
left a comment
There was a problem hiding this comment.
Looks good. I did NOT pull down to run locally
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.
BEGIN_COMMIT_OVERRIDE
feat!: Move shared types nested in LdAiConfig into static LdAiConfigTypes — Message, ModelConfiguration, and ModelProvider
feat!: Move Role from LaunchDarkly.Sdk.Server.Ai.DataModel into LdAiConfigTypes
feat!: Rename LdAiConfig.ModelConfiguration to LdAiConfigTypes.ModelConfig and LdAiConfig.ModelProvider to LdAiConfigTypes.ProviderConfig
END_COMMIT_OVERRIDE
Summary
Message,Role,ModelConfig, andProviderConfigunder a staticLdAiConfigTypesclass, matching theDataStoreTypes/EventProcessorTypespattern in the main server SDK.System.Net.Mail.Messagewhile keeping theModelConfig/ProviderConfigsuffix aligned with sibling AI SDKs.LdAiConfigTypes.csfile.Breaking changes
Public payload type locations change from nested-under-
LdAiConfigandDataModel.Role(0.9.x) to nested-under-LdAiConfigTypes(e.g.LdAiConfigTypes.Message). Property shapes and wire-format JSON are unchanged.Test plan
dotnet test pkgs/sdk/server-ai/test/LaunchDarkly.ServerSdk.Ai.Tests.csproj -f net8.0(91 passed)Made with Cursor
Note
Medium Risk
Breaking change for consumers referencing old top-level or
*Basetype names; evaluation and tracking logic are largely mechanical renames with tests updated.Overview
Breaking API refactor for the server AI .NET SDK: prompt/model payload types move from top-level names into a static
LdAiConfigTypescontainer (Message,Role,ModelConfig,ProviderConfig), aligned with patterns likeDataStoreTypesin the main server SDK.Abstract bases are renamed
LdAiConfigBase→LdAiConfigandLdAiConfigDefaultBase→LdAiConfigDefault(withLdAiConfigDefaultextracted to its own file).ConfigFactory, completion config types, tracker factories, and XML docs now reference the nested types and renamed bases; standalone type files are removed in favor ofLdAiConfigTypes.cs.Getting-started docs add a
Confignamespace import and showCompletionConfigwithLdAiCompletionConfigDefault.Disabled. Property shapes and wire JSON are unchanged—only public type names/locations change.Reviewed by Cursor Bugbot for commit cb9f59c. Bugbot is set up for automated code reviews on this repo. Configure here.