v4.0.0

lm-sys/RouteLLMv4.0.0Oct 23, 2025by XiaomaiTX

AI Summary

Major milestone update focused on backend refactoring and minute-level data analysis capabilities.

Key Highlights

  • Minute-level real-time statistics (RPM/TPM) for monitoring.
  • Refactoring of the admin/analysis module for better maintainability.
  • Integration of Skylark features.
  • Mathematical formula rendering for Markdown.

New Features

  • APIs for minute-level statistics (GetTpmToday, GetRpmToday).
  • Billing statistics APIs (GetBillingYesterday, GetBillingLastMonth).
  • Skylark feature merge.
  • Math preprocessing for Markdown component.

Full Release Notes

# CoAI v4.0.0 Release Notes

We are excited to announce the official release of **CoAI v4.0.0**! This is a major, milestone update focused on the refactoring of the backend management system and the enhancement of core data analysis capabilities, alongside numerous features and fixes contributed by the community.

## 🚀 Highlights

### 📊 Comprehensive Data Analysis Capabilities

This update introduces a brand-new backend data analysis module, elevating the statistical granularity from daily to **minute-level**. This provides finer, more real-time insights for operations and management.

- **Minute-Level Real-Time Statistics**: Added minute-level statistics for model request volume (RPM - Requests Per Minute) and token usage (TPM - Tokens Per Minute), enabling real-time monitoring for both individual users and the global system.
- **Extended Billing and Request Statistics**: New APIs for fetching yesterday's and last month's billing data, as well as statistics for error requests and total requests, ensuring comprehensive data coverage.

### 🏗 Admin Module Refactor

To support future feature expansion and improve code quality, we have thoroughly modularized and refactored the core Go backend `admin/analysis` module.

- **Optimized Code Structure**: The original `admin/analysis.go` file has been split into multiple files, including `analysis.go`, `format.go`, `statistic.go`, and `reflect.go`. This separation of concerns significantly enhances **maintainability** and **readability**.

### ✨ New Features & Improvements

- **Skylark Integration**: Merged Skylark-related features (PR #328), further expanding the platform's capabilities.
- **Mathematical Formula Rendering**: Added math preprocessing for the Markdown component, allowing for better display and rendering of complex mathematical expressions.
- **Theme Switching Optimization**: Optimized the display logic for theme switching, improving the user experience.
- **Development Environment Configuration**: Updated `docker-compose.watch.yaml` to optimize the configuration for development and debugging environments.

### 🐞 Key Fixes

- **Chat Content Display Fix**: Fixed an issue where users could not see the answer content when the message included `reasoning_content`.
- **Thinking Block Display Fix**: Fixed the issue where text overflowed and was not displayed correctly in the "Thinking Block" due to the `overflow-hidden` property.

## Detailed Changes

| Type | Module | Description | PR |
| :--- | :--- | :--- | :--- |
| **Feat** | Admin/Analysis | Added real-time statistics APIs like `GetTpmToday` and `GetRpmToday`. | - |
| **Feat** | Admin/Analysis | Added `GetBillingYesterday` and `GetBillingLastMonth` APIs. | - |
| **Feat** | Core | Merged Skylark-related features. | #330 |
| **Feat** | Frontend | Added math preprocessing for the Markdown component. | #335 |
| **Refactor**| Admin/Analysis | Split `admin/analysis.go` into `analysis.go`, `format.go`, `statistic.go`, `reflect.go`. | - |
| **Refactor**| Frontend | Optimized the display logic for theme switching. | #350 |
| **Fix** | Chat | Fixed issue where answer content was hidden with `reasoning_content`. | #326 |
| **Fix** | Chat | Fixed text overflow issue in the "Thinking Block" caused by `overflow-hidden`. | #355 |
| **Docs** | Documentation | Added Japanese `README` documentation. | #262 |
| **Chore** | Config | Updated the `docker-compose.watch.yaml` file. | #324 |
| **Chore** | Config | Updated `.gitignore` to accommodate new config and key file structure. | - |
| **Chore** | Dependencies | Major updates to `package.json` and `pnpm-lock.yaml`. | - |

## 🤝 New Contributors

A big thank you to the following community members for their first contributions to CoAI! Welcome to the CoAI family!

*   [@ncs19960831](https://github.com/ncs19960831)
*   [@eltociear](https://github.com/eltociear)
*   [@PandaJu](https://github.com/PandaJu)
*   [@Hobo12](https://github.com/Hobo12)
*   [@willow-god](https://github.com/willow-god)

**Full Changelog**: [v3.11.1...v4.0.0](https://github.com/coaidev/coai/compare/v3.11.1...v4.0.0)

Thank you to all contributors and community members for your support! If you encounter any issues, please feel free to report them via [GitHub Issues](https://github.com/coaidev/coai/issues).

---
*The CoAI Team*
*Release Date: 2025.10.23*