BoundaryML/baml · error · BridgeError
Missing argument '{parameter}' for function '{function}'
Error message
Missing argument '{parameter}' for function '{function}' What it means
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.
Source
Thrown at baml_language/crates/bridge_cffi/src/error.rs:31
#[error("Project not initialized")]
ProjectNotInitialized,
#[error("Engine lock poisoned")]
LockPoisoned,
#[error("{0}")]
Runtime(#[from] bex_project::RuntimeError),
#[error("CallFunctionArgs.call_target must be set")]
MissingCallTarget,
#[error("type arguments are not supported when invoking a BAML function handle")]
FunctionHandleTypeArgs,
#[error("Function not found: {name}")]
FunctionNotFound { name: String },
#[error("Missing argument '{parameter}' for function '{function}'")]
MissingArgument { function: String, parameter: String },
#[error("Not implemented: {0}")]
NotImplemented(String),
#[error("call_id {0} is already in use by an active call")]
DuplicateCallId(u64),
#[error("call_id must be a nonzero uint64")]
InvalidCallId,
#[error("Internal error: {0}")]
Internal(String),
#[error("{0}")]
Startup(String),
}
View on GitHub (pinned to bd85ce9dee)
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.
Example fix
// before
args.inputs = {"resume_text": text};
// after
args.inputs = {"resume_text": text, "language": "en"}; Defensive patterns
Strategy: validation
Validate before calling
required = FUNCTION_SIGNATURES[fn_name] # from .baml signature
missing = required - set(inputs)
if missing:
raise ValueError(f'missing args: {missing}') Try / catch
try:
bridge.call_function(args)
except BridgeError as e:
if e is BridgeError.MissingArgument:
inputs[e.parameter] = default_for(e.function, e.parameter)
retry(inputs) Prevention
- Generate call-site checks from .baml signatures
- Re-check required params after any .baml edit
- Spell parameter names exactly as declared
When it happens
Trigger: Calling a BAML function via the bridge while omitting one of its required parameters from the args map/list.
Common situations: 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.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- CallFunctionArgs.call_target must be set
- call_id must be a nonzero uint64
- {0}
- Invalid bigint hex string ({len} bytes)
- Invalid decimal bigint literal ({len} bytes)
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/c2aee866423c6fae.
Report an issue: GitHub.