AI Integration
Native Vector Indexing and Faster Vector Queries
4D 21 R5 introduces native vector indexing for 4D.Vector fields, bringing dedicated indexing to embedding based data for the first time in 4D.
This improves the performance of similarity searches as datasets grow, which is especially useful for semantic search, recommendation systems, RAG, and other AI driven workflows. Queries on indexed vector fields return the same results as non indexed queries, but faster.
You can configure Cosine, Dot, and Euclidean indexes directly in the Structure editor, while the existing Automatic index remains available for null vectors. Each index can be enabled independently, so you only keep the ones your application actually uses.
Indexed vector fields can also be used with sorting operations, allowing query results to be ordered according to vector similarity while benefiting from the new index.
Vector indexes are integrated into the standard database lifecycle, including reindexing, backup, MSC verification, and repair.
For applications already storing embeddings in 4D.Vector fields, this gives you a direct path to faster vector search without changing how your data is modeled or the results your queries return.
Programmatic Vector Index Management
4D 21 R5 also adds the programmatic side of vector indexing, so you can create, inspect, and manage vector indexes directly from code instead of relying only on the Structure editor.
CREATE INDEX and SET INDEX support Cosine, Dot, and Euclidean indexes, while DataClass.getIndexes() lets you check the indexes available on a data class at runtime. This is particularly useful when validating deployments or building diagnostic tools because you can confirm that the expected indexes are present without opening the database structure manually.
Vector storage is also more flexible. 4D.Vector.new() now uses 32 bit precision by default, helping reduce storage requirements, while 64 bit precision remains available when your use case needs it.
Together, these changes make vector search easier to operate beyond development: you can configure indexes visually while designing the database, then validate and manage them programmatically once the application is deployed.
Automatic Embedding Invalidation in 4D Embedding Studio
Keeping embeddings synchronized with business data is easier with 4D Embedding Studio. When source data changes, 4D can now identify vectors that may no longer represent the current entity instead of leaving outdated embeddings in place.
If an attribute used to build an embedding phrase is modified, the related vector is invalidated automatically. When you use a corresponding dirty Boolean field, 4D can flag the vector for regeneration while keeping the current value available. Otherwise, the vector is cleared.
The same protection applies when the embedding configuration changes. Updating the phrase can trigger a broader recalculation workflow, while changing the embedding model prevents vectors created with the previous model from continuing to be reused.
This removes a lot of manual tracking and lowers the risk of semantic search, RAG, or recommendation features working with stale embeddings as your data and AI configuration evolve.
Security
S/MIME Signing for SMTP Transporter
Outgoing emails can now be digitally signed with S/MIME directly through SMTP Transporter, giving recipients a way to verify both who sent the message and whether its content was modified after signing.
This is particularly useful for invoices, approvals, reports, notifications, and other business communications where authenticity matters.
Signing fits into the existing SMTP workflow. You provide a certificate containing the private key, either directly as a file or Blob through certificate, or referenced from the system certificate store with certificateName. Password protected certificates are supported as well.
Because the signing stays inside the standard SMTP Transporter API, you can strengthen trusted email workflows without introducing a separate signing tool or custom integration layer.
OpenSSL 4 for NGTCP2 and QUIC
The networking stack used by QUIC, WebSocket, and TLS related features now relies on OpenSSL 4 instead of BoringSSL, modernizing the security foundation while keeping existing application behavior largely unchanged.
For most applications, the upgrade is transparent. The main point to verify is your TLS configuration: SET DATABASE PARAMETER now supports only TLS 1.2 and TLS 1.3 for the minimum TLS version, and the default server version is TLS 1.3.
The change also covers OpenSSL based operations such as encryption, certificate generation, key generation, the OpenSSL provider, and the ODBC driver.
There is no activation or migration step, but applications that still depend on older TLS versions should review their configuration before deployment.
HTTP SERVER
Built In Rate Limiting for the 4D Web Server
The 4D Web Server can now limit excessive workload before it affects the rest of the application, giving you more control over how server resources are shared.
You can define limits for request volume, inbound and outbound data, active sessions, guest sessions, and entity sets. These limits can apply to the entire server or to individual sessions, which helps prevent one client or workload from consuming a disproportionate amount of capacity.
When a limit is reached, the request is rejected early with HTTP 429 Too Many Requests, before a web process is created. Clients can also receive a Retry-After value when appropriate, giving them a clear signal about when to try again.
Quotas can be configured at startup, loaded from HTTPQuotas.json, or updated at runtime through WEB Server().quotas. Nothing changes by default, so existing applications keep their current behavior until quotas are explicitly configured.
This does not replace a reverse proxy, firewall, or WAF. Instead, it adds application aware protection inside 4D itself, helping production applications stay more responsive during traffic spikes or poorly behaved usage.
DATABASE
Modernized Windows Installer and CI Ready Deployment
Installing 4D on Windows is now simpler for individual users and much easier to automate for teams managing build or deployment environments.
All supported languages are installed by default, removing the need to choose language packs during setup and avoiding missing language issues later.
The same installer can handle 4D, 4D Server, 4D Volume Desktop, and 4D Components, with everything selected by default while still allowing you to install only what you need.
For CI and automated deployment, the installer can run silently from the command line through Inno Setup options. This makes it easier to prepare build agents, test machines, or deployment environments without manual interaction.
The installer is now x64 only, which simplifies the deployment matrix and aligns with supported Windows environments. A link to the Windows App SDK installer is also available at the end of setup when that runtime is needed.
The result is a more predictable Windows installation process, whether you are setting up one workstation or automating dozens of environments.
4D Component
Compile Components Directly from the Host Project
Components can now be compiled directly from the host project, making it much easier to keep the application and the component versions used by a build in sync.
The Compiler window displays the host project together with compatible components, so you can compile, check syntax, or clear compiled code without opening every component separately. You can also jump directly to the Compiler from the Explorer for a selected component.
A component is eligible when its source is available locally, it is not packaged as .4dz or coming from the Dependencies Manager cache, and it uses Direct Typing.
Each component still uses its own compiler settings, while compilation logs are centralized in the host project. Errors and warnings also identify the component they come from, which makes troubleshooting much faster in projects that depend on several reusable modules.
The practical gain is a more reliable build process. You spend less time managing compiled components separately and reduce the chance of shipping an application with an outdated component version.
Discover Components Faster with 4D Corner
Finding reusable components is now part of the dependency management workflow itself. 4D Corner can be opened directly from the Project Dependencies interface or from the Add Dependency window.
From there, you can browse components shared by 4D and the community, copy the dependency you need, and bring it back into your project without separately searching repositories.
This makes it easier to discover existing solutions before building functionality yourself and creates a much clearer path between finding a component and actually adding it to an application.
User Interface
Fluent UI Support for List Forms
List forms can now use the same Fluent UI rendering as the rest of your Windows interface, removing one of the most visible inconsistencies in applications that were already using the modern WinUI appearance.
When Fluent UI is enabled, list forms opened through commands such as DISPLAY SELECTION and MODIFY SELECTION, as well as list subforms, keep their existing layout and behavior while adopting the modern rendering.
This also means list forms now follow the same light or dark Windows theme as detail forms and dialogs. Users no longer move from a modern dark interface into a classic list form that looks like part of another application.
There is no redesign required. Existing list forms can benefit from the new rendering automatically, while the Widget Appearance property still lets you control the behavior per form.
For applications with a large amount of existing list form UI, this makes a full Fluent UI transition far more practical.
More Flexible Styling for Buttons, Radio Buttons, and Check Boxes
Simple interface customization no longer requires creating image assets for every button or control.
Custom styled buttons, radio buttons, and check boxes can now use a background color, border color, border width, and corner radius directly from the Form Editor, CSS, or 4D code.
For buttons, the new properties are available through the Custom border style so existing forms keep their current appearance unless you choose to use the new styling. Radio buttons and check boxes expose the same visual properties directly.
Background images can still be combined with a background color, and rounded corners automatically clip the background correctly.
This gives you more freedom to create a consistent visual identity across light and dark themes while reducing the number of graphics you need to create, version, and maintain.
The new styling options apply to project mode and are not supported in binary databases.
Vertical Alignment and Padding for Text Objects
Text placement inside forms is now easier to control without resizing objects or relying on visual workarounds.
Text Area and Input objects can use top, middle, bottom, or default vertical alignment, together with independent padding on each side. This makes it much easier to keep labels, fields, and larger input areas visually balanced.
You can configure the values from the Form Editor, Form JSON, CSS, or from code. The new OBJECT SET PADDING and OBJECT GET PADDING commands provide runtime control, while the existing vertical alignment commands now also work with Text Area and Input objects.
Padding support also extends to List Boxes, with symmetrical horizontal and vertical spacing.
Existing forms keep their current rendering until you start using the new properties, so you can improve layouts gradually instead of having to redesign existing screens.
Visual Studio Code Extension
Seamless 4D IDE and VS Code Workflow
Moving between the 4D IDE and VS Code no longer means hunting through project folders to find the right method or class.
A new Code editor preference lets you decide whether 4D or VS Code should open code by default, while the Alt key gives you quick access to the other editor when needed. You can also keep the current behavior and always use the 4D Code Editor.
The preference follows you across the 4D IDE, including the Explorer, Form Editor, Debugger, runtime error dialogs, and Go to definition actions. When VS Code is selected, 4D opens the exact method or class file and gives VS Code the project folder as its workspace.
This is especially valuable for form and object methods, where finding the corresponding file manually can involve table numbers and deeply nested folders. 4D now resolves that path for you and creates the method first when necessary.
The result is a much smoother mixed IDE workflow. You can continue using the 4D IDE for forms, debugging, and project navigation while moving directly into VS Code when you want Git tools, extensions, or AI assisted development.
The integration applies to project mode. Binary databases continue to use the 4D Code Editor.