{
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "JSON Schema 地址，仅供编辑器补全/校验；运行时忽略。"
    },
    "apiKey": {
      "type": "string",
      "minLength": 1,
      "description": "DeepSeek API key（必填）。优先级：环境变量 DEEPSEEK_API_KEY > 本字段。"
    },
    "baseUrl": {
      "type": "string",
      "default": "https://api.deepseek.com",
      "description": "API 基础地址（自建代理时修改）。环境变量 DEEPSEEK_BASE_URL 可覆盖。"
    },
    "model": {
      "type": "string",
      "default": "deepseek-v4-flash",
      "minLength": 1,
      "pattern": "^(?!\\s*$)",
      "description": "模型名（自由字符串）。官方还支持 deepseek-v4-flash-vision-exp，但本插件只发送文本查询，不支持图片输入；切换模型后价格自动取 prices.models，未配置时回退顶层价格。环境变量 DEEPSEEK_MODEL 可覆盖。"
    },
    "reasoningEffort": {
      "type": "string",
      "enum": [
        "off",
        "low",
        "high",
        "max"
      ],
      "default": "high",
      "description": "推理强度：off 关闭思考（省 token）、low/high/max 控制思考量。本项目默认 high；未传 effort 时 DeepSeek 默认启用思考。环境变量 DEEPSEEK_REASONING_EFFORT 可覆盖。"
    },
    "maxOutputTokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 384000,
      "default": 4096,
      "description": "回答最大输出 token 数（官方上限 384K）。环境变量 DEEPSEEK_MAX_OUTPUT_TOKENS 可覆盖。"
    },
    "timeoutMs": {
      "type": "integer",
      "minimum": 1,
      "default": 30000,
      "description": "单次请求超时（毫秒）。环境变量 DEEPSEEK_TIMEOUT_MS 可覆盖。"
    },
    "cacheTtlMs": {
      "type": "integer",
      "minimum": 1,
      "default": 300000,
      "description": "搜索结果缓存 TTL（毫秒）。环境变量 DEEPSEEK_CACHE_TTL_MS 可覆盖。"
    },
    "maxResultChars": {
      "type": "integer",
      "minimum": 1,
      "default": 50000,
      "description": "返回给 LLM 的文本最大字符数（超出截断）。环境变量 DEEPSEEK_MAX_RESULT_CHARS 可覆盖。"
    },
    "prices": {
      "type": "object",
      "properties": {
        "inputPerMillion": {
          "type": "number",
          "exclusiveMinimum": 0,
          "default": 0.22,
          "description": "输入单价，缓存未命中，空闲价（USD / 1M tokens）。环境变量 DEEPSEEK_PRICE_INPUT 可覆盖。"
        },
        "cachedInputPerMillion": {
          "type": "number",
          "exclusiveMinimum": 0,
          "default": 0.007,
          "description": "输入单价，缓存命中，空闲价（USD / 1M tokens）。环境变量 DEEPSEEK_PRICE_CACHED_INPUT 可覆盖。"
        },
        "outputPerMillion": {
          "type": "number",
          "exclusiveMinimum": 0,
          "default": 0.66,
          "description": "输出单价，空闲价（USD / 1M tokens）。环境变量 DEEPSEEK_PRICE_OUTPUT 可覆盖。"
        },
        "peak": {
          "type": "object",
          "required": [
            "multiplier",
            "hours"
          ],
          "properties": {
            "multiplier": {
              "type": "number",
              "exclusiveMinimum": 0,
              "description": "高峰单价倍率（官方规则为 2）。"
            },
            "hours": {
              "type": "array",
              "items": {
                "type": "array",
                "additionalItems": false,
                "items": [
                  {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  },
                  {
                    "type": "string",
                    "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                  }
                ],
                "minItems": 2
              },
              "minItems": 1,
              "description": "高峰时段列表，半开区间 [start, end)（09:00 计高峰、12:00 不计）。"
            },
            "weekendOffPeak": {
              "type": "boolean",
              "default": true,
              "description": "官方生效后周六、周日全天按平峰计价；自定义价格表可设为 false 保留周末高峰。"
            }
          },
          "additionalProperties": false,
          "default": {
            "multiplier": 2,
            "hours": [
              [
                "09:00",
                "12:00"
              ],
              [
                "14:00",
                "18:00"
              ]
            ],
            "weekendOffPeak": true
          },
          "description": "峰谷定价：高峰时段价格 = 平峰 × multiplier（适用所有计费项）。官方工作日高峰时段为北京时间 9:00-12:00 与 14:00-18:00；2026-08-23 00:00 起周末全天为平峰。"
        },
        "models": {
          "type": "object",
          "patternProperties": {
            "^.*$": {
              "type": "object",
              "properties": {
                "inputPerMillion": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "输入单价（缓存未命中）。"
                },
                "cachedInputPerMillion": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "输入单价（缓存命中）。"
                },
                "outputPerMillion": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "输出单价。"
                },
                "peak": {
                  "type": "object",
                  "required": [
                    "multiplier",
                    "hours"
                  ],
                  "properties": {
                    "multiplier": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "高峰单价倍率（官方规则为 2）。"
                    },
                    "hours": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "additionalItems": false,
                        "items": [
                          {
                            "type": "string",
                            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                          },
                          {
                            "type": "string",
                            "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
                          }
                        ],
                        "minItems": 2
                      },
                      "minItems": 1,
                      "description": "高峰时段列表，半开区间 [start, end)（09:00 计高峰、12:00 不计）。"
                    },
                    "weekendOffPeak": {
                      "type": "boolean",
                      "default": true,
                      "description": "官方生效后周六、周日全天按平峰计价；自定义价格表可设为 false 保留周末高峰。"
                    }
                  },
                  "additionalProperties": false,
                  "description": "峰谷定价：高峰时段价格 = 平峰 × multiplier（适用所有计费项）。官方工作日高峰时段为北京时间 9:00-12:00 与 14:00-18:00；2026-08-23 00:00 起周末全天为平峰。"
                }
              },
              "additionalProperties": false,
              "description": "单模型价格覆盖：缺省项回退顶层价格。"
            }
          },
          "description": "按模型覆盖的价格表（key = 模型名，命中优先；整块替换默认表）。"
        }
      },
      "additionalProperties": false,
      "description": "价格配置，单位：USD / 1M tokens。默认值为官方空闲价，并默认启用官方峰谷时段及周末平峰规则。"
    }
  },
  "additionalProperties": false,
  "description": "Generated by pnpm gen:schema from src/config-schema.ts — do not edit. 由 src/config-schema.ts 自动生成，请勿手改。",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "deepseek-web-search config (zh)"
}
