mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
feat: raise default tool-calling iteration limit from 90 to 500
The default max_iterations/agent.max_turns budget was set when long agentic runs were rare; complex tasks now routinely exceed 90 tool calls. Raise the default to 500 across every surface that hardcodes the fallback: AIAgent constructor, DEFAULT_CONFIG, CLI resolution chain, gateway env bridge, cron scheduler, and TUI gateway. Explicit user config values are unaffected (deep-merge preserves them; no _config_version bump needed). Docs (en + zh-Hans), CLI help text, tips, and pinned tests updated to match.
This commit is contained in:
parent
4a9f67acfb
commit
1b081e4891
23 changed files with 48 additions and 48 deletions
|
|
@ -60,7 +60,7 @@ class TestMaxTurnsResolution:
|
|||
def test_default_max_turns_is_integer(self):
|
||||
cli = _make_cli()
|
||||
assert isinstance(cli.max_turns, int)
|
||||
assert cli.max_turns == 90
|
||||
assert cli.max_turns == 500
|
||||
|
||||
def test_explicit_max_turns_honored(self):
|
||||
cli = _make_cli(max_turns=25)
|
||||
|
|
@ -69,7 +69,7 @@ class TestMaxTurnsResolution:
|
|||
def test_none_max_turns_gets_default(self):
|
||||
cli = _make_cli(max_turns=None)
|
||||
assert isinstance(cli.max_turns, int)
|
||||
assert cli.max_turns == 90
|
||||
assert cli.max_turns == 500
|
||||
|
||||
def test_env_var_max_turns(self):
|
||||
"""Env var is used when config file doesn't set max_turns."""
|
||||
|
|
@ -79,7 +79,7 @@ class TestMaxTurnsResolution:
|
|||
def test_invalid_env_var_max_turns_falls_back_to_default(self):
|
||||
"""Invalid env values should not crash CLI init."""
|
||||
cli_obj = _make_cli(env_overrides={"HERMES_MAX_ITERATIONS": "not-a-number"})
|
||||
assert cli_obj.max_turns == 90
|
||||
assert cli_obj.max_turns == 500
|
||||
|
||||
def test_legacy_root_max_turns_is_used_when_agent_key_exists_without_value(self):
|
||||
cli_obj = _make_cli(config_overrides={"agent": {}, "max_turns": 77})
|
||||
|
|
@ -88,7 +88,7 @@ class TestMaxTurnsResolution:
|
|||
def test_max_turns_never_none_for_agent(self):
|
||||
"""The value passed to AIAgent must never be None (causes TypeError in run_conversation)."""
|
||||
cli = _make_cli()
|
||||
assert isinstance(cli.max_turns, int) and cli.max_turns == 90
|
||||
assert isinstance(cli.max_turns, int) and cli.max_turns == 500
|
||||
|
||||
|
||||
class TestVerboseAndToolProgress:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue