Status: available in the built-in runtime at the upstream revision used for this documentation. Install
powercontext[builtin] for in-process composition or powercontext[server] for the Server. Python 3.11 or later is required. Calls to real providers, credentials, and production latency were not validated in this verification.Choose one of four runtime states
Generation and embedding are optional and independent. A model-free Server remains useful: explicit Memory and FTS do not need either provider.
Generation does not enable the Scheduler. You may call
flush_memory manually, or configure POWERCONTEXT_SERVER_RUNTIME_SCHEDULE_SECONDS separately.
Configure the Server
Install one of the supported roles. This pin is the same commit as the LangGraph and LangChain pages, written as a full hash:POWERCONTEXT_SERVER_INFERENCE_GENERATION_MODEL_SETTINGS accepts a JSON object shared by generation pipelines, reranking, and the readiness probe. Put provider request fields under extra_body; keep credentials and static headers in provider configuration. Non-empty settings without a generation model, or settings containing extra_headers, fail configuration validation.
EMBEDDING_MODEL, EMBEDDING_PROFILE_ID, and EMBEDDING_DIMENSION are all-or-none. Partial configuration is rejected before startup. The profile is part of the persisted vector contract, so choose its ID, dimension, and normalization deliberately rather than changing them in place.
Use the structured generator directly
The low-level generator accepts an already constructed and opened Pydantic AIModel; it deliberately rejects a model string. The caller owns that model’s lifecycle.
InferenceConfig.generation_model accepts a model string, opens the provider model while the runtime is active, reuses it across the generation pipelines, and closes it with the runtime.
Follow the execution flow
Generation flow
Embedding flow
Understand search and write failures
A provider outage affects only the paths that depend on that provider. The table separates those paths from durable state that remains authoritative in storage.
Provider timeouts and temporary unavailability map to PowerContext inference errors and Server HTTP 503 responses. Invalid output, including reordered embeddings, a wrong vector count or dimension, and non-finite values, is rejected rather than indexed.
Check readiness without overstating it
Configured generation and embedding each add a non-blocking readiness probe. A failed inference probe reportsdegraded with HTTP 200, not not_ready. Runtime or database failure is the blocking case and returns not_ready with HTTP 503.
Set privacy and Scope boundaries
The provider receives the serialized input for the operation. Depending on the pipeline, that can include Source content, Memory candidates, a query, Handoff evidence, or Candidate-generation evidence. Provider usage records request and token counts; optional instrumentation may emit inference spans. Configure provider data handling and tracing before sending sensitive project material. Scope still selects PowerContext data. It does not stop selected content from leaving the Server for the configured model, prove user identity, grant model permissions, or approve generated content. Keep secrets out of Source and Memory when the provider must not receive them.Currently unsupported or not validated
Completion check
Before relying on inference, confirm that:- you chose one of the four states intentionally;
- the three required embedding fields are either all set or all absent;
powercontext readydistinguishesready,degraded, andnot_readycorrectly;powercontext capabilitieslists only the search and generation capabilities you configured;- explicit vector verification fails visibly rather than being mistaken for FTS fallback;
- your provider privacy, tracing, and retention settings fit the data sent by each pipeline;
- downstream domain validation and Candidate Review remain in place after schema validation.

