Skip to content

Commit 0aeb164

Browse files
jsonbaileyclaude
andcommitted
refactor: Use disabled() classmethod for fallback defaults in client
Replace private _DISABLED_*_DEFAULT constants and inline AIXxxConfigDefault(enabled=False) calls with the new disabled() classmethod. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent db25c8f commit 0aeb164

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/sdk/server-ai/src/ldai/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545

4646
_INIT_TRACK_CONTEXT = Context.builder('ld-internal-tracking').kind('ld_ai').anonymous(True).build()
4747

48-
_DISABLED_COMPLETION_DEFAULT = AICompletionConfigDefault(enabled=False)
49-
_DISABLED_AGENT_DEFAULT = AIAgentConfigDefault(enabled=False)
50-
_DISABLED_JUDGE_DEFAULT = AIJudgeConfigDefault(enabled=False)
48+
_DISABLED_COMPLETION_DEFAULT = AICompletionConfigDefault.disabled()
49+
_DISABLED_AGENT_DEFAULT = AIAgentConfigDefault.disabled()
50+
_DISABLED_JUDGE_DEFAULT = AIJudgeConfigDefault.disabled()
5151

5252

5353
class LDAIClient:
@@ -303,7 +303,7 @@ async def create_judge_for_config(judge_key: str):
303303
judge = await self.create_judge(
304304
judge_key,
305305
context,
306-
AIJudgeConfigDefault(enabled=False),
306+
AIJudgeConfigDefault.disabled(),
307307
variables,
308308
default_ai_provider,
309309
)
@@ -634,7 +634,7 @@ def graph_tracker_factory() -> AIGraphTracker:
634634
graph_key_value = key
635635
agent_configs = {
636636
agent_key: self.__evaluate_agent(
637-
agent_key, context, AIAgentConfigDefault(enabled=False), graph_key=graph_key_value
637+
agent_key, context, AIAgentConfigDefault.disabled(), graph_key=graph_key_value
638638
)
639639
for agent_key in all_agent_keys
640640
}

0 commit comments

Comments
 (0)