Skip to content

Commit 9d89e73

Browse files
committed
Updated config model with error analyzer configuration
1 parent 5c8b3de commit 9d89e73

File tree

1 file changed

+23
-0
lines changed
  • lib/idp_common_pkg/idp_common/config

1 file changed

+23
-0
lines changed

lib/idp_common_pkg/idp_common/config/models.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,36 @@ def parse_max_workers(cls, v: Any) -> int:
302302
return int(v)
303303

304304

305+
class ErrorAnalyzerParameters(BaseModel):
306+
"""Error analyzer parameters configuration"""
307+
308+
max_log_events: int = Field(default=5, gt=0, description="Maximum number of log events to retrieve")
309+
time_range_hours_default: int = Field(default=24, gt=0, description="Default time range in hours for log searches")
310+
311+
@field_validator("max_log_events", "time_range_hours_default", mode="before")
312+
@classmethod
313+
def parse_int(cls, v: Any) -> int:
314+
"""Parse int from string or number"""
315+
if isinstance(v, str):
316+
return int(v) if v else 0
317+
return int(v)
318+
319+
305320
class ErrorAnalyzerConfig(BaseModel):
306321
"""Error analyzer agent configuration"""
307322

308323
model_id: str = Field(
309324
default="us.anthropic.claude-sonnet-4-20250514-v1:0",
310325
description="Bedrock model ID for error analyzer",
311326
)
327+
system_prompt: str = Field(
328+
default="",
329+
description="System prompt for error analyzer"
330+
)
331+
parameters: ErrorAnalyzerParameters = Field(
332+
default_factory=ErrorAnalyzerParameters,
333+
description="Error analyzer parameters"
334+
)
312335

313336

314337
class AgentsConfig(BaseModel):

0 commit comments

Comments
 (0)