Skip to content

CreateIndeRunWebOptions

Configuration for the default Web SDK factory.

optional allowDirectOpenAIEndpoint?: boolean

Explicit opt-in for calling a public Responses endpoint directly from this Web SDK factory — OpenAI’s or OpenRouter’s — with browser-held credentials.

Browser apps should leave this unset and use a proxy endpoint with openAI.auth = "none" instead. Direct calls can expose credentials to client-side code and are appropriate only for controlled non-production environments.


optional hostServices?: CreateBrowserHostServicesOptions

Optional browser host service overrides.


optional modelProfiles?: Readonly<Record<string, readonly string[]>>

Named model profiles requests can route within. Each maps a profile name to an ordered list of target ids, for example { smart: ["openai:gpt-5.2"] }.


optional neuralSpeech?: (NeuralSpeechProviderOptions & ProviderRegistrationOptions)[]

Neural speech providers registered by the factory, one per developer-supplied speech model package, each with the runtime that executes it. Every entry gets the id local.onnx.speech.web:<modelPackage.id> unless it sets id, so one app can register several models side by side. Playback needs the host’s audioOutput; artifacts do not.


optional onnx?: OnnxProviderOptions & ProviderRegistrationOptions

Web ONNX Runtime provider configuration registered by the factory, for developer-supplied local models. Registering it is what makes constraints.privacy = "local_required" routable.


optional openAI?: OpenAIFactoryOptions

OpenAI Responses provider configuration registered by the factory. One target is registered per entry in models, with id <id>:<model> (id defaults to "openai"), so model profiles can list each model separately.


optional systemModel?: SystemModelProviderOptions & ProviderRegistrationOptions

Web system-model provider configuration registered by the factory, for browser-managed on-device models (for example Chrome’s Prompt API). Unlike onnx, this provider takes no developer-supplied model: the browser owns model availability, download, and execution.


optional systemSpeech?: SystemSpeechProviderOptions & ProviderRegistrationOptions

Browser speech provider configuration registered by the factory, over speechSynthesis. Playback only; pass {} for the defaults. Speech is opt-in, because the router probes every registered provider on every request.