{"record":{"id":"cab3e3374a7a30e1","repo":"BoundaryML/baml","slug":"unsupported-property-k","errorCode":null,"errorMessage":"Unsupported property: {k}","messagePattern":"Unsupported property: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-lib/llm-client/src/clients/helpers.rs","lineNumber":855,"sourceCode":"                                Some((either::Either::Left(s.clone()), v.meta().clone()))\n                            }\n                        }\n                        None => {\n                            self.push_error(\n                                format!(\"values in strategy must be strings. Got: {}\", v.r#type()),\n                                v.meta().clone(),\n                            );\n                            None\n                        }\n                    })\n                    .collect()\n            })\n    }\n\n    pub fn finalize_empty(self) -> Vec<Error<Meta>> {\n        let mut errors = self.errors;\n        for (k, (key_span, _)) in self.options {\n            errors.push(Error::new(format!(\"Unsupported property: {k}\"), key_span));\n        }\n        errors\n    }\n\n    pub fn finalize(\n        self,\n    ) -> (\n        IndexMap<String, (Meta, UnresolvedValue<Meta>)>,\n        Vec<Error<Meta>>,\n    ) {\n        (self.options, self.errors)\n    }\n}\n\nfn ensure_string<Meta: Clone>(\n    options: &mut IndexMap<String, (Meta, UnresolvedValue<Meta>)>,\n    key: &str,\n) -> Result<Option<(Meta, StringOr, Meta)>, Error<Meta>> {","sourceCodeStart":837,"sourceCodeEnd":873,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-lib/llm-client/src/clients/helpers.rs#L837-L873","documentation":"finalize_empty() drains leftover client options that were never consumed by the provider implementation and reports each as \"Unsupported property: {k}\". It exists to catch typos and options not applicable to the chosen provider, turning silent ignoring into a hard error.","triggerScenarios":"Passing an option key in a client's options block that the target provider does not recognize (e.g. `azure_deployment` on a plain openai client, or a misspelled `api_keyy`).","commonSituations":"Copying options between providers of different types; typos in option names; upgrading BAML and an option was renamed or removed; mixing OpenAI and Azure options on one client.","solutions":["Remove the unsupported key from the client options block.","Fix the spelling of the intended option (check the provider's documented option list).","Move the option to the correct provider type (e.g. azure-specific keys only under azure-openai clients)."],"exampleFix":"// before\nclient \"Gpt4\" {\n  provider \"openai\"\n  options {\n    model \"gpt-4o\"\n    azure_deployment \"my-deploy\"\n  }\n}\n// after\nclient \"Gpt4\" {\n  provider \"openai\"\n  options {\n    model \"gpt-4o\"\n  }\n}","handlingStrategy":"validation","validationCode":"// Check option keys against the provider's supported set before submit\nconst SUPPORTED: [&str; 3] = [\"model\", \"api_key\", \"base_url\"];\nfor k in option_keys {\n    if !SUPPORTED.contains(&k.as_str()) { eprintln!(\"unsupported option: {k}\"); }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use option keys documented for the specific provider type.","Watch for renamed options when upgrading BAML versions.","Don't copy option blocks between different providers without review."],"tags":["config","validation","unsupported-property"],"backgroundTag":"unsupported-config-value","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}