Skip to content

ChatSpeed v1.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Jan 01:00

[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/embeddings path 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.
  • MCP Proxy Router Overhaul:
    • Path Unification: Consolidated MCP-related SSE and HTTP routes under the /mcp namespace, introducing /mcp/sse and /mcp/http as standard endpoints.
    • State Isolation: Leveraged nest_service to decouple different application states (SharedState vs. ChatState), improving system stability under concurrent requests.
    • Backward Compatibility: Maintained the legacy /sse entry point (marked as deprecated) to ensure a smooth transition for older clients.

🪄 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/embeddings path, 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 标准路径冲突导致的程序异常。
  • MCP 代理路由架构重构
    • 路径统一化:将 MCP 相关的 SSE 和 HTTP 路由统一整合至 /mcp 命名空间下,推出了 /mcp/sse/mcp/http 标准端点。
    • 状态隔离优化:通过 nest_service 实现了不同业务状态(SharedState 与 ChatState)的解耦,提升了并发请求下的系统稳定性。
    • 向下兼容:保留了传统的 /sse 入口并标记为弃用,确保老版本客户端平滑过渡。

🪄 改进

  • API 文档与 UI 同步:更新了代理设置页面中的 API 端点帮助表格,新增了 Embedding 相关的完整路径说明及占位符替换指南,显著提升了开发者体验(DX)。

🐞 修复

  • 路由冲突加固:彻底解决了因多个协议(OpenAI/Ollama/Claude)在某些模式下重复注册 /v1/embeddings 路径导致的程序启动 Panic。