### ⚠️ Potential Breaking Changes
**Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human... ([#28282](https://github.com/directus/directus/pull/28282))**
Env vars are now cast more strictly:
- Booleans only accept `true`, `false`, `1` and `0` (case-insensitive). Other values (eg `yes`) are invalid, where some
vars previously treated any non-empty value as enabled (eg `SERVE_APP=FALSE`)
- Plain number durations (eg `ACCESS_TOKEN_TTL=900`) are read as milliseconds, use a unit to be explicit (eg `15m`)
- Invalid values log a warning and fall back to the default (or `false` for booleans without one)
- Variables without a value in a `.env` file (eg `KEY=`) are treated as not configured and fall back to the default. Use
`KEY=""` for an empty value, eg `DB_PASSWORD=""` for a database user without a password, as `DB_PASSWORD=` is now
reported as missing
- Empty values of string and list vars (eg `KEY=""` in a `.env` file or `KEY=` in the process environment) are kept as an
empty string or list instead of falling back to the default, eg an empty `EMAIL_SENDMAIL_PATH` is no longer replaced by
`/usr/sbin/sendmail`. Empty values of other vars still fall back to the default
- `useEnv` returns parsed values: durations and sizes are numbers, lists are arrays
- The `env` passed to API extensions is typed as `Record<string, unknown>` instead of `Record<string, any>`, so env vars
need to be narrowed before use
**Bounded the work that parsing query parameters can cause ([#28521](https://github.com/directus/directus/pull/28521))**
`filter` and `deep` are now rejected with an `InvalidQueryError` once they exceed a limit on total node count or nesting depth.
The node allowance is spent across a whole query, so a filter nested under `deep` draws from what is left rather than starting over. Set a limit to `Infinity` to opt out of it.
- `QUERY_FILTER_MAX_NODES` (default `10000`) - total `filter`/`deep` nodes
- `QUERY_FILTER_MAX_DEPTH` (default `50`) - nesting depth of a filter or of `deep`
- `GRAPHQL_QUERY_SELECTION_LIMIT` (default `10000`) - fields a GraphQL operation may select across all its root fields once its fragments are expanded, checked during validation
`QUERY_FILTER_MAX_NODES` is the one most likely to be reached. Every object, array and value counts,
so `{"id":{"_in":[…]}}` costs one node per value plus three, and an `_in` of more than 9997 values is
rejected.
A `$NOW(...)` adjustment longer than 64 characters is now treated as unparseable, which also rejects
a zero-padded amount that long, such as `$NOW(0000…0005s)`. A dynamic variable path deeper than 25
segments now resolves to its default value.
A `$CURRENT_USER`, `$CURRENT_ROLE`, `$CURRENT_ROLES` or `$CURRENT_POLICIES` path in a query filter is
now held to `MAX_RELATIONAL_DEPTH`, the same as the fields it is fetched as, and is rejected with an
`InvalidQueryError` beyond it.
**Enforced `MAX_PAYLOAD_SIZE` on incoming WebSocket messages ([#28521](https://github.com/directus/directus/pull/28521))**
A WebSocket message larger than `MAX_PAYLOAD_SIZE` (default `1mb`) now closes the connection with
code `1009`. The setting applied only to REST bodies before this, leaving a message bounded by the
100MB `ws` allows on its own.
**Fixed websocket subscription delete events not enforcing read permissions ([#28522](https://github.com/directus/directus/pull/28522))**
WebSocket Subscription delete events now require read access to, at minimum, the `id` field and no item rules on the events collection. Users who don't meet these requirements will not receive delete events.
**Added proxy support via `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables ([#28057](https://github.com/directus/directus/pull/28057))**
- Requests now go through the proxy set in `HTTP_PROXY`/`HTTPS_PROXY`. If these variables are already set and S3 should be reached directly, add the S3 host to `NO_PROXY`
- Proxy variables are read from the process environment, not from the Directus `.env` or config file
- `STORAGE_<LOCATION>_CONNECTION_TIMEOUT` (5 seconds by default) also covers the proxy handshake and may need raising for slow proxies
- **@directus/api**
- Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human ([#28282](https://github.com/directus/directus/pull/28282) by @Nitwel)
readable durations (eg `15m`) and sizes (eg `10mb`). Custom env vars can be typed by extending the `Env` interface.
Added a `toMilliseconds` helper to `@directus/utils`
- Bounded the work that parsing query parameters can cause ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- Fixed websocket subscription delete events not enforcing read permissions ([#28522](https://github.com/directus/directus/pull/28522) by @br41nslug)
- **@directus/types**
- Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human ([#28282](https://github.com/directus/directus/pull/28282) by @Nitwel)
readable durations (eg `15m`) and sizes (eg `10mb`). Custom env vars can be typed by extending the `Env` interface.
Added a `toMilliseconds` helper to `@directus/utils`
- **@directus/env**
- Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human ([#28282](https://github.com/directus/directus/pull/28282) by @Nitwel)
readable durations (eg `15m`) and sizes (eg `10mb`). Custom env vars can be typed by extending the `Env` interface.
Added a `toMilliseconds` helper to `@directus/utils`
- **@directus/storage-driver-s3**
- Added proxy support via `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables ([#28057](https://github.com/directus/directus/pull/28057) by @kasamthapa)
### ✨ New Features & Improvements
- **@directus/app**
- Added OpenRouter to the AI Image flow operation, listing OpenRouter's image models in the model picker ([#28506](https://github.com/directus/directus/pull/28506) by @bryantgillespie)
- Added an AI Image flow operation that generates images with OpenAI or Google models and saves them to the file library ([#28488](https://github.com/directus/directus/pull/28488) by @bryantgillespie)
- Added an AI Text flow operation that generates text or structured data with any configured AI provider and model ([#28487](https://github.com/directus/directus/pull/28487) by @bryantgillespie)
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- Added selectable `colorField` parameter and contrast calculation for event card coloring in calendar layout. ([#28366](https://github.com/directus/directus/pull/28366) by @Artemsites)
- Added inline images to the WYSIWYG interface, so an image inside a paragraph, heading, list item, figure caption, `<dt>` or `<summary>` stays in its line of text ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a Form Elements option to the WYSIWYG interface that keeps `<form>`, `<button>`, `<input>`, `<select>` and `<textarea>` as non-editable blocks and keeps `<label>` ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added an HTML Comments option to the WYSIWYG interface that keeps stored HTML comments (comments from other pages are still removed on paste) and adds a toolbar toggle to show them ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a WYSIWYG interface option to keep all inline `style` attributes and `<style>` tags ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a Legacy Attributes option to the WYSIWYG interface that keeps `<iframe>` attributes such as `frameborder` and `allow`, and table attributes such as `border`, `cellpadding` and `cellspacing` ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a WYSIWYG interface option to keep `<b>` and `<i>` tags instead of converting them to `<strong>` and `<em>` ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Made the WYSIWYG interface keep `<a name>` anchors, so in-page links like `#section-2` still have a target ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Made the WYSIWYG editor keep inline `<svg>` elements, image maps (`<map>`, `<area>`) and `usemap` on images ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a Wrapper Elements option to the WYSIWYG interface that keeps `<div>`, `<aside>`, `<header>`, `<footer>`, `<nav>` and `<main>` instead of removing them ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added a No Paragraphs in Containers option to the WYSIWYG interface that stops the editor from adding `<p>` tags inside list items, blockquotes and table cells ([#28524](https://github.com/directus/directus/pull/28524) by @alvarosabu)
- Added single and multiple choice card interfaces with icons, images, and search. ([#28424](https://github.com/directus/directus/pull/28424) by @bryantgillespie)
- **@directus/api**
- Added OpenRouter to the AI Image flow operation, listing OpenRouter's image models in the model picker ([#28506](https://github.com/directus/directus/pull/28506) by @bryantgillespie)
- Added an AI Image flow operation that generates images with OpenAI or Google models and saves them to the file library ([#28488](https://github.com/directus/directus/pull/28488) by @bryantgillespie)
- Added an AI Text flow operation that generates text or structured data with any configured AI provider and model ([#28487](https://github.com/directus/directus/pull/28487) by @bryantgillespie)
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/ai**
- Added OpenRouter to the AI Image flow operation, listing OpenRouter's image models in the model picker ([#28506](https://github.com/directus/directus/pull/28506) by @bryantgillespie)
- Added an AI Image flow operation that generates images with OpenAI or Google models and saves them to the file library ([#28488](https://github.com/directus/directus/pull/28488) by @bryantgillespie)
- Added an AI Text flow operation that generates text or structured data with any configured AI provider and model ([#28487](https://github.com/directus/directus/pull/28487) by @bryantgillespie)
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/types**
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/system-data**
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/sdk**
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/utils**
- Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human ([#28282](https://github.com/directus/directus/pull/28282) by @Nitwel)
readable durations (eg `15m`) and sizes (eg `10mb`). Custom env vars can be typed by extending the `Env` interface.
Added a `toMilliseconds` helper to `@directus/utils`
- **@directus/env**
- Bounded the work that parsing query parameters can cause ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- **@directus/errors**
- Added `withZodSupport` and `formatZodError` to construct `InvalidPayloadError` and `InvalidQueryError` from Zod errors, replacing `zod-validation-error` ([#28388](https://github.com/directus/directus/pull/28388) by @smit153)
### 🐛 Bug Fixes & Optimizations
- **@directus/app**
- Updated the AI SDK packages to their latest v6 releases, adding support for current OpenAI image models and Claude 5 structured output ([#28483](https://github.com/directus/directus/pull/28483) by @bryantgillespie)
- Fixed the WYSIWYG editor dropping the class and other attributes of a `div` when it turns the `div` into a paragraph ([#28458](https://github.com/directus/directus/pull/28458) by @alvarosabu)
- Fixed field conditions using name instead of key for versioning ([#28465](https://github.com/directus/directus/pull/28465) by @nazarli-shabnam)
- Fixed multi-query insights panels such as the bar chart with an X-axis display field randomly rendering empty because query results were assigned in response key order instead of query order ([#28442](https://github.com/directus/directus/pull/28442) by @costajohnt)
- Reworked regexes whose worst-case matching time grew faster than the length of their input ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- Fixed the inline list interface not focusing the new item when clicking Create New ([#28482](https://github.com/directus/directus/pull/28482) by @bryantgillespie)
- Fixed the related values display on many-to-any fields showing junction IDs instead of each related item's display template ([#28468](https://github.com/directus/directus/pull/28468) by @alvarosabu)
- Sped up field, relation, and collection lookups in the Data Studio ([#28443](https://github.com/directus/directus/pull/28443) by @bryantgillespie)
- Improved typing performance in item forms by no longer re-rendering every field on each keystroke ([#28439](https://github.com/directus/directus/pull/28439) by @bryantgillespie)
- Fixed the app displaying unknown icon names as text ([#28496](https://github.com/directus/directus/pull/28496) by @andrewalfaro1)
- Fixed choice icons not showing in the dropdown list when the field allows other values ([#28487](https://github.com/directus/directus/pull/28487) by @bryantgillespie)
- Improved table performance by only re-rendering rows whose own data changed ([#28437](https://github.com/directus/directus/pull/28437) by @bryantgillespie)
- Fixed a Vue warning on every table cell that slowed down list views in development, by moving the inactive column styling onto the table cell ([#28467](https://github.com/directus/directus/pull/28467) by @bryantgillespie)
- **@directus/api**
- Enforced `MAX_PAYLOAD_SIZE` on incoming WebSocket messages ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- Updated the AI SDK packages to their latest v6 releases, adding support for current OpenAI image models and Claude 5 structured output ([#28483](https://github.com/directus/directus/pull/28483) by @bryantgillespie)
- Fixed redacted keys exposed in flow logs when present in webhook bodies or arrays ([#28486](https://github.com/directus/directus/pull/28486) by @bryantgillespie)
- Fixed m2a alias being dropped from a GraphQL selection ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- Fixed crashes and unintended unloading of flows and extensions during failed reloads ([#28473](https://github.com/directus/directus/pull/28473) by @ComfortablyCoding)
- Added uuidv7() to allowed DB default functions ([#28445](https://github.com/directus/directus/pull/28445) by @westhouseit)
- Added `withZodSupport` and `formatZodError` to construct `InvalidPayloadError` and `InvalidQueryError` from Zod errors, replacing `zod-validation-error` ([#28388](https://github.com/directus/directus/pull/28388) by @smit153)
- Fixed multiple aliased relational fields inside a GraphQL Many-to-Any fragment returning null or erroring ([#28425](https://github.com/directus/directus/pull/28425) by @costajohnt)
- Updated `nodejs`, `tar`, `pm2`, `minimatch`, `braintrust`, `readdir-glob` and `@hono/node-server` to address CVEs ([#28514](https://github.com/directus/directus/pull/28514) by @br41nslug)
- Fixed API hook extensions not receiving the `extensions.unload` event ([#28421](https://github.com/directus/directus/pull/28421) by @joggienl)
- **@directus/cli**
- Added OpenRouter as an AI provider with searchable model selection in AI settings and prompt caching across tool steps ([#28407](https://github.com/directus/directus/pull/28407) by @bryantgillespie)
- **@directus/pressure**
- Improved typing of `@directus/env` to contain known env vars and added `milliseconds` and `bytes` cast types for human ([#28282](https://github.com/directus/directus/pull/28282) by @Nitwel)
readable durations (eg `15m`) and sizes (eg `10mb`). Custom env vars can be typed by extending the `Env` interface.
Added a `toMilliseconds` helper to `@directus/utils`
- **@directus/utils**
- Bounded the work that parsing query parameters can cause ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- Reworked regexes whose worst-case matching time grew faster than the length of their input ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- **@directus/release-notes-generator**
- Reworked regexes whose worst-case matching time grew faster than the length of their input ([#28521](https://github.com/directus/directus/pull/28521) by @br41nslug)
- **@directus/sdk**
- Fixed realtime WebSocket URL ignoring the client URL subpath ([#28510](https://github.com/directus/directus/pull/28510) by @ankush2311025)
- **@directus/system-data**
- Added `conceal` special to `directus_users.auth_data` ([#28513](https://github.com/directus/directus/pull/28513) by @br41nslug)
### 📦 Published Versions
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`
- `@directus/
[email protected]`