The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(gateway): set the fallback eviction marker without a suppress wrapper
yoniebans71b623ad5690
diff --git a/gateway/run_turn.py b/gateway/run_turn.pyindex 1b156968e62..cceaf8e2427 100644--- a/gateway/run_turn.py+++ b/gateway/run_turn.py@@ -1678,8 +1678,7 @@ class GatewayTurnMixin(GatewayTurnPrepareMixin, GatewayTurnHygieneMixin, Gatewaysession_key, turn_ctx.source, _agent, policy_model=policy.current_model(active_authority(self)) if policy and policy.model else None)if _agent.model == _cfg_model or self._is_intentional_model_switch(session_key, _agent, _cfg_model):return- with suppress(Exception):- _agent._evicted_on_fallback = session_key or True+ _agent._evicted_on_fallback = session_key or Trueself._evict_cached_agent(session_key)async def _run_agent_finalize_streaming_tts(self, turn_ctx: TurnContext, adapter: Any) -> None: