logoassistant-ui
Migrations

Migration to v0.9

Edge Runtime moved to @assistant-ui/react-edge

The edge runtime, as well as the CoreMessage type, moved to @assistant-ui/react-edge.

The following components and types have been moved to @assistant-ui/react-edge:

  • Edge Runtime

    • useEdgeRuntime
    • EdgeRuntimeOptions
    • EdgeModelAdapter
    • EdgeChatAdapter
    • EdgeRuntimeRequestOptions
    • createEdgeRuntimeAPI
    • getEdgeRuntimeResponse
  • Core Types

    • CoreMessage
    • CoreUserMessage
    • CoreAssistantMessage
    • CoreSystemMessage
    • CoreUserMessagePart
    • CoreAssistantMessagePart
    • CoreToolCallMessagePart
  • Core message converters

    • fromCoreMessages
    • fromCoreMessage
    • toCoreMessages
    • toCoreMessage

To migrate, use the migration codemod:

# IMPORTANT: make sure to commit all changes to git / creating a backup before running the codemod
npx assistant-ui upgrade

Language Model converters and useDangerousInBrowserRuntime moved to @assistant-ui/react-ai-sdk

The following methods have been moved to @assistant-ui/react-ai-sdk:

  • Language Model converters
    • toLanguageModelMessages
    • toLanguageModelTools
    • fromLanguageModelMessages
    • fromLanguageModelTools
  • Dangerous in Browser Runtime
    • useDangerousInBrowserRuntime

To migrate, use the migration codemod:

# IMPORTANT: make sure to commit all changes to git / creating a backup before running the codemod
npx assistant-ui upgrade

LangGraph unstable_allowImageAttachments removed

The unstable_allowImageAttachments option has been removed. Use the adapters option instead.

useLangGraphRuntime({
  adapters: {
    attachments: new SimpleImageAttachmentAdapter(),
  },
});

Markdown components.by_language removed

The components.by_language option has been removed. Use the componentsByLanguage option instead.