ai.wire.send_as

Send, classify non-2xx via `ai.errors.classify_http`, decode the body as T. T = json-shaped envelope class; unknown fields are ignored by the decoder. A null or non-positive timeout preserves the transport's unbounded default.

Reference version

Signature

function ai.wire.send_as<T>(
req: baml.http.Request,
provider: string,
request_timeout_ms: int | null = …
) -> T throws baml.errors.Timeout | ai.errors.Failure

Send, classify non-2xx via ai.errors.classify_http, decode the body as T. T = json-shaped envelope class; unknown fields are ignored by the decoder. A null or non-positive timeout preserves the transport's unbounded default.

Source:<builtin>/ai/ns_wire/wire.bamlbytes 50796606