Skip to content

feat!: Nest AI config payload types under LdAiConfigTypes#284

Merged
jsonbailey merged 3 commits into
mainfrom
jb/nest-ld-ai-config-types
Jun 5, 2026
Merged

feat!: Nest AI config payload types under LdAiConfigTypes#284
jsonbailey merged 3 commits into
mainfrom
jb/nest-ld-ai-config-types

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented Jun 5, 2026

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

  • Nest Message, Role, ModelConfig, and ProviderConfig under a static LdAiConfigTypes class, matching the DataStoreTypes / EventProcessorTypes pattern in the main server SDK.
  • Reduce naming collisions with common BCL types such as System.Net.Mail.Message while keeping the ModelConfig / ProviderConfig suffix aligned with sibling AI SDKs.
  • Keep all nested types in a single LdAiConfigTypes.cs file.

Breaking changes

Public payload type locations change from nested-under-LdAiConfig and DataModel.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 *Base type 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 LdAiConfigTypes container (Message, Role, ModelConfig, ProviderConfig), aligned with patterns like DataStoreTypes in the main server SDK.

Abstract bases are renamed LdAiConfigBaseLdAiConfig and LdAiConfigDefaultBaseLdAiConfigDefault (with LdAiConfigDefault extracted 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 of LdAiConfigTypes.cs.

Getting-started docs add a Config namespace import and show CompletionConfig with LdAiCompletionConfigDefault.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.

jsonbailey and others added 2 commits June 5, 2026 09:47
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>
@jsonbailey jsonbailey marked this pull request as ready for review June 5, 2026 14:53
@jsonbailey jsonbailey requested a review from a team as a code owner June 5, 2026 14:53
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>
Copy link
Copy Markdown
Contributor

@mattrmc1 mattrmc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I did NOT pull down to run locally

@jsonbailey jsonbailey merged commit ac7fd06 into main Jun 5, 2026
17 checks passed
@jsonbailey jsonbailey deleted the jb/nest-ld-ai-config-types branch June 5, 2026 17:51
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.

2 participants