[API-Inference] GLM-5.3-Flash returns HTTP 401 while Qwen3.8-Flash-Next works with the same token
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by checking ModelScope's API-Inference model registry and the routing or authorization configuration for ZhipuAI/GLM-5.3-Flash; the issue gives no repository files or tests to begin from. Compare its /v1/models visibility and request handling with ZhipuAI/GLM-4.7-Flash or Qwen/Qwen3.8-Flash-Next. Done means the model works with a valid token, or requests return an accurate availability or permission error.
由索引模型根据 Issue 内容生成。
描述
Environment
- Windows 11
- Python 3.13.18 (managed by uv)
- OpenAI Python SDK 3.49.0
- ModelScope OpenAI-compatible API:
https://api-inference.modelscope.cn/v1
Description
Calling ZhipuAI/GLM-5.3-Flash through the OpenAI-compatible /v1/chat/completions endpoint returns HTTP 401 ("Authentication failed, please make sure that a valid ModelScope token is supplied"), while Qwen/Qwen3.8-Flash-Next works normally with the same token, same base URL, same SDK, and same request structure.
The token itself is valid: GET /v1/models returns HTTP 200 with the same credential. Qwen/Qwen3.8-Flash-Next appears in the /v1/models list, but ZhipuAI/GLM-5.3-Flash does not (the list does contain ZhipuAI/GLM-4.7-Flash and ZhipuAI/GLM-5.2).
The 401 also occurs on plain text requests without any image input, so this is not related to multimodal content.
Steps to Reproduce
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api-inference.modelscope.cn/v1",
api_key=os.environ["MODELSCOPE_API_TOKEN"], # valid token, redacted here
)
try:
response = client.chat.completions.create(
model="ZhipuAI/GLM-5.3-Flash",
messages=[{
"role": "user",
"content": [{"type": "text", "text": "输出 测试成功"}],
}],
stream=True,
)
for chunk in response:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
except Exception as e:
print(type(e).__name__, str(e))
if getattr(e, "response", None):
print("HTTP:", e.response.status_code)
print("Response:", e.response.text)
The same script with model="Qwen/Qwen3.8-Flash-Next" completes successfully and outputs 测试成功.
Model list check (same token):
HTTP/1.1 200 OK
"Qwen/Qwen3.8-Flash-Next" present: True
"ZhipuAI/GLM-5.3-Flash" present: False
Expected Behavior
ZhipuAI/GLM-5.3-Flash should respond normally through API-Inference. If the model is not (yet) supported by API-Inference or requires extra authorization, the API should return a clear, accurate error indicating model availability or permission — not a generic token authentication failure, which is misleading because the same token authenticates fine everywhere else.
Actual Behavior
HTTP 401 on every request to ZhipuAI/GLM-5.3-Flash, including plain text, no images:
AuthenticationError Error code: 401 - Authentication failed, please make sure that a valid ModelScope token is supplied.
HTTP: 401
Response: {"error":{"message":"Authentication failed, please make sure that a valid ModelScope token is supplied.","request_id":"be80f8b6-21d7-4409-b140-a08a26127d98"},"request_id":"8aac6103-d4d4-4ffb-ad4f-d6cbf2374170"}
Comparison
| Model | Listed in /v1/models |
Chat Completion |
|---|---|---|
| Qwen/Qwen3.8-Flash-Next | Yes | Success |
| ZhipuAI/GLM-5.3-Flash | No | HTTP 401 |
Related Issue
#1832 previously reported that GLM-5.3-Flash on API-Inference intermittently returns "lock" in the output stream. That issue describes a different symptom (garbled stream content, requests otherwise succeed) from this one (requests are rejected outright with HTTP 401), so I am not claiming they share a root cause — but both suggest something may be off with the GLM-5.3-Flash deployment on API-Inference.
Questions
- Is
ZhipuAI/GLM-5.3-Flashofficially supported by ModelScope API-Inference? - Why is this model absent from the
/v1/modelsresponse? - Does it require additional access authorization that is not documented?
- Why does it return HTTP 401 ("invalid token") when the same token successfully accesses
Qwen/Qwen3.8-Flash-Next? - Is there an issue with the model's deployment, routing, or authentication configuration on the API-Inference side?
- 主要语言
- Python
- 星标
- 9.2k
- 派生
- 977
- 平均合并
- 4 天 5 小时
- 30 天内合并 PR
- 10
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelscope/modelscope 的其他 Issue
-
希望创空间能增加变更代码推送自动重新部署功能可能已有人在做 @yingdachen 于 2 天前认领。 未关闭
modelscope/modelscope#1851 · 已指派 3 人 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
modelscope/modelscope#1849 · 1 条评论 ·
维护者通常 2 天内回复
-
关于 model scope 的API 推理接口是否已支持了音频推理?可能已有人在做 @yingdachen 于 11 天前认领。 未关闭
modelscope/modelscope#1842 · 3 条评论 · 已指派 3 人 ·
维护者通常 2 天内回复
-
[API-Inference][modelscope.ai] Qwen3.8-Max Responses API returns HTTP 405 security block for inert code text可能已有人在做 @yingdachen 于 18 天前认领。 未关闭
modelscope/modelscope#1837 · 已指派 3 人 ·
维护者通常 2 天内回复
-
GLM 5.3 Flash in API Inference continues to output "lock"可能已有人在做 @yingdachen 于 19 天前认领。 未关闭
modelscope/modelscope#1832 · 已指派 3 人 ·
维护者通常 2 天内回复
查看 modelscope/modelscope 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
ida-arbeitszeit/workers-control#1578 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
aws-samples/sample-per-model-bedrock#898 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
intake mcp-intake needs-human-review priority:high
难度 2/5 1-3 小时 新手友好度 65/100
Ikalus1988/MisakaNet#5041 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100