hermes-agent/tests/agent
teknium1 25c65bc99e fix(agent): handle None content in context compressor (fixes #211)
The OpenAI API returns content: null on assistant messages that only
contain tool calls. msg.get('content', '') returns None (not '') when
the key exists with value None, causing TypeError on len() and string
concatenation in _generate_summary and compress.

Fix: msg.get('content') or '' — handles both missing keys and None.

Tests from PR #216 (@Farukest). Fix also in PR #215 (@cutepawss).
Both PRs had stale branches and couldn't be merged directly.

Closes #211
2026-03-02 01:35:52 -08:00
..
__init__.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_auxiliary_client.py refactor(auth): transition Codex OAuth tokens to Hermes auth store 2026-03-01 19:59:24 -08:00
test_context_compressor.py fix(agent): handle None content in context compressor (fixes #211) 2026-03-02 01:35:52 -08:00
test_model_metadata.py test: add unit tests for 8 untested modules 2026-02-26 13:27:58 +03:00
test_prompt_builder.py test: add unit tests for 8 untested modules 2026-02-26 13:27:58 +03:00
test_prompt_caching.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_redact.py test(redact): add sensitive text redaction 2026-02-28 21:56:27 -08:00
test_subagent_progress.py fix(display): fix subagent progress tree-view visual nits 2026-02-28 23:29:49 -08:00