weaviate/weaviate · warning

init graphql provider

Error message

init graphql provider

What it means

text2vec-nvidia wraps any error from initNearText() with the message "init graphql provider" during InitExtension. initNearText() wires the nearText GraphQL searcher/argument provider (modules/text2vec-nvidia/nearText.go:19) and currently always returns nil, so this wrap is purely defensive: it would only surface if the wiring fails or if m.vectorizer is nil (InitExtension called before Init), which would cause a nil dereference rather than this wrapped error. If you see it, it means module startup sequencing broke.

Solutions

  1. Ensure all modules' Init() is called before InitExtension() (standard startup does this; fix custom wiring if you call these yourself).
  2. Check the wrapped inner error in the log line — it names the actual failure inside initNearText.
  3. If you modified nearText.go or module.go, verify m.vectorizer is initialized before initNearText() runs.
  4. Update/rebuild Weaviate if this reproduces on an unmodified binary; on stock code this path cannot fail.

Example fix

// before (custom embedding code)
module.InitExtension(allModules) // Init not called yet -> nil vectorizer
// after
module.Init(ctx, initParams)
module.InitExtension(allModules)
Defensive patterns

Strategy: validation

Validate before calling

// operator-side preflight: ensure module init order and env
if os.Getenv("NVIDIA_APIKEY") == "" {
  log.Println("warning: NVIDIA_APIKEY not set; text2vec-nvidia will fail at vectorization time")
}
// in custom wiring, enforce lifecycle order:
if err := mod.Init(ctx, params); err != nil { return err }
if err := mod.InitExtension(allModules); err != nil { return fmt.Errorf("init graphql provider: %w", err) }

Try / catch

// Go: unwrap and classify at startup
if err := mod.InitExtension(all); err != nil {
  return fmt.Errorf("nvidia module startup failed: %w", err)
}

Prevention

When it happens

Trigger: Server startup calls InitExtension on the text2vec-nvidia module and initNearText() returns a non-nil error; or InitExtension is invoked before Init so nearText.NewSearcher receives a nil vectorizer, producing an error wrapped here.

Common situations: Custom module registration order in configure_api.go, embedded/custom Weaviate builds that call module lifecycle methods manually, or code changes to initNearText that introduce error returns.

Related errors


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

Appendix: source

Thrown at modules/text2vec-nvidia/module.go:96

	}

	return nil
}

func (m *NvidiaModule) InitExtension(modules []modulecapabilities.Module) error {
	for _, module := range modules {
		if module.Name() == m.Name() {
			continue
		}
		if arg, ok := module.(modulecapabilities.TextTransformers); ok {
			if arg != nil && arg.TextTransformers() != nil {
				m.nearTextTransformer = arg.TextTransformers()["nearText"]
			}
		}
	}

	if err := m.initNearText(); err != nil {
		return errors.Wrap(err, "init graphql provider")
	}
	return nil
}

func (m *NvidiaModule) initVectorizer(ctx context.Context, timeout time.Duration,
	logger logrus.FieldLogger,
) error {
	apiKey := os.Getenv("NVIDIA_APIKEY")
	client := clients.New(apiKey, timeout, logger)

	m.vectorizer = text2vecbase.New(client,
		batch.NewBatchVectorizer(client, 50*time.Second, batchSettings, logger, m.Name()),
		batch.ReturnBatchTokenizer(batchSettings.TokenMultiplier, m.Name(), ent.LowerCaseInput),
	)
	m.metaProvider = client

	return nil
}

View on GitHub (pinned to 75aa4b6d11)