ai-sdk-harness
API reference

ai-sdk-harness-network

The presets of hosts and the network policy built from them, generated from the source.

networkPolicy(...lists)

Returns { mode: 'custom', allowedHosts }, the hosts of lists checked, in lower case, each once and sorted: the networkPolicy of a sandbox, or of setNetworkPolicy(). allowedHosts(...lists) returns the same list alone, and both throw an InvalidHostError for a host isAllowedHost() refuses.

Prop

Type

trustedHosts(...names)

The hosts of TRUSTED_HOSTS for each service named (TrustedService), or for the services of each group of TRUSTED_GROUPS (TrustedGroup); every service without any.

harnessHosts(harnessId, options?)

What HARNESS_NETWORK holds for the harness: where it installs from, its service, and the API of its provider.

Prop

Type

Prop

Type

providerHosts(provider, location?)

The hosts of a provider's API: those of PROVIDER_HOSTS, or of Vertex AI, Bedrock and Azure where their models run.

Prop

Type

On this page