Skip to content

Show a user-friendly error when no embedding model is configured - #553

Merged
haiphucnguyen merged 1 commit into
askimo-ai:mainfrom
AnayGarodia:devin/1784880930-friendly-embedding-error
Jul 24, 2026
Merged

Show a user-friendly error when no embedding model is configured#553
haiphucnguyen merged 1 commit into
askimo-ai:mainfrom
AnayGarodia:devin/1784880930-friendly-embedding-error

Conversation

@AnayGarodia

Copy link
Copy Markdown
Contributor

Summary

Fixes #549

When a user opens a project with reference materials but has not configured an embedding model, indexing failed with the raw langchain4j builder error modelName cannot be null or blank in the "Failed to index knowledge source" dialog.

This adds a guard before building the embedding model, so the resolved-but-blank model name now surfaces as an actionable message, matching the existing wording style used in ensureLocalEmbeddingModelAvailable:

No embedding model is configured for <PROVIDER>. Go to Settings > AI Provider and select an embedding model under the provider configuration card.

Applied in the two paths where the resolved model name can be blank (provider setting and AppConfig default both empty):

  • OpenAiCompatibleChatModelFactory.createEmbeddingModel (Ollama, Docker AI, LocalAI, LM Studio, etc.)
  • OpenAiCompatibleModelFactory.createEmbeddingModel (generic OpenAI-compatible provider)

Ran ./gradlew spotlessApply detekt test — all pass.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 08:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@haiphucnguyen haiphucnguyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @AnayGarodia

@haiphucnguyen
haiphucnguyen merged commit 5542fa8 into askimo-ai:main Jul 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjust the error message more user friendly

3 participants