Routing options
Model ids and providerOptions.speko for the AI SDK provider.
The model id selects a routing strategy, not a single model.
Model ids
| Model id | Behavior |
|---|---|
auto | Router default for your organization's routing policy |
auto-fast | Bias toward latency |
auto-quality | Bias toward accuracy and quality |
auto-cheap | Bias toward cost |
deepgram | Pin routing and failover to one upstream provider |
elevenlabs/eleven_multilingual_v2 | Pin the provider and request a specific upstream model |
speko.transcription('auto-quality');
speko.speech('elevenlabs/eleven_multilingual_v2');providerOptions.speko
| Option | Applies to | Description |
|---|---|---|
language | both | BCP-47 tag, for example en or es-MX. Routing is language-aware. Defaults to en |
region | both | Region to rank providers in, for example us-east4 or eu-west1 |
optimizeFor | both | balanced, accuracy, latency, or cost. Overrides the model id preset |
providers | both | Restrict routing and failover to these upstream providers |
keywords | transcription | Domain keywords forwarded to the routed STT provider |
outputFormat | speech | wav (default) or pcm for raw s16le mono |
model | speech | Upstream model override, for example sonic-2 |
spokenForm | speech | Deterministic spoken-form normalization before synthesis |
Failover
Failover happens server-side. If the routed provider errors or degrades, Speko retries against the next-ranked provider before the call returns. A single generateSpeech or transcribe call can therefore cross providers without the caller noticing.
providerMetadata.speko.failoverCount reports how many were tried. Use providers to constrain the pool the router and its failover may draw from.
Unsupported settings
fetch and headers provider settings are not supported. @spekoai/sdk manages its own transport and headers, so custom headers produce an unsupported-setting warning rather than being sent.