{"record":{"id":"c2aee866423c6fae","repo":"BoundaryML/baml","slug":"missing-argument-parameter-for-function-function","errorCode":null,"errorMessage":"Missing argument '{parameter}' for function '{function}'","messagePattern":"Missing argument '(.+?)' for function '(.+?)'","errorType":"exception","errorClass":"BridgeError","httpStatus":null,"severity":"error","filePath":"baml_language/crates/bridge_cffi/src/error.rs","lineNumber":31,"sourceCode":"    #[error(\"Project not initialized\")]\n    ProjectNotInitialized,\n\n    #[error(\"Engine lock poisoned\")]\n    LockPoisoned,\n\n    #[error(\"{0}\")]\n    Runtime(#[from] bex_project::RuntimeError),\n\n    #[error(\"CallFunctionArgs.call_target must be set\")]\n    MissingCallTarget,\n\n    #[error(\"type arguments are not supported when invoking a BAML function handle\")]\n    FunctionHandleTypeArgs,\n\n    #[error(\"Function not found: {name}\")]\n    FunctionNotFound { name: String },\n\n    #[error(\"Missing argument '{parameter}' for function '{function}'\")]\n    MissingArgument { function: String, parameter: String },\n\n    #[error(\"Not implemented: {0}\")]\n    NotImplemented(String),\n\n    #[error(\"call_id {0} is already in use by an active call\")]\n    DuplicateCallId(u64),\n\n    #[error(\"call_id must be a nonzero uint64\")]\n    InvalidCallId,\n\n    #[error(\"Internal error: {0}\")]\n    Internal(String),\n\n    #[error(\"{0}\")]\n    Startup(String),\n}\n","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/bridge_cffi/src/error.rs#L13-L49","documentation":"BridgeError::MissingArgument names both the function and the missing parameter. The bridge validated the supplied arguments against the BAML function's signature and found a required parameter with no corresponding value. It is a pre-execution argument-count validation failure.","triggerScenarios":"Calling a BAML function via the bridge while omitting one of its required parameters from the args map/list.","commonSituations":"A .baml function gained a new required parameter and old call sites were not updated; optional-vs-required misunderstanding; keyword arguments misspelled so the bridge counts one as missing.","solutions":["Supply a value for the named parameter '{parameter}' in the call args.","Check the function's signature in the .baml file for the exact parameter name.","If the parameter should be optional, mark it with a default in the BAML function definition.","Update stale call sites after signature changes."],"exampleFix":"// before\nargs.inputs = {\"resume_text\": text};\n// after\nargs.inputs = {\"resume_text\": text, \"language\": \"en\"};","handlingStrategy":"validation","validationCode":"required = FUNCTION_SIGNATURES[fn_name]  # from .baml signature\nmissing = required - set(inputs)\nif missing:\n    raise ValueError(f'missing args: {missing}')","typeGuard":null,"tryCatchPattern":"try:\n    bridge.call_function(args)\nexcept BridgeError as e:\n    if e is BridgeError.MissingArgument:\n        inputs[e.parameter] = default_for(e.function, e.parameter)\n        retry(inputs)","preventionTips":["Generate call-site checks from .baml signatures","Re-check required params after any .baml edit","Spell parameter names exactly as declared"],"tags":["ffi","validation","arguments"],"backgroundTag":"missing-required-argument","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"}