The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix: add reasoning_echo_flag to init snapshot and switch rollback
Yingliang Zhang663fa68cd434
diff --git a/agent/agent_init.py b/agent/agent_init.pyindex 155ddba5787..da92e6f8812 100644--- a/agent/agent_init.py+++ b/agent/agent_init.py@@ -2961,6 +2961,7 @@ def init_agent("client_kwargs": dict(agent._client_kwargs),"use_prompt_caching": agent._use_prompt_caching,"use_native_cache_layout": agent._use_native_cache_layout,+ "reasoning_echo_flag": getattr(agent, "_reasoning_echo_flag", False),# Context engine state that _try_activate_fallback() overwrites.# Use getattr for model/base_url/api_key/provider since plugin# engines may not have these (they're ContextCompressor-specific).diff --git a/agent/agent_runtime_helpers.py b/agent/agent_runtime_helpers.pyindex 451b3a09278..bcb1cc3a04e 100644--- a/agent/agent_runtime_helpers.py+++ b/agent/agent_runtime_helpers.py@@ -2654,6 +2654,7 @@ def switch_model(agent, new_model, new_provider, api_key='', base_url='', api_mo"_anthropic_base_url","_is_anthropic_oauth","_config_context_length",+ "_reasoning_echo_flag",)}# _client_kwargs is a dict — snapshot a shallow copy so mutating the