Skip to content

The agent that grows with you

style(gateway): split the fire startup refusal onto house-style lines and keep the live-adapters WHY

kshitijk4poorae2ed3583ea9
diff --git a/gateway/platforms/api_server.py b/gateway/platforms/api_server.py
index 369db7e51b5..6b6efc08576 100644
--- a/gateway/platforms/api_server.py
+++ b/gateway/platforms/api_server.py
@@ -4037,7 +4037,11 @@ class APIServerAdapter(OpenAICompatRoutesMixin, BasePlatformAdapter):
from gateway.run import _gateway_runner_ref
runner = _gateway_runner_ref()
from gateway.platforms.api_server_fire_startup import refuse_until_started
- if (refusal := await refuse_until_started(runner, job_id)) is not None: return refusal
+ refusal = await refuse_until_started(runner, job_id)
+ if refusal is not None:
+ return refusal
+ # Live adapters (parity with the built-in ticker): E2EE / relay-fronted platforms
+ # have no native credential, so without them delivery fails.
adapters = getattr(runner, "adapters", None) or None
def _detach_fire(fire_fn, *fire_args) -> "web.Response":