ai.internal._from_shorthand

(internal) Construct the client a `"provider/model"` shorthand names.

Reference version

Signature

function ai.internal._from_shorthand<__effect_param_0>(
shorthand: string,
providers: (string, string) -> ai.Client | null throws __effect_param_0,
prefixes: string[]
) -> ai.Client throws ai.errors.InvalidRequest | __effect_param_0

(internal) Construct the client a "provider/model" shorthand names.

providers maps a prefix and model to the constructed client, or null for an unknown prefix, and prefixes lists every prefix it knows (for error messages). This package cannot build either: every provider package implements root.Client, so ai sits below them in the package graph. The compiler synthesizes both from its own provider table (the same one a literal client "provider/model" lowers through) at each root.clients.resolve call.

Source:<builtin>/ai/ns_internal/clients.bamlbytes 7111872