{"record":{"id":"619d9e86d25279c4","repo":"Hmbown/CodeWhale","slug":"modelsupdatepartial","errorCode":"ModelsUpdatePartial","errorMessage":"{}","messagePattern":"\\{\\}","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/provider_lake.rs","lineNumber":1701,"sourceCode":"                    receipt\n                        .observed_at\n                        .map_or_else(|| \"unknown\".to_string(), |timestamp| timestamp.to_string()),\n                    receipt.source,\n                    serde_json::to_string(&receipt.status)?,\n                    receipt\n                        .error\n                        .map_or_else(String::new, |error| format!(\"\\terror={error}\"))\n                );\n            }\n            if receipts\n                .iter()\n                .any(|receipt| matches!(receipt.source, \"codex_cli_cache\" | \"codex_app_server\"))\n            {\n                println!(\"{}\", tr(locale, MessageId::ModelsCodexHint));\n            }\n        }\n        if failed > 0 {\n            anyhow::bail!(\"{}\", tr(locale, MessageId::ModelsUpdatePartial));\n        }\n        return Ok(());\n    }\n    let identity = &identities[0];\n    let mut route_config = config.clone();\n    route_config.scope_to_provider_identity(identity);\n    let mut models = configured_catalog_models_for_route(\n        config,\n        identity.provider,\n        &identity.key,\n        &route_config.deepseek_base_url(),\n    );\n    let default_model = route_config.default_model();\n    if !default_model.is_empty() && !default_model.eq_ignore_ascii_case(\"auto\") {\n        push_unique_model(&mut models, &default_model);\n    }\n    models.sort();\n    models.dedup();","sourceCodeStart":1683,"sourceCodeEnd":1719,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/crates/tui/src/provider_lake.rs#L1683-L1719","documentation":"run_models prints a translated ModelsUpdatePartial message via anyhow::bail! after the models update flow when one or more provider fetches failed (failed > 0) while others succeeded. The dynamic message text is the whole error message, so this error represents a partially-successful update: some routes/providers updated, at least one did not.","triggerScenarios":"run_models (models update path) when the per-receipt failure count is greater than 0 — at least one provider/route fetch or update failed during the update pass; called from models_listing_is_offline_and_update_never_forwards_another_routes_cli_key coverage.","commonSituations":"A provider endpoint is unreachable or returns an error while others succeed; stale or invalid credentials for one provider cause its fetch to fail; offline/partial network during 'models update'; a provider's upstream API changed shape and its fetch errors.","solutions":["Inspect the printed per-provider receipts/logs to see which provider failed and why, then fix that provider's credentials or endpoint and re-run the update","Check network connectivity / proxy settings if the failing provider is remote","If a provider is intentionally unused, remove or disable its route so the update no longer counts it as failed"],"exampleFix":"// the failure is in the per-provider receipts; re-run after fixing that provider\n// before: codex-cli key expired for one provider\n// after: export the fresh key / re-auth that provider, then re-run:\nmodels update","handlingStrategy":"try-catch","validationCode":"// before running models update, confirm all configured providers are reachable/authorized\nfor route in config.provider_routes() {\n    if !provider_reachable(route) { eprintln!(\"{} unreachable; update will be partial\", route); }\n}","typeGuard":null,"tryCatchPattern":"match run_models(/* update mode */).await {\n    Err(e) if e.to_string().contains(\"partial\") || failed_receipts_exist => {\n        eprintln!(\"Some providers failed: inspect receipts, fix credentials/network, retry update\");\n    }\n    Ok(()) => (),\n    Err(e) => return Err(e),\n}","preventionTips":["Validate provider credentials and endpoints before running models update","Read the per-receipt output to identify the failing provider rather than treating the run as fully failed","Remove or disable unused provider routes so stale providers don't fail the update","Run updates with stable network connectivity; retry after transient network errors"],"tags":["models","update","partial-failure"],"backgroundTag":"http-request-failed","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}