lobe-chat icon indicating copy to clipboard operation
lobe-chat copied to clipboard

[Bug] 不能切换模型,界面显示切换了但看日志好像没有

Open ymefg opened this issue 1 week ago • 7 comments

📦 部署环境

Vercel

📌 软件版本

v1.52.15

💻 系统环境

Windows

🌐 浏览器

Edge

🐛 问题描述

模型选中 Gemini,并输入一段超过 8000 token 的话,然后模型没有反应。

Image

Image

去到 Vercel 看日志,发现提示 token 超出限制

Image

Error [TRPCError]: 
    at o (.next/server/chunks/33378.js:1:1149)
    at f (.next/server/chunks/33378.js:4:286)
    at async f (.next/server/chunks/33378.js:4:68)
    at async f (.next/server/chunks/33378.js:4:68)
    at async f (.next/server/chunks/33378.js:4:68)
    at async f (.next/server/chunks/33378.js:4:68)
    at async r (.next/server/chunks/33378.js:1:6073)
    at async (.next/server/chunks/45276.js:1:7990) {
  code: 'INTERNAL_SERVER_ERROR',
  [cause]: Error: 
      at <unknown> (.next/server/chunks/33378.js:1:1460)
      at new a (.next/server/chunks/33378.js:1:1502)
      at o (.next/server/chunks/33378.js:1:1149)
      at f (.next/server/chunks/33378.js:4:286)
      at async f (.next/server/chunks/33378.js:4:68)
      at async f (.next/server/chunks/33378.js:4:68)
      at async f (.next/server/chunks/33378.js:4:68)
      at async f (.next/server/chunks/33378.js:4:68)
      at async r (.next/server/chunks/33378.js:1:6073) {
    endpoint: 'https://models.inference.ai.azure.com',
    error: {
      message: "This model's maximum context length is 8192 tokens, however you requested 8337 tokens (8337 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.",
      type: 'invalid_request_error',
      param: null,
      code: null
    },
    errorType: 'ProviderBizError',
    provider: 'github'
  }
}

明显是这里使用了 GitHub 的模型,并不是我选择的 Gemini

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

关联了两个文件,没有使用插件。一直以来使用的都是 Gemini 2.0 Flash Thinknig Experimental 01-21 模型,偶尔会切换到 GitHub 的 GPT-4o。

ymefg avatar Feb 11 '25 02:02 ymefg