Tencent/WeKnora · error

engine ID is required for Google provider

Error message

engine ID is required for Google provider

What it means

Parameter validation in validateProviderParameters: the provider type is Google and params.EngineID is empty (the API key may be present). Google Programmable Search requires the custom search engine ID in addition to the key, so the configuration is rejected until an engine ID is supplied.

Source

Thrown at internal/application/service/web_search_provider.go:161

		return true
	default:
		return false
	}
}

// validateProviderParameters validates required parameters for each provider type
func validateProviderParameters(provider types.WebSearchProviderType, params types.WebSearchProviderParameters) error {
	switch provider {
	case types.WebSearchProviderTypeBing:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Bing provider")
		}
	case types.WebSearchProviderTypeGoogle:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Google provider")
		}
		if params.EngineID == "" {
			return fmt.Errorf("engine ID is required for Google provider")
		}
	case types.WebSearchProviderTypeTavily:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Tavily provider")
		}
	case types.WebSearchProviderTypeOllama:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Ollama provider")
		}
	case types.WebSearchProviderTypeBaidu:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Baidu provider")
		}
	case types.WebSearchProviderTypeExa:
		if params.APIKey == "" {
			return fmt.Errorf("API key is required for Exa provider")
		}
	case types.WebSearchProviderTypeZhipu:

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Set engine_id to the Programmable Search engine (cx) value
  2. Create a search engine in the Google Cloud console if none exists
  3. Re-test the provider config after filling engine ID
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/application/service/web_search_provider.go:161 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/70ee28865fbeb628. Report an issue: GitHub.