Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/developer-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Install Node.js and basedpyright
run: |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
npm install -g basedpyright

Expand Down Expand Up @@ -104,6 +104,7 @@ jobs:
with:
files: lib/idp_common_pkg/test-reports/test-results.xml
check_name: Test Results
comment_mode: off # Disable PR comments to avoid permission issues on fork PRs

- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ agents:
parameters:
max_log_events: 5
time_range_hours_default: 24

chat_companion:
model_id: us.anthropic.claude-haiku-4-5-20251001-v1:0
pricing:
Expand Down
35 changes: 26 additions & 9 deletions lib/idp_common_pkg/idp_common/config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
"""

from typing import Any, Dict, List, Optional, Union, Literal, Annotated
from pydantic import BaseModel, ConfigDict, Field, field_validator, Discriminator
from typing_extensions import Self
from pydantic import (
BaseModel,
ConfigDict,
Field,
field_validator,
Discriminator,
model_validator,
)


class ImageConfig(BaseModel):
Expand Down Expand Up @@ -78,6 +86,10 @@ class AgenticConfig(BaseModel):

enabled: bool = Field(default=False, description="Enable agentic extraction")
review_agent: bool = Field(default=False, description="Enable review agent")
review_agent_model: str | None = Field(
default=None,
description="Model used for reviewing and correcting extraction work",
)


class ExtractionConfig(BaseModel):
Expand Down Expand Up @@ -120,6 +132,14 @@ def parse_int(cls, v: Any) -> int:
return int(v) if v else 0
return int(v)

@model_validator(mode="after")
def set_default_review_agent_model(self) -> Self:
"""Set review_agent_model to extraction model if not specified."""
if not self.agentic.review_agent_model:
self.agentic.review_agent_model = self.model

return self


class ClassificationConfig(BaseModel):
"""Document classification configuration"""
Expand Down Expand Up @@ -423,7 +443,7 @@ class ErrorAnalyzerConfig(BaseModel):
"AccessDenied",
"ThrottlingException",
],
description="Error patterns to search for in logs"
description="Error patterns to search for in logs",
)
system_prompt: str = Field(
default="""
Expand Down Expand Up @@ -511,11 +531,10 @@ class ErrorAnalyzerConfig(BaseModel):
- No time specified: 24 hours (default)

IMPORTANT: Do not include any search quality reflections, search quality scores, or meta-analysis sections in your response. Only provide the three required sections: Root Cause, Recommendations, and Evidence.""",
description="System prompt for error analyzer"
description="System prompt for error analyzer",
)
parameters: ErrorAnalyzerParameters = Field(
default_factory=ErrorAnalyzerParameters,
description="Error analyzer parameters"
default_factory=ErrorAnalyzerParameters, description="Error analyzer parameters"
)


Expand Down Expand Up @@ -635,12 +654,10 @@ class AgentsConfig(BaseModel):
"""Agents configuration"""

error_analyzer: Optional[ErrorAnalyzerConfig] = Field(
default_factory=ErrorAnalyzerConfig,
description="Error analyzer configuration"
default_factory=ErrorAnalyzerConfig, description="Error analyzer configuration"
)
chat_companion: Optional[ChatCompanionConfig] = Field(
default_factory=ChatCompanionConfig,
description="Chat companion configuration"
default_factory=ChatCompanionConfig, description="Chat companion configuration"
)


Expand Down
Loading