feat!: remove deprecated client method aliases and type aliases#179
Draft
jsonbailey wants to merge 1 commit intomainfrom
Draft
feat!: remove deprecated client method aliases and type aliases#179jsonbailey wants to merge 1 commit intomainfrom
jsonbailey wants to merge 1 commit intomainfrom
Conversation
Remove the following deprecated symbols ahead of the next release: - LDAIClient.config() -> use completion_config() - LDAIClient.create_chat() -> use create_model() - LDAIClient.agent() -> use agent_config() - LDAIClient.agents() -> use agent_configs() - LDAIConfigTracker.track_openai_metrics() -> use track_metrics_of with get_ai_metrics_from_response from ldai_openai - LDAIMetricSummary.duration -> use duration_ms - Chat class and ldai/chat/ shim package -> use ManagedModel - LDAIAgent type alias -> use AIAgentConfig - LDAIAgentConfig type alias -> use AIAgentConfigRequest - LDAIAgentDefaults type alias -> use AIAgentConfigDefault - AIConfig public re-export -> internal base class only BREAKING CHANGE: All deprecated method aliases, type aliases, and the ldai.chat shim package are removed. Migrate to the documented replacements listed above. Note: The plural-form ``evaluation_metric_keys`` field on AIJudgeConfig and AIJudgeConfigDefault is intentionally kept for wire-format compatibility with existing LD-side judge configurations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Removes the following deprecated symbols from the
launchdarkly-server-sdk-aipackage ahead of the next release. Each replacement has existed and been recommended for some time; this PR drops the back-compat shims.LDAIClient.config()LDAIClient.completion_config()LDAIClient.create_chat()LDAIClient.create_model()LDAIClient.agent()LDAIClient.agent_config()LDAIClient.agents()LDAIClient.agent_configs()LDAIConfigTracker.track_openai_metrics()LDAIConfigTracker.track_metrics_ofwithget_ai_metrics_from_responsefromldai_openaiLDAIMetricSummary.durationLDAIMetricSummary.duration_msChatclass +ldai/chat/shim packageManagedModelLDAIAgenttype aliasAIAgentConfigLDAIAgentConfigtype aliasAIAgentConfigRequestLDAIAgentDefaultstype aliasAIAgentConfigDefaultAIConfigfromldaiAIConfigis now internal-only (still defined as the base class inldai.models)The corresponding tests have been updated to call the replacement APIs. The two dedicated
track_openai_metricstests were removed (their behavior is covered bytrack_metrics_oftests).BREAKING CHANGE
This is a breaking release. Callers using any of the removed names must migrate to the replacements listed above. The
ldai.chatimport path is gone entirely —from ldai.chat import Chatwill now fail.Note on
evaluation_metric_keysThe plural-form
evaluation_metric_keysfield onAIJudgeConfigandAIJudgeConfigDefault(and the correspondingevaluationMetricKeyswire output) is intentionally kept for wire-format compatibility with existing LD-side judge configurations. It is not part of this removal.Test plan
make test— full unit test suite (server-ai, langchain, openai) passes (328 tests)make lint— mypy, isort, pycodestyle pass for all three packages