升级到v1.3.0:新增auto推理模式和完善推理级别文档
主要功能更新: - 新增auto推理级别,完全遵循客户端原始请求参数 - 支持五档推理级别:auto/off/low/medium/high - auto模式零干预:不修改推理字段和anthropic-beta头 - 除gpt-5-codex外,所有模型默认设为auto模式 文档完善: - 更新核心功能说明,突出智能推理级别控制 - 新增auto推理模式详细说明和使用场景 - 添加推理级别对比表格和配置示例 - 增强FAQ部分,分场景解答推理相关问题 - 提供OpenAI和Anthropic模型字段对应关系 技术实现: - 更新getModelReasoning函数支持auto选项 - 完善所有transformer的auto模式处理逻辑 - 优化routes.js中直接转发端点的auto支持 - 确保auto模式下头信息和请求体完全透传
This commit is contained in:
10
routes.js
10
routes.js
@@ -238,7 +238,10 @@ async function handleDirectResponses(req, res) {
|
||||
|
||||
// 处理reasoning字段
|
||||
const reasoningLevel = getModelReasoning(modelId);
|
||||
if (reasoningLevel) {
|
||||
if (reasoningLevel === 'auto') {
|
||||
// Auto模式:保持原始请求的reasoning字段不变
|
||||
// 如果原始请求有reasoning字段就保留,没有就不添加
|
||||
} else if (reasoningLevel && ['low', 'medium', 'high'].includes(reasoningLevel)) {
|
||||
modifiedRequest.reasoning = {
|
||||
effort: reasoningLevel,
|
||||
summary: 'auto'
|
||||
@@ -373,7 +376,10 @@ async function handleDirectMessages(req, res) {
|
||||
|
||||
// 处理thinking字段
|
||||
const reasoningLevel = getModelReasoning(modelId);
|
||||
if (reasoningLevel) {
|
||||
if (reasoningLevel === 'auto') {
|
||||
// Auto模式:保持原始请求的thinking字段不变
|
||||
// 如果原始请求有thinking字段就保留,没有就不添加
|
||||
} else if (reasoningLevel && ['low', 'medium', 'high'].includes(reasoningLevel)) {
|
||||
const budgetTokens = {
|
||||
'low': 4096,
|
||||
'medium': 12288,
|
||||
|
||||
Reference in New Issue
Block a user