v2.2.12
What's Changed
Aivory 2.2.12 adds optional knowledge-base reranking, a platform-wide content-resource workspace for administrators, and durable provenance boundaries for generated-image galleries. It also reorganizes the main navigation, makes long conversation titles readable without widening the sidebar, and gives the shared chat composer a restrained focus response on both the home and conversation pages.
Knowledge-Base Reranking
- Adds optional reranking for retrieval results through an independently configured OpenAI-compatible reranking service.
- Lets administrators configure the reranking Base URL, API key, and model under Document settings without creating or reusing a normal chat-model channel.
- Keeps reranking disabled by default. Existing installations preserve their current retrieval behavior until an administrator deliberately enables it.
- Runs reranking only when a conversation has one or more attached knowledge bases. Ordinary conversations, direct chat attachments, sandbox files, and conversations without an attached knowledge base remain unchanged.
- Applies the existing minimum relevance threshold before reranking, then sends at most 24 eligible candidates to the reranking service.
- Preserves fixed Top-K handling, multi-knowledge-base result interleaving, adjacent-fragment expansion, citations, and the existing multi-turn knowledge retrieval flow.
- Uses a five-second reranking timeout so an unavailable service cannot indefinitely delay an answer.
- Falls back to the original reciprocal-rank-fusion order when the service times out, returns a non-success response, omits required result fields, produces invalid indexes, or otherwise cannot be used.
- Validates the enabled configuration atomically before saving. The administrator interface requires an absolute HTTP(S) Base URL ending in
/v1, a model, and an API key. - Sends the API key as a Bearer token and keeps it masked when settings are read back through administrator APIs.
- Adds focused unit coverage for successful reordering, truncated candidate sets, malformed responses, invalid indexes, HTTP failures, timeouts, and fallback ordering.
Administrator Content Resources
- Adds a new
/admin/resourcespage for reviewing knowledge bases, projects, and generated images across the entire installation. - Places the new page in the administrator navigation as a standalone operational surface instead of nesting it under an individual user's profile.
- Lets administrators filter knowledge bases by resource name and by the creator's username or email.
- Shows knowledge-base ownership, workspace context, description, embedding model and availability, vector dimension, document totals, processing states, failures, storage size, chunk count, sharing totals, shared members, uploaders, and timestamps.
- Reuses the existing document metadata and status model so administrators can inspect ready, processing, and failed documents without introducing a second ingestion system.
- Lets administrators filter projects by project name and by the creator's username or email.
- Shows project instructions, visual settings, ownership, workspace context, the dedicated knowledge base, index health, documents, activity totals, and paginated source conversations.
- Lets administrators filter generated images by the owner's username or email and by the persisted image-model attribution.
- Shows image previews, generation prompts when available, model information, owner, workspace, filename, media type, file size, artifact ID, message ID, conversation ID, generation time, and a link to the source conversation.
- Provides explicit initial loading, background refresh, filter loading, error, retry, empty, filtered-empty, detail loading, detail failure, and pagination feedback throughout the page.
- Keeps list requests and detail requests protected against stale out-of-order responses when filters, pages, tabs, or selected resources change quickly.
- Removes the redundant per-user Library action from administrator user menus while retaining the new global resource inventory.
- Registers all new resource APIs behind administrator authorization and exposes them as read-only inspection endpoints.
Generated-Image Provenance
- Adds a durable
sourcevalue to stored artifacts so the application can distinguish Python execution output from local image generation and hosted model image generation. - Records
python_execute,image_generate, andimage_generationat artifact creation time instead of inferring provenance later from a whole assistant message. - Restricts the user's My Gallery view to artifacts created by real image-generation paths.
- Applies the same source boundary to administrator per-user galleries, the new global image inventory, image totals, model options, and image detail lookups.
- Excludes charts, plots, screenshots, and other image files created by
python_executeeven when they share an assistant message with a generated image. - Keeps gallery discovery based on persistent artifacts and billing usage rather than removable request logs, so deleting usage logs does not remove correctly attributed gallery images.
- Leaves excluded artifacts intact in storage and in their source conversations; the change affects gallery and inventory visibility only.
Navigation and Interaction
- Reorganizes the main sidebar around concise Files, Knowledge, and Library destinations.
- Adds the Knowledge destination to workspace sidebars for users who have knowledge-base permission.
- Removes the duplicate Knowledge entry from the avatar menu.
- Renames the former Skills & prompts navigation label to the shorter Library label while retaining the existing skills and prompt functionality.
- Makes truncated conversation titles pan horizontally after pointer hover or keyboard focus so the complete title can be read without changing sidebar width.
- Measures only actually overflowing titles and adjusts the animation duration to the hidden text distance.
- Preserves the normal ellipsis and exposes a native full-title hint when reduced-motion preferences are enabled.
- Adds a subtle one-pixel focused lift and localized reflected light beneath the shared composer on both the home page and conversation page.
- Keeps the composer treatment restrained to the active state and avoids a full perimeter glow.
- Preserves mobile sizing, keyboard focus visibility, dark-theme contrast, and reduced-motion behavior.
Localization
- Adds complete administrator resource-management and reranking copy for English, French, Japanese, Simplified Chinese, and Traditional Chinese.
- Updates navigation labels consistently across all five supported languages.
Upgrade Notes
- Database migrations run automatically for SQLite and PostgreSQL; no manual SQL migration is required.
- The migration adds
artifacts.sourceas a non-null text field with an empty default for existing records. - Historical artifacts do not contain reliable per-artifact provenance. Records whose source remains empty are therefore hidden from user and administrator galleries after upgrading, but they are not deleted and remain available from their original conversations.
- New artifacts are attributed at creation time, so local image generation, hosted image generation, and Python execution are separated reliably going forward.
- Reranking settings are seeded automatically and remain disabled by default. Existing knowledge bases, embeddings, chunks, citations, document status, and conversation selections require no migration or reindexing.
- When reranking is enabled, the retrieval query and up to 24 eligible knowledge-base fragments are sent to the independently configured external reranking service. Administrators should choose a service whose privacy and retention terms match their deployment requirements.
- Reranking failures are non-fatal and preserve the original retrieval order; disabling the setting immediately returns the installation to its previous retrieval path.
- Image model attribution in the administrator inventory is derived from the persistent image usage associated with the source assistant message. The normal one-model generation flow is exact; a rare message that invokes multiple distinct image-generation backends can share one displayed model attribution across its images.
- Existing
/admin/users/:id/librarydeep links remain available for compatibility, but the visible administrator workflow now uses/admin/resources. - For Docker deployments, set
IMAGE_TAG=2.2.12and leaveSANDBOX_IMAGE_TAGunset after the matching application and sandbox image workflows complete.
Validation
go test -count=1 ./...andgo build ./...passed.- All 71 frontend test files and all 425 frontend tests passed.
- TypeScript type checking, ESLint, and the production frontend build passed.
- Focused Go tests passed for reranking behavior, administrator resource stores, image-source filtering, schema migration, settings validation, permissions, and image workflow attribution.
- Desktop and mobile browser checks passed for the home page and conversation page in light and dark themes, including focused and unfocused composer states.
- All 75 locale JSON files parsed successfully, and the new keys have parity across the five supported interface languages.
git diff --checkpassed.
Release Scope
- Knowledge-base reranking, administrator content resources, generated-image provenance, sidebar and title improvements, and composer focus treatment:
712086e(feat(admin): add content resources and knowledge reranking).
Full Changelog: v2.2.11...v2.2.12