{"record":{"id":"8a751e3c166f7f2e","repo":"BoundaryML/baml","slug":"no-parsed-result-available-from-function-call","errorCode":null,"errorMessage":"no parsed result available from function call","messagePattern":"no parsed result available from function call","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-runtime/src/async_vm_runtime.rs","lineNumber":1349,"sourceCode":"        }\n\n        BamlValue::Media(media) => Ok(vm.alloc_media(media.clone())),\n    }\n}\n\nfn try_vm_value_from_function_result(\n    vm: &mut Vm,\n    resolved_class_names: &HashMap<String, ObjectIndex>,\n    resolved_enums_names: &HashMap<String, ObjectIndex>,\n    result: anyhow::Result<FunctionResult>,\n) -> anyhow::Result<baml_vm::Value> {\n    let fn_result = result.context(\"failed to get function result\")?;\n\n    // TODO: Return type of .parsed() sucks.\n    let baml_value = fn_result\n        .parsed()\n        .as_ref()\n        .ok_or_else(|| anyhow!(\"no parsed result available from function call\"))?\n        .as_ref()\n        .map_err(|e| anyhow!(\"error parsing function result: {e}\"))?\n        .clone()\n        .0\n        .value();\n\n    try_vm_value_from_baml_value(vm, resolved_class_names, resolved_enums_names, &baml_value)\n}\n\nimpl crate::runtime_interface::InternalRuntimeInterface for BamlAsyncVmRuntime {\n    fn features(&self) -> crate::internal::ir_features::IrFeatures {\n        self.llm_runtime.features()\n    }\n\n    fn diagnostics(&self) -> &internal_baml_core::internal_baml_diagnostics::Diagnostics {\n        self.llm_runtime.diagnostics()\n    }\n","sourceCodeStart":1331,"sourceCodeEnd":1367,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/async_vm_runtime.rs#L1331-L1367","documentation":"try_vm_value_from_function_result expects the function result to contain a parsed output. The parsed() accessor returned None, meaning no parsed result exists for this call (e.g. the function failed to produce a parseable output and the parsed slot was never populated).","triggerScenarios":"Calling a function through the async VM runtime where the result's parsed() is None — typically when the LLM response could not be parsed into the output type and the failure was recorded without a parsed payload.","commonSituations":"LLM returning malformed output that fails parsing; calling a test/streaming path that never sets a parsed result; using the VM runtime on results that only carry raw text.","solutions":["Check the underlying function result/LLM raw output and fix the prompt or output schema so parsing succeeds","Strengthen the output type or add BAML retry policies / @check fallbacks so a parsed result is always produced","Verify you are using a non-streaming call path that populates the parsed result"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// check before use\nif fn_result.parsed().is_none() { handle_missing_parse(); }","tryCatchPattern":"match call_function(...) { Err(e) if e.to_string().contains(\"no parsed result\") => { /* inspect raw output, fix prompt/schema */ }, ... }","preventionTips":["Use non-streaming call paths that populate parsed results","Add retry/repair policies so parsing always yields a result","Log raw LLM output during development"],"tags":["baml","parsing","result"],"backgroundTag":"unexpected-response-shape","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}