weaviate/weaviate · error

explorer: get class: extend: %v

Error message

explorer: get class: extend: %v

What it means

Thrown when `modulesProvider.GetExploreAdditionalExtend` fails while computing `_additional` module extensions (e.g. `generate`, `nearText`-provided extras like certainty/answers) for the result set of a class vector search. The error uses Errorf with `%v` so the underlying module error is inlined into the message.

Source

Thrown at usecases/traverser/explorer.go:350

				}
				if stripVector != "" {
					delete(res[i].Vectors, stripVector)
				}
			}
		}

		// Module extension (rerankers) runs after MMR — skipped in searchForTargets
		// under MMR — so rerankers re-sort the diversified page, matching the
		// hybrid path where ListExploreAdditionalExtend follows selection.
		if e.modulesProvider != nil {
			var searchVector models.Vector
			if len(searchVectors) > 0 {
				searchVector = searchVectors[0]
			}
			res, err = e.modulesProvider.GetExploreAdditionalExtend(ctx, res,
				params.AdditionalProperties.ModuleParams, searchVector, params.ModuleParams)
			if err != nil {
				return nil, nil, errors.Errorf("explorer: get class: extend: %v", err)
			}
		}
	}

	if len(searchVectors) > 0 {
		return res, searchVectors[0], nil
	}
	return res, []float32{}, nil
}

// mmrFetchDepth returns how deep to fetch before MMR. It must reach at least windowEnd
// (offset+limit) so the [offset:offset+limit] window is populated; when boost is active it
// fetches Boost.Depth deep (so boost re-ranks that deep), floored at windowEnd.
func (e *Explorer) mmrFetchDepth(boost *filters.Boost, windowEnd int) int {
	if boost == nil || boost.Weight <= 0 {
		return windowEnd
	}
	depth := boost.Depth

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Read the `%v` suffix of the message — it contains the module's own error (auth, rate limit, timeout) and fix that root cause.
  2. Validate the module's credentials/config (e.g. OPENAI_APIKEY, ANTHROPIC_APIKEY, base URLs) and re-test with a single-object query.
  3. Reduce `limit` so the module extends fewer objects, avoiding provider rate limits and timeouts.
  4. Remove the unsupported `_additional` field from the query or enable the owning module (ENABLE_MODULES).
  5. Retry on transient provider errors; consider configuring module timeouts/whitespace-tolerant retry behavior.

Example fix

// before
{ Get { Article(nearVector: {vector: [...]}) { title _additional { generate(singleResult: {prompt: "summarize {title}"}) } } } }
// fails with generative-openai key missing

// after: export OPENAI_APIKEY=sk-... and ENABLE_MODULES=text2vec-openai,generative-openai
// or drop _additional.generate until module is configured
{ Get { Article(nearVector: {vector: [...]}) { title } } }
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check that every _additional field requested belongs to an enabled module
const needed = ['generate'];
if (needed.some(f => query.additional.includes(f)) && !enabledModules.some(m => m.startsWith('generative-')))
  throw new Error('_additional.generate requires a generative-* module');

Type guard

function requestsModuleExtension(additionalProps) {
  return Array.isArray(additionalProps) && additionalProps.length > 0; // module-provided extras
}

Try / catch

try {
  return await client.graphql.get().withNearVector(nv).withFields('_additional { generate(singleResult: {prompt: "..."}) }').do();
} catch (e) {
  if (String(e).includes('explorer: get class: extend')) {
    console.warn('module extend failed:', e); // root cause is inlined after 'extend: '
    return await client.graphql.get().withNearVector(nv).withFields('title').do(); // fallback without _additional
  }
  throw e;
}

Prevention

When it happens

Trigger: A GraphQL Get query with `nearVector`/`nearObject` whose `_additional { ... }` block requests a module-provided extension (e.g. `_additional { generate }` with generative-openai), and the module's Extend call errors — remote inference HTTP failure, bad API key, prompt/option validation, or timeout over the result batch.

Common situations: Using `_additional { generate(singleResult:...) }` with an expired/missing OpenAI/Anthropic key; generative module timeouts on large result sets; requesting an `_additional` property from a module that is not enabled for the collection; version drift where the module no longer supports the requested extension.

Related errors


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