ai.wire.send_as_with_wire
Same contract as `send_as`, plus the ModelCall record billed to `model`; its `usage` and resolved model are the caller's to fill once it decodes the response (`ai.internal.with_own_call`). On a non-2xx or transport failure this still throws the same classified error `send_as` throws — composite clients build failed attempts from the error itself (`_failed_attempt`), so no record accompanies a throw. `capture_wire` gates the request/response bodies; status, headers, and timing are always recorded. The request URL and captured response body are redacted with `redact_url_secrets` before storing.
Signature
Same contract as send_as, plus the ModelCall record billed to model;
its usage and resolved model are the caller's to fill once it decodes the
response (ai.internal.with_own_call). On a non-2xx or transport failure
this still throws the same classified error send_as throws — composite
clients build failed attempts from the error itself (_failed_attempt),
so no record accompanies a throw. capture_wire
gates the request/response bodies; status, headers, and timing are always
recorded. The request URL and captured response body are redacted with
redact_url_secrets before storing.
Source:<builtin>/ai/ns_wire/wire.bamlbytes 7401–9646