[托管代理] proxy.monkeycode-ai.com 回归:/api/v1/* 全部返回 Caddy catch-all 200 "OK",LLM 链路不可用
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 719
- Avg merge
- 4h 30m
- Merged PRs (30d)
- 83
Description
环境:https://proxy.monkeycode-ai.com(托管 LLM 代理),客户端 = MonkeyCode 桌面端(ohmyagent 引擎),账号 = 免费档(basic)。
现象(2026-09-19 起观测):
对 https://proxy.monkeycode-ai.com/api/v1/chat/completions 发起 OpenAI 兼容 chat 请求,
无论携带何种鉴权(Bearer oma_* ± X-OhMyAgent-Signature HMAC、完全无鉴权)、
何种方法(GET / POST)、何种路径(/api/v1 根、/api/v1/models),
响应一律为:
HTTP/2 200
content-type: text/plain; charset=utf-8
content-length: 2
server: Caddy
OK
响应体只有 2 字节 OK,无 chat.completion JSON、无 usage 字段、无 SSE chunk。
对照基线(2026-09-17 实测,正常期):
- 相同端点 + Bearer+HMAC →
200+ 完整openai-chat.completion(model: om-gpt-5.5-chat,choices[0].message.role=assistant) - 无鉴权 →
401 Unauthorized(WWW-Authenticate头) - 即:正常期鉴权是生效的;现在无鉴权也返回 200 "OK",说明请求已不再进入鉴权/LLM 路由,而是落到 Caddy 层的 catch-all 应答。
影响:
- 所有经托管代理的 chat 调用静默失败(客户端拿到 200 但无内容),难以与成功区分。
- 计量侧未见扣减(同期
/api/v1/users/wallet的balance/daily_token_balance无变化),与「请求未进 LLM 链路」一致。 GET /api/v1/models返回405 Method Not Allowed(非 catch-all 200),说明仅部分路由存活。
复现:
POST https://proxy.monkeycode-ai.com/api/v1/chat/completions
Authorization: Bearer ***
Content-Type: application/json
{ "model": "om-gpt-5.5-chat", "max_tokens": 8, "stream": false,
"messages": [ { "role": "user", "content": "hi" } ] }
预期(正常期):200 + chat.completion JSON。实际:200 "OK"(2 字节)。
建议排查方向:
- 检查
proxy.monkeycode-ai.com的 Caddyfile / 反代配置:/api/v1/*的 proxy/reverse_proxy 路由是否被移除或被一条 catch-allrespond "OK"覆盖。 - 检查 LLM 上游(chat 路由后端)健康状态与注册表;
405的/models路由与 200 的 catch-all 并存,指向「部分路由存活」的半迁移/故障状态。 - 若为灰度/迁移中间态,建议在代理侧显式返回
503而非200 "OK",避免客户端把故障当成功。
观测时间:2026-09-19(UTC+8),持续中。
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
Start by checking the Caddyfile or reverse-proxy configuration for proxy.monkeycode-ai.com, focusing on /api/v1/* and any catch-all respond "OK" rule. Compare the chat/completions route with the surviving /api/v1/models route and inspect the LLM upstream health or registration. Done means authenticated chat requests return the expected completion response, unauthenticated requests are rejected, and failures do not return a misleading 200 OK.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100