larry-zy commented on code in PR #1567:
URL: https://github.com/apache/dubbo-admin/pull/1567#discussion_r4136697245


##########
ai/component/agent/react/config.go:
##########
@@ -70,6 +73,9 @@ func (c *AgentSpec) Validate() error {
        if c.ChannelBufferSize <= 0 {
                return fmt.Errorf("channel_buffer_size must be greater than 0")
        }
+       if c.ContextWindowTurns <= 0 {

Review Comment:
   P3: The schema treats context_window_turns as optional with a default of 10, 
and NewReActAgentWithStore also falls back to 10. This validation rejects the 
zero value before that fallback can run when an AgentSpec is built directly (or 
AgentFactory receives a spec without schema default injection), so previously 
valid callers now fail component validation unless they add the new field. 
Could we apply the default before validation, while still rejecting explicitly 
negative values?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to