mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 13:53:18 +08:00
Increase default tool rounds to 100 with 300 cap.
Raise Admin/UI defaults and backend clamps for AIA_TURN_MAX_TOOL_ROUNDS across gateway, worker, and direct loop paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
89b295293d
commit
8233db93db
9 changed files with 18 additions and 18 deletions
|
|
@ -32,7 +32,7 @@ class AgentCoreRunInput:
|
|||
parent_span_id: str | None
|
||||
run_id: str | None = None
|
||||
max_messages: int = 80
|
||||
max_tool_rounds: int = 30
|
||||
max_tool_rounds: int = 100
|
||||
max_tool_workers: int = 8
|
||||
max_attempts: int = 2
|
||||
memory_context: OclawMemoryContext | None = None
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class GenerationInterrupted(Exception):
|
|||
@dataclass(frozen=True)
|
||||
class AgentConfig:
|
||||
max_messages: int = AGENT_CONTEXT_MESSAGES
|
||||
max_tool_rounds: int = 30
|
||||
max_tool_rounds: int = 100
|
||||
max_tool_workers: int = 8
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1364,7 +1364,7 @@ def run_oclaw_direct_loop(
|
|||
run_id: str | None = None,
|
||||
attempt_no: int | None = None,
|
||||
max_messages: int = 80,
|
||||
max_tool_rounds: int = 30,
|
||||
max_tool_rounds: int = 100,
|
||||
max_tool_workers: int = 8,
|
||||
on_token: Optional[Callable[[str], None]] = None,
|
||||
on_progress: Optional[Callable[[str], None]] = None,
|
||||
|
|
|
|||
|
|
@ -1198,7 +1198,7 @@ class OclawGateway:
|
|||
parent_span_id=None,
|
||||
run_id=rid,
|
||||
max_messages=_get_int_setting("AIA_TURN_MAX_CONTEXT_MESSAGES", 80, 10, 400),
|
||||
max_tool_rounds=_get_int_setting("AIA_TURN_MAX_TOOL_ROUNDS", 30, 1, 100),
|
||||
max_tool_rounds=_get_int_setting("AIA_TURN_MAX_TOOL_ROUNDS", 100, 1, 300),
|
||||
max_tool_workers=_get_int_setting("AIA_TURN_MAX_TOOL_WORKERS", 8, 1, 32),
|
||||
max_attempts=_get_int_setting("AIA_OCLAW_MAX_ATTEMPTS", 2, 1, 5),
|
||||
memory_context=memory_context,
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ def _worker_loop(*, store: Any, worker_id: str, poll_interval_s: float) -> None:
|
|||
system_prompt = str(getattr(executor, "system_prompt", "") or "")
|
||||
|
||||
max_messages = int(store.get_setting("AIA_TURN_MAX_CONTEXT_MESSAGES") or 80)
|
||||
max_tool_rounds = int(store.get_setting("AIA_TURN_MAX_TOOL_ROUNDS") or 30)
|
||||
max_tool_rounds = int(store.get_setting("AIA_TURN_MAX_TOOL_ROUNDS") or 100)
|
||||
max_tool_workers = int(store.get_setting("AIA_TURN_MAX_TOOL_WORKERS") or 8)
|
||||
|
||||
msg = StandardMessage(
|
||||
|
|
@ -301,7 +301,7 @@ def _worker_loop(*, store: Any, worker_id: str, poll_interval_s: float) -> None:
|
|||
parent_span_id=None,
|
||||
run_id=run_id,
|
||||
max_messages=max(10, min(max_messages, 400)),
|
||||
max_tool_rounds=max(1, min(max_tool_rounds, 100)),
|
||||
max_tool_rounds=max(1, min(max_tool_rounds, 300)),
|
||||
max_tool_workers=max(1, min(max_tool_workers, 32)),
|
||||
max_attempts=2,
|
||||
memory_context=memory_ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue