Skip to main content

explain_diff

Function explain_diff 

Source
pub async fn explain_diff(
    old: &Schema,
    new: &Schema,
    api_key: &str,
) -> Result<ExplainReport, ExplainError>
Expand description

Phase 8.4 — narrate a diff between two schemas with one extra LLM call. Receives the api_key directly (rather than reading it from the env like generate / update / analyze) so the caller can short-circuit when the flag is off without ever touching the env. The CLI’s --explain gate hands this in.

MAX 1 LLM call. NEVER mutates either schema. NEVER recurses (no follow-up calls based on the response).