ai.wire.resolve_media

Resolve BAML media for provider request lowering. This mirrors the media resolution pass in `sys_llm`: existing base64 is retained, and URL fetching is selected by the provider. Media built from a file already holds its content as base64.

Reference version

Signature

function ai.wire.resolve_media(
media: ai.MediaPart,
fetch_url: bool
) -> ai.wire.ResolvedMedia throws baml.errors.InvalidArgument | baml.errors.Timeout | ai.errors.NetworkFailure

Resolve BAML media for provider request lowering. This mirrors the media resolution pass in sys_llm: existing base64 is retained, and URL fetching is selected by the provider. Media built from a file already holds its content as base64.

Source:<builtin>/ai/ns_wire/wire.bamlbytes 10567–11836