cloudflare
workerd
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Forward gateway options as cf-aig-* headers from Ai.run() `env.AI.run(model, inputs, { gateway })` previously sent the gateway config only inside the JSON request body (`options.gateway`). AI Gateway enforces these options via `cf-aig-*` request headers (as the REST API and the Universal endpoint `env.AI.gateway(id).run()` already do), so fields like `requestTimeoutMs` were silently ignored on the binding's run path. Long-running calls never aborted, despite the timeout being exposed in the TypeScript types. Add a `gatewayOptionsToHeaders` helper that mirrors `AiGateway.#getHeadersFromOptions` in aig-api.ts, and emit those headers in `#generateFetch`. The mapping is placed after `extraHeaders` so the typed `gateway` option takes precedence. `gateway.id` is intentionally not emitted as a header; it continues to drive `/ai-gateway/run` routing via the body. The change is purely additive: the body still carries `options.gateway`, so existing behavior is unaffected. Adds a regression test (full option set and requestTimeoutMs-only) that asserts the cf-aig-* headers reach the upstream fetch.
JoaquinGimenez1:main
5 hours ago
[build] Address aspect-build/rules_ts#664, drop Windows workaround Finally figured out how to solve this. We need to ensure that rules_ts enables the composite setting and avoid writing to the same path twice since Windows does not have a proper Bazel sandbox. Also update to the latest Bazel release and enable --rewind_lost_inputs, both of these should help with the Bazel remote cache issues we've seen.
felix/060326-drop-windows-workaround
6 hours ago
Release 2026-06-04
main
6 hours ago
Merge branch 'main' into penalosa/workers-types-v5
penalosa/workers-types-v5
14 hours ago
Improve external SDK error message
dominik/fix-workers-py-error
15 hours ago
Fix worker-py version requirement in error message
dominik/fix-workers-py-error
15 hours ago
Release 2026-06-03
main
1 day ago
Release 2026-06-02
main
2 days ago
Latest Branches
CodSpeed Performance Gauge
0%
Forward gateway options as cf-aig-* headers from Ai.run()
#6798
5 hours ago
d15c990
JoaquinGimenez1:main
CodSpeed Performance Gauge
0%
[build] Address aspect-build/rules_ts#664, drop Windows workaround
#6797
7 hours ago
3f1de20
felix/060326-drop-windows-workaround
CodSpeed Performance Gauge
0%
`@cloudflare/workers-types` v5
#3741
15 hours ago
23e7327
penalosa/workers-types-v5
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs