{"record":{"id":"5e5b5386e6f1dccc","repo":"BoundaryML/baml","slug":"unsupported-strategy-provider-available-ones-are","errorCode":null,"errorMessage":"Unsupported strategy provider: {}. Available ones are: {}","messagePattern":"Unsupported strategy provider: (.+?)\\. Available ones are: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/internal/llm_client/strategy/mod.rs","lineNumber":74,"sourceCode":"    }\n}\n\nimpl TryFrom<(&ClientProperty, &RuntimeContext)> for LLMStrategyProvider {\n    type Error = anyhow::Error;\n\n    fn try_from((client, ctx): (&ClientProperty, &RuntimeContext)) -> Result<Self> {\n        match &client.provider {\n            ClientProvider::Strategy(strategy) => match strategy {\n                StrategyClientProvider::RoundRobin => RoundRobinStrategy::try_from((client, ctx))\n                    .map(Arc::new)\n                    .map(LLMStrategyProvider::RoundRobin),\n                StrategyClientProvider::Fallback => {\n                    FallbackStrategy::try_from((client, ctx)).map(LLMStrategyProvider::Fallback)\n                }\n            },\n            other => {\n                let options = [\"round-robin\", \"fallback\"];\n                anyhow::bail!(\n                    \"Unsupported strategy provider: {}. Available ones are: {}\",\n                    other,\n                    options.join(\", \")\n                )\n            }\n        }\n    }\n}\n\nimpl WithRetryPolicy for LLMStrategyProvider {\n    fn retry_policy_name(&self) -> Option<&str> {\n        match self {\n            LLMStrategyProvider::RoundRobin(strategy) => strategy.retry_policy.as_deref(),\n            LLMStrategyProvider::Fallback(strategy) => strategy.retry_policy.as_deref(),\n        }\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/strategy/mod.rs#L56-L92","documentation":"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.","triggerScenarios":"Same as 1013: an unrecognized `provider` value in a strategy client block hits the `other =>` match arm during strategy construction.","commonSituations":"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.","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."],"exampleFix":"// before\nclient<Strategy> S { provider sequential strategy { A B } }\n\n// after\nclient<Strategy> S { provider round-robin strategy { A B } }","handlingStrategy":"validation","validationCode":"const ALLOWED = ['round-robin', 'fallback'];\nif (!ALLOWED.includes(strategyClient.provider)) {\n  throw new Error(`invalid strategy provider ${strategyClient.provider}; available: ${ALLOWED.join(', ')}`);\n}","typeGuard":"function isStrategyProvider(p) { return p === 'round-robin' || p === 'fallback'; }","tryCatchPattern":"try { loadStrategy(cfg); } catch (e) { if (String(e).includes('Available ones are')) console.error(e.message); }","preventionTips":["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"],"tags":["configuration","baml","strategy","unsupported"],"backgroundTag":"invalid-enum-value","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}