Commit Detail
Commit b2ba62c
feat(types): add overload-based AI.run() with gateway fallback and gemma-4 Add overload-based run() signatures for better type inference: - Batch request (queueRequest: true) -> AsyncResponse - Raw response (returnRawResponse: true) -> Response - WebSocket (websocket: true) -> Response - Streaming (stream: true in inputs) -> ReadableStream - Normal -> model-specific output type - Unknown model (gateway fallback) -> Record<string, unknown> The gateway fallback allows AI Gateway models (e.g. 'google/nano-banana') to be called without type errors while preserving full type safety for known Cloudflare AI models. Also adds gemma-4-26b-a4b-it model types and type-check tests.
Files changed
2 files changed+1 added~1 modified