BoundaryML/baml · error

Unsupported property: {k}

Error message

Unsupported property: {k}

What it means

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.

Source

Thrown at engine/baml-lib/llm-client/src/clients/helpers.rs:855

                                Some((either::Either::Left(s.clone()), v.meta().clone()))
                            }
                        }
                        None => {
                            self.push_error(
                                format!("values in strategy must be strings. Got: {}", v.r#type()),
                                v.meta().clone(),
                            );
                            None
                        }
                    })
                    .collect()
            })
    }

    pub fn finalize_empty(self) -> Vec<Error<Meta>> {
        let mut errors = self.errors;
        for (k, (key_span, _)) in self.options {
            errors.push(Error::new(format!("Unsupported property: {k}"), key_span));
        }
        errors
    }

    pub fn finalize(
        self,
    ) -> (
        IndexMap<String, (Meta, UnresolvedValue<Meta>)>,
        Vec<Error<Meta>>,
    ) {
        (self.options, self.errors)
    }
}

fn ensure_string<Meta: Clone>(
    options: &mut IndexMap<String, (Meta, UnresolvedValue<Meta>)>,
    key: &str,
) -> Result<Option<(Meta, StringOr, Meta)>, Error<Meta>> {

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Remove the unsupported key from the client options block.
  2. Fix the spelling of the intended option (check the provider's documented option list).
  3. Move the option to the correct provider type (e.g. azure-specific keys only under azure-openai clients).

Example fix

// before
client "Gpt4" {
  provider "openai"
  options {
    model "gpt-4o"
    azure_deployment "my-deploy"
  }
}
// after
client "Gpt4" {
  provider "openai"
  options {
    model "gpt-4o"
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// Check option keys against the provider's supported set before submit
const SUPPORTED: [&str; 3] = ["model", "api_key", "base_url"];
for k in option_keys {
    if !SUPPORTED.contains(&k.as_str()) { eprintln!("unsupported option: {k}"); }
}

Prevention

When it happens

Trigger: 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`).

Common situations: 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.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/cab3e3374a7a30e1. Report an issue: GitHub.