-
Notifications
You must be signed in to change notification settings - Fork 61.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 自己申请的官方key和第三方的key同时使用的问题 #6318
Comments
Title: [Bug] Issues when using the official key you applied for and the third-party key at the same time |
+deepseek-chat@DeepSeek=DeepSeek |
+deepseek-chat@DeepSeek=DeepSeek |
不行,提示下面的错误 {
"error": {
"message": "bad response status code 402 (request id: 2025030812282583788488544898589)",
"type": "upstream_error",
"param": "402",
"code": "bad_response_status_code"
}
} 下面是我的.env全部文件内容。里面的KEY都是可能用的。我将这些KEY在其他平台是能够正确使用的。 # Your openai api key. (required)
OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Access password, separated by comma. (optional)
CODE=XXXXXXXXXXXXX
# You can start service behind a proxy. (optional)
PROXY_URL=http://localhost:7890
# (optional)
# Default: Empty
# Google Gemini Pro API key, set if you want to use Google Gemini Pro API.
GOOGLE_API_KEY=
# (optional)
# Default: https://generativelanguage.googleapis.com/
# Google Gemini Pro API url without pathname, set if you want to customize Google Gemini Pro API url.
GOOGLE_URL=
DEEPSEEK_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DEEPSEEK_URL=https://api.deepseek.com
GROK_API_KEY=xai-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GROK_URL=https://api.x.ai/v1
# Override openai api request base url. (optional)
# Default: https://api.openai.com
BASE_URL=https://aihubmix.com
# Specify OpenAI organization ID.(optional)
# Default: Empty
OPENAI_ORG_ID=
# (optional)
# Default: Empty
# If you do not want users to use GPT-4, set this value to 1.
DISABLE_GPT4=1
# (optional)
# Default: Empty
# If you do not want users to input their own API key, set this value to 1.
HIDE_USER_API_KEY=1
# (optional)
# Default: Empty
# If you do want users to query balance, set this value to 1.
ENABLE_BALANCE_QUERY=
# (optional)
# Default: Empty
# If you want to disable parse settings from url, set this value to 1.
DISABLE_FAST_LINK=
# (optional)
# Default: Empty
# To control custom models, use + to add a custom model, use - to hide a model, use name=displayName to customize model name, separated by comma.
CUSTOM_MODELS=-all,+deepseek-chat@DeepSeek=DeepSeek
# (optional)
# Default: Empty
# Change default model
DEFAULT_MODEL=gpt-3.5-turbo
# anthropic claude Api Key.(optional)
ANTHROPIC_API_KEY=
### anthropic claude Api version. (optional)
ANTHROPIC_API_VERSION=
### anthropic claude Api url (optional)
ANTHROPIC_URL=
### (optional)
WHITE_WEBDAV_ENDPOINTS= |
📦 部署方式
Other
📌 软件版本
V2.15.8
💻 系统环境
Ubuntu
📌 系统版本
Node
🌐 浏览器
Edge
📌 浏览器版本
x
🐛 问题描述
我使用从AIHubMix获得的API密钥,并在.env文件中设置了BASE_URL,如下所示:
BASE_URL=https://aihubmix.com/
它们正常工作,令牌消耗详情会显示在AIHubMix上。
同时,我又单独申请了一个自己DeepSeek 官方API密钥,并将其配置在我的.env文件中:
DEEPSEEK_API_KEY=sk-XXXXX
DEEPSEEK_URL=https://api.deepseek.com/
然后我添加了以下自定义模型设置:
+deepseek-chat=DeepSeek
但是,当我使用DeepSeek时,它仍然从AIHubMix消耗令牌,而不是我的个人DeepSeek API密钥。
类似地,我申请了一个Grok API密钥,并按如下方式配置:
GROK_API_KEY=xai-XXXXX
GROK_URL=https://api.x.ai/v1
当我使用Grok时,它也消耗了AIHubMix的令牌,而不是我的个人Grok API密钥。
问题可能出在哪里呢?是否需要额外的配置,以确保DeepSeek和Grok使用我的个人API密钥,而不是AIHubMix?
期待您的指导。谢谢!
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
No response
The text was updated successfully, but these errors were encountered: