Files
hermes-agent/agent/transports
Teknium 3a53716ce4 fix: OpenAI and xAI models keep reasoning across turns and through compaction
Teknium ruling: every model's reasoning is replayed wherever the provider can consume it.
Live consumption matrix (api.openai.com, api.x.ai) showed four places Responses routes lost it:

- transports/codex.py: send reasoning.context="all_turns" on api.openai.com for the
  gpt-5.4 / 5.5 / 5.6 / 6.x families (table in codex_responses_adapter). gpt-5.4/5.5 default
  to current_turn and discard replayed earlier-turn blobs without it. o-series, base
  gpt-5-mini/nano and gpt-5.1-5.3 400 on it and are absent from the table; the openai-codex
  backend and every other host are unchanged. A 400 naming reasoning.context omits it for
  that model for the session and retries once (ahead of the reasoning-mandatory rung, which
  would otherwise drop the whole reasoning config).
- context_compressor.py: compaction keeps earlier-turn codex_reasoning_items when the route
  reads them (xAI, Meta, all_turns OpenAI models: route_reads_prior_turn_reasoning). The
  newest-checkpoint rule (#102374) still applies on every route.
- codex_responses_adapter.py: on api.openai.com a blob minted by a sibling variant of the
  same family replays (gpt-5.6-luna -> terra, 5.4 <-> 5.4-mini, 6-astra <-> 6.1-sol all
  rendered live); exact-model matching everywhere else.
- turn_recovery.py: the first invalid_encrypted_content rejection now drops only blobs not
  stamped by exactly this endpoint+model; the full strip / replay disable runs only when
  there is nothing unverified to drop or the narrowed retry fails again.
2026-10-10 19:22:07 -07:00
..