Skip to content

createAnthropicProvider()

PromptScript API


createAnthropicProvider(config, deps?): EvalProvider

Defined in: eval/src/http-provider.ts:354

Create a provider for the Anthropic Messages API. The body comes from the runtime mapper; this adds the URL, the fixed headers and the transport rules: an allowed host, no redirects, a time limit and a 4 MiB body cap.

Parameters

config

ProviderConfig

Name, base URL, key and transport limits

deps?

ProviderDeps = {}

Fetch to use instead of the global one

Returns

EvalProvider

The provider

Throws

EvalProviderError PS6302 when the base URL is refused