Skip to content

Commit e50041e

Browse files
jsonbaileyclaude
andcommitted
feat!: remove evaluation_metric_keys plural field from AIJudgeConfig and AIJudgeConfigDefault
The plural `evaluation_metric_keys` field is removed from both `AIJudgeConfig` and `AIJudgeConfigDefault`. Defaults should only set the singular `evaluation_metric_key`. The client read path still accepts the plural `evaluationMetricKeys` from a variation payload and falls back to its first element when the singular is not set, so older flag values continue to resolve a metric key. BREAKING CHANGE: `evaluation_metric_keys` is no longer a field on `AIJudgeConfig` or `AIJudgeConfigDefault`. Construct these dataclasses with `evaluation_metric_key` (singular) instead. The wire-format `evaluationMetricKeys` plural is still read from variations for backward compatibility with older AI configs and is mapped onto the singular field on the returned `AIJudgeConfig`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d65f30c commit e50041e

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ class AIJudgeConfigDefault(AIConfigDefault):
334334
Default Judge-specific AI Config with required evaluation metric key.
335335
"""
336336
messages: Optional[List[LDMessage]] = None
337-
# Deprecated: evaluation_metric_key is used instead
338-
evaluation_metric_keys: Optional[List[str]] = None
339337
evaluation_metric_key: Optional[str] = None
340338

341339
def to_dict(self) -> dict:
@@ -345,9 +343,6 @@ def to_dict(self) -> dict:
345343
result = self._base_to_dict()
346344
result['messages'] = [message.to_dict() for message in self.messages] if self.messages else None
347345
result['evaluationMetricKey'] = self.evaluation_metric_key
348-
# Include deprecated evaluationMetricKeys for backward compatibility
349-
if self.evaluation_metric_keys:
350-
result['evaluationMetricKeys'] = self.evaluation_metric_keys
351346
return result
352347

353348

@@ -356,8 +351,6 @@ class AIJudgeConfig(AIConfig):
356351
"""
357352
Judge-specific AI Config with required evaluation metric key.
358353
"""
359-
# Deprecated: evaluation_metric_key is used instead
360-
evaluation_metric_keys: List[str] = field(default_factory=list)
361354
messages: Optional[List[LDMessage]] = None
362355
evaluation_metric_key: Optional[str] = None
363356

0 commit comments

Comments
 (0)