{"record":{"id":"fea85a1e7697de81","repo":"lfnovo/open-notebook","slug":"no-embedding-model-configured-please-configure-on-fea85a","errorCode":null,"errorMessage":"No embedding model configured. Please configure one in the Models section.","messagePattern":"No embedding model configured\\. Please configure one in the Models section\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"commands/embedding_commands.py","lineNumber":638,"sourceCode":"\n    Retry Strategy:\n    - Retries disabled (retry=None) for this coordinator command\n    - Individual embed_* commands handle their own retries\n    \"\"\"\n    start_time = time.time()\n\n    try:\n        logger.info(\"=\" * 60)\n        logger.info(f\"Starting embedding rebuild with mode={input_data.mode}\")\n        logger.info(\n            f\"Include: sources={input_data.include_sources}, notes={input_data.include_notes}, insights={input_data.include_insights}\"\n        )\n        logger.info(\"=\" * 60)\n\n        # Check embedding model availability (fail fast)\n        EMBEDDING_MODEL = await model_manager.get_embedding_model()\n        if not EMBEDDING_MODEL:\n            raise ValueError(\n                \"No embedding model configured. Please configure one in the Models section.\"\n            )\n\n        logger.info(f\"Embedding model configured: {EMBEDDING_MODEL}\")\n\n        # Collect items to process (returns IDs only)\n        items = await collect_items_for_rebuild(\n            input_data.mode,\n            input_data.include_sources,\n            input_data.include_notes,\n            input_data.include_insights,\n        )\n\n        total_items = (\n            len(items[\"sources\"]) + len(items[\"notes\"]) + len(items[\"insights\"])\n        )\n        logger.info(f\"Total items to rebuild: {total_items}\")\n","sourceCodeStart":620,"sourceCodeEnd":656,"githubUrl":"https://github.com/lfnovo/open-notebook/blob/a7de90d38aaf18ee85fd661854d35c11e44613e2/commands/embedding_commands.py#L620-L656","documentation":"ValueError raised by rebuild_embeddings_command as a fail-fast check: model_manager.get_embedding_model() returned None, so no default embedding model is configured in the Models section. Rebuilding all embeddings requires a working embedding model up front.","triggerScenarios":"Running the rebuild-embeddings command on a fresh install or after a DB reset where no model has been marked as the default embedding model, or where the model entry lacks provider credentials.","commonSituations":"Fresh setup that never completed model configuration, deleted/reassigned default embedding model, or environment variables for the model provider not set so the model is effectively unusable.","solutions":["Open the Models section in the UI and set a default embedding model (with valid provider credentials)","Verify the provider's API key env var is set for the API and worker processes","Re-run the rebuild-embeddings command and confirm the log line 'Embedding model configured: ...' appears"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"models = (await client.get('/models')).json()\nif not any(m.get('is_default') or 'embed' in (m.get('mode') or '') for m in models):\n    raise RuntimeError('no default embedding model configured')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure a default embedding model in the Models section before running rebuild","Set provider API key env vars for both API and worker processes","Confirm startup logs show the embedding model resolved"],"tags":["python","valueerror","embedding","model-configuration","setup"],"backgroundTag":"missing-model-configuration","analyzedSha":"a7de90d38aaf18ee85fd661854d35c11e44613e2","analyzedAt":"2026-08-27T02:39:58.166Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}