Skip to content

AI chat calls semantic_search and errors out when no VectorSearch plugin is enabled #1532

@hgaol

Description

@hgaol

Describe the bug

When a user chats with the built-in AI assistant, the semantic_search MCP tool is always
advertised to the LLM, regardless of whether a VectorSearch plugin is installed and
enabled. If no such plugin is enabled, the LLM still picks the tool, the call reaches
EmbeddingService.SearchSimilar, and the request fails with:

  ERROR controller/mcp_controller.go:376  semantic search failed: semantic search is not
  available: no vector search plugin is enabled

Because semantic search is provided by an optional plugin (not core), any deployment
without that plugin sees this error on every AI conversation where the model decides
semantic search is relevant. It pollutes the logs and wastes a tool-call round-trip on a
capability that doesn't exist.

To Reproduce

Steps to reproduce the behavior:

  1. Start an Answer instance with no VectorSearch plugin enabled (default state).
  2. Configure the AI provider and open the AI chat.
  3. Ask any question whose phrasing nudges the model toward semantic lookup, e.g. "Find
    questions conceptually related to caching strategies."
  4. Observe the server log: semantic search failed: semantic search is not available: no
    vector search plugin is enabled.

Expected behavior

If no VectorSearch plugin is enabled, the semantic_search tool should not be advertised
to the LLM at all, so it can never be selected. Other MCP tools should remain available.
No error log should be produced for missing optional capabilities.

Screenshots

N/A — log line is reproduced in the description.

Platform

  • Device: [e.g. Desktop, Mobile]
  • OS: [e.g. macOS]
  • Browser and version: [e.g. Chrome, Safari]
  • Version: [dev]

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions