Skip to content

v2.4.0

Choose a tag to compare

@hjxwz123 hjxwz123 released this 29 Aug 02:56
· 11 commits to main since this release

What's Changed

Aivory 2.4.0 introduces a lightweight personal deployment backed by SQLite, a guided administration experience, safer and more predictable tool execution, and stronger authentication and model-configuration protections. It also expands operational visibility, improves image generation and editing decisions, adds complete LaTeX copying, and refines the chat experience across desktop and mobile.

Personal Deployment and Embedded Vectors

  • Adds deploy/docker-compose.personal.yml and .env.personal.example for a single-instance deployment that runs Aivory without external PostgreSQL, Redis, or Qdrant services.
  • Stores application data and vector embeddings in SQLite, with in-process cache and queue implementations. A new exact cosine-similarity backend supports VECTOR_BACKEND=sqlite, alongside qdrant, disabled, and automatic selection.
  • Includes SQLite vector data in logical backups and removes it with the corresponding documents, knowledge bases, and conversations.
  • Keeps the sandbox optional through the Compose sandbox profile. Existing full-stack deployments continue to use PostgreSQL, Redis, and Qdrant unchanged.

Guided Administration and Model Setup

  • Replaces the static first-run checklist with a server-backed walkthrough that can navigate administrators between configuration pages, retry status checks, skip recommended steps, and be reopened later.
  • Detects personal and full deployments and distinguishes required channel, chat-model, and default-model setup from recommended embedding, search, sandbox, and SMTP configuration.
  • Can discover and import compatible provider models when a channel is created, while skipping duplicates or unsupported entries and reporting complete, partial, empty, and failed outcomes.
  • Expands the administrator overview with 24-hour activity metrics, configuration health, and a global offline indicator.
  • Adds expandable workspace knowledge-base details covering documents, indexing, embedding configuration, status, and storage usage.

Tool Execution and LLM Reliability

  • Adds batched web operations: aivory_web_search accepts up to five queries and web_fetch accepts up to four URLs, with bounded concurrency, deduplication, stable ordering, and partial-success results.
  • Introduces per-turn tool and time budgets plus repeated-call and no-progress detection. When a limit is reached, Aivory stops calling tools and asks the model for one final tool-free response instead of allowing an endless loop.
  • Applies the safeguards consistently across OpenAI Chat, OpenAI Responses, Anthropic, Gemini, prompt-tool flows, and Deep Research, with explicit tool_budget_exceeded and tool_no_progress handling.
  • Reduces repeated context-compaction attempts and separates compaction and turn orchestration into focused modules with expanded regression coverage.

Image Generation and Editing

  • Plans image requests explicitly as generation or editing operations and identifies whether the edit base is a previously generated image or a selected current attachment.
  • Supports choosing a specific base from multiple attachments while keeping the remaining images as references.
  • Prevents new-generation requests from accidentally carrying prior or current images into an edit request.
  • Fails closed and asks for clarification when the intended edit base is ambiguous, while preserving provider parameters, dimensions, image counts, fallbacks, quotas, and usage reporting.
  • Handles deleted conversation attachments without breaking history restoration or image-capability checks.

Authentication and Session Security

  • Reworks the slider captcha around server-signed pass tokens with stronger verification, replay prevention, and expiration enforcement.
  • Retries transient OAuth token-exchange timeouts once on a fresh connection, extends the exchange timeout, and restricts public OAuth errors to a fixed allowlist so provider responses and tokens are not exposed.
  • Enforces exclusive refresh sessions at login. Refresh-token reuse revokes the complete session family, while browser tabs serialize refreshes with Web Locks to avoid false replay detection.
  • Adds refresh-cookie CSRF validation to refresh, session, and logout endpoints.

RAG and Document Safety

  • Prevents deletion of embedding models or channels that are referenced by global settings or knowledge bases, and blocks changes to vector-identity fields while those references exist.
  • Returns localized conflict responses with recovery guidance instead of surfacing database foreign-key errors, including for historical dangling-model configurations.
  • Surfaces parser and MinerU availability failures in document workflows so administrators can configure the missing service and retry indexing.
  • Requires hosted tools to be configured explicitly; new models and channel imports no longer receive implicit OpenAI hosted-tool defaults.

Chat, Formula, and Sharing Experience

  • Copies the complete LaTeX source from rendered inline and block formulas and provides localized success or failure feedback without disrupting citation interactions.
  • Tracks and displays thinking duration, hides unavailable timing data in restored tool traces, and fixes reasoning Markdown line breaks around bold titles without changing ATX headings or creating unintended lists.
  • Adds the same user avatar menu to mobile home and conversation headers, contains image attachments within message bubbles, and restores the configured default tool selection in new chats.
  • Refines shared conversations, conversation renaming, font preferences, sidebar hierarchy, and general visual alignment.
  • Reduces the desktop chat title bar from 56 px to 48 px and blends scrolled messages into it with the same subtle fade treatment used between sidebar controls and conversation history.
  • Aligns the Personalization page's Response style and Tools headings with the typography used by other settings tabs.
  • Unifies sub-conversation, HTML preview, and conversation-file drawers with matching title typography, borderless chat edges, and open/close motion. HTML output now begins directly below its title without a framed preview card or persistent sandbox caption.

Permissions, Administration, and Sandbox Recovery

  • Adds conversation-deletion permissions to user groups and workspace members, enforces separate checks for deleting conversations and message rounds, and hides unavailable deletion actions in the client.
  • Shows nicknames in usage records and lets administrators search usage by nickname, email address, or user ID.
  • Recovers missing sandbox sessions from archives, supports restoration under a read-only root filesystem, and improves artifact-link recognition in Markdown and inline threads.

Deployment and Platform Support

  • Publishes sandbox runner and sidecar images for both linux/amd64 and linux/arm64 under the same semantic-version tag, matching the existing multi-architecture application image.
  • Lets Compose select the correct supported architecture automatically. 32-bit ARM remains unsupported.

Upgrade Notes

  • Database migrations run automatically; no manual SQL is required. The new vector_points table stores embeddings when the SQLite vector backend is active.
  • Existing full-stack installations remain on PostgreSQL, Redis, and Qdrant and do not need to migrate to the personal profile. The personal and full-stack Compose configurations are separate deployment paths and must not be combined.
  • The personal profile is designed for one application instance. Do not horizontally scale it or place its SQLite database on NFS or another network filesystem.
  • Logging in replaces existing refresh sessions, so users may need to sign in again on other devices after the upgrade.
  • Review hosted-tool settings after upgrading because hosted tools now require explicit administrator configuration.
  • Embedding models and channels referenced by knowledge bases or global settings can no longer be removed or have their vector identity changed until those references are updated.
  • New settings use safe defaults and introduce no required environment variables. ARM64 installations can use the same v2.4.0 image tags as AMD64 installations.

Validation

  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build
  • go test ./... from server/
  • go build ./... from server/
  • python3 -m unittest discover -s tests/sandbox-service -p 'test_*.py'
  • Locale JSON validation with jq empty
  • git diff --check

Related Issues and Pull Requests

  • Resolves #25 through #26: rendered inline and block formulas now copy their complete LaTeX source with localized success and failure feedback.

Release Scope

  • Personal SQLite deployment and vector backend: 59e9131 (feat(deploy): add personal SQLite profile).
  • Guided administration and model setup: ad98495, 5d53476, beb76a2, 42deb89, and 87caa70.
  • Tool batching, loop protection, and LLM orchestration: 7c7322c, 44234cd, bc4a239, and 6ba9fa2.
  • Image generation and editing routing: 740999b (fix image generation and editing routing).
  • Authentication and session security: b5fd8f5, d881cb0, and 63892b4.
  • RAG, document parsing, and explicit hosted tools: 1847588, b7e184d, and 5fb859c.
  • Chat and interface improvements: 4178937, c6aa7ad, 438d557, 5a9fcb7, 659bee6, and 4c0536f.
  • Conversation permissions, administrative visibility, and sandbox recovery: cecfcb3, af37c01, 5787054, 49ccf37, and febd235.
  • Multi-architecture sandbox images: 415fd77 (build(docker): publish sandbox images for arm64).

Full Changelog: v2.3.1...v2.4.0