Version: ABP 10.3.0, Volo.AIManagement 10.3.0, Blazor Server, EF Core / SQL Server
Description A workspace without any embedder or vector store still gets the RAG tool on every chat request. As a result, the model often calls search_documents, the tool answers that no embedding provider is configured, and the whole prompt (including attachments) is sent to the model a second time.
Steps to reproduce
Create a workspace in the AI Management UI (OpenAI chat provider) and leave Embedder Provider and Vector Store Provider empty. Save it. In the database, EmbedderProvider and VectorStoreProvider are stored as '' (empty string), not NULL. Send a chat request through this workspace, for example via IChatClientResolver or IAIChatCompletionIntegrationService.
Expected
No RAG tool and no extra system instruction, because the workspace has no embedder.
Actual
AIManagementChatClient.PrepareOptionsAsync adds a search_documents tool (tool_choice = auto) and a system instruction to always call search_documents first. The model calls the tool, which replies that the embedding provider is not configured, and the request is sent again.
In our measurement, a request of about 186K prompt tokens was billed as about 372K. This doubles cost and rate-limit (HTTP 429) pressure.
Cause (version 10.3.0)
Two checks disagree on what "configured" means:
WorkspaceConfigurationStore: HasEmbedderConfiguration = EmbedderProvider != null, so '' counts as configured. DocumentSearchService: uses string.IsNullOrWhiteSpace(...), so '' counts as not configured. The Workspaces page saves empty fields as '', so a workspace edited in the UI can never be stored as NULL.
Suggested fix
Use !string.IsNullOrWhiteSpace(EmbedderProvider) in WorkspaceConfigurationStore, and/or normalise empty provider fields to NULL when saving a workspace.
Workaround Set the columns to NULL directly in the database. Editing the workspace in the UI afterwards brings the problem back.