Structured errors and Azure OpenAI support in CocoIndex

CocoIndex 0.3.11–0.3.26 adds structured errors with Python stack traces, warnings for slow live updates, Azure OpenAI and OpenRouter embeddings.

ChangelogUpdated 8 min read
CocoIndex 0.3.11 to 0.3.26: structured errors and Azure OpenAI support, with the core changes, integrations and a 16-release track
Enlarge cover

Structured errors and Azure OpenAI support in CocoIndex

Zoom in to see details.

CocoIndex 0.3.11 to 0.3.26: structured errors and Azure OpenAI support, with the core changes, integrations and a 16-release track

CocoIndex shipped 16 releases (0.3.11–0.3.26) in this cycle and reached #1 on GitHub Trending for Rust. The releases focus on production use: structured errors with stack traces across Rust and Python, warnings for slow live updates, failure handling, and new connector and LLM options.

GitHub Trending for Rust, today: cocoindex-io/cocoindex in first place, with 4,234 stars and 187 stars that day, above rust-lang/book and denoland/deno
#1 on GitHub Trending for Rust, with 187 stars that dayEnlarge
GitHub Trending for Rust, today: cocoindex-io/cocoindex in first place, with 4,234 stars and 187 stars that day, above rust-lang/book and denoland/deno

Agents need their context updated as source data and transformation logic change. CocoIndex incrementally updates derived data from sources such as PDFs, codebases, and meeting notes. The source and release history are in the CocoIndex repository.

Core runtime: errors, warnings and reprocessing

The runtime adds structured errors with stack traces across Rust and Python. Other changes cover target drop failures, slow-update warnings, forced reprocessing, progress rendering, and internal API cleanup.

Structured error system

The new error system changes how errors are defined and propagated:

  • Structured error framework with host exception tunneling
  • Python stack traces that propagate end to end
  • Unified error types for exception messages and logging in the Rust and Python layers (#1380, #1413)

refresh_interval warnings for slow live updates

CocoIndex now warns when a live update pass takes longer than refresh_interval, which means updates are falling behind (#1408).

--full-reprocess: force a full recomputation

Run cocoindex update --full-reprocess ... to force a full recomputation during an incremental update, for example to reset state (#1385).

Tolerate target drop failures

Target drops can fail when a connection is unavailable, which blocks pipeline setup updates. Set COCOINDEX_IGNORE_TARGET_DROP_FAILURES to true to log the failure and continue. By default, a drop failure still stops the update, and the error message names this option (#1454).

Flow correctness fixes

  • Corrected target diffing for user-managed setup states (#1369)
  • Full-text search (FTS) fixes for LanceDB (#1403)

Simpler progress bar

The progress bar now has a simpler presentation (#1467).

Internal API cleanup

datatype.py is now a separate module, and many internal entries moved to _internal, which reduces the public API surface (#1402).

Integrations: connector options and LLM support

These releases add connector options and LLM integrations.

Sources and targets

Qdrant

The Qdrant connector now supports VectorIndexMethod HNSW configuration (#1410).

Postgres

The Postgres source now supports pgvector types (#1387).

Local files

The LocalFile source now follows symlinks. It treats symlinked directories as directories, and it skips broken symlinks with a warning (#1463).

LanceDB

Functions and LLM providers

Azure OpenAI

Azure OpenAI is now an LLM provider, so CocoIndex pipelines can use your Azure deployments (#1362).

OpenRouter embeddings

OpenRouter now supports embedding models, in addition to LLMs (#1359).

Shared OpenAI and Azure OpenAI code

openai.rs and azureopenai.rs now share logic (#1376).

expected_output_dimension for embed_text

The new parameter is used for validation and the schema, separately from output_dimension, which goes to the API. Use it with OpenAI-compatible embedding APIs that reject the dimensions parameter (#1373).

Direct JSON output in functions

The GeneratedOutput enum lets functions return structured JSON for downstream use (#1395).

Gemini API key fix

The Gemini API key now propagates correctly across function calls (#1375).

Projects built with CocoIndex

These 4 projects show CocoIndex pipelines in use.

Keep multimodal data fresh with LanceDB

LanceDB + CocoIndexkept in sync
sourceReal-world APIs, databases, filesystems
textimagesJSON
transformations
ParseJson()
then, per record
TextEmbedding()ExtractFeatures() · DSPyImageEmbedding()
targetLanceDB
textimagesembeddingsderived features

CocoIndex engine
Pipeline catalogFailure managementCachingChange captureLineage
observe
CocoInsight UI

Agents that search, reason, and act over long periods need infrastructure that keeps multimodal data fresh.

LanceDB published a full walkthrough with us that builds a live-updating multimodal search index. Text, images, embeddings, and LLM-derived features stay in sync as data and logic change. The details are in the tutorial.

What the example covers:

  • Incremental processing: Only new or changed records are reprocessed. If you add 1 recipe, update 1 image, or fix 1 ingredient, CocoIndex touches only that change, not the other 100k rows.
  • Multimodal indexing: Text, images, embeddings, and metadata live together in LanceDB, which serves both search and analytics.
  • Schema evolution: The example adds LLM-extracted feature columns (vegetarian, dairy, category, etc.) after data is live. CocoIndex updates the schema and backfills, with no table rebuilds.
  • Structured LLM extraction: DSPy signatures define the input and output types, so the LLM returns typed fields.
  • Upserts and deletes: Primary keys and incremental flows prevent duplicates and stale rows, so you maintain no “did this record change?” logic.
  • Lineage and observability: CocoInsight shows why a record changed and which transformation produced each field.
  • Live mode: Run the pipeline continuously. As data arrives or logic changes, the search layer updates in near real time.

The same approach applies to PDFs, slides, screenshots, images, videos, and support tickets in enterprise data lakes.

HackerNews topicsincremental
sourceHackerNews APIthreads · comments
custom source
New or changed messagesincremental sync
LLM extractionnormalized topics
targetPostgrestopics · metadata · scores
queryQuery handlersweighted trend ranking
observeCocoInsight UI
consumeAI agents, dashboards

Tracking emerging topics by hand across thousands of HackerNews threads and comments is not practical. This example builds an incremental trending topics pipeline on HackerNews with CocoIndex. It shows how high-volume community data can be incrementally ingested, enriched with LLMs, and queried as structured, up-to-date knowledge.

An LLM extraction step processes each thread and comment to identify normalized topics (technologies, products, companies, people, etc.). These topics and the original messages are indexed into Postgres as queryable tables. Weighted scoring separates primary topics in threads from secondary mentions in comments, which gives better trend rankings.

The result is a set of continuously updated tables that dashboards, analytics, or AI agents can query. The details are in the blog post.

Build a knowledge graph from meeting notes

Meeting notes graphauto-updates
sourceMeeting notesGoogle Drive
CocoIndex + LLM extraction
Identify changes
Extract structure
Map relationships
target · graphNeo4j
Person
ATTENDED → Meeting
Meeting
DECIDED → Task
Person
ASSIGNED_TO → Task

Meeting notes hold decisions, tasks, owners, and relationships, and they change over time. This walkthrough turns meeting notes in Drive into a live-updating knowledge graph using CocoIndex and LLM extraction. The details are in the tutorial.

What the example covers:

  • Incremental processing: Only changed documents are reprocessed. If 1% of thousands of meeting notes change each day, CocoIndex reprocesses only that 1%, which saves 99% of the LLM cost and compute of a full run.
  • Structured extraction with LLMs: A typed Python dataclass is the schema, so the LLM returns structured objects.
  • Graph export: CocoIndex maps nodes (Meeting, Person, Task) and relationships (ATTENDED, DECIDED, ASSIGNED_TO) directly into Neo4j, with no hand-written Cypher.
  • Automatic updates: If a meeting note changes (task reassigned, typo fixed, new discussion added), the graph updates.

Extract patient intake forms with DSPy

Intake form extraction: DSPy + CocoIndex
sourceIntake formsdocuments
CocoIndex pipeline
Ingestion
DSPy extractor
ValidationPydantic model
targetStructured datadatabase

No OCR or regex. Strong typing and separation of concerns.

Patient intake forms hold structured clinical data, but OCR and regex pipelines do not reliably capture their nested, conditional, and variable structure.

The DSPy and CocoIndex patient form extraction project extracts typed patient data from PDF intake forms. It uses vision models and Pydantic validation rather than a separate text-extraction step. The output is a set of up-to-date, queryable patient models for downstream systems, analytics, or AI agents. The details are in the tutorial.

Thanks to the community

Thanks to the contributors below. 8 of them made their first CocoIndex contribution in these releases.

@1fanwang

Thanks for adding Azure OpenAI support as an LLM provider in #1362, enabling enterprise users to use CocoIndex with their Azure deployments.

@vipulaSD

Thanks for adding field-level descriptions for data classes in the Product Recommendation example in #1327, making the example more informative and easier to understand.

@prrao87

Thanks for adding support for embedding models in OpenRouter in #1359, expanding LLM provider options, and fixing typos and consistency issues in the docs in #1360, making the documentation clearer and more polished.

@Haleshot

Thanks for improving the README note for better GitHub rendering in #1288, shifting to the tracing crate for logging in #1363, adding Postgres server reminder to quickstart docs in #1368, fixing the broken workflow badge in README in #1370, introducing a structured error system with host exception tunneling in #1380, adding llms.txt file to docs in #1455, adding short flag aliases for common CLI options in #1458, and adding env file sourcing tip to meeting_notes_graph example in #1470.

@thisisharsh7

Thanks for making openai.rs generic to share logic with azureopenai.rs in #1376, including mypy type checking for the examples directory in #1383, and adding the GeneratedOutput enum for direct JSON returns in #1395, enhancing type safety and code reusability.

@prithvi-moonshot

Thanks for adding onBrokenAnchors config to report documentation errors in #1325, providing an option to force reprocessing during update in #1385, and making target deletion (drop) tolerate failures in #1454, improving robustness of the data pipeline.

@skprasadu

Thanks for wrapping cargo test to avoid embedded Python stdlib discovery crash in #1398, moving Query Support above Built-in Sources in the docs for better organization in #1397, and adding a warning when live update pass exceeds refresh_interval in #1408.

@Gohlub

Thanks for adding with_context to user-configured operations in #1275, enabling context-aware flows for sources, functions, and targets.

@wxh06

Thanks for adding expected_output_dimension parameter to embed_text in #1373, providing more control over embedding output dimensions.

@samojavo

Thanks for fixing mypy errors in example entry points and adding a local type-check script in #1248, improving code quality and developer experience.

@aryasoni98

Thanks for enabling programmatic API key passing besides reading from environment variables in #1134, providing more flexibility in configuration.

@shinobiwanshin

Thanks for enhancing the Button component with hover effects and styling improvements in #1393, making the UI more polished and interactive.

@majiayu000

Thanks for adding VectorIndexMethod support for HNSW configuration in Qdrant in #1410, enabling more fine-grained control over vector indexing parameters.

Summary

This CocoIndex cycle adds structured errors, LLM integrations, and runtime diagnostics.

CocoIndex v1 has since shipped and replaces the v0 API used on this page. The v1 release notes start with CocoIndex 1.0.1 to 1.0.7; all release notes are under the changelog tag.

Build fresh context for your agents.

CocoIndex keeps derived data in sync with its sources. Only what changed re-runs.