Minor Changes
-
#590
fe0d182Thanks @threepointone! - New gateway options, plus the provider routing table andcf-aig-*header
building are now shared with theworkers-ai-providerAI Gateway delegate
(bundled inline — no new dependency), so the two stay in lockstep.AiGatewayOptionsgains two universal-endpoint controls:byokAlias
(cf-aig-byok-alias, select a stored BYOK key by alias) andzdr
(cf-aig-zdr, per-request Zero Data Retention override for Unified Billing).- Cache controls now emit the current
cf-aig-cache-ttl/cf-aig-skip-cache
header names instead of the upstream-deprecatedcf-cache-ttl/cf-skip-cache. - New opt-in resumable streaming on the binding/run path (coming soon —
not generally available yet while the AI Gateway resume backend rolls out;
treat as experimental): passresume
({ binding: env.AI, gateway, onResumeExpired?, maxReconnects? }) and a
streaming run that surfaces acf-aig-run-idwill transparently reconnect on a
transient mid-stream drop, reusing the same resumable-stream engine as the
workers-ai-providerdelegate. No-op on the REST/API-key path and on
non-streaming calls. - The misspelled
retriesoption type is renamedAiGatewayReties→
AiGatewayRetries; the old name stays exported as a deprecated alias, so this
is non-breaking.
Existing behavior is otherwise unchanged.