BoundaryML/baml · error
Unsupported strategy provider: {}. Available ones are: {}
Error message
Unsupported strategy provider: {}. Available ones are: {} What it means
Strategy-client construction error from the ClientProperty TryFrom impl: the provider kind is a Strategy variant this runtime does not implement. Unlike its sibling error, this message also lists the strategy providers that ARE available (round-robin, fallback), which helps when a baml config uses a strategy name introduced in a different baml version.
Source
Thrown at engine/baml-runtime/src/internal/llm_client/strategy/mod.rs:74
}
}
impl TryFrom<(&ClientProperty, &RuntimeContext)> for LLMStrategyProvider {
type Error = anyhow::Error;
fn try_from((client, ctx): (&ClientProperty, &RuntimeContext)) -> Result<Self> {
match &client.provider {
ClientProvider::Strategy(strategy) => match strategy {
StrategyClientProvider::RoundRobin => RoundRobinStrategy::try_from((client, ctx))
.map(Arc::new)
.map(LLMStrategyProvider::RoundRobin),
StrategyClientProvider::Fallback => {
FallbackStrategy::try_from((client, ctx)).map(LLMStrategyProvider::Fallback)
}
},
other => {
let options = ["round-robin", "fallback"];
anyhow::bail!(
"Unsupported strategy provider: {}. Available ones are: {}",
other,
options.join(", ")
)
}
}
}
}
impl WithRetryPolicy for LLMStrategyProvider {
fn retry_policy_name(&self) -> Option<&str> {
match self {
LLMStrategyProvider::RoundRobin(strategy) => strategy.retry_policy.as_deref(),
LLMStrategyProvider::Fallback(strategy) => strategy.retry_policy.as_deref(),
}
}
}
View on GitHub (pinned to bd85ce9dee)
Solutions
- Set provider to one of `round-robin` or `fallback` as listed in the error.
- Fix typos in the strategy client's provider field.
- If migrating configs, rename deprecated strategy provider values to the two supported ones.
- Regenerate client code after editing the .baml file.
Example fix
// before
client<Strategy> S { provider sequential strategy { A B } }
// after
client<Strategy> S { provider round-robin strategy { A B } } Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = ['round-robin', 'fallback'];
if (!ALLOWED.includes(strategyClient.provider)) {
throw new Error(`invalid strategy provider ${strategyClient.provider}; available: ${ALLOWED.join(', ')}`);
} Type guard
function isStrategyProvider(p) { return p === 'round-robin' || p === 'fallback'; } Try / catch
try { loadStrategy(cfg); } catch (e) { if (String(e).includes('Available ones are')) console.error(e.message); } Prevention
- Copy provider names verbatim from BAML docs (`round-robin`, `fallback`)
- Search .baml files for strategy blocks and lint provider values in CI
- Check changelogs when upgrading BAML for renamed strategy providers
When it happens
Trigger: Same as 1013: an unrecognized `provider` value in a strategy client block hits the `other =>` match arm during strategy construction.
Common situations: Typoed provider names, using `sequential`/`retry`-style names or model provider names in strategy clients, and stale configs from older BAML versions with different strategy names.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unsupported strategy provider: {}
- Invalid client property. Should have been a fallback propert
- Invalid client property. Should have been a round-robin prop
- unsupported: {message}
- Unsupported {} `{}`: {}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/5e5b5386e6f1dccc.
Report an issue: GitHub.