BoundaryML/baml · error

No parsed result available from function call

Error message

No parsed result available from function call

What it means

The REPL requires that every completed LLM function call yields a parsed result; when parsed() returns None the call produced no parse outcome at all, so evaluation fails with this invariant-style error. Unlike 912 this is not a parse failure — no parsing was even attempted or recorded.

Source

Thrown at engine/baml-runtime/src/cli/repl.rs:599

                            if let LLMResponse::Success(resp) = function_result.llm_response() {
                                let usage = TokenUsage {
                                    prompt_tokens: resp.metadata.prompt_tokens,
                                    output_tokens: resp.metadata.output_tokens,
                                    total_tokens: resp.metadata.total_tokens,
                                    cached_input_tokens: resp.metadata.cached_input_tokens,
                                };
                                let _ = tx.send(LlmStatusEvent::Finished(run_id, Some(usage)));
                            } else {
                                let _ = tx.send(LlmStatusEvent::Finished(run_id, None));
                            }
                        }
                        match function_result.parsed() {
                            Some(Ok(response_baml_value)) => Ok(response_baml_value
                                .clone()
                                .0
                                .map_meta_owned(|_| (Span::fake(), None))),
                            Some(Err(e)) => Err(anyhow!("Failed to parse function result: {}", e)),
                            None => Err(anyhow!("No parsed result available from function call")),
                        }
                    }
                    None => Err(anyhow!(
                        "No runtime loaded, it should be impossible to call an LLM function"
                    )),
                }
            }
        };
        // REPL watch handler: collect notifications
        let watch_notifications = Arc::new(Mutex::new(Vec::new()));
        let watch_notifications_clone = watch_notifications.clone();
        let watch_handler = shared_handler(move |notification| {
            watch_notifications_clone
                .lock()
                .unwrap()
                .push(format!("{notification}"));
        });

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Check earlier LLM status events/logs for an upstream call failure and fix that first
  2. Retry the function call — often transient (rate limit, timeout upstream)
  3. Verify the function runs correctly via the BAML CLI/VS Code playground
  4. Report as a bug if the call visibly succeeded but parsed() is still None
Defensive patterns

Strategy: retry

Try / catch

match result { Err(e) if e.to_string().contains("No parsed result") => { /* check status events/logs, then retry once */ }, Ok(v) => Ok(v), Err(e) => Err(e) }

Prevention

When it happens

Trigger: function_result.parsed() returns None after a function call — the function runtime returned a result object without a parsed payload (e.g. call errored upstream, streaming result not finalized, or result not yet available).

Common situations: LLM call failed before producing output, using a runtime/function combo that does not populate the parsed field, internal state issues in the REPL runtime.

Understand the failure class

Background: "empty response", "returned no data", "empty embeddings": what HTTP 200-with-empty-body errors mean across libraries — this error's family across 36 libraries.

Related errors


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