Skip to content

v2.4.1

Choose a tag to compare

@hjxwz123 hjxwz123 released this 29 Aug 08:18
· 9 commits to main since this release

What's Changed

Aivory 2.4.1 makes image attachments useful with text-only chat models, aligns internal model policies with the model selected for each conversation, and fixes Tailwind and Google Fonts rendering in HTML previews. It also hardens image editing, improves the administrator onboarding flow, expands regression coverage, and adds direct links to the documentation and live demo.

Images with Text-only Models and Tools

  • Allows images to be uploaded from both the composer and conversation-files panel regardless of the selected chat model's native vision capability.
  • Keeps image attachments on the persisted conversation turn, including image-only turns, instead of filtering them out or rejecting the request before streaming begins.
  • Continues to exclude image blocks from provider requests when the selected model is not vision-capable, while showing a localized warning that the image remains available to conversation tools.
  • Preserves original image bytes for python_execute, MCP tools, restored conversations, and later model changes. Images still require a conversation scope and retain server-side signature and MIME classification.
  • Treats a current image attachment as a deterministic file-tool signal in Auto mode so an enabled file-capable tool can inspect it without relying on the route classifier to infer the need from the prompt.

Image Generation and Editing Reliability

  • Ignores a stale base_image_index when the model correctly selects previous_generation as the edit base. The index only applies to current_attachment and no longer causes a valid continuation edit to fail validation.
  • Clarifies the image tool schema so models omit attachment indexes for previous-generation edits.
  • Adds provider-mocked coverage for new generation, requested aspect ratios and resolution tiers, multiple outputs, PNG and JPEG edits, selected bases with reference images, prior-generation continuation, and editing an image generated earlier in the same turn.
  • Adds negative-path coverage confirming invalid operations stop before the provider call and do not create artifacts, while valid operations persist artifacts and image usage counts.

Internal Model Policy

  • Uses the current conversation model for titles, query routing, summaries, memory extraction, and other internal tasks when no dedicated task model is configured. The global default model remains the final fallback for task calls that have no usable conversation model.
  • Uses the current conversation model to classify ambiguous Auto tool requests when no dedicated tool-routing model is configured. Explicit task and tool-routing model selections continue to take precedence.
  • Makes context compaction consistently discover the current conversation model when the caller does not pass an explicit fallback.
  • Adds explicit Use current conversation model choices and updated guidance across model policy and context-memory settings.
  • Treats an unset task model as a valid inherited configuration in the administrator overview, while still reporting invalid configured model IDs.
  • Prevents administrators from selecting model-based prompt moderation until an enabled chat model is configured as the moderation model.

Administrator Onboarding

  • Adds optional task-model and tool-routing-model steps to the server-backed setup guide, with direct targets on the Model policy page and completion checks for valid enabled chat models.
  • Keeps these two model optimizations optional, so they never block required first-run setup.
  • Fixes navigation so Next continues through all remaining steps, Finish appears only at the end, and completion remains disabled until required setup is ready.
  • Shows Skip for now only for an unseen guide and simplifies the Back, Next, and Finish action hierarchy.
  • Updates all affected administrator copy in English, Simplified Chinese, Traditional Chinese, Japanese, and French.

HTML Preview Rendering

  • Detects generated Tailwind utility classes and injects the bundled @tailwindcss/browser runtime into the sandboxed preview document, so utility-based HTML renders with its intended layout and styling.
  • Avoids injecting Tailwind into ordinary custom-class documents and avoids adding a second runtime when the preview already includes Tailwind or is rebuilt.
  • Supports complete HTML documents and bare fragments while preserving mixed-content upgrades, safe external-link behavior, iframe sandboxing, and no-referrer requests.
  • Rewrites Google Fonts stylesheet and font-file hosts to reachable HTTPS mirrors while preserving resource paths.
  • Adds focused frontend tests for runtime detection, document-head insertion, duplicate prevention, custom CSS isolation, empty previews, and Google Fonts rewriting.

Documentation

  • Adds prominent links to the official documentation and live demo in the English and Simplified Chinese project READMEs.
  • Points both deployment quick-start guides to the official deployment and configuration documentation.
  • Updates the Chinese Auto tools documentation to describe current-conversation-model routing when no dedicated route model is set.

Upgrade Notes

  • No database migration or new environment variable is required for this release.
  • If task_model_id or tool_route_model_id is empty, internal calls now use the model selected for the current conversation. Configure dedicated low-latency, non-reasoning models if inheriting a reasoning model adds unwanted latency or cost.
  • Text-only providers still never receive image bytes as native visual input. To inspect such images, enable an appropriate sandbox or MCP tool, or select a vision-capable chat model.
  • HTML previews that use Tailwind utilities now load a runtime bundled with the application rather than relying on a public Tailwind CDN.

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

Release Scope

  • Documentation and demo links: 763e954.
  • Previous-generation image edit fix: 946d0ac.
  • Durable images for text-only models and tools: 14a104e.
  • Model policy, moderation guard, and onboarding refinements: 555a636 and a707465.
  • Image operation regression coverage: dd35d2c.
  • Tailwind and Google Fonts support in HTML previews: 9d8dfe6, ebd1de8, and 2999e85.

Full Changelog: v2.4.0...v2.4.1