Change8

gradio@6.21.0

📦 gradioView on GitHub →
13 features🐛 16 fixes🔧 9 symbols

Summary

This release introduces several new features including improved workflow capabilities, enhanced event handling, and better API integration for OAuth tokens. It also includes numerous bug fixes for a more stable and performant user experience.

✨ New Features

  • Preserve browser-visible proxy origins for frontend assets and API requests, and retain app-level FastAPI root paths.
  • Fix chained events after cancellation and while the browser tab is hidden.
  • Allow API callers to supply a token for endpoints that take a `gr.OAuthToken`, via `oauth_token` on the Python and JS clients — sent only to endpoints that declare they need one.
  • Improve build performance.
  • Fix `gradio cc dev`, `gradio cc build`, and `gradio cc install` to respect a custom `FRONTEND_DIR` set on the component class, instead of assuming the frontend code lives in the `frontend` directory.
  • Add model endpoint integration to workflows.
  • Report why the Node SSR server failed, and serve without SSR on the expected port.
  • Improve canvas authoring and examples in workflows.
  • Fix spurious separators from empty tokens in `HighlightedText` with `combine_adjacent=True`.
  • Add HTML modality to workflows.
  • Various UX improvements for workflows, including automatically opening the write-access link in a browser tab when a `gr.Workflow` is launched locally, and calling vision-language models through chat completions so `image-text-to-text` model nodes work.
  • Fix error banner and textarea visibility in workflows.
  • Ensure trailing null values are handled in workflows.

🐛 Bug Fixes

  • Keep in-flight events and generators working when an app is hot-reloaded (`gradio app.py`).
  • Fix Windows filename/path handling (reserved names, node probe, file URLs).
  • Rerun HTML mount behavior when `gr.render` replaces an unkeyed component.
  • Reset audio playback position when the file is cleared or a new one is uploaded.
  • Strip `<style>` and `<link>` elements when sanitizing HTML in the frontend.
  • Fix crash when a streaming `gr.ChatInterface` function yields nothing.
  • Use anyio.to_thread to send sync server functions to thread pool in workflows.
  • Fix ColorPicker dispatching blur while the user is still using the picker dialog.
  • Stop deep-copying chat messages so components work as chat content again.
  • Fix `gr.Code` not rendering when it has no initial value.
  • CLI: don't delete the installed skill when an agent's skills directory is a symlink to the central location.
  • Keep fullscreen component controls inside the visible viewport when the page has a scrollbar.
  • Fix `gr.State` passing its callable default to event handlers instead of the called value.
  • Fix hidden tab focus and label overflow menu.
  • Only remount a plot when its payload changes.
  • Upload recorded audio only once to fix intermittent Content-Length errors when loading recordings.

Affected Symbols