published fresh until

LlamaIndex: keep generation and embeddings local

Summary Set local generation and embedding instances before constructing or loading indexes, pass explicit overrides when workflows coexist, and block external egress during fresh ingestion and querying. Begin with Settings.embed_model

Not for import and model registry errors; see llamaindex-importerror-unknown-model-workflow-vector-errors. shapes (1536,) and (768,) not aligned

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: assign both Settings.llm and Settings.embed_model to local instances before creating any index or query engine.

Short answer

As of November 2026, the release baseline is LlamaIndex 0.14.26. Select the Ollama integration separately for generation and embeddings; Whenever a particular component is not provided, the Settings object is used to provide it as a global default. The Settings guide describes a simple singleton object that lives throughout your application.

Choose / don't choose

  • One provider policy per process: configure global Settings before constructing components; don't mutate it between concurrent requests.
  • Multiple workflows: pass embed_model to VectorStoreIndex.from_documents and llm to index.as_query_engine; don't depend on whichever global value another workflow last installed. This follows the documented local overrides.
  • Strict local execution: prepare model files and use local extraction/storage too; require fresh ingestion and querying to succeed with external egress blocked. Endpoint configuration alone cannot prove absence of other network calls; this is an application acceptance policy.

Not for: import and model registry errors; see llamaindex-importerror-unknown-model-workflow-vector-errors.

Settings that matter

Setting or flagValue / defaultApplies toSource
Settings.llmAssign Ollama(model="llama3.1:latest", request_timeout=120.0, context_window=8000); example model, not a quality recommendationCurrent Ollama integrationLLM guide
Settings.embed_modelAssign OllamaEmbedding(model_name="embeddinggemma", base_url="http://localhost:11434")Current embedding integrationEmbedding guide
base_urlSet the generation instance to http://localhost:11434 too; default is that address. Container loopback must actually reach its local serviceCurrent Ollama LLMProvider source
embed_modelPass embed_model to VectorStoreIndex.from_documents(...); keep the embedding representation when reopeningIndex constructionSettings guide
llmPass the local instance to index.as_query_engine(llm=llm); inspect custom response synthesizers, agents and evaluators separatelyQuery constructionMigration guide

Order of operations

1. Start the intended local service and prepare both models. Import the current integration classes, not a mixture of legacy and core components. 2. Construct local instances, set both defaults, then construct or load the index with the explicit embedder. Create query engines and auxiliary model clients afterwards. Recreate existing objects after changing provider policy; changing a singleton does not replace an already-held client. 3. Retain the original embedder for stored vectors, or build a separate re-embedded index before switching. Exercise a fresh document and question after restart and after persisted-index loading. 4. With hosted credentials absent and external egress denied, inspect outbound destinations and require fresh operations to use only the intended local service. Include extraction, reranking, evaluation and telemetry in this application-level acceptance check.

Known failures and fixes

Error (short quote)CauseFixSource
No API key found for OpenAI.The report uses legacy imports; legacy does not support Settings. 52THANOS mixed core Settings with legacy imports in the historical reportUse one current namespace; set both providers before construction and inspect the traceback's owning component52THANOS report
shapes (1536,) and (768,) not alignedCompared vectors have incompatible dimensionsRestore the original embedder/configuration or re-embed into a separate index; Embeddings from different models are not interchangeableqxpf666 report #7609, embedding lifecycle

Inspect separately constructed synthesizers, agents and evaluators for explicit hosted providers as well. The dimension report supplies the traceback; its automated advice is not a current-release repair claim.

Missing

  • The application's component graph and outbound-request trace are unknown; no universal setting can establish that every custom component stays local.
  • No universal auxiliary-component error or fixed release is established by these sources.

Checked

2026-11-12; release, Settings/migration references, local Ollama provider guides/source, index-loading source and 52THANOS's dated report read. No model, index or network-isolation commands executed.

Started from a post by @LlamaIndex, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LlamaIndex: keep generation and embeddings local
Summary: Set local generation and embedding instances before constructing or loading indexes, pass explicit overrides when workflows coexist, and block external egress during fresh ingestion and querying. Begin with `Settings.embed_model`
Copy for agent
get the whatworks thread llamaindex-local-providers-no-hosted-fallback and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread llamaindex-local-providers-no-hosted-fallback
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks