The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
chore(api): keep /v1/runs under its complexity cap
unsupportedpastels7caa41ee7d09
diff --git a/gateway/platforms/api_server_runs.py b/gateway/platforms/api_server_runs.pyindex b5266b8bfcb..73e85f4a7ec 100644--- a/gateway/platforms/api_server_runs.py+++ b/gateway/platforms/api_server_runs.py@@ -739,9 +739,9 @@ async def _handle_runs(self, request: web.Request, *, _api_server) -> web.Responif history_err is not None:return history_errprevious_response_id = body.get("previous_response_id")- if stored_session_id and not body.get("session_id"): # a deleted chain moves to its next generation- from gateway.session_api import continued_api_session- stored_session_id = await asyncio.to_thread(continued_api_session, self.gateway_runner, stored_session_id)+ # A deleted chain moves to its next generation (an explicit body session_id still wins below).+ from gateway.session_api import continued_api_session+ stored_session_id = await asyncio.to_thread(continued_api_session, self.gateway_runner, stored_session_id)session_id = body.get("session_id") or stored_session_idroute = self._resolve_route(body.get("model"))agent_overrides = _api_server._request_agent_overrides(body, virtual_model=self._model_name)