错误信息: Failed after 3 attempts. Last error: 所有令牌分组 default 下对于模型 gemini-3-pro-pre...

2026年04月01日 09:50 processing

错误信息

错误名称: AI_RetryError 错误信息: Failed after 3 attempts. Last error: 所有令牌分组 default 下对于模型 gemini-3-pro-preview 均无可用渠道,请更换分组尝试 (request id: 20260401095007417888624PelrJZq) 堆栈信息: AI_RetryError: Failed after 3 attempts. Last error: 所有令牌分组 default 下对于模型 gemini-3-pro-preview 均无可用渠道,请更换分组尝试 (request id: 20260401095007417888624PelrJZq) at _retryWithExponentialBackoff (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-CsnpwSxn.js:50413:37) at async streamStep (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-CsnpwSxn.js:53858:109) at async fn (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-CsnpwSxn.js:54164:5) at async file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-CsnpwSxn.js:50243:19 错误原因: "[undefined]"

AI 解决方案

报错分析报告

1.错误翻译


原文:All token groups under the default group have no available channels for the model gemini-3-pro-preview, please try changing the group  
译文:所有令牌分组 default 下对于模型 gemini-3-pro-preview 均无可用渠道,请更换分组尝试

2.原因分析


  • 根本原因:默认令牌分组(default)中未配置模型gemini-3-pro-preview的可用调用渠道,导致3次重试均失败。

  • 发生位置:调用gemini-3-pro-preview模型时,系统在default分组内未找到有效渠道(堆栈指向_retryWithExponentialBackoff重试逻辑)。
  • 3.解决方案


    直接更换令牌分组或修改分组配置:
    // 方案1:调用时指定可用分组(以JavaScript为例)
    const response = await fetch("https://api.dmxapi.com/v1/chat/completions", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer YOUR_TOKEN`,
        "X-Token-Group": "your-available-group" // 替换为有gemini-3-pro-preview权限的分组名
      },
      body: JSON.stringify({
        model: "gemini-3-pro-preview",
        messages: [/* 你的消息 */]
      })
    });
    
    // 方案2:配置文件修改分组(以JSON为例)
    {
      "model": "gemini-3-pro-preview",
      "token_group": "your-available-group" // 替换默认分组为可用分组
    }
    

    4. 预防措施


  • 最佳实践1:调用模型前通过API查询分组渠道可用性(如GET /v1/token-groups),避免盲目使用默认分组。

  • 最佳实践2:配置2-3个备用分组,在默认分组失效时自动切换(可结合重试逻辑的fallback_groups参数)。

  • 推荐工具:使用Postman的「Collection Runner」监控分组可用性,或用curl定期校验渠道状态。