Files
hermes-agent/website/docs/integrations
teknium1 6f8389d67b fix(aux): keep the /btw and title snapshots duck-typed; make the out-of-turn header tests discriminating
Follow-up on the salvaged #112721 commits (@fangliquanflq):

- agent/turn_context.py, tui_gateway/methods_prompt.py: add ``session_id`` to the explicit
  snapshot dicts instead of switching them to ``agent._current_main_runtime()``. The titling
  prologue is duck-typed (its tests drive a minimal stub) and the snapshot values feed the
  ``runtime_validator`` equality checks, where ``_current_main_runtime()``'s ``"" `` for a
  missing attribute would no longer match the live ``None``. Same outcome — the background
  request inherits the conversation's ``x-opencode-session`` — without changing what the
  callers read.
- tests/agent/test_opencode_session_affinity.py: the salvaged title test passed on an
  unfixed tree because the titler thread republishes the conversation contextvar
  (``set_conversation_context``) and the affinity header falls back to it. Replace it with
  two invariant tests (sync + async ``call_llm(main_runtime=...)`` with EVERY ambient source
  unset via the ``out_of_turn`` fixture): red on origin/main, green here; both also pin
  that the explicit binding does not leak past the call.
- website/docs/integrations/providers.md: name the background/out-of-turn auxiliary calls
  the header now covers.

Fixes #112717
2026-09-16 17:22:17 -07:00
..
…