Overview of FastGPT 4.15.2 Code Improvements
This document outlines the official code-level changes released in FastGPT 4.15.2, designed to improve system stability, type safety, maintainability, and security for self-hosted deployments. All details below are sourced directly from the official 4.15.2 upgrade documentation, with no external assumptions added beyond the provided reference material.
Core Code Refactors and Stability Fixes
This section covers the primary functional and structural code improvements included in the release:
- Agent V2 Dialog Reuse Refactor: The ChatAgentHelper utility, used for Agent V2 assisted generation workflows, has been completely refactored to centralize dialog reuse logic. This removes duplicated implementation across multiple code paths, reducing long-term maintenance overhead and ensuring consistent behavior for repeated dialog sessions across the platform.
- Truncated Long AI Request Logs: AI request records that contain extremely long base64-encoded data or data URLs are now automatically truncated before being saved to storage. This change prevents potential stack overflow errors that could occur when processing or storing oversized log entries, improving system stability during high-volume AI inference operations.
- Unified SSE Event Wrapping: Server-Sent Events (SSE) payloads now use a standardized wrapping format with enhanced type hints. This update strengthens type safety for all downstream consumers of SSE streams, reducing runtime type mismatch errors and simplifying integration with client-side applications that consume real-time AI response data.
New Security Configuration Parameter
A new environment variable has been added to control secure cookie behavior for user login sessions. The following table details the parameter:
| Environment Variable | Core Purpose | Default State | Enabled Behavior |
|---|---|---|---|
AUTH_COOKIE_SECURE | Configure Secure attribute for authentication cookies | Disabled | Cookies are marked with the Secure attribute, and only transmitted over encrypted HTTPS connections |
This parameter allows self-hosted administrators to enforce stricter security for user login sessions, aligning with modern web security best practices for production deployments.
Source: FastGPT official source
Applicability and version scope
Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.
Rollback guidance
Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.