mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-12 03:42:08 +00:00
fix(gateway): ignore malformed custom delay env vars in natural mode
This commit is contained in:
parent
349d0da07e
commit
3b16c590e0
2 changed files with 13 additions and 2 deletions
|
|
@ -492,6 +492,16 @@ class TestGetHumanDelay:
|
|||
delay = BasePlatformAdapter._get_human_delay()
|
||||
assert 0.8 <= delay <= 2.5
|
||||
|
||||
def test_natural_mode_ignores_malformed_custom_env_vars(self):
|
||||
env = {
|
||||
"HERMES_HUMAN_DELAY_MODE": "natural",
|
||||
"HERMES_HUMAN_DELAY_MIN_MS": "oops",
|
||||
"HERMES_HUMAN_DELAY_MAX_MS": "still-bad",
|
||||
}
|
||||
with patch.dict(os.environ, env):
|
||||
delay = BasePlatformAdapter._get_human_delay()
|
||||
assert 0.8 <= delay <= 2.5
|
||||
|
||||
def test_custom_mode_uses_env_vars(self):
|
||||
env = {
|
||||
"HERMES_HUMAN_DELAY_MODE": "custom",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue