@wacry/codeks-bridge 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/catalog/README.md CHANGED
@@ -55,7 +55,7 @@ Claude、DeepSeek 和 Gemini 从 GPT-6.1 Sol 的完整条目开始,只做各
55
55
 
56
56
  依据:[Sonnet 模型规格](https://platform.claude.com/docs/en/models/sonnet-5-5/overview)、[Haiku 模型规格](https://platform.claude.com/docs/en/models/haiku-5-5/overview)、[Messages 必填参数](https://platform.claude.com/docs/en/api/messages/create)、[DeepSeek 模型规格](https://api-docs.deepseek.com/quick_start/pricing/)。这些是第三方精调的依据,`source` 仍记录 Codex 模板来源。
57
57
 
58
- Claude 的默认 effort 为 `medium`,目录提供 `low`、`medium`、`high`、`xhigh`、`max` 和客户端 `ultra`。DeepSeek 默认 `high`,目录提供 `none`、`low`、`high`、`max` 和 `ultra`;`none` 关闭 thinking。DeepSeek 的 `minimal`、`medium`、`xhigh` 仍作为请求兼容别名映射到原生值,但不作为重复档位展示。[DeepSeek effort 映射](https://api-docs.deepseek.com/guides/thinking_mode/)
58
+ Claude 的默认 effort 为 `medium`,目录提供 `low`、`medium`、`high`、`xhigh`、`max` 和客户端 `ultra`。DeepSeek 默认 `high`,目录提供原生 `low`、`high`、`max` 和客户端 `ultra`。[DeepSeek thinking 参数](https://api-docs.deepseek.com/guides/thinking_mode/)
59
59
 
60
60
  Opus / Sonnet 两个条目从 `low` 开始:Opus 5.5 始终启用 thinking,Sonnet 5.5 的最低模式 `between_tools` 仍保留工具之间的思考,因此不能用 `none` 表示。需要 Sonnet 的这一模式时,使用 [Messages 原生 options](../docs/backends-anthropic.md#历史与-thinking) 显式配置。目录列出的档位应与已审阅模型匹配;未列出的显式请求值仍交给上游裁决。[Claude thinking 规则](https://platform.claude.com/docs/en/build-with-claude/thinking)
61
61
 
@@ -10,19 +10,15 @@
10
10
  "以 GPT-6.1 Sol 的完整条目为起点;保留 Code Mode Only、Responses Lite、多代理和工具元数据。",
11
11
  "将模型标识和展示信息改为 DeepSeek Flash;instructions_template 仅将 based on GPT-6 改为 based on DeepSeek,保留 Codex 代理身份和其余客户端提示词。",
12
12
  "context_window 和 max_context_window 设为 1000000,部署配置可明确覆盖。",
13
- "默认 effort 为 high;目录提供 none、low、high、max 及客户端 ultra。minimal、medium、xhigh 仅保留兼容映射,不作为独立菜单选项,避免重复原生档位;none 关闭 thinking,未列出的显式请求值继续由上游裁决。",
13
+ "默认 effort 为 high;目录提供原生 low、high、max 及客户端 ultra,thinking 使用 enabled。未列出的显式请求值继续由上游裁决。",
14
14
  "关闭尚未转换的 verbosity 和 original image detail 声明;保留普通图片输入。",
15
15
  "清空 GPT 专属的服务优先级、速度档位、推广和升级提示。",
16
16
  "ultra 是客户端自动分工档位,映射到原生 max;multi_agent_reasoning_effort 同样设为 max,保留源条目的 Ultra 描述。"
17
17
  ],
18
18
  "adapter": "deepseek-chat",
19
19
  "effort_map": {
20
- "none": "none",
21
- "minimal": "low",
22
20
  "low": "low",
23
- "medium": "high",
24
21
  "high": "high",
25
- "xhigh": "high",
26
22
  "max": "max",
27
23
  "ultra": "max"
28
24
  },
@@ -65,10 +61,6 @@
65
61
  "description": "DeepSeek Flash with the Codex coding-agent instructions and tools.",
66
62
  "default_reasoning_level": "high",
67
63
  "supported_reasoning_levels": [
68
- {
69
- "effort": "none",
70
- "description": "Disable thinking"
71
- },
72
64
  {
73
65
  "effort": "low",
74
66
  "description": "Upstream reasoning effort: low"
@@ -4,10 +4,10 @@ import { buildChatRequest, runChat } from "./chat.js";
4
4
  const deepseek = {
5
5
  reasoningField: "reasoning_content",
6
6
  requestParameters({ request, route }) {
7
- const effort = reasoningEffort(route, request.reasoning?.effort);
8
- return effort === "none"
9
- ? { thinking: { type: "disabled" } }
10
- : { thinking: { type: "enabled" }, reasoning_effort: effort };
7
+ return {
8
+ thinking: { type: "enabled" },
9
+ reasoning_effort: reasoningEffort(route, request.reasoning?.effort),
10
+ };
11
11
  },
12
12
  configureStructuredOutput({ request, route }, body) {
13
13
  const format = request.text?.format;
@@ -32,13 +32,10 @@
32
32
 
33
33
  | 客户端 effort | 原生参数 |
34
34
  | --- | --- |
35
- | `none` | `thinking.type: "disabled"` |
36
35
  | `low` | `thinking.type: "enabled"`,`reasoning_effort: "low"` |
37
36
  | `high` | `thinking.type: "enabled"`,`reasoning_effort: "high"` |
38
37
  | `max`、`ultra` | `thinking.type: "enabled"`,`reasoning_effort: "max"` |
39
38
 
40
- `minimal` 映射到 `low`,`medium`、`xhigh` 映射到 `high`,继续兼容已有配置和显式请求;这些名称是兼容别名,因此不作为重复档位展示。[官方 effort 映射](https://api-docs.deepseek.com/guides/thinking_mode/)
41
-
42
39
  codeks 的 `ultra` 由客户端注入多代理提示词,并使用原生 `max` effort。映射可由 `reasoning.effort_map` 整体替换,显式覆盖时其键同时决定目录中可选档位。未映射的显式 effort 原样发送。上游和模型 `options` 随后覆盖推导参数,允许直接设置端点专有选项;桥接器最终固定 model、messages、工具定义、流模式和 usage 开关。
43
40
 
44
41
  强制工具选择、输出格式与 thinking 能否组合由上游判断。bridge 转换可表达的请求后直接发送,上游不支持时保留错误,不自动关闭 thinking 或改成普通文本输出。
package/docs/config.md CHANGED
@@ -217,7 +217,7 @@ token 临近过期时自动续期并写回原文件;HTTP 401 可触发一次
217
217
  }
218
218
  ```
219
219
 
220
- `effort_map` 的键是 codeks 可选档位,值是发给上游的原生值。提供映射时完整替换目录条目的默认映射;`default_effort` 必须出现在映射中。未指定默认档位时,保留映射中仍存在的条目默认值,否则选映射第一项。映射为原生 `none` 时,Messages/DeepSeek adapter 发送 `thinking.type: "disabled"`,是否接受由上游决定。Claude 5.5 目录不提供这个档位;Sonnet 的 `between_tools` 模式可通过显式 options 选择,含义和配置见 [Messages](backends-anthropic.md)。
220
+ `effort_map` 的键是 codeks 可选档位,值是发给上游的原生值。提供映射时完整替换目录条目的默认映射;`default_effort` 必须出现在映射中。未指定默认档位时,保留映射中仍存在的条目默认值,否则选映射第一项。Sonnet 的 `between_tools` 模式可通过显式 options 选择,含义和配置见 [Messages](backends-anthropic.md)。
221
221
 
222
222
  请求没有 effort 时使用配置默认值;有映射则转换,未列出的显式 effort 直接透传,交给上游判断。catalog 与实际请求使用同一份配置;通过原生 `options` 再覆盖 thinking/effort 时,应同时调整这里的展示设置。
223
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wacry/codeks-bridge",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Configurable local Responses API bridge for codeks with GPT, Claude Messages, DeepSeek Chat, and native Gemini adapters.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "David Zhang",