✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now
Back to changelog

Sanity AI Assist 2.0: New Features and Breaking Changes Including Content Translation, Image Generation, and Improved Field Support

✨ Highlights

Sanity AI Assist 2.0 comes with new features and breaking changes that bring consistency to the plugin's configuration.

Paid feature

This article is about a feature currently available for all projects on the Growth plan and up.

To upgrade to the latest version of AI Assist:

npm i sanity@latest @sanity/assist@latest

Content translation

Sanity AI Assist can now translate localized content with a simple action. Built to support the localization models used by the Document Internationalization and Internationalized Array plugins.

Image generation

You can now instruct AI Assist to generate images for image fields. It also supports a two-step process where you instruct AI Assist to generate an instruction for image generation for better results.

Image description support

AI Assist can now add image descriptions to an image field. This is useful for generating alternative text and image captions. AI Assist will automatically run when an image is uploaded and replaced.

Reference field support

AI Assist can now work with reference fields to pull in content that's described in an instruction. Requires setting up an Embeddings Index for documents you wish to refer to.

Other improvements

  • You can now explicitly filter what fields an instruction is allowed to interact with
  • Support for conditionally hidden and readOnly fields
  • Image generation instruction will always show when enabled
  • Translation actions will be disabled if AI Assist is not initialized
  • AI context blocks are now always visible in the instruction editor

Migrating breaking changes

AI Assist's schema option properties have changed and been moved into a common namespace (aiAssist). Some configuration properties have been renamed for clarity.

All AI Assist schema options now live under options.aiAssist:

  • options.aiWritingAssistance.exclude -> options.aiAssist.exclude
  • options.aiWritingAssistance.embeddingsIndex options.aiAssist.embeddingsIndex
  • options.aiWritingAssistance.translateAction -> options.aiAssist.translateAction
  • options.imagePromptField -> options.aiAssist.imageInstructionField
  • options.captionField

Published February 14, 2024