{"record":{"id":"b7113e30aaa2efe7","repo":"weaviate/weaviate","slug":"explorer-get-class-extend-v","errorCode":null,"errorMessage":"explorer: get class: extend: %v","messagePattern":"explorer: get class: extend: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/traverser/explorer.go","lineNumber":350,"sourceCode":"\t\t\t\t}\n\t\t\t\tif stripVector != \"\" {\n\t\t\t\t\tdelete(res[i].Vectors, stripVector)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Module extension (rerankers) runs after MMR — skipped in searchForTargets\n\t\t// under MMR — so rerankers re-sort the diversified page, matching the\n\t\t// hybrid path where ListExploreAdditionalExtend follows selection.\n\t\tif e.modulesProvider != nil {\n\t\t\tvar searchVector models.Vector\n\t\t\tif len(searchVectors) > 0 {\n\t\t\t\tsearchVector = searchVectors[0]\n\t\t\t}\n\t\t\tres, err = e.modulesProvider.GetExploreAdditionalExtend(ctx, res,\n\t\t\t\tparams.AdditionalProperties.ModuleParams, searchVector, params.ModuleParams)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, errors.Errorf(\"explorer: get class: extend: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif len(searchVectors) > 0 {\n\t\treturn res, searchVectors[0], nil\n\t}\n\treturn res, []float32{}, nil\n}\n\n// mmrFetchDepth returns how deep to fetch before MMR. It must reach at least windowEnd\n// (offset+limit) so the [offset:offset+limit] window is populated; when boost is active it\n// fetches Boost.Depth deep (so boost re-ranks that deep), floored at windowEnd.\nfunc (e *Explorer) mmrFetchDepth(boost *filters.Boost, windowEnd int) int {\n\tif boost == nil || boost.Weight <= 0 {\n\t\treturn windowEnd\n\t}\n\tdepth := boost.Depth","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/traverser/explorer.go#L332-L368","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the `%v` suffix of the message — it contains the module's own error (auth, rate limit, timeout) and fix that root cause.","Validate the module's credentials/config (e.g. OPENAI_APIKEY, ANTHROPIC_APIKEY, base URLs) and re-test with a single-object query.","Reduce `limit` so the module extends fewer objects, avoiding provider rate limits and timeouts.","Remove the unsupported `_additional` field from the query or enable the owning module (ENABLE_MODULES).","Retry on transient provider errors; consider configuring module timeouts/whitespace-tolerant retry behavior."],"exampleFix":"// before\n{ Get { Article(nearVector: {vector: [...]}) { title _additional { generate(singleResult: {prompt: \"summarize {title}\"}) } } } }\n// fails with generative-openai key missing\n\n// after: export OPENAI_APIKEY=sk-... and ENABLE_MODULES=text2vec-openai,generative-openai\n// or drop _additional.generate until module is configured\n{ Get { Article(nearVector: {vector: [...]}) { title } } }","handlingStrategy":"try-catch","validationCode":"// Pre-check that every _additional field requested belongs to an enabled module\nconst needed = ['generate'];\nif (needed.some(f => query.additional.includes(f)) && !enabledModules.some(m => m.startsWith('generative-')))\n  throw new Error('_additional.generate requires a generative-* module');","typeGuard":"function requestsModuleExtension(additionalProps) {\n  return Array.isArray(additionalProps) && additionalProps.length > 0; // module-provided extras\n}","tryCatchPattern":"try {\n  return await client.graphql.get().withNearVector(nv).withFields('_additional { generate(singleResult: {prompt: \"...\"}) }').do();\n} catch (e) {\n  if (String(e).includes('explorer: get class: extend')) {\n    console.warn('module extend failed:', e); // root cause is inlined after 'extend: '\n    return await client.graphql.get().withNearVector(nv).withFields('title').do(); // fallback without _additional\n  }\n  throw e;\n}","preventionTips":["Validate provider credentials (e.g. OPENAI_APIKEY) at deployment time, not first query.","Keep `limit` modest on generate/extend queries to avoid provider rate limits and timeouts.","Match _additional fields to modules actually listed in ENABLE_MODULES.","Log the inlined module error after 'extend:' — it names the exact provider failure."],"tags":["graphql","modules","generative","additional-properties"],"backgroundTag":"module-extend-failed","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}