Skip to content

v2.1.1

Latest

Choose a tag to compare

@Ahmath-Gadji Ahmath-Gadji released this 24 Aug 14:02
· 85 commits to develop since this release
2198252

What's Changed

🐛 Bug Fixes

  • fix(rag): keep sources when the LLM omits the citation tag by @Ahmath-Gadji in #847
  • fix(docker): make venv writes group-writable to survive APP_UID drift by @Ahmath-Gadji in #844

📝 API Changes: Enhanced Source Filtering Response

This release improves source citation tracking with new fields in the OpenAI-compatible /v1/chat/completions response.

Response Structure: Sources are located in the extra field (JSON string) of the completion choice:

{
  "choices": [
    {
      "message": { "content": "..." },
      "extra": "{\"presented_sources\": [...], \"cited_sources\": [...], ...}"
    }
  ]
}

New Fields (v2.1.1+)

  • presented_sources — every source shown to the LLM (after context budget truncation), regardless of citation. Always present.
  • cited_sources — strictly what the model cited via the [Sources: ...] tag. Empty ([]) when no tag was found.
  • citations_reported (boolean) — true only when the model actually emitted a citations tag; false when the tag was missing.
  • all_retrieved_sources (optional) — all sources retrieved before filtering, only included when metadata.include_all_retrieved_sources: true is set in the request.

Backward Compatibility

The legacy sources field is retained for existing clients:

  • Falls back to cited sources when a citation tag is present
  • Falls back to all presented sources when no tag was found

Migration: New client code should adopt presented_sources + cited_sources + citations_reported for fine-grained tracking. Use cited_sources for LLM citations; fall back to presented_sources in the UI when citations are empty.

Upgrade Notes

  • Persisted venv volumes: if upgrading from v2.1.0 with an existing Docker volume for openrag_venv or Kubernetes PVC, recreate it once. The v2.1.1 fix for multi-UID venv syncing only applies to files written from here on. Either delete the volume/PVC and let it resync, or run chmod -R g+w openrag_venv/ on the existing volume.

Full Changelog: v2.1.0...v2.1.1