quick fix for agent default behaviour#136
Conversation
| task: str, | ||
| session: Session | None = None, | ||
| input: BaseModel | DataFrame | UUID | Result | None = None, | ||
| effort_level: EffortLevel | None = EffortLevel.LOW, | ||
| effort_level: EffortLevel | None = DEFAULT_EFFORT_LEVEL, | ||
| llm: LLM | None = None, | ||
| iteration_budget: int | None = None, | ||
| include_research: bool | None = None, |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
RafaelPo
left a comment
There was a problem hiding this comment.
Maybe also add a comment explaining iteration_budget=0?
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| task: str, | ||
| session: Session | None = None, | ||
| input: BaseModel | UUID | Result | None = None, | ||
| effort_level: EffortLevel | None = EffortLevel.LOW, | ||
| effort_level: EffortLevel | None = DEFAULT_EFFORT_LEVEL, | ||
| llm: LLM | None = None, | ||
| iteration_budget: int | None = None, | ||
| include_research: bool | None = None, |
There was a problem hiding this comment.
Bug: Changing the default effort_level to MEDIUM is a breaking change. Users providing custom parameters must now explicitly set effort_level=None to avoid an API validation error.
Severity: HIGH
Suggested Fix
To avoid breaking existing clients, either revert the default effort_level or, preferably, modify the logic to automatically set effort_level to None if any custom parameters (llm, iteration_budget, etc.) are provided. Additionally, ensure all documentation, including the agent_map docstring, is updated to reflect the correct default behavior.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/everyrow/ops.py#L144-L150
Potential issue: Changing the default `effort_level` to `EffortLevel.MEDIUM` introduces
a breaking change for users providing custom parameters like `llm` or
`iteration_budget`. The API requires that `effort_level` and custom parameters are
mutually exclusive. Users who previously called the function with custom parameters
without explicitly setting `effort_level` will now have the default
`effort_level=MEDIUM` sent along with their custom parameters. This will cause the API
to return a 422 validation error, breaking existing client implementations. The issue is
made worse by outdated docstrings that still list the old default value.
No description provided.