Skip to content

Commit ad852ef

Browse files
fix: go back to og agent_configs (our changes were frivalous)
1 parent ac0d339 commit ad852ef

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/agentex/lib/types/agent_configs.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from pydantic import BaseModel, Field, field_validator, model_validator
1+
from pydantic import BaseModel, Field, model_validator, validator
22

33

44
class TemporalWorkflowConfig(BaseModel):
@@ -37,9 +37,6 @@ class TemporalWorkerConfig(BaseModel):
3737
)
3838

3939

40-
# Removed CustomHeadersConfig - now using simple list[str] for header_allowlist
41-
42-
4340
class TemporalConfig(BaseModel):
4441
"""
4542
Simplified temporal configuration for agents
@@ -62,16 +59,15 @@ class TemporalConfig(BaseModel):
6259
description="List of temporal workflow configurations. Used when enabled=true.",
6360
)
6461

65-
@field_validator("workflows")
66-
@classmethod
67-
def validate_workflows_not_empty(cls, v: list[TemporalWorkflowConfig] | None) -> list[TemporalWorkflowConfig] | None:
62+
@validator("workflows")
63+
def validate_workflows_not_empty(cls, v):
6864
"""Ensure workflows list is not empty when provided"""
6965
if v is not None and len(v) == 0:
7066
raise ValueError("workflows list cannot be empty when provided")
7167
return v
7268

7369
@model_validator(mode="after")
74-
def validate_temporal_config_when_enabled(self) -> "TemporalConfig":
70+
def validate_temporal_config_when_enabled(self):
7571
"""Validate that workflow configuration exists when enabled=true"""
7672
if self.enabled:
7773
# Must have either workflow (legacy) or workflows (new)

0 commit comments

Comments
 (0)