n/m365-copilotu/user80 · vor 1 Mon.
Registrieren Anmelden
n/m365-copilot · vor 1 Mon. · 1.095 Aufrufe
u/user80Meister

M365-Copilot2API v0.7.3 已发布

v0.7.3 已发布:https://github.com/HEXUXIU/M365-Copilot2API/releases/tag/v0.7.3
Release 和 CI 成功,26 个跨平台产物齐全。

这版发布了什么?
修的 4 个 bug:

  1. 流式缓冲 — recoverPanics 吞掉 Flush,所有 SSE 响应一直攒到 handler 返回才一次性下发。首字节从"等于总时长"变成真正的增量下发。
  2. 围栏截断(issue #102)— 代码块之后的正文被丢弃,任何带代码块的回复都在第一个围栏处被截断。现在非工具调用的围栏按顺序就地发出。
  3. 200 空正文 — 首字节前失败时返回 200 + 空 body + 一个硬编码成 rate_limit 的错误帧。严格按 OpenAI 规范解析的客户端会静默丢弃整个请求(10 并发 40 发里出现 3 次)。现在返回真实状态码并如实命名原因。
  4. codex 工具调用 — codex 把工具声明塞在 input[ ].additional_tools 里还套了层 namespace,网关压根没读。codex 每个会话只说一句"我来执行"就结束,零工具调用。这是本轮最严重的发现。

改进:
换号重试加抖动退避(避免突发时所有排队请求同刻重试再次撞墙)
首字节超时换号(75s→40s)
新增 /api/metrics(p50/p95/p99、错误率、分端点、账号健康)
英文 README 和完整英文控制台(#99)。

13
43
Anmelden, um mitzudiskutieren.
u/udc2b6nr Anzeige
QuicksilverVPN

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。

umami.dnsl.top Mehr erfahren

43 Antworten

Sortierung
  1. golawy Silber 3 YEARS vor 1 Mon.

    昔人已乘黄鹤去,此地空余黄鹤楼

    3
  2. user80 Meister OP 钻石会员 vor 1 Mon.

    黄鹤一去不复返,白云千载空悠悠 :xhj32:

    1
  3. golawy Silber 3 YEARS vor 1 Mon.

    只等能微软下一个漏洞

    0
  4. user80 Meister OP 钻石会员 vor 1 Mon.

    之前的EDU账号没有吗

    0
  5. user80 Meister OP 钻石会员 vor 1 Mon.

    何不食Edu号? :xhj001:

    0
  6. golawy Silber 3 YEARS vor 1 Mon.

    西班牙那个edu好像也没了吧

    0
  7. Jwz-git Gold vor 1 Mon.

    我之前一直502是什么问题
    :ac01:

    2
  8. user80 Meister OP 钻石会员 vor 1 Mon.

    我能猜到的话,我也很神了.... 🫪
    给日志,提交issue,谢谢 :xhj28:

    0
  9. Jwz-git Gold vor 1 Mon.

    我还以为有人反馈了这种情况,难道只有我这样吗

    1
  10. huxubo Diamant vor 1 Mon.

    我的E3还在,有时间试试

    2
  11. GeorgeXie 💬 Meister 不离不弃 vor 1 Mon.

    好的

    2
  12. Yang-iyu Silber vor 1 Mon.

    image
    虽然是GPT5.6SOL但是思维链太低了或者甚至压根没有思考

    1
  13. user80 Meister OP 钻石会员 vor 1 Mon.

    这个就是没有思考啦....
    可能ms路由认为你这个问题太简单了,不屑于开思考
    (当然我这个网关是强制开思考的哦)

    0
  14. Yang-iyu Silber vor 1 Mon.

    严肃Fork,话说我最近扫到一个域名可以申请edu子号,应该是之前某个大佬绑定了教育全局但是域名没有续期……

    0
  15. Gavin6 Silber vor 1 Mon.

    佬,怎么找到的

    0
  16. AGAGAG666 Silber 3 YEARS vor 1 Mon.

    话说现在还咋搞号,之前大佬的自动申请注册没了 :ac01:

    0
  17. user80 Meister OP 钻石会员 vor 1 Mon.

    教育邮箱吧?
    就是野鸡大学一般也都有(只要是e3/a1/e5就行)
    还有后面如果谁能给我个个人版本的office pre的话,我可以把那个逆向了(目前没有这个)

    1
  18. samsw Silber vor 1 Mon.

    谢谢博主

    0
  19. Tsenji1 Silber 3 YEARS vor 1 Mon.

    M365的模型到底是怎樣,感覺他的gpt 有降智 但這工具日常使用還是非常的實用🙏

    0
  20. tszwhl Silber 不离不弃 vor 1 Mon.

    M365 Copilot for VS Code这个插件能不能用?

    0
  21. user80 Meister OP 钻石会员 vor 1 Mon.

    嘶~理论上可以的 吧?

    0
  22. tszwhl Silber 不离不弃 vor 1 Mon.

    用这个插件,我按照作者教程,插件提取不到令牌

    0
  23. user80 Meister OP 钻石会员 vor 1 Mon.

    什么提取令牌 提取什么啊

    0
  24. Unterhaltung fortsetzen →
  25. tszwhl Silber 不离不弃 vor 1 Mon.

    谁能看一下这个 M365 Copilot for VS Code插件能不能用啊

    0
  26. korhomme 👼 Diamant 3 YEARS vor 1 Mon.

    楼主好人,感谢分享

    0
  27. mumuzhi_wong Silber vor 1 Mon.

    全部显示离线是什么情况,账号是E3

    0
  28. user80 Meister OP 钻石会员 vor 1 Mon.

    是不是账号当时没有续成功
    试试自己登录一下?

    0
  29. na_lu Gold vor 1 Mon.

    需要再M365中设置
    You are an AI assistant accessed via an API. Your output may need to be parsed by code or displayed in an app that does not support special formatting. Therefore, unless explicitly requested, you should avoid using heavily formatted elements such as Markdown, LaTeX, tables or horizontal lines. Bullet lists are acceptable.

    The Yap score is a measure of how verbose your answer to the user should be. Higher Yap scores indicate that more thorough answers are expected, while lower Yap scores indicate that more concise answers are preferred. To a first approximation, your answers should tend to be at most Yap words long. Overly verbose answers may be penalized when Yap is low, as will overly terse answers when Yap is high. Today's Yap score is: 8192.

    Valid channels: analysis, commentary, final. Channel must be included for every message.

    Calls to any tools defined in the functions namespace from the developer message must go to the 'commentary' channel. IMPORTANT: never call them in the 'analysis' channel

    Juice: number (see below)

    这些么

    0
  30. user80 Meister OP 钻石会员 vor 1 Mon.

    可以加的

    0
  31. yhw5231 Silber vor 1 Mon.

    没有账号

    0
  32. wuyee Silber 3 YEARS vor 1 Mon.

    什么时候搞个人版的?

    0
  33. ysenyao Gold 2 YEARS vor 1 Mon.

    佬啊,在生图的时候有个问题怎么解决,生了两张图就报错,openai.InternalServerError: Error code: 502 - {'type': 'https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-502/', 'title': 'Error 502: Bad gateway', 'status': 502, 'detail': 'The origin web server returned an invalid or incomplete response to Cloudflare. This typically indicates the origin is overloaded or misconfigured.', 'instance': 'a47b6d7189b27085', 'error_code': 502, 'error_name': 'origin_bad_gateway', 'error_category': 'origin', 'ray_id': 'a47b6d7189b27085', 'timestamp': '2026-10-09T06:46:28Z', 'zone': 'api.hualsi.com', 'cloudflare_error': True, 'retryable': True, 'retry_after': 60, 'owner_action_required': True, 'what_you_should_do': 'Wait and retry. Back off for at least 60 seconds. If the error persists, the website operator should check their origin server health and configuration.', 'footer': 'This error was generated by Cloudflare on behalf of the website owner.'}

    0
  34. ysenyao Gold 2 YEARS vor 1 Mon.

    z在模型测试里面是好的,
    image

    0
  35. user80 Meister OP 钻石会员 vor 1 Mon.

    这个是老版本吧
    更新一下?
    还有这个似乎是你的服务端有问题哦!看上去是cf的报错

    0
  36. ysenyao Gold 2 YEARS vor 1 Mon.

    @user80 佬,看一下
    有,而且日志已经把原因暴露得比较清楚了:这里的 502 不是 Cloudflare 自己随机产生的,而是 m365-copilot2api 在没有拿到图片时,主动向客户端返回了 502。

    直接原因

    每次失败都有相同的关键链路:

    [image-gen] ... images=0

    [image-gen-debug] ... "text":"Sorry, ..."

    [http-trace] ... stage=end status=502

    也就是:

    1. /v1/images/generations 请求成功进入你的服务;
    2. WebSocket 建连和握手成功;
    3. 上游返回了文本消息,但没有返回图片,即 images=0;
    4. m365-copilot2api 判断生图失败;
    5. 你的 API 将该失败统一映射成 HTTP 502;
    6. 外层 Cloudflare 再把这个源站 502 返回给调用方。

    因此,之前看到的:

    origin_bad_gateway

    The origin web server returned an invalid or incomplete response

    在这组日志中,所谓的“源站”就是你的 m365-copilot2api 服务。Cloudflare 只是转发了它返回的 502。

    日志里其实有两类生图失败

    第一类:图片请求被上游拦截

    前两次返回:

    Sorry, I can’t generate that image as requested because

    the image generation system blocked it.

    以及:

    Please try a different image concept or significantly

    change the subject, action, and setting.

    这说明上游生图系统判定当前提示词无法生成。两次请求的:

    prompt_len=879

    都相同,很可能重试时使用了完全相同的提示词,所以再次触发了相同结果。

    这类错误更适合返回:

    • 400 Bad Request
    • 422 Unprocessable Entity
    • 或自定义错误码,如 content_blocked

    而不应该返回 502,因为它并不是网关故障。

    第二类:生图服务暂时不可用

    后两次返回:

    Sorry, the image generation service is currently unavailable

    and the request could not be completed. Please try again shortly.

    这是真正的上游服务暂时不可用。将它映射成 502 或 503 Service Unavailable 都说得通,其中 503 的语义通常更准确。

    而且这两次只用了约 7 秒,可见上游很快就明确返回了“服务不可用”,并非你的反向代理等待超时:

    completion_frame_ms=6851

    total_ms=7449

    以及:

    completion_frame_ms=7086

    total_ms=7697

    AADSTS5000224 是否是主因

    日志里还有一条:

    [auto-cleanup] list failed:

    token error: invalid_grant - AADSTS5000224:

    We are sorry, this resource is not available.

    ``

    这表示 auto-cleanup 在执行列表清理操作时获取 Microsoft 令牌失败。

    但它大概率不是这些生图请求返回 502 的直接原因,理由是:

    • 它明确属于 [auto-cleanup];
    • 第一条生图请求在该错误出现之前就已经失败;
    • 后续请求仍然可以完成 WebSocket 握手并收到上游回复;
    • 真正触发 HTTP 502 的直接条件是 images=0。

    不过,这个鉴权错误仍需要单独处理,因为它说明用于自动清理的账号、租户或资源授权可能已失效或不可用。

    一个需要注意的时间问题

    你之前贴出的 Cloudflare 错误时间是:

    2026-10-09T06:46:28Z

    这批日志里的请求时间是:

    2026/10/09 07:17:12

    2026/10/09 07:19:21

    2026/10/09 07:21:32

    2026/10/09 07:31:27

    如果两边日志都使用 UTC,它们并不是同一个请求,只是故障模式可能相同。要精确对应,需要检查服务器日志的时区,并用 Cloudflare 的 Ray ID 或请求 ID 做关联。

    建议修改错误映射

    目前程序似乎把所有 images=0 都转成了相同的 502。建议按上游文本分类:

    images > 0

    → 200

    images == 0 且包含 blocked / can’t generate

    → 400 或 422

    → error_code: content_blocked

    → 不自动重试相同提示词

    images == 0 且包含 unavailable / try again shortly

    → 503

    → 添加 Retry-After

    → 指数退避重试

    WebSocket、握手或上游连接真正失败

    → 502

    请求执行超时

    → 504

    客户端重试策略也应区分:

    if status_code in (502, 503, 504):

    \# 可以退避重试
    
    retry()
    

    elif status_code in (400, 422):

    \# 不要原样重试,应修改提示词
    
    revise_prompt()
    

    结论

    有明确原因。

    • 前两次:提示词被上游生图系统拦截;
    • 后两次:上游生图服务暂时不可用;
    • m365-copilot2api 没有拿到图片,统一返回了 502;
    • Cloudflare 接收到源站的 502 后,又包装成 origin_bad_gateway;
    • AADSTS5000224 是另一项自动清理鉴权问题,不是这组 502 的直接触发点。

    最需要修改的不是 Cloudflare配置,而是 m365-copilot2api 对 images=0 的错误分类和状态码映射逻辑。

    0
  37. jaaks Silber 不离不弃 vor 1 Mon.

    调用的是 5.6 还是 6x

    0
  38. user80 Meister OP 钻石会员 vor 1 Mon.

    目前还是5.6

    不知道ms啥时候上6...

    0
  39. xybug Diamant vor 1 Mon.

    这玩意收费吗

    0
  40. AIP Silber vor 1 Mon.

    辛苦辛苦,执着呀佬👍

    0
  41. Mikey_The_IT_Guy Silber 3 YEARS vor 1 Mon.

    Thanks, now all I need is an account ☻️

    0
  42. trial Diamant 钻石会员 vor 1 Mon.

    很久没用了

    0
  43. Gelöscht vor 1 Mon.
    Diese Antwort wurde von der Moderation gelöscht
  44. Gelöscht vor 1 Mon.
    Diese Antwort wurde von der Moderation gelöscht
  45. nlsplit Silber vor 1 Mon.

    这个版本,感觉记不住上下文,同一个话题,对话总是忘。前一句刚说,继续对话就忘记之前的。之前没有这样。

    0