Tencent/WeKnora · error
web search provider type %s not registered
Error message
web search provider type %s not registered
What it means
The web-search Registry has no factory registered under the requested provider type string. CreateProvider looks up r.factories[providerType]; when absent it returns this error naming the unknown type.
Source
Thrown at internal/infrastructure/web_search/registry.go:42
return &Registry{
factories: make(map[string]ProviderFactory),
}
}
// Register registers a provider type factory by ID
func (r *Registry) Register(id string, factory ProviderFactory) {
r.mu.Lock()
defer r.mu.Unlock()
r.factories[id] = factory
}
// CreateProvider creates a provider instance by type with the given parameters.
func (r *Registry) CreateProvider(providerType string, params types.WebSearchProviderParameters) (interfaces.WebSearchProvider, error) {
r.mu.RLock()
factory, ok := r.factories[providerType]
r.mu.RUnlock()
if !ok {
return nil, fmt.Errorf("web search provider type %s not registered", providerType)
}
return factory(params)
}
View on GitHub (pinned to 988cbb0330)
Solutions
- Check the exact providerType string in config against registered types
- Ensure the provider's Register/Init function runs at startup before CreateProvider
- List registered factories (or log them) to compare against the configured value
- Fix typos and update configs after provider renames
Example fix
// before providerType := "searx" // not registered // after providerType := "searxng" // matches registered factory key
Defensive patterns
Strategy: validation
Validate before calling
func knownProviderTypes() map[string]bool { return map[string]bool{
"baidu": true, "bing": true, "duckduckgo": true, "exa": true,
"google": true, "keenable": true, "searxng": true,
} }
if !knownProviderTypes()[cfg.Type] {
return fmt.Errorf("unknown provider type %q", cfg.Type)
} Try / catch
provider, err := registry.CreateProvider(providerType, params)
if err != nil {
if strings.Contains(err.Error(), "not registered") {
log.Printf("provider type %q unavailable; falling back to default", providerType)
return registry.CreateProvider(defaultType, params)
}
return err
} Prevention
- Ensure all provider Register calls run in init() before use
- Validate provider type strings against an enum/whitelist at config load
- Log registered factory keys when lookup fails
- Migrate old type names in config on upgrades
When it happens
Trigger: resolveProvider or doTestSearch invoked with a providerType that was never registered, e.g. "searxng" before RegisterSearxng runs, a renamed type string, or a typo like "googlee".
Common situations: Configuration saved with a provider type from a different/older version, missing init() registration in a new binary, user-edited config with a typo, plugin not loaded.
Related errors
- sandbox: unsupported remote provider %q
- custom agent configuration is required for agent QA
- summary model (model_id) is not configured in custom agent s
- rerank model is not configured: please set rerank_model_id o
- JWKS document contains no keys
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/928b0e3b3635e96f.
Report an issue: GitHub.