Repository navigation
Chainlit 3.0.0rc1
Pre-releaseNote
This is a pre-release of chainlit-community 3.0.0, published for testing. It may still change before 3.0.0 is released; please report what you find.
Changelog
Changes in 3.0.0 since the last release:
Added
- Preview builds. Every commit on
mainthat passes CI is published as a pre-release on GitHub Releases, versioned<next version>.dev<N>(e.g.3.0.0.dev1234), with the wheel, the sdist, the@chainlit/react-clienttarball,SHA256SUMSand build provenance attestations. The wheel includes the built frontend, so it installs by URL without Node or pnpm; see Installation. Preview builds are not published to PyPI or npm. - Every pull request gets a downloadable build of the same files as a workflow artifact, with a comment on the pull request explaining how to install it.
- Official versions are published to PyPI as
chainlit-communityand as GitHub releases, with checksums and build provenance attestations. Alphas, betas and release candidates are marked as pre-releases. - Final releases come with a hand-checked upgrade guide in
docs/releases/, which is also the first part of the release notes.
Changed
- Breaking: the distribution is renamed to
chainlit-communityon PyPI. The import package and the command are unchanged: you stillimport chainlitand runchainlit. To migrate:- Uninstall the original distribution first:
pip uninstall chainlit. Both distributions provide thechainlitimport package, so when both are installed they overwrite each other's files. - Install the new one:
pip install chainlit-community(uv add chainlit-community,poetry add chainlit-community). - Replace
chainlitbychainlit-communityinrequirements.txt,pyproject.tomland lock files, including extras:chainlit[custom-data]becomeschainlit-community[custom-data]. - Third-party packages that depend on
chainlitstill pull in the unmaintained original alongsidechainlit-community;pip show chainlitshows whether it is installed and what requires it. - The files are now named
chainlit_community-<version>-py3-none-any.whlandchainlit_community-<version>.tar.gz, for preview builds too. Update any URL or script that refers tochainlit-<version>....
- Uninstall the original distribution first:
@chainlit/react-clientis now version0.6.0, the next release of the package, so that its preview builds (0.6.0-dev.<N>) sort above the0.5.0already on npm.- Breaking: the generation and step types (
cl.ChatGeneration,cl.CompletionGeneration,cl.GenerationMessage, ...) and the OpenAI / Mistral AI instrumentation behindcl.instrument_openai()/cl.instrument_mistralai()now live in Chainlit itself. Theliteralaipackage is no longer a dependency, and neither are its transitive dependencies (traceloop-sdk,chevron, theopentelemetry-instrumentation-*and OTLP exporter packages,anthropic,grpcio,cuid,inflection,docstring-parser). Apps thatimport literalai(or any of those packages) themselves must add it to their own dependencies. cl.ChatGeneration/cl.CompletionGenerationare now Chainlit's own classes rather than aliases of theliteralaiones, soisinstance()checks no longer matchliteralaigeneration objects. Their fields and serialised form are unchanged.literalai_*keyword arguments (literalai_tags,literalai_metadata, ...) passed to instrumented OpenAI / Mistral AI calls are still accepted for backward compatibility. This might be removed in a future release, so stop passing them.cl.instrument_mistralai()now raisesModuleNotFoundErrorinstead of a genericExceptionwhenmistralaiis not installed.- Breaking: Chainlit now requires Python
>=3.11.5,<3.14.0(was>=3.10,<3.14.0). Python 3.10 and 3.11.0 to 3.11.4 are no longer supported:chainlit-communitydoes not install on those interpreters. Move to Python 3.11.5 or later before upgrading, including in base images and CI matrices. chainlit lint-translationsnow exits with status 1 when a translation file in.chainlit/translationsdiffers from the packageden-US.json(a missing key, an extra key or a structure mismatch), and prints the number of differences. It used to print them and exit 0. Locale files copied into.chainlit/translationsby earlier versions lack the newchat.messages.actions.debugkey, so a CI step that runs the command reports them: add the missing keys to the files you customised, and delete the ones you did not, which are recreated from the packaged files on the next start.- The debug button's tooltip reads "Debug" instead of "Debug in Literal AI". Its text is the new translation key
chat.messages.actions.debug, added to every packaged locale. - Building Chainlit from source requires Node.js 24 or later. Installing the wheel does not need Node.js.
- The package summary shown on PyPI now says that this is the community maintenance fork of Chainlit.
Fixed
cl.instrument_mistralai()no longer makes streaming calls (chat.stream,fim.streamand their_asyncvariants) fail withAttributeErroron mistralai 1.x releases that returnEventStreamobjects.cl.instrument_openai()no longer fails on responses withoutusage(some OpenAI-compatible servers omit it).- Resuming a thread no longer crashes on elements with Base64 (
bytes) content:Element.from_dictkeepsbytescontent as bytes instead of its string representation. - With the built-in data layer, an element stored without a
url,mimeorobjectKeycomes back withNonein that field instead of the string"None". - A storage provider that fails to return a read URL for one element no longer aborts the whole thread resume, with the built-in and the DynamoDB data layers; a warning is logged instead. A message step that cannot be restored is skipped with a warning, and if the resume still fails the user sees "Failed to load conversation history."
@chainlit/react-client: on thread resume, elements with achainlitKeybut nourlget their URL resolved, as elements received during a session already did, andnullentries in the thread's elements are ignored.- The per-session chat context is removed with the session after a disconnect instead of staying in memory for the lifetime of the server. A failing
@cl.on_chat_endcallback, or a failure persisting the session, no longer skips the rest of the disconnect cleanup. - The chat profile selector and the message feedback buttons no longer crash with "Rendered fewer hooks than expected" when the number of chat profiles or the feedback setting changes between renders.
- A
config.tomlwhose[meta]section has nogenerated_bykey now gives the intended "config file is outdated" error instead of aTypeError. - When
CHAINLIT_ROOT_PATHis set, the auth cookies are set and cleared with that path. Its value used to be looked up as the name of another environment variable, so the path was always/and stale cookie chunks were not removed on logout or token refresh.CHAINLIT_AUTH_COOKIE_PATHnow applies when the auth cookie is set, not only when it is cleared.
Removed
- Breaking: removed the LiteralAI data layer (
chainlit.data.literalai,LITERAL_API_KEY/LITERAL_API_URL/LITERAL_SERVER). The service shut down on 2025-10-31. Migrate to the built-in data layer viaDATABASE_URLor a custom@cl.data_layer.
Security
- Breaking: fix a path traversal through the Socket.IO session id (CVE-2026-86099, GHSA-5q2m-cqhf-xw26). Connections whose
sessionIdis missing or does not match[A-Za-z0-9_-]{1,128}are now refused withinvalid session id. The id was used unvalidated as a directory name under the session files directory, so a client could make the server write uploaded files into, or recursively delete, a directory outside it, or share another session's files directory.@chainlit/react-client, used by the bundled frontend and the copilot, sends UUIDs and is not affected; custom clients must send ids that match the pattern, for example a UUID. - Breaking: raised the minimum versions of runtime dependencies to releases that clear the known advisories against the previous minimums:
fastapi>=0.133.0(was>=0.116.1),starlette>=1.3.1(was>=0.47.2),python-socketio>=5.16.2(was>=5.11.0),mcp>=1.30.0(was>=1.28.1),python-dotenv>=1.2.2(was>=1.0.0),python-multipart>=0.0.31(was>=0.0.30) andpyjwt>=2.15.0(was>=2.13.0). Upper bounds are unchanged. Environments that pin one of these below the new minimum can no longer install Chainlit;starlettemoves from 0.x to 1.x, so apps that use FastAPI or Starlette directly should read their release notes. Python 3.11.0 to 3.11.4 are dropped for the same reason: the patchedsoupsieverequires 3.11.5. - The OAuth state is compared with the state cookie in constant time, and a callback without a state cookie is rejected.
Install
Python package (chainlit-community 3.0.0rc1)
The package is installed as chainlit-community and imported as chainlit; the chainlit command keeps its name. The wheel bundles the built frontend and copilot, so Node.js and pnpm are not needed to install it. The commands below are alternatives: use the one command that matches your tooling.
# pip
pip install "chainlit-community==3.0.0rc1"
# uv, in a project: records the dependency in pyproject.toml
uv add "chainlit-community==3.0.0rc1"
# uv, without a project: installs into the active virtual environment only
uv pip install "chainlit-community==3.0.0rc1"
# poetry
poetry add "chainlit-community==3.0.0rc1"This is a pre-release: pip only installs it with the exact version shown above, or with --pre (pip install --pre chainlit-community).
Important
If the upstream chainlit distribution is installed in the environment, uninstall it first (pip uninstall chainlit): both distributions provide the chainlit import package and would overwrite each other's files.
This release does not publish @chainlit/react-client to npm; the build that matches it is attached to this release.
@chainlit/react-client (0.6.0-dev.1433)
Again, use the one command that matches your package manager.
# npm
npm install --allow-remote=root https://github.com/chainlit-community/chainlit/releases/download/3.0.0rc1/chainlit-react-client-0.6.0-dev.1433.tgz
# pnpm
pnpm add https://github.com/chainlit-community/chainlit/releases/download/3.0.0rc1/chainlit-react-client-0.6.0-dev.1433.tgznpm 12 and later refuse tarball URLs outside the registry by default (EALLOWREMOTE), hence --allow-remote=root; alternatively set allow-remote=root in your project's .npmrc. Older npm versions and pnpm do not need it.
Verify
Checksums of the assets are in SHA256SUMS, and each asset has a build provenance attestation:
gh release download 3.0.0rc1 -R chainlit-community/chainlit
sha256sum --ignore-missing -c SHA256SUMS
gh attestation verify chainlit_community-3.0.0rc1-py3-none-any.whl -R chainlit-community/chainlit