ms-types 0.10.0 → 0.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -18,6 +18,6 @@
18
18
  "devDependencies": {
19
19
  "vitepress": "^1.6.4",
20
20
  "vitepress-theme-teek": "^1.6.2",
21
- "wrangler": "^4.129.0"
21
+ "wrangler": "^4.129.1"
22
22
  }
23
23
  }
package/types/ai.d.ts CHANGED
@@ -14,7 +14,7 @@ declare namespace ai {
14
14
  name: string;
15
15
  /** 接口协议 */
16
16
  protocol: "openai" | "anthropic" | "gemini";
17
- /** 接口根地址,例如 https://api.openai.com/v1 */
17
+ /** 接口根地址,例如 https://api.deepseek.com */
18
18
  baseUrl: string;
19
19
  /** API Key;openai 协议连本机模型时可为空 */
20
20
  apiKey: string;
@@ -26,6 +26,11 @@ declare namespace ai {
26
26
  temperature?: number;
27
27
  /** 默认最大输出 token;不传则不发该字段,用模型自己的默认值(Anthropic 因接口必填仍默认 2048) */
28
28
  maxTokens?: number;
29
+ /**
30
+ * 思考级别,只对 openai 协议生效(请求字段 reasoning_effort)。
31
+ * 不传则不发,用服务商默认。
32
+ */
33
+ reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh";
29
34
  /** 是否支持图片输入,默认 true;为 false 时带图调用直接报错 */
30
35
  supportsVision: boolean;
31
36
  /** 是否为默认供应商 */
package/types/lua/ai.lua CHANGED
@@ -6,12 +6,13 @@ local _Ai = {}
6
6
  ---@field id string 供应商 id,不传时自动生成
7
7
  ---@field name string 展示名,例如 "DeepSeek",调用时可用它选模型
8
8
  ---@field protocol "openai"|"anthropic"|"gemini" 接口协议
9
- ---@field baseUrl string 接口根地址,例如 https://api.openai.com/v1
9
+ ---@field baseUrl string 接口根地址,例如 https://api.deepseek.com
10
10
  ---@field apiKey string API Key;openai 协议连本机模型时可为空
11
11
  ---@field model string 默认模型名
12
12
  ---@field headers table<string, string> 额外请求头,某些网关需要
13
13
  ---@field temperature number|nil 默认温度;不传则不发该字段,用模型自己的默认值
14
14
  ---@field maxTokens integer|nil 默认最大输出 token;不传则不发该字段,用模型自己的默认值(Anthropic 因接口必填仍默认 2048)
15
+ ---@field reasoningEffort "none"|"low"|"medium"|"high"|"xhigh"|nil 思考级别,仅 openai 协议;不传不发,用服务商默认
15
16
  ---@field supportsVision boolean 是否支持图片输入,默认 true
16
17
  ---@field isDefault boolean 是否为默认供应商
17
18
 
@@ -16,7 +16,7 @@ declare namespace $AI {
16
16
  name: 字符串;
17
17
  /** 接口协议 */
18
18
  protocol: "openai" | "anthropic" | "gemini";
19
- /** 接口根地址,例如 https://api.openai.com/v1 */
19
+ /** 接口根地址,例如 https://api.deepseek.com */
20
20
  baseUrl: 字符串;
21
21
  /** API Key;openai 协议连本机模型时可为空 */
22
22
  apiKey: 字符串;
@@ -28,6 +28,11 @@ declare namespace $AI {
28
28
  temperature?: 数字;
29
29
  /** 默认最大输出 token;不传则不发该字段,用模型自己的默认值(Anthropic 因接口必填仍默认 2048) */
30
30
  maxTokens?: 数字;
31
+ /**
32
+ * 思考级别,只对 openai 协议生效(请求字段 reasoning_effort)。
33
+ * 不传则不发,用服务商默认。
34
+ */
35
+ reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh";
31
36
  /** 是否支持图片输入,默认 true */
32
37
  supportsVision: 布尔值;
33
38
  /** 是否为默认供应商 */