github radzenhq/radzen-blazor v12.1.0
12.1.0

latest release: v12.1.1
5 hours ago

12.1.0 - 2026-10-12

Improvements

  • AIChat is built on Microsoft.Extensions.AI. AIChatService talks to the model through IChatClient: register the client of any provider (OpenAI, Azure OpenAI, Ollama and others) with AddChatClient and the chat picks it up, or keep the built-in OpenAICompatibleChatClient, which streams from any OpenAI-compatible chat completions endpoint and now parses tool calls. IAIChatService.GetChatClient() exposes the configured pipeline, with the Model, MaxTokens and Temperature defaults applied, to your own code.
  • AIChat calls your C# code. Tools takes the AIFunctions created with AIFunctionFactory; calls run automatically and render as cards with the arguments, status and result, ToolCallTemplate renders a result with Radzen components (generative UI), ApprovalRequiredAIFunction makes the chat ask the user before a tool runs (ApproveToolCall, RejectToolCall), and ToolCallCompleted, ShowToolCalls and AllowMultipleToolCalls control the rest. Multiple approvals in one answer are batched and the answer continues once all of them are decided.
  • AIChat shows the reasoning of models that expose it as a collapsible block above the answer (ShowReasoning), lists the sources of an answer under it (ChatMessage.Citations, ShowCitations, CitationTemplate) from the citation annotations of providers such as OpenAI web search or Perplexity and from tools that return ChatCitation, and normalizes the citation markers of gpt-oss models to plain [n].
  • AIChat takes file attachments. AllowAttachments renders a paperclip (AcceptedAttachmentTypes, MaxAttachmentSize, Error), AddAttachment adds files from code and pending attachments show as thumbnails under the input. Images go to multimodal models as image content, text files (txt, csv, md, json, xml and similar) as text so any model can read them, PDF files as file parts for providers that support them. A stop button replaces the send button while an answer streams; Stop() keeps the text received so far. ShowUsage shows the tokens the provider reports for each answer.
  • AIChat conversations persist through IConversationStore. InMemoryConversationStore keeps them for the lifetime of the application and AddConversationStore<TStore>() plugs in a database store; ConversationSessionSerializer round-trips a session with its model history, tool calls, results and attachments as JSON. The service saves after every answer, UserId tells whose conversation it is and GetOrCreateSessionAsync, GetSessionsAsync, ClearSessionAsync and DeleteSessionAsync manage the saved ones; a chat with a SessionId restores its conversation on initialization.
  • AIPrompt is a new component: a prompt box for one-shot AI tasks with suggested prompts, a streaming markdown output panel with copy and regenerate, and commands such as Shorter, Formal or Translate that refine the output. Context applies every prompt to a piece of text, for example the content or selection of an editor; Value, Output, Generated and OutputTemplate wire it into the page.
  • InlineAIPrompt is a new component that adds an AI assistant to any text field. A button opens an AIPrompt in a popup, the bound Value is the context and the output replaces it, is appended to it or is discarded. With TargetId set to the id of the input or textarea, the text selected in it becomes the context and only the selection is replaced. ShowButton="false" with OpenAsync(element) opens the popup from your own trigger and Applied reports the new value.
  • SmartPasteButton is a new component that fills a form from the text in the clipboard: it describes the properties of TModel to the model (Description and Display attributes guide it), asks for a JSON object and assigns the converted values to Data, including dates, numbers, enums and Guids, notifying the EditContext. Fields and Instructions narrow the request and Paste(text) works without the clipboard.
  • Embeddings are available through IAIChatService.GetEmbeddingGenerator(): OpenAICompatibleEmbeddingGenerator implements IEmbeddingGenerator<string, Embedding<float>> over any OpenAI-compatible embeddings endpoint (EmbeddingsEndpoint, EmbeddingsProxy, EmbeddingsModel in AIChatServiceOptions), or register the generator of your provider.
  • AIChatService refuses an API key in the browser. Everything in a WebAssembly client is visible to its users, so configuring ApiKey there, through the options, the component parameter or a per-message override, throws with a message that says to keep the key on the server and set Proxy to a server endpoint that adds it; Blazor Server applications keep working as before.
  • AIChat, AIPrompt and Chat render markdown while the answer streams instead of after it ends.
  • Markdown and the MarkdownEditor design view style lists, code, blockquotes, horizontal rules and inline HTML tags.
  • Demos get an AI section in the navigation and a redesigned AI overview page, with new demos for tool calling, generative UI, human in the loop, voice input, file attachments, citations and conversation persistence in AIChat, AI assistants for the DataGrid (natural language filtering, an AI column, semantic search with embeddings, AI highlight), the Scheduler, the Chart, the HtmlEditor and the MarkdownEditor.

Don't miss a new radzen-blazor release

NewReleases is sending notifications on new releases.