fix(agent): 执行边界 - 遵守策略上限并压缩工具协议
This commit is contained in:
1 parent
dc2002b010
commit
c1d628b873
6 files changed
+40
-17
No files matched your search
@@ -47,7 +47,10 @@ func agentStepMaxOutputTokensDefault() int {
|
||||
|
||||
func agentStepTimeoutSecondsDefault() int {
|
||||
value := envInt("CANVAS_AGENT_STEP_TIMEOUT_SECONDS", DefaultRuntimeAgentStepTimeout)
|
||||
return min(value, MaxRuntimeAgentStepTimeoutSeconds)
|
||||
if value <= 0 {
|
||||
return DefaultRuntimeAgentStepTimeout
|
||||
}
|
||||
return min(max(value, MinRuntimeAgentStepTimeoutSeconds), MaxRuntimeAgentStepTimeoutSeconds)
|
||||
}
|
||||
|
||||
type RuntimeResourcePolicy struct {
|
||||
|
||||
Reference in new issue
Block a user