lfnovo/open-notebook · error · ValueError

No embedding model configured. Please configure one in the M

Error message

No embedding model configured. Please configure one in the Models section.

What it means

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.

Source

Thrown at commands/embedding_commands.py:638

    Retry Strategy:
    - Retries disabled (retry=None) for this coordinator command
    - Individual embed_* commands handle their own retries
    """
    start_time = time.time()

    try:
        logger.info("=" * 60)
        logger.info(f"Starting embedding rebuild with mode={input_data.mode}")
        logger.info(
            f"Include: sources={input_data.include_sources}, notes={input_data.include_notes}, insights={input_data.include_insights}"
        )
        logger.info("=" * 60)

        # Check embedding model availability (fail fast)
        EMBEDDING_MODEL = await model_manager.get_embedding_model()
        if not EMBEDDING_MODEL:
            raise ValueError(
                "No embedding model configured. Please configure one in the Models section."
            )

        logger.info(f"Embedding model configured: {EMBEDDING_MODEL}")

        # Collect items to process (returns IDs only)
        items = await collect_items_for_rebuild(
            input_data.mode,
            input_data.include_sources,
            input_data.include_notes,
            input_data.include_insights,
        )

        total_items = (
            len(items["sources"]) + len(items["notes"]) + len(items["insights"])
        )
        logger.info(f"Total items to rebuild: {total_items}")

View on GitHub (pinned to a7de90d38a)

Solutions

  1. Open the Models section in the UI and set a default embedding model (with valid provider credentials)
  2. Verify the provider's API key env var is set for the API and worker processes
  3. Re-run the rebuild-embeddings command and confirm the log line 'Embedding model configured: ...' appears
Defensive patterns

Strategy: validation

Validate before calling

models = (await client.get('/models')).json()
if not any(m.get('is_default') or 'embed' in (m.get('mode') or '') for m in models):
    raise RuntimeError('no default embedding model configured')

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of lfnovo/open-notebook@a7de90d38a (2026-08-27). Data as JSON: /api/errors/fea85a1e7697de81. Report an issue: GitHub.