Releases: aidyou/chatspeed
Releases · aidyou/chatspeed
ChatSpeed v1.2.8
🚀 New Features
-
429 Exponential Backoff Retry Mechanism: Added intelligent retry functionality to the CCProxy module to effectively handle server-side rate limiting scenarios.
- When the backend returns a 429 (Too Many Requests) status code, the system automatically performs exponential backoff retries.
- Retry attempts can be configured via the settings interface (0-10 times, default is 0 meaning no retry).
- Smart backoff strategy: 1 second for the 1st retry, 2 seconds for the 2nd, 4 seconds for the 3rd, and so on, up to a maximum of 32 seconds.
- Supports the
Retry-Afterresponse header from the server, prioritizing the server-suggested wait time. - This feature covers all proxy request paths: direct forwarding, protocol conversion, and Embedding requests.
-
Multi-Vendor Reasoning Support: Extended compatibility for reasoning/thinking modes across major AI providers.
- OpenAI o1/o3 Series: Automatically maps reasoning configuration to the
reasoning_effortparameter (low/medium/high). - MiniMax: Supports the
reasoning_splitparameter and correctly parsesreasoning_detailsin responses. - Zhipu GLM, DeepSeek, Kimi (Moonshot): Automatically injects the
thinkingparameter to enable reasoning mode. - Qwen Series: Supports
enable_thinkingandthinking_budgetparameter configuration. - Reasoning content is now properly forwarded to the frontend for display and preserved across multi-turn conversations.
- OpenAI o1/o3 Series: Automatically maps reasoning configuration to the
🪄 Improvements
-
Tool Compatibility Mode Parser Overhaul: Completely rewrote the XML tool call parsing engine for significantly improved robustness.
- Added a manual scanning parser as the primary method, correctly handling parameter content with unescaped code.
- Supports self-closing tag format (e.g.,
<arg name="x" value="y" />), adapting to more model output styles. - Supports single-quoted, double-quoted, and unquoted attribute values for stronger fault tolerance.
- Automatically cleans up redundant closing tags generated by models (e.g., Kimi may output duplicate
</cs:tool_use>). - Added
logit_biasparameter passthrough support for advanced configuration capabilities.
-
Proxy Statistics Dashboard Overhaul: Completely redesigned the Proxy Stats page for better data visualization and user experience.
- KPI Metric Cards: Added four key performance indicator cards at the top: Total Requests, Total Tokens, Error Rate, and Active Models for at-a-glance insights.
- Tabbed Layout: Organized all charts into two tabbed sections for cleaner UI and better space utilization.
- Trend Analysis Tab: Daily Token consumption trends (default) and Daily Requests with Error Rate dual-axis chart.
- Distribution Analysis Tab: Model Token Usage (default), Model Usage Count, Provider Token Usage (new), and Error Code Distribution.
- Horizontal Bar Charts: Converted all pie charts to horizontal bar charts for easier comparison of top items.
- Smart Axis Formatting: Implemented automatic formatting for large numbers using Chinese units (万 for 10k+, 亿 for 100M+).
- Visual Polish: Applied dashed grid lines with solid axis lines for better readability; fixed tooltip display issues.
- Provider Token Analytics: Added new backend API and chart for provider-level token consumption analysis.
🚀 新功能
-
429 指数退避重试机制:为 CCProxy 代理模块新增了智能重试功能,有效应对服务端限流场景。
- 当后端返回 429 (Too Many Requests) 状态码时,系统会自动进行指数退避重试。
- 支持通过设置界面配置重试次数(0-10 次,默认为 0 即不重试)。
- 智能退避策略:第 1 次重试等待 1 秒,第 2 次 2 秒,第 3 次 4 秒,依此类推,最大等待 32 秒。
- 支持服务端返回的
Retry-After响应头,优先使用服务端建议的等待时间。 - 该功能覆盖所有代理请求路径:直接转发、协议转换和 Embedding 请求。
-
多供应商推理(Reasoning)支持:扩展了对各主流供应商推理/思考模式的兼容性。
- OpenAI o1/o3 系列:自动将推理配置映射为
reasoning_effort参数(low/medium/high)。 - MiniMax:支持
reasoning_split参数,并正确解析响应中的reasoning_details字段。 - 智谱 GLM、DeepSeek、Kimi(月之暗面):自动注入
thinking参数启用推理模式。 - Qwen 系列:支持
enable_thinking和thinking_budget参数配置。 - 推理内容现可正确回传至前端展示,并在多轮对话中保留上下文。
- OpenAI o1/o3 系列:自动将推理配置映射为
🪄 改进
-
工具兼容模式解析器重构:彻底重写了 XML 工具调用解析引擎,显著提升鲁棒性。
- 新增手动扫描解析器作为首选方案,可正确处理包含未转义代码的参数内容。
- 支持自闭合标签格式(如
<arg name="x" value="y" />),适配更多模型输出风格。 - 支持单引号、双引号及无引号的属性值,容错性更强。
- 自动清理模型产生的冗余闭合标签(如 Kimi 模型可能输出重复的
</cs:tool_use>)。 - 新增
logit_bias参数透传支持,扩展高级配置能力。
-
代理统计信息页面重构:重新设计了代理统计页面,优化了数据可视化效果和用户体验。
- KPI 指标卡片:在顶部添加了四个关键指标卡片:总请求数、总 Token 数、错误率和活跃模型数,方便快速查看核心数据。
- Tab 分组布局:将所有图表组织到两个 Tab 分组中,界面更简洁,空间利用更合理。
- 趋势分析 Tab:每日 Token 消耗趋势(默认)和每日请求量与错误率双轴图表。
- 分布分析 Tab:后端模型 Token 消耗分布(默认)、后端模型使用次数分布、供应商 Token 消耗分布(新增)和错误状态码分布。
- 横向柱状图:将所有饼图转换为横向柱状图,便于对比排名靠前的项目。
- 智能坐标轴格式化:实现大数字自动格式化,使用中文单位(万表示 1 万以上,亿表示 1 亿以上)。
- 视觉优化:使用虚线网格线和实线坐标轴提升可读性;修复了提示文字显示问题。
- 供应商 Token 分析:新增后端 API 和图表,支持按供应商维度分析 Token 消耗情况。
ChatSpeed v1.2.7
🚀 New Features
- Configurable Proxy Listen Address: Added a new security setting to control CCProxy visibility.
- Users can now toggle between Local (127.0.0.1) for maximum security and WAN (0.0.0.0) for hosting AI services across the network.
- Updated the Proxy Settings UI with intuitive "Local" and "WAN" options across all 10 supported languages.
🪄 Improvements
- Internationalization (i18n) Expansion: Completed translations for proxy listen settings in German, Spanish, French, Japanese, Korean, Portuguese, Russian, and Traditional Chinese.
🐞 Bug Fixes
- Application Updater: Fixed a critical issue where the update manager was not correctly registered in the system state, preventing the "Install and Restart" functionality from working.
🚀 新功能
- 可配置的代理监听地址:新增了 CCProxy 访问控制设置,提升了灵活性。
- 用户现在可以根据需求切换 本机 (127.0.0.1) 模式(安全性最高)或 广域网 (0.0.0.0) 模式(允许在网络中共享 AI 服务)。
- 优化了代理设置界面,在所有 10 种支持的语言中均提供了直观的“本机”与“广域网”选项。
🪄 改进
- 多国语言支持补全:完成了德语、西班牙语、法语、日语、韩语、葡萄牙语、俄语及繁体中文关于代理监听设置的国际化翻译。
🐞 修复
- 应用更新程序:修复了更新管理器未正确注册到系统状态的问题,解决了“安装并重启”功能失效的故障。
ChatSpeed v1.2.5
🪄 Improvements
- Startup Sequence Overhaul: Redesigned the initialization flow to use manual window creation. By disabling auto-launch in
tauri.conf.jsonand triggering window creation only after Rust-side state management is fully ready, we've eliminated the "state not managed" panics and UI loading failures prevalent in high-performance Release builds on Windows. - Hierarchical Proxy Routing Architecture: Redesigned the proxy module's routing system with strict priority enforcement (Fixed Prefixes > Direct Protocol Routes > Global Compat > Dynamic Group Routes). This eliminates "Route Shadowing" where standard
/v1endpoints could be incorrectly captured by dynamic groups, ensuring 100% accurate protocol dispatching. - Smart Response Header Filtering: Introduced a centralized header filtration utility that automatically strips conflicting transport headers (e.g.,
Content-Length,Connection,Transfer-Encoding). This fixes the persistent "Empty reply from server" and connection drop issues encountered with certain AI backends in direct forward mode. - Gemini Protocol Enhancements:
- Action Path Expansion: Added support for slash-style action paths (e.g.,
/v1beta/models/{model}/{action}) alongside the standard colon format, improving compatibility with various Gemini-compliant clients. - Auto-Field Translation: Fixed tool definition parsing by implementing seamless snake_case to camelCase conversion (
functionDeclarations), ensuring that backend models correctly identify the available tool list.
- Action Path Expansion: Added support for slash-style action paths (e.g.,
- Database Fail-safe Fallback: If the primary database file is corrupted or inaccessible due to file system locks, the app now automatically falls back to an in-memory database. This prevents fatal panics and allows the application to stay operational for diagnostics.
- Backup Data Integrity (WAL Checkpointing): Implemented an explicit SQL Checkpoint mechanism before backup operations. This forces the database to flush all pending writes from the WAL log file to the main DB file, guaranteeing that backups are always up-to-date and complete.
- Atomic Restoration Engine: Downscaled the complex restoration logic into a single atomic operation within the core data layer. It handles connection termination, WAL cleanup, and state preservation in a single transaction, completely eliminating file corruption risks and "readonly database" errors during data recovery.
🐞 Bug Fixes
- Windows Startup Logic: Resolved critical race conditions and crashes on Windows 11 where the frontend would request state before the backend had finished initializing. (#3)
- Proxy UI Interaction: Fixed a bug where the "Confirm" button in the Add Proxy dialog was unclickable on macOS 15 and older engines due to layout overlaps. (#4)
- Cross-Protocol Negative Index Fix: Resolved a critical panic where certain models (e.g., Qwen) return
index: -1in tool calls or embedding vectors. - SQL Execution Errors: Fixed a bug where
rusqlitewould throw an error when executingPRAGMAcommands that returned result rows. - Arc Ownership Fix: Resolved a compilation error related to
Arcmove semantics in asynchronous initialization blocks. - Encoding & Invisible Characters: Cleaned up potential encoding issues and invisible characters in Windows PowerShell scripts that could lead to build failures.
🪄 改进
- 启动顺序深度重构:重构了后端初始化与窗口创建的逻辑顺序。通过在 Rust 端禁用自动窗口创建并改为在状态注册(Manage State)完成后手动触发,彻底解决了 Release 版本在 Windows 上因“前端加载快于后端就绪”导致的启动 Panic 和界面数据空白问题。
- 代理分层路由架构:重新设计了代理模块的路由优先级系统(固定路径 > 直接路径 > 兼容路径 > 动态分组路径)。这彻底解决了旧版本中
/v1等标准协议路径可能被动态分组意外捕获(Shadowing)的问题,确保了协议分发的绝对准确。 - 响应头智能过滤系统:引入了统一的响应头清洗机制,自动过滤引起与后端框架冲突的传输级头部(如
Content-Length,Connection,Transfer-Encoding等)。该改进修复了部分模型在直连模式下报“Empty reply”或连接异常中断的顽疾。 - Gemini 协议深度增强:
- 动作路径扩展:新增支持斜杠格式的动作路径(如
/v1beta/models/{model}/{action}),提升了对各类客户端的兼容性。 - 字段自动转换:修正了 Gemini 工具定义在输入适配器中的解析逻辑,实现了蛇形(snake_case)到驼峰(camelCase)的无缝转换,确保后台能正确识别工具列表。
- 动作路径扩展:新增支持斜杠格式的动作路径(如
- 数据库故障回退:如果主数据库文件损坏或因系统锁无法访问,应用现在会自动回退到 内存数据库 (:memory:)。这避免了毁灭性的 Panic 崩溃,使应用仍能运行以供诊断。
- 备份数据完整性保障:在执行备份前引入了显式的 SQL Checkpoint (检查点) 机制。这强制数据库将所有待写入数据从
-wal日志同步到主文件中,确保备份包始终包含最新的对话记录。 - 原子化还原引擎:将复杂的还原逻辑下沉至核心数据层,实现了单次原子操作。它能在一个事务内完成连接断开、WAL 清理及状态保留,彻底消除了数据恢复过程中的文件损坏风险和“只读数据库”错误。
🐞 修复
- Windows 启动崩溃与加载失败:修复了 Windows 11 环境下常见的
state not managed崩溃及闪退问题。通过同步环境初始化和延迟窗口加载,确保了应用在各种硬件性能下都能稳定进入主界面。 (#3) - 代理配置界面交互修复:修复了在 macOS 15 及旧版浏览器内核中,添加代理对话框的“确定”按钮由于布局层级覆盖导致无法点击的问题。 (#4)
- 跨协议负数索引崩溃修复:修复了一个关键的解析 Bug,即当 Qwen 等模型在工具调用或嵌入向量中返回
index: -1时会导致程序 Panic。 - SQL 执行错误修复:修复了
rusqlite在执行带结果行的PRAGMA指令时报“Execute returned results”的错误。 - 所有权编译错误:修复了异步块中
Arc移动语义导致的代码编译失败。 - 脚本编码清理:清理了 Windows PowerShell 脚本中潜在的编码问题及不可见字符,解决了编译时报指令未找到的问题。
ChatSpeed v1.2.4
🪄 Improvements
- Database Architecture Hardening: Upgraded the database engine to use WAL (Write-Ahead Logging) mode and implemented a 5-second Busy Timeout. These changes significantly improve concurrency, allowing the background proxy (CCProxy) and the main chat interface to access the database simultaneously without locking issues.
- Data Integrity for Backups: Implemented a mandatory SQL Checkpoint (TRUNCATE) before any backup operation. This ensures that all latest messages (previously held in the
-wallog file) are properly flushed to the main database file before encryption, guaranteeing that your backups always contain the most recent data. - Atomic Restoration with State Preservation: Completely refactored the database restoration process. The system now performs a safe, atomic "disconnect-replace-reconnect" sequence that prevents file corruption. It also preserves machine-specific settings (window positions, sizes, and network proxy configurations) during restoration, ensuring a seamless experience when migrating data.
- Mission-Critical Stability Hardening: Performed a comprehensive audit and refactoring of the application's startup sequence. All hardcoded
.expect()and.unwrap()calls in critical paths (logging, database path resolution, and window management) have been replaced with graceful error handling. This ensures the application remains operational even in highly restricted environments like Windows Server 2019. - Graceful Logging Fallback: The logging system now automatically degrades to console-only output if the designated log directory is unwritable or inaccessible, preventing immediate startup crashes.
🐞 Bug Fixes
- Production Database Locking: Resolved a critical "attempt to write a readonly database" error in production environments caused by redundant file handle requests during initialization.
- Proxy Routing Precedence: Resolved a critical routing conflict where generic group paths (e.g.,
/{group}/...) could incorrectly intercept specific functional prefixes like/switch,/compat, or/compat_mode. This fix ensures correct dispatching for all access modes and resolves 404 errors when using combined paths. - Compatibility Mode Alias: Introduced the
compatshorthand alias as a convenient alternative tocompat_mode(e.g.,/group/compat/v1/messages), improving API call ergonomics. - Proxy Statistics Calibration: Fixed a critical issue where output tokens were reported as 0 in
tool_compat_modeanddirect_forwardmodes. The system now accurately estimates tokens for Reasoning/Thinking content and Tool Call Arguments across all supported protocols (OpenAI, Claude, Gemini, Ollama). - Unified Cache Token Tracking: Implemented a standardized mapping for cached tokens. Cached data from various protocols (e.g., OpenAI's
prompt_cached_tokens, Claude'scache_read_input_tokens, and Gemini'scached_content_tokens) is now correctly captured in stream logs and persisted to the database. - Path Resolution Panic: Resolved potential panics during environment detection when the current working directory or application data directory cannot be resolved by the OS.
- Window Handler Race Condition: Added safety checks to window event listener registration to prevent crashes during the early initialization phase.
🪄 改进
- 数据库架构加固:将数据库引擎升级为 WAL (Write-Ahead Logging) 模式,并实现了 5 秒的 Busy Timeout (忙碌重试)。这些改进显著提升了并发性能,允许后台代理 (CCProxy) 与主聊天界面同时访问数据库而不会发生锁定冲突。
- 备份数据完整性保障:在执行任何备份操作前引入了强制的 SQL Checkpoint (TRUNCATE) 机制。这确保了所有最新的消息记录(原先可能暂存在
-wal日志文件中)在加密前都被完整同步到数据库主文件中,解决了“备份不到最新消息”的问题。 - 状态保留的原子化还原:彻底重构了数据库还原流程。系统现在执行安全的原子级“断开-替换-重连”序列,防止了文件损坏和重启崩溃。同时,在还原过程中能够自动保留机器特有的设置(如窗口位置、尺寸、网络代理配置等),确保数据迁移后的无缝体验。
- 启动路径鲁棒性加固:对应用程序启动序列进行了全面审计和重构。移除了所有在关键路径(如日志系统、数据库路径解析及窗口管理)中硬编码的
.expect()和.unwrap()调用。这确保了在 Windows Server 2019 等权限高度受限的环境下,程序仍能平稳启动而不会闪退。 - 日志系统自动降级:当日志目录不可写或无法访问时,日志系统现在会自动降级为仅控制台输出模式,彻底消除了由于磁盘写入权限导致的启动 Panic。
🐞 修复
- 生产环境数据库锁定修复:解决了在生产环境下,由于初始化过程中冗余的文件句柄请求导致的“attempt to write a readonly database”关键错误。
- 代理路由优先级修复:解决了通配分组路径(如
/{group}/...)可能意外拦截/switch、/compat或/compat_mode等特定功能前缀的冲突问题。该修复确保了所有访问模式都能正确分发,解决了组合路径下可能出现的 404 错误。 - 兼容模式别名支持:新增了
compat简写别名作为compat_mode的便捷替代方案(例如:/group/compat/v1/messages),提升了 API 调用体验。 - 代理统计校准:修复了在
工具兼容模式(tool_compat_mode) 和直接转发(direct_forward) 模式下,输出 Token 统计始终为 0 的问题。现在系统能准确估算所有协议(OpenAI、Claude、Gemini、Ollama)中的推理/思考内容 (Reasoning/Thinking) 及工具调用参数的 Token 消耗。 - 统一缓存 Token 追踪:实现了跨协议的缓存 Token 统一映射。现在能正确捕捉并记录来自不同协议的缓存数据(如 OpenAI 的
prompt_cached_tokens、Claude 的cache_read_input_tokens以及 Gemini 的cached_content_tokens),并确保其在流式响应结束时准确入库。 - 路径解析 Panic 修复:解决了在部分受限环境下,若操作系统无法返回当前工作目录或应用数据目录时可能导致的 Panic。
- 窗口句柄竞态修复:在注册全局窗口监听器时增加了安全性检查,防止在窗口尚未完全就绪的极早期启动阶段发生崩溃。
ChatSpeed v1.2.2
[1.2.2]
⚠️ Deprecation Notice
- MCP SSE Protocol: The
/mcp/sseendpoint is now officially deprecated and scheduled for removal in v1.3.0. Users are strongly encouraged to migrate to the more stable/mcp/http(Streamable HTTP) protocol. This decision is due to inherent stability issues with SSE (such as unfixable 410 errors) and the removal of support in the upstream library.
🚀 New Features
- Proxy Switcher Window: Introduced a lightweight, dedicated window for quickly switching active proxy groups. Accessible via the system tray, titlebar menu, and global shortcuts.
- Enhanced Proxy Stats UI:
- Persistent Auto-Refresh: Auto-refresh state is now persisted in local storage.
- Improved Interactivity: Added sortable columns for Client Model, Backend Model, and various token counts.
🪄 Improvements
- Intelligent Configuration Protection: Optimized the database restoration process to automatically preserve machine-specific settings, including window positions, sizes, network proxy configurations, and backup paths. This ensures a seamless transition when moving data between different machines.
- Fair Weight Rotation Logic: Refactored the proxy rotation engine to group targets by provider. This prevents "weight explosion" where a provider with many keys or model aliases would unfairly dominate traffic distribution.
- Robust Statistics Recording: Introduced a RAII-based
StreamStatGuardto ensure proxy usage statistics are accurately recorded even when streams are prematurely terminated or encounter errors. - Refined Proxy Rotator: Simplified the internal architecture by removing redundant locks, improving performance and maintainability.
- Cleaner Debug Logs: Updated VS Code launch configurations to suppress noisy
OS_ACTIVITY_MODElogs on macOS.
🐞 Bug Fixes
- Startup Panic on Windows: Fixed a critical issue where the application could panic during startup if window events (Resized/Moved) were triggered before the internal state was fully initialized.
- Windows MCP Reliability: Resolved an issue where some MCP servers (e.g., Context7) would hang in the "Starting" state on Windows. This was caused by improper terminal handling and script execution wrapping.
- Silent Process Execution on Windows: Fixed an issue where starting MCP servers or environment detection would cause a terminal window (black box) to pop up on Windows. All background processes now run silently.
- Stat Recording Leak: Fixed a potential issue where statistics might not be recorded if a streaming response ended unexpectedly.
[1.2.2]
⚠️ 弃用公告
- MCP SSE 协议弃用:
/mcp/sse入口已正式弃用,并计划于 v1.3.0 版本彻底删除。由于 SSE 协议存在难以修复的稳定性问题(如 410 错误)且上游依赖库已停止支持,强烈建议用户尽快迁移至更稳定的/mcp/http(Streamable HTTP) 协议。
🚀 新特性
- 新增代理切换窗口:引入了一个轻量级的专用窗口,用于快速切换当前激活的代理分组。可通过系统托盘、标题栏菜单及快捷键快速唤起。
- 代理统计 UI 增强:
- 自动刷新持久化:代理统计的自动刷新开关状态现在支持本地持久化存储。
- 交互体验优化:统计表格新增支持按客户端模型、后端模型及各类 Token 计数进行点击排序。
🪄 改进
- 智能配置保护:优化了数据库还原流程,会自动保留当前机器特有的设置,包括窗口位置、尺寸、网络代理配置以及备份路径。这确保了在不同设备间迁移数据时,不会干扰本机的界面布局和网络环境。
- 公平权重轮询逻辑:重构了代理轮询引擎,改为按供应商(Provider)进行分组调度。彻底解决了因单供应商配置多密钥或多别名导致的“权重爆炸”问题,确保流量分配严格遵循物理密钥比例。
- 鲁棒性统计记录:引入了基于 RAII 机制的
StreamStatGuard,确保即使在流式响应异常中断或报错的情况下,代理使用统计也能被准确记录。 - 代理轮询器优化:简化了内部架构,移除了冗余的读写锁,提升了并发性能与可维护性。
- 调试日志去噪:更新了 VS Code 启动配置,禁用了 macOS 下冗余的
OS_ACTIVITY_MODE日志输出。
🐞 修复
- Windows 启动崩溃修复:解决了在 Windows 平台上,若窗口事件(如调整大小或移动)在内部状态完全初始化前触发,可能导致程序 Panic 崩溃的关键问题。
- Windows MCP 可靠性提升:修复了部分 MCP 服务(如 Context7)在 Windows 上可能卡在“启动中”状态的问题。通过优化终端处理和脚本执行包装逻辑,确保了服务能顺畅启动。
- Windows 静默进程执行:修复了在 Windows 上启动 MCP 服务或进行环境检测时会弹出黑窗口(命令行窗口)的问题。现在所有后台进程均以静默模式运行。
- 统计记录遗漏修复:修复了在流式响应意外结束时可能导致使用统计未正确入库的潜在问题。
ChatSpeed v1.2.1
[1.2.1]
🐞 Bug Fixes
- Privacy Security Hardening (Attachment Sanitization): Resolved a critical vulnerability where sensitive data filtering was bypassed for multimodal (array format) messages. Text extracted from attachments (PDF, Word, or image analysis) is now rigorously sanitized before being sent to AI providers.
- Gemini Protocol Link Calibration:
- URL Generation Fix: Fixed a logic bug where the protocol colon in
https://was mistakenly identified as a suffix separator, ensuring valid backend request URLs. - Auth Parameter Persistence: Corrected an issue where the API Key query parameter was lost during embedding request forwarding.
- URL Generation Fix: Fixed a logic bug where the protocol colon in
- Backend Provider Compatibility: Fixed 400 errors from strict backends (e.g., Qwen/ModelScope) by ensuring
encoding_format: "float"is always supplied and empty string parameters are stripped.
[1.2.1]
🐞 修复
- 隐私安全加固(附件脱敏):修复了敏感信息过滤逻辑在多模态(数组格式)消息下失效的严重漏洞。现在,通过附件(PDF/Word/图片分析等)提取的文本内容在发送给 AI 供应商之前,也会强制执行脱敏处理,确保隐私保护无死角。
- Gemini 协议链路修复:
- URL 生成逻辑校准:修复了在提取 Base URL 时意外将
https://中的冒号识别为后缀分隔符的漏洞,确保了后端请求 URL 的合法性。 - 鉴权参数持久化:修正了 Embedding 请求过程中 API Key 丢失的问题,确保转发至 Gemini 官方或兼容接口时身份验证始终有效。
- URL 生成逻辑校准:修复了在提取 Base URL 时意外将
- 后端供应商兼容性加固:通过在代理层强制补全
encoding_format: "float"并剔除空字符串参数,解决了部分严苛后端(如 Qwen/魔塔系列模型)报 400 错误的兼容性难题。
ChatSpeed v1.2.0
[1.2.0]
🚀 New Features
- Full Embedding Proxy Protocol Support:
- Multi-Protocol Integration: The proxy layer now natively supports embedding protocols for OpenAI (
/v1/embeddings), Gemini (:embedContent), and Ollama (/api/embeddings). - Cross-Protocol Auto-Conversion: Implemented a comprehensive protocol conversion engine. Users can use any client SDK (e.g., OpenAI SDK) to call backend models configured with different protocols.
- Intelligent Parameter Alignment: Added automatic cleaning and completion logic for optional parameters (like
encoding_format) that certain backends validate strictly. Systems now automatically supply default values (e.g.,float) when converting from Gemini/Ollama to OpenAI. - Dedicated Rejection Path: Created a standalone
/v1/claude/embeddingspath for the Claude protocol. Since Claude officially does not support embeddings, this path returns a clear 501 error, keeping the API structure aligned without causing router conflicts.
- Multi-Protocol Integration: The proxy layer now natively supports embedding protocols for OpenAI (
- MCP Proxy Router Overhaul:
- Path Unification: Consolidated MCP-related SSE and HTTP routes under the
/mcpnamespace, introducing/mcp/sseand/mcp/httpas standard endpoints. - State Isolation: Leveraged
nest_serviceto decouple different application states (SharedState vs. ChatState), improving system stability under concurrent requests. - Backward Compatibility: Maintained the legacy
/sseentry point (marked as deprecated) to ensure a smooth transition for older clients.
- Path Unification: Consolidated MCP-related SSE and HTTP routes under the
🪄 Improvements
- API Documentation & UI Sync: Updated the API endpoint help table in the Proxy Settings page, adding full path descriptions and placeholder replacement guides for Embedding services.
🐞 Bug Fixes
- Router Conflict Hardening: Resolved a critical issue where multiple protocols (OpenAI/Ollama/Claude) would attempt to register the same
/v1/embeddingspath, leading to application panics on startup.
[1.2.0]
🚀 新特性
- 全面支持 Embedding 代理协议:
- 多协议集成:代理层现在原生支持 OpenAI (
/v1/embeddings)、Gemini (:embedContent) 和 Ollama (/api/embeddings) 的嵌入协议。 - 跨协议自动转换:实现了完善的协议转换引擎。用户可以使用任一协议的客户端(如 OpenAI SDK)调用后端配置的其他协议模型,系统会自动处理请求结构、URL 拼接及响应包装。
- 智能参数对齐:针对部分后端供应商对可选参数(如
encoding_format)校验极其严格的问题,增加了自动清洗与补全逻辑。当从 Gemini/Ollama 转换为 OpenAI 协议时,会自动补全默认值(如float),确保 100% 成功转发。 - 专有拒绝路径:为 Claude 协议开辟了独立的
/v1/claude/embeddings路径。由于 Claude 官方暂不支持嵌入,该路径会返回明确的 501 错误提示,既保持了 API 结构的整齐对齐,又避免了与 OpenAI 标准路径冲突导致的程序异常。
- 多协议集成:代理层现在原生支持 OpenAI (
- MCP 代理路由架构重构:
- 路径统一化:将 MCP 相关的 SSE 和 HTTP 路由统一整合至
/mcp命名空间下,推出了/mcp/sse和/mcp/http标准端点。 - 状态隔离优化:通过
nest_service实现了不同业务状态(SharedState 与 ChatState)的解耦,提升了并发请求下的系统稳定性。 - 向下兼容:保留了传统的
/sse入口并标记为弃用,确保老版本客户端平滑过渡。
- 路径统一化:将 MCP 相关的 SSE 和 HTTP 路由统一整合至
🪄 改进
- API 文档与 UI 同步:更新了代理设置页面中的 API 端点帮助表格,新增了 Embedding 相关的完整路径说明及占位符替换指南,显著提升了开发者体验(DX)。
🐞 修复
- 路由冲突加固:彻底解决了因多个协议(OpenAI/Ollama/Claude)在某些模式下重复注册
/v1/embeddings路径导致的程序启动 Panic。
ChatSpeed v1.1.26
[1.1.26]
🚀 New Features
- Refined Proxy Statistics: Added "Today" (natural day) dimension to stats, complementing the "Last 24 Hours" view for a more intuitive perspective on daily usage.
- Custom Header Defense System:
- Full-Chain Filtering: Built-in blacklist for restricted headers (e.g.,
Host,Connection,Content-Length) inshould_forward_headerto prevent proxy protocol conflicts. - Source Validation: Added real-time validation in the AI Engine settings UI. Users are now alerted with localized error messages when trying to save restricted headers, avoiding confusion over failed forwardings.
- Prefix-Aware Protection: The interceptor intelligently strips the
cs-prefix before performing safety checks, ensuring no restricted headers bypass the filter.
- Full-Chain Filtering: Built-in blacklist for restricted headers (e.g.,
- Model ID Robustness Enhancement:
- Full-Chain Noise Reduction: Implemented automatic
.trim()handling in both backend forwarding logic (Body injection and URL splicing) and frontend model settings (Saving and Importing). This eliminates API authentication or matching failures caused by accidental leading/trailing spaces in configurations. - Protocol-Aware Model Injection: For OpenAI, Claude, and Ollama protocols, the proxy now forcibly inserts the correct backend model ID into the request body. This ensures the backend receives the expected ID even if the client omits the
modelfield or passes an alias.
- Full-Chain Noise Reduction: Implemented automatic
🪄 Improvements
- Proxy Statistics Dashboard Optimization:
- Real-time Auto-Refresh: The dashboard now supports automatic data updates every 10 seconds. Auto-refreshes do not trigger full-screen loading or clear current views, ensuring a smooth and continuous observation experience.
- Parallel Data Fetching: Optimized the statistics dashboard by switching from serial to parallel requests (
Promise.all), significantly reducing load times.
- Header Forwarding Architecture Overhaul (Sandwich Logic):
- Tiered Override Priority: Refactored the header construction pipeline to establish a strict hierarchy:
Client Standard Headers -> Provider Config Headers -> Protocol Mandatory Headers -> Client cs- Overrides. This prevents standard client headers from accidentally overriding provider-specific configurations (like custom User-Agents) while maintaining the explicit override power ofcs-prefixed headers. - Internal Metadata Passthrough: Restored the forwarding of internal identification headers such as
X-Provider-Id,X-Model-Id, andX-Internal-Requestfor better observability.
- Tiered Override Priority: Refactored the header construction pipeline to establish a strict hierarchy:
- Token Estimation Calibration: Fixed a major estimation bug in direct forward mode. The system now counts tokens only for plain text content, excluding massive counts caused by binary data like Base64 images.
- Param Forwarding Strategy Optimization: Refined the handling of sampling parameters like
stop. If the configuration is empty or resolves to an empty list, the field is no longer sent, ensuring compatibility with providers that enforce strict validation against empty values. - Performance & Stability Enhancements:
- Streaming Robustness: Restored and optimized buffer flush logic for the Claude protocol, ensuring complete output delivery even during unexpected stream interruptions.
🐞 Bug Fixes
- Assistant Window UX Fix: Resolved an issue where the Assistant window failed to auto-hide on blur and lacked reliable input focus upon being shown. Optimized focus handling specifically for macOS to ensure a smoother transition.
- Codebase Cleanup: Eliminated multiple redundant header forwarding loops in
chat_handler.rs, streamlining the backend execution path. - i18n Synchronization: Completed translations for "Today" statistics and "Restricted Header" warnings across all supported language packs.
[1.1.26]
🚀 新特性
- 精细化代理统计:新增“今天”统计维度,支持按自然日查看统计数据,与“最近 24 小时”维度互补,提供更符合直觉的数据观察视角。
- 自定义请求头防御系统:
- 全链路过滤机制:在
should_forward_header中内置受限头黑名单(如Host、Connection、Content-Length等),防止因自定义头冲突导致代理请求失败。 - 源头校验增强:在 AI 引擎设置界面(UI)增加实时校验,用户尝试保存非法头时将弹出多语言错误提示,避免配置后无法转发产生的疑虑。
- 前缀感知防御:拦截逻辑会自动识别并剥离
cs-前缀后再进行安全比对,确保防御无死角。
- 全链路过滤机制:在
- 模型 ID 鲁棒性增强:
- 全链路自动去噪:在后端转发逻辑(请求体注入与 URL 拼接)以及前端模型设置(保存与导入)全面引入自动
.trim()处理,彻底解决因配置中意外携带首尾空格导致的 API 鉴权或匹配失败。 - 协议感知模型注入:针对 OpenAI、Claude、Ollama 等协议,代理层现在会强制在请求体中插入正确的后端模型 ID,确保即使客户端未传
model字段或传递了别名,后端也能收到预期的 ID。
- 全链路自动去噪:在后端转发逻辑(请求体注入与 URL 拼接)以及前端模型设置(保存与导入)全面引入自动
🪄 改进
- 代理统计看板优化:
- 实时自动刷新:看板现在支持每 10 秒自动更新一次数据,且自动刷新时不会触发全屏加载或清空当前视图,确保了观测的连续性与平滑性。
- 并行请求优化:统计看板的数据加载由串行改为并行(
Promise.all),显著缩短了加载等待时间。
- Header 转发架构重构 (Sandwich Logic):
- 覆盖优先级梯队化:重构了请求头构建流程,确立了
客户端标准头 -> 供应商配置头 -> 协议必需头 -> 客户端 cs- 覆盖的层级结构。有效解决了供应商自定义头被客户端默认头意外覆盖的问题,同时赋予了客户端cs-前缀头最高级别的显式覆盖权。 - 内部元数据透传:恢复了
X-Provider-Id、X-Model-Id和X-Internal-Request等内部标识头的透传功能,便于链路分析。
- 覆盖优先级梯队化:重构了请求头构建流程,确立了
- Token 估算算法校准:修正了直连转发模式下的估算漏洞。现在仅针对消息中的纯文本内容进行 Token 计数,完全排除了 Base64 图片等二进制数据带来的海量计数异常,确保统计数据的准确性。
- 参数发送策略优化:优化了
stop(停止符)等采样参数的处理。当配置为空或解析结果为空列表时,系统将不再发送该字段,以适配对空值校验较严格的后端供应商。 - 性能与鲁棒性增强:
- 流式处理加固:恢复并优化了 Claude 协议下的末尾缓冲区刷新逻辑,确保在流异常中断等极端情况下也能完整产出结果。
🐞 修复
- 助手页面交互修复:解决了助手窗口在失去焦点后无法自动隐藏,以及唤起后未能可靠聚焦输入框的问题。特别针对 macOS 优化了焦点处理逻辑,确保交互体验更加顺滑。
- 冗余代码清理:移除了
chat_handler.rs中多处重复的 Header 转发循环,优化了后端执行路径。 - 国际化同步:补全了所有语言包中关于“自然日统计”和“受限头提示”的翻译。
ChatSpeed v1.1.25
[1.1.25] - 2026-01-28
🚀 New Features
- New Proxy Statistics Feature:
- Comprehensive Data Monitoring: The system now automatically records all requests passing through the proxy module, including Client Model Alias, actual Backend Model ID, provider, protocol, and HTTP status code.
- Dual-Mode Persistence: Statistics are captured for both protocol conversion and direct forward modes, including detailed error logs for failed requests.
- Precise Token Tracking: Supports cumulative input, output, and cache token counts. Implemented intelligent estimation logic based on character counts as a fallback when providers do not return usage data.
- Brand New Visual Analytics Dashboard:
- Advanced Charting: Added Backend Model Distribution (Pie), Error Code Distribution (Pie), and Daily Token Trends (Stacked Column).
- Interactive Dashboard: A new "Statistics" tab in Proxy Settings supports daily summaries and multiple time ranges (Last 24h, 7d, 30d, 90d).
- Detailed Drill-down: Expand daily logs to view "Statistics Details," showing the mapping between model aliases and actual backend providers.
- Rapid Error Diagnostics: Click on error counts to instantly view the distribution of error codes and specific failure reasons for that date.
🪄 Improvements
- UI/UX Interaction Enhancements:
- Instant Data Refresh: Added a refresh button with
row-keyoptimization to ensure statistical data and charts sync and re-render instantly. - Refined Scrolling: Disabled horizontal overscroll bounce effects for a crisper feel. Fixed the expansion column to the left and optimized column widths with text-overflow tooltips.
- Smart Unit Formatting: Large token counts are now automatically converted to "Ten Thousand" (万) or "Hundred Million" (亿) with thousands separators.
- Instant Data Refresh: Added a refresh button with
- System Architecture & Robustness:
- Database Evolution: Implemented V4 migration with the
ccproxy_statstable and indexes on key fields likerequest_atandproviderfor high-performance queries. - Enhanced Error Defense: Backend SQL queries now use
COALESCEprotection to eliminate type-parsing errors caused by malformed or missing data. - Memory Management: Automatic destruction of chart instances upon component unmounting to prevent memory leaks.
- Database Evolution: Implemented V4 migration with the
[1.1.25] - 2026-01-28
🚀 新特性
- 新增代理统计功能:
- 全量数据监控:现在系统会自动记录所有通过代理模块的请求,包括请求的模型别名(客户端)、实际调用的模型 ID(后端)、供应商、协议及 HTTP 状态码。
- 双模式统计入库:无论是协议转换模式还是直连转发模式,均已实现自动统计,并支持记录详细的错误信息。
- 精准 Token 追踪:支持记录累计输入、输出及缓存 Token 数;当供应商未返回数据时,系统会自动启用基于字符计数的智能估算逻辑进行兜底。
- 全新可视化统计看板:
- 多维度图表分析:新增后端模型使用分布(饼图)、错误代码分布(饼图)及每日 Token 消耗趋势(堆叠柱状图)。
- 可视化看板:在代理设置页面新增“统计信息”标签页,支持按天汇总及最近 24 小时/7天/30天/90天多跨度切换。
- 深度下钻详情:支持展开每日统计查看“统计详情”,清晰展示模型别名与后端模型的映射关系及各项指标。
- 错误快速定位:支持点击错误次数直接查看该日期下的错误码分布及具体错误原因。
🪄 改进
- UI/UX 交互优化:
- 数据即时刷新:新增一键刷新按钮,配合
row-key优化,确保统计数据与图表能够即时同步渲染。 - 列表滚动增强:禁用了表格的越界回弹效果(Overscroll),滑动体验更干脆;固定了展开列至左侧,并优化了列宽和文本溢出处理。
- 智能单位换算:Token 数量支持自动换算为“万”或“亿”单位,并增加千分位分隔符,大额数据展示更直观。
- 数据即时刷新:新增一键刷新按钮,配合
- 系统架构稳健性:
- 数据库演进:引入 V4 数据库迁移逻辑,新增
ccproxy_stats表并配置了request_at、provider等关键字段索引,确保海量数据下的查询性能。 - 错误防御增强:后端 SQL 查询全面采用
COALESCE保护,彻底杜绝了因脏数据或空值导致的类型解析错误。 - 内存管理优化:在前端组件卸载时自动销毁图表实例,防止内存泄漏。
- 数据库演进:引入 V4 数据库迁移逻辑,新增
ChatSpeed v1.1.24
[1.1.24] - 2026-01-27
🚀 New Features
- New Proxy Group Switcher Window:
- Instant Summon: Added a global shortcut (default
Alt+Shift+P) to quickly open a lightweight switcher panel - Native Interaction: Supports Arrow keys (
↑/↓) for navigation,Enterto activate, andEscto close - Seamless UX: Automatically hides on blur and includes built-in drag support for effortless placement
- Full Support: Comes with complete localized translations for all 8 languages and optimized startup shortcut registration
- Instant Summon: Added a global shortcut (default
- Enhanced Proxy Server List:
- Accordion Layout: Refactored the proxy list in Settings into an animated accordion view
- Focus Management: Implemented "Single-Open" logic to maintain focus and improved usability with localized updates for template loading and tool modes
- Enhanced Attachment Support: Now supports sending images and various office documents in chat:
- Images: Supported formats include JPG, PNG, GIF, WEBP, SVG, BMP. Supports direct pasting and drag-and-drop.
- Office Documents: Local parsing for PDF, DOCX, XLSX, and XLS formats.
- Local File Parsing: All office document parsing (PDF/Word/Excel) is performed locally without relying on external networks or CDNs, ensuring stability even in offline or restricted network environments.
- Intelligent Vision Model Integration:
- Automatically invokes the configured "Vision Model" to generate content descriptions or extract text when images/documents are sent.
- Description results are automatically prepended to the user's question as context, significantly enhancing the AI's multimodality comprehension.
- Tool Call Mode Configuration: Added tool call mode settings in proxy groups with three modes:
- URL Setting: Automatically determines mode based on request path (e.g.,
/compat_mode/), preserving original behavior - Compat Mode: Forces XML-based tool compatibility mode for models that don't support native tool calls
- Native Call: Forces native tool call format for optimal performance and compatibility
- URL Setting: Automatically determines mode based on request path (e.g.,
- Quick Mode Toggle: Added tool mode toggle icon in proxy group list, supporting one-click cycling between three modes with real-time status display
- Batch Update Template Loading: Added "Load from Template" feature in batch update dialog, allowing quick configuration import from existing proxy groups
🪄 Improvements
- Immersive UI/UX Optimizations:
- Instant Feedback: Clears the input area immediately upon sending and displays processing progress for a smoother interaction.
- Visible Progress: Displays real-time processing steps (e.g., "Analyzing images...", "Generating response...") at the bottom of the chat.
- Auto-Scrolling: The chat window now automatically scrolls to the bottom when progress steps are updated.
- Image Preview: Images in chat bubbles now support click-to-zoom; redundant attachment filenames have been removed.
- Error Rollback: If vision analysis or message storage fails, the system automatically restores backed-up text and attachments to the input area to prevent data loss.
- Assistant Window Interaction Improvements:
- Layout Refactoring: Icons have been moved below the text box and arranged horizontally to fix crowding and tooltip overlap issues.
- Smart Pinning: Automatically enables "Always on Top" temporarily when selecting attachments, restoring the original state once the dialog is closed.
- Settings Optimization: Added "Clear" buttons for Vision and Title Generation models and fixed a UI bug where cleared selections displayed as
0. - Enhanced Context Restoration: In multi-turn dialogues, the system now automatically restores vision analysis results from history using XML tags, ensuring the AI maintains full background context even after switching models.
- Batch Update Dialog Optimization: Increased dialog height and added scroll support to prevent form content from being obscured by buttons
- UI Alignment Fix: Fixed vertical alignment between labels and checkboxes in batch update dialog
🐞 Bug Fixes
- Synchronous Request Fix: Improved the backend OpenAI protocol handler for non-streaming (synchronous) requests, resolving parsing errors in vision analysis scenarios.
- Resend Message Fix: Resolved a logic error where resending a message could lead to sending empty content or losing context.
- Code Robustness: Fixed a reference error in
Index.vuecaused by a missingSkillItemcomponent import. - Tooltip Opacity Fix: Optimized global CSS variables to fix overlapping text caused by transparent Tooltip backgrounds.
[1.1.24] - 2026-01-27
🚀 新特性
- 新增代理分组切换快捷窗:
- 高效唤起:新增全局快捷键(默认
Alt+Shift+P)一键召唤轻量级代理切换面板 - 流畅交互:支持键盘
↑/↓方向键预览、Enter键即刻激活、Esc键快速关闭 - 智能显隐:窗口失去焦点时自动隐藏,且在隐藏前自动解除置顶,确保不干扰主工作流
- 完整交付:内置了完善的窗口拖拽支持及全语种(繁中、日、韩、德、俄、葡、法、西)的配套翻译
- 可靠注册:优化了快捷键底层注册逻辑,确保应用启动后即可立即使用
- 高效唤起:新增全局快捷键(默认
- 代理服务器列表体验升级:
- 手风琴布局:设置页面的代理列表重构为手风琴折叠样式,并配有平滑的过渡动画
- 聚焦优化:始终保持一个分组开启的逻辑,并同步补全了相关操作(如模板加载、工具模式切换)的多语言翻译
- 增强附件支持:现在支持在聊天中发送图片以及多种办公文档:
- 图片:支持 JPG, PNG, GIF, WEBP, SVG, BMP 格式,支持直接粘贴或拖拽上传
- 办公文档:支持 PDF, DOCX, XLSX, XLS 格式的本地解析
- 本地化文件解析:所有办公文档解析(PDF/Word/Excel)均在本地执行,不依赖任何外部网络或 CDN,确保在断网或受限网络下依然稳定可用
- 智能视觉模型集成:
- 发送图片或文档时,系统会自动调用配置的“视觉模型”生成内容描述或提取文本
- 描述结果将作为上下文自动拼接到用户的提問中,显著提升 AI 对多模态内容的理解力
- 工具调用模式设置:在代理分组中新增工具调用模式配置,支持三种模式:
- URL 设置:根据请求路径自动判断(如
/compat_mode/),保持原有行为 - 兼容模式:强制使用 XML 格式的工具兼容模式,适配不支持原生工具调用的模型
- 原生调用:强制使用原生工具调用格式,提供最佳性能和兼容性
- URL 设置:根据请求路径自动判断(如
- 快捷切换工具模式:在代理分组列表中新增工具模式切换图标,支持一键在三种模式间循环切换,实时显示当前模式状态
- 批量更新模板加载:在批量更新对话框中新增"从模板加载"功能,可选择现有分组的配置快速填充到表单中,提高批量配置效率
🪄 改进
- UI/UX 沉浸式优化:
- 即时响应:点击发送后立即清空输入区并显示处理进度,提升交互流畅感
- 进度可见性:在聊天底部实时显示处理步骤(如“正在分析图片...”、“正在生成回复...”)
- 自动滚动:进度更新时窗口会自动滚动到底部,确保最新信息不被遮挡
- 图片预览:聊天气泡中的图片支持点击放大查看,移除冗余的附件名称显示
- 错误回滚:若视觉分析或消息存储失败,系统会自动将备份的文字和附件还原到输入区,确保数据不丢失
- 助手窗口交互优化:
- 布局重构:将图标栏移至文本框下方并横向排列,解决界面拥挤和 Tooltips 遮挡问题
- 智能置顶:在选择附件时会自动临时开启窗口置顶,选择完成或关闭对话框后自动恢复原始状态,防止窗口意外隐藏
- 设置项优化:为“视觉模型”和“标题生成模型”添加清除按钮,并修复了清空后显示为
0的 UI Bug - 上下文还原增强:在多轮对话中,系统会自动从历史记录中还原视觉分析结果并使用 XML 标签包装,确保 AI 即使在切换模型后依然拥有完整的背景记忆
- 批量更新对话框优化:增加对话框高度和滚动支持,确保表单内容不会被按钮遮挡
- UI 对齐优化:修复批量更新对话框中 label 和 checkbox 的垂直对齐问题
🐞 修复
- 同步请求修复:修复了后端 OpenAI 协议对非流式(同步)请求的处理逻辑,解决了视觉分析等场景下的解析错误
- 消息重发修复:修复了“重新发送”消息时可能导致发送空内容或丢失上下文的逻辑错误
- 代码健壮性:修复了
Index.vue中缺失SkillItem组件导入导致的引用错误 - Tooltip 透明度修复:优化了全局 CSS 变量,解决了 Tooltip 背景透明导致文字重叠的问题