{"record":{"id":"beeefcad554c1203","repo":"zed-industries/zed","slug":"no-existing-predictions-found-use-provider-to-s","errorCode":null,"errorMessage":"No existing predictions found. Use --provider to specify which model to use for prediction.","messagePattern":"No existing predictions found\\. Use --provider to specify which model to use for prediction\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/edit_prediction_cli/src/predict.rs","lineNumber":55,"sourceCode":"    example_progress: &ExampleProgress,\n    mut cx: AsyncApp,\n) -> anyhow::Result<()> {\n    let repetition_count = args.repetitions;\n\n    if let Some(existing_prediction) = example.predictions.first() {\n        let has_prediction = existing_prediction.actual_patch.is_some()\n            || !existing_prediction.actual_output.is_empty();\n        if has_prediction {\n            match args.provider {\n                None => return Ok(()),\n                Some(provider) if existing_prediction.provider == provider => return Ok(()),\n                Some(_) => example.predictions.clear(),\n            }\n        }\n    }\n\n    let Some(provider) = args.provider else {\n        anyhow::bail!(\n            \"No existing predictions found. Use --provider to specify which model to use for prediction.\"\n        );\n    };\n\n    if let PredictionProvider::Teacher(backend, _)\n    | PredictionProvider::TeacherNonBatching(backend, _)\n    | PredictionProvider::TeacherJumps(backend)\n    | PredictionProvider::TeacherJumpsNonBatching(backend) = provider\n    {\n        run_context_retrieval(\n            example,\n            app_state.clone(),\n            example_progress,\n            vec![ContextRetrievalType::Lsp],\n            false,\n            cx.clone(),\n        )\n        .await?;","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/predict.rs#L37-L73","documentation":"Guard in the predict loop (predict.rs): for each example it first looks for an existing prediction (actual_patch set or non-empty actual_output). If one exists for the requested provider it is reused (early return); if one exists for a different provider, predictions are cleared and regenerated. Only when no usable prediction exists AND no --provider was passed does it bail with this message — prediction cannot proceed without knowing which model to use.","triggerScenarios":"Running predict on a fresh dataset (no prior predictions recorded) without --provider; or after predictions were cleared/invalidated. Note an existing prediction with matching provider makes --provider optional, so the same command can work on one dataset and fail on another.","commonSituations":"New pull of examples from Snowflake and re-running an old command line that relied on previously cached predictions; teammates sharing scripts where one person's dataset already has predictions and another's does not.","solutions":["Pass --provider explicitly, e.g. --provider zeta2:ordered or --provider teacher:sonnet46","Or first run the prediction step that populates actual_patch/actual_output, after which providerless re-runs will reuse them"],"exampleFix":"# before\npredict examples.jsonl\n\n# after\npredict examples.jsonl --provider zeta2:ordered","handlingStrategy":"validation","validationCode":"// Per-example check before predicting:\nlet has_prediction = existing_prediction\n    .map(|p| p.actual_patch.is_some() || !p.actual_output.is_empty())\n    .unwrap_or(false);\nif !has_prediction && args.provider.is_none() {\n    anyhow::bail!(\"pass --provider; example {} has no stored prediction\", example.id);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --provider in scripts instead of relying on previously cached predictions","Remember a stored prediction for a different provider gets cleared and regenerated — pin one provider per dataset","After pulling fresh examples from Snowflake, expect the first predict run to require --provider"],"tags":["rust","cli","edit-prediction","missing-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}