hermes-agent/tests/agent/transports
Soju 775a17284f fix(transport): strip Hermes-internal scaffolding keys before chat.completions
The empty-response recovery path in run_agent.py appends synthetic
messages tagged with _empty_recovery_synthetic (and the agent loop uses
_thinking_prefill / _empty_terminal_sentinel similarly). These are
internal bookkeeping markers — they must never reach the wire.

chat_completions' convert_messages only stripped Codex Responses leak
fields (codex_reasoning_items, call_id, etc.), not these _-prefixed
markers. Permissive providers (real OpenAI, Anthropic) silently ignore
unknown message keys so the bug stayed hidden, but strict
OpenAI-compatible gateways reject them outright. Observed against
codex.nekos.me:

  502: [ObjectParam] [input[617]._empty_recovery_synthetic]
       [unknown_parameter] Unknown parameter:
       '_empty_recovery_synthetic'

Because the synthetic messages persist in the session, every
subsequent request in that session carries the poisoned key and
fails identically — a deterministic 502 the retry loop mistakes for
a transient server error.

Fix: convert_messages now drops any top-level message key starting
with '_'. OpenAI's message schema has no '_'-prefixed fields, so this
is safe and future-proofs against new internal markers.

Origin: local-author
Upstream-PR: none
Patch-State: local-only
2026-05-24 15:15:37 -07:00
..
__init__.py feat: add transport types + migrate Anthropic normalize path 2026-04-20 23:06:00 -07:00
test_bedrock_transport.py fix(bedrock): preserve reasoningContent across converse normalization 2026-05-07 05:17:16 -07:00
test_chat_completions.py fix(transport): strip Hermes-internal scaffolding keys before chat.completions 2026-05-24 15:15:37 -07:00
test_codex_app_server_runtime.py fix(codex): allow kanban worker board writes 2026-05-17 11:50:43 -07:00
test_codex_app_server_session.py fix(tui): handle images with codex app-server 2026-05-23 20:40:09 -07:00
test_codex_event_projector.py feat(codex-runtime): optional codex app-server runtime for OpenAI/Codex models (#24182) 2026-05-13 17:18:15 -07:00
test_codex_transport.py fix(xai): restore encrypted reasoning replay across turns 2026-05-20 23:12:45 -07:00
test_hermes_tools_mcp_server.py feat(codex-runtime): optional codex app-server runtime for OpenAI/Codex models (#24182) 2026-05-13 17:18:15 -07:00
test_transport.py fix(agent): preserve Codex message items for replay 2026-04-25 18:22:06 -07:00
test_types.py fix(agent): preserve Codex message items for replay 2026-04-25 18:22:06 -07:00