Extension contracts · Rust

Models and processors

Use CoreCortex-owned contracts for embeddings, language models, chunking, and relationship extraction while implementations remain independently replaceable.

Available now

CoreCortex provides OpenAI-compatible Rust implementations of EmbeddingProvider and LanguageModelProvider. They can target LiteLLM Rust, TensorZero, current LiteLLM, or a customer gateway that exposes the corresponding embeddings and chat-completions endpoints.

LiteLLM Rust support is available at this provider boundary today. Because the official Rust gateway is moving through a staged beta, confirm that the selected build exposes the endpoint required by the strategy. The CoreCortex API remains unchanged as gateway endpoint coverage evolves.

Core interfaceRoleAvailable implementation
EmbeddingProviderCreate reproducible vectorsDeterministic local, Ollama, OpenAI-compatible gateway
LanguageModelProviderSynthesize from authorized evidenceOpenAI-compatible gateway
ChunkingStrategyCreate retrievable fragmentsWhole-record, token-window, sentence-aware, Markdown-aware
RelationExtractorCreate evidenced triplesConfigured explicit-field reference plus registered extractor packages

Configure LiteLLM Rust or TensorZero embeddings

Change COREC_MODEL_GATEWAY to tensorzero and point the URL at its OpenAI-compatible API root to use TensorZero. TensorZero is the default Rust-native gateway recommendation. LiteLLM Rust fits teams already using LiteLLM configuration and routing. The model revision stays explicit because a gateway alias can outlive its backing model.

Rig remains a candidate library for direct-provider and local-model packages. Those packages implement the same CoreCortex provider interfaces.

yamlCoreCortex Core
pipeline:
  - use: embedding.generate
    with:
      provider: openai-compatible
      model: corpus-embedding
Ignored .env
dotenvProduced artifact
COREC_MODEL_GATEWAY_URL=http://127.0.0.1:4000/v1
COREC_MODEL_GATEWAY=litellm-rust
COREC_MODEL_GATEWAY_API_KEY=replace-locally
COREC_EMBEDDING_MODEL_REVISION=deployment-2026-08

Use a language-model provider in a response plan

The Synthesis page owns response-plan configuration, request envelopes, citation checks, and worker responses.

Select a Core chunker

Core ships whole-record, fixed token-window, sentence-aware, and Markdown-aware chunkers. Existing text.chunk stages use token-window by default. The tokens setting is a maximum, so a short record remains one short fragment. Each strategy produces FragmentDocument values with processor version, configuration fingerprint, token count, section path, source lineage, and inherited access.

The ingestion runtime stores the selected fragments and embeds the same fragments for vector projections. Semantic results resolve to the exact authorized canonical fragment, and record deletion propagates every fragment identity to the vector adapter.

yamlCoreCortex Core
pipeline:
  - use: text.chunk
    with:
      strategy: corec.chunk.markdown-aware
      tokens: 240
      overlap: 30

Select optional packages during enablement

An Enterprise enablement begins with the customer's datasets and retrieval needs. The FDE first evaluates Core strategies, then registers a separately owned package only when measured evidence shows that additional behavior is useful.

The generic Core and Enterprise distributions contain no customer or vertical processor and report an empty optional-package inventory. Optional packages live as independent private Rust crates in their owning application or customer delivery repository.

Every package carries a manifest, compatible Core API version, processor identities and versions, supported record types, configuration JSON Schema, and distribution metadata. Stage B records the package and processor versions; certification binds the selected configuration and full-evaluation evidence.

shellCustomer distribution inventory
corec strategy list
corec strategy describe io.customer.pack.document-structure

# Materialize only after selecting a registered strategy
corec dataset chunk \
  --input engagement/05-dataset/records.jsonl \
  --output engagement/07-fragments/candidate.jsonl \
  --strategy io.customer.chunk.document-structure \
  --configuration engagement/chunk-settings.json
PackageProcessorWhen it applies
Core referencecorec.chunk.*A portable baseline satisfies the reviewed dataset
Application-ownedApplication-owned stable IDA product owns reusable behavior for its data
Customer-specificCustomer-owned stable IDA reviewed dataset requires behavior that existing strategies do not provide

Chunking and extraction remain independent

Semantic or contextual chunkers can call a registered model provider while retaining their own strategy identity.

RelationExtractor produces source-grounded TripleDocument values. spaCy, GLiNER, LLM-based, and domain-specific extractors can run through Rust, subprocess, gRPC, WASI, or container packages while preserving evidence, confidence, origin, validity, and access policy.

Continue readingSynthesis→