QuantumNous / QuantumNous/new-api
模型同步界面报错
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 48.5k
- Forks
- 11.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 58
Description
提交前必读(请勿删除本节)
- 文档:https://docs.newapi.ai/
- 使用问题先看或先问:https://deepwiki.com/QuantumNous/new-api
- 警告:删除本模板、删除小节标题或随意清空内容的 issue,可能会被直接关闭;重复恶意提交者可能会被 block。
您当前的 newapi 版本
new-api-v0.12.14.exe
提交确认
[//]: # (方框内删除已有的空格,填 x 号)
- 我已确认目前没有类似 issue
- 我已完整查看过文档 https://docs.newapi.ai/ 和项目 README,尤其是常见问题部分
- 我未删除此模板中的任何引导内容或小节标题,并会按要求完整填写
- 我理解项目维护者精力有限,不遵循模板要求的 issue 可能会被无视或直接关闭
问题描述
模型管理界面点击同步报错浏览器开发者工具显示:
POST /api/models/sync_upstream 请求已经正常发送到后端
请求头中包含 Cookie
请求头中也包含 New-API-User: 1
但接口返回:
{"message":"无权进行此操作,未登录且未提供 access token","success":false}
复现步骤
登录后台
进入模型管理页面
点击“同步上游模型”
预期结果
相关截图
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from the model management page and inspect the POST /api/models/sync_upstream entry point, focusing on how the session cookie and New-API-User header are authenticated. Trace the request through the backend authentication checks and verify that a logged-in user can sync upstream models without the unauthenticated access-token error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100