weaviate/weaviate · error

wrong taskType supported task types are: %v (joined validati

Error message

wrong taskType supported task types are: %v (joined validation errors: %s)

What it means

Class-settings validation for the text2vec-google module failed on one or more checks: a base-settings validation error, a missing projectID when a non-default API endpoint is set, or a taskType outside the supported list. This is the joined message of all accumulated validation errors (the %s), so the specific offending field is in the joined details, not this prefix.

Source

Thrown at modules/text2vec-google/vectorizer/class_settings.go:97

	var errorMessages []string
	if err := ic.BaseClassSettings.Validate(class); err != nil {
		errorMessages = append(errorMessages, err.Error())
	}

	apiEndpoint := ic.ApiEndpoint()
	if apiEndpoint != DefaultAIStudioEndpoint {
		projectID := ic.ProjectID()
		if projectID == "" {
			errorMessages = append(errorMessages, fmt.Sprintf("%s cannot be empty", projectIDProperty))
		}
	}

	if !slices.Contains(availableTaskTypes, ic.TaskType()) {
		errorMessages = append(errorMessages, fmt.Sprintf("wrong taskType supported task types are: %v", availableTaskTypes))
	}

	if len(errorMessages) > 0 {
		return fmt.Errorf("%s", strings.Join(errorMessages, ", "))
	}

	return nil
}

func (ic *classSettings) getStringProperty(name, defaultValue string) string {
	return ic.BaseClassSettings.GetPropertyAsString(name, defaultValue)
}

func (ic *classSettings) getDefaultModel(apiEndpoint string) string {
	if apiEndpoint == DefaultAIStudioEndpoint {
		return DefaulAIStudioModel
	}
	return DefaultModel
}

// Google params
func (ic *classSettings) ApiEndpoint() string {

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Read the joined validation details in the full message to see which checks failed
  2. Set XGoogleClientProjectID when using a custom ApiEndpoint
  3. Set taskType to one of the supported values (e.g. RETRIEVAL_DOCUMENT, RETRIEVAL_QUERY) or leave it unset for auto-selection
  4. Fix any base class-settings errors reported alongside
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/text2vec-google/vectorizer/class_settings.go:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/e6bd30089731f423. Report an issue: GitHub.