Commit Graph
3 Commits
Author SHA1 Message Date
ZacharyZhang-NY fa19e95f19 fix(security): inject provider env into model streams 2026-05-15 00:35:55 -04:00
ZacharyZhang-NY fccb0d8586 fix(runtime): serialize Fire Pass calls per credential to stop boss-build 429s
Boss build seeds one Fire Pass key for every agent. Three concurrent
agents -> three concurrent streamSimple calls against the Kimi K2.6
Turbo router -> three HTTP 429s on the overview dashboard.

Add an in-memory async semaphore keyed by (provider, sha1(apiKey)) and
acquire a slot inside `createSafePiStream` before invoking the source.
The slot is released when the stream finishes, errors, or aborts.
`fireworks-firepass` is capped at 1 concurrent call; every other
provider stays uncapped (no fallback layer, no 429 retry — flow control
prevents the burst at the source instead of recovering after).

Same code path applies to public and boss builds: only the seeded key
differs, the gate behaviour is identical.
2026-05-14 22:31:01 -04:00
ZacharyZhang-NY 64842a9185 fix(runtime): guard pi stream setup failures 2026-04-22 14:36:16 -04:00