Fix UpdateProvidersAsync overwriting embedder/vector store providers on partial updates #21796

Back

Summary

  • Fix UpdateProvidersAsync overwriting SupportedEmbedderProviders and SupportedVectorStoreProviders with empty arrays when called with only chat provider parameters (null for embedder/vector store)
  • This was triggered by the ABP Suite template's temporary workaround in WebModule.OnPostApplicationInitializationAsync which called UpdateProvidersAsync with only ChatClientFactoryOptions, wiping out the correctly-saved values from InitialWorkspaceUpdater
  • Add autoSave: true to both insert and update paths for reliable persistence
  • Closes #21788

Root Cause

In layered apps, the generated WebModule contained a temporary fix that called UpdateProvidersAsync(appName, chatProviders) after InitialWorkspaceUpdater had already correctly saved all three provider types. Since the optional supportedEmbedderProviders and supportedVectorStoreProviders parameters defaulted to null, the update path treated them as empty arrays and overwrote the existing values.

Test plan

  • Verified with AbpSolution875771095 layered app using local source references
  • Database query confirmed all three columns populated: SupportedProviders=OpenAI,Ollama, SupportedEmbedderProviders=OpenAI, SupportedVectorStoreProviders=Pgvector
Version
10.2.0-rc.2
Release Date
09 March, 2026
Labels
abp-module-ai-management
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.