{"record":{"id":"a1f496fe4da1c3b5","repo":"BoundaryML/baml","slug":"unsupported-strategy-provider","errorCode":null,"errorMessage":"Unsupported strategy provider: {}","messagePattern":"Unsupported strategy provider: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/internal/llm_client/strategy/mod.rs","lineNumber":53,"sourceCode":"        }\n    }\n}\n\nimpl TryFrom<(&ClientWalker<'_>, &RuntimeContext)> for LLMStrategyProvider {\n    type Error = anyhow::Error;\n\n    fn try_from((client, ctx): (&ClientWalker, &RuntimeContext)) -> Result<Self> {\n        match &client.elem().provider {\n            ClientProvider::Strategy(strategy_client_provider) => match strategy_client_provider {\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            _ => {\n                anyhow::bail!(\"Unsupported strategy provider: {}\", client.elem().provider,)\n            }\n        }\n    }\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            },","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/internal/llm_client/strategy/mod.rs#L35-L71","documentation":"Strategy-client construction error from the ClientWalker TryFrom impl: the client's provider is a Strategy provider whose concrete kind did not match any supported strategy implementation (round-robin or fallback). This guard is the match's catch-all for an unrecognized StrategyClientProvider variant — typically from a newer/older config schema than this runtime understands.","triggerScenarios":"Writing `provider <something-else>` inside a strategy client block, e.g. `provider openai` or a typo like `provider roundrobin`, then attempting to construct the strategy at client resolution time.","commonSituations":"Typos (`round_robin` vs `round-robin`), using a model provider name where a strategy provider is expected, or older config files using renamed provider values.","solutions":["Change the strategy client's provider to `fallback` or `round-robin` exactly.","Fix casing/spelling: `round-robin`, not `round_robin` or `roundrobin`.","Move model-provider options (openai, anthropic, ...) to the inner clients referenced by the strategy, not the strategy itself.","Re-run `baml-cli generate` and check the error message's reported provider value."],"exampleFix":"// before\nclient<Strategy> MyStrategy { provider openai ... }\n\n// after\nclient<Strategy> MyStrategy {\n  provider fallback\n  strategy { ClientA ClientB }\n}","handlingStrategy":"validation","validationCode":"const ALLOWED = ['round-robin', 'fallback'];\nif (!ALLOWED.includes(strategyClient.provider)) {\n  throw new Error(`strategy provider must be one of ${ALLOWED}, got ${strategyClient.provider}`);\n}","typeGuard":"function isStrategyProvider(p) { return p === 'round-robin' || p === 'fallback'; }","tryCatchPattern":"try { loadStrategy(cfg); } catch (e) { if (String(e).startsWith('Unsupported strategy provider')) console.error('Fix provider to round-robin or fallback'); }","preventionTips":["Use only `round-robin` or `fallback` as strategy provider values","Keep model providers on inner clients, not on the strategy client","Regenerate client code after any .baml strategy edit"],"tags":["configuration","baml","strategy","unsupported"],"backgroundTag":"unsupported-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"}