Prism-Foundry认证问题

Prism-Foundry Azure 资源反复出现 403 “Key based authentication is disabled” 错误,根因是 Azure 侧 Local Authentication 开关被反复切换。

概述

Prism-Foundry 是团队的一个 Azure OpenAI 资源端点,提供 gpt-5.4、FW-GLM-5 和 text-embedding-3-large 等模型服务。从 2026 年 4 月起,该端点反复出现 403 错误,错误信息为 “Key based authentication is disabled”,表明 Azure 侧的 API Key 认证被禁用。

该问题的特点是间歇性出现——有时候 Azure 侧会自动恢复,有时候需要手动在 Azure Portal 重新开启 Key 认证。由于系统有其他 provider(my-azure、github-copilot 等)可以 fallback,日常使用不受严重影响,但会导致 LCM 压缩失败和模型降级等问题。最终团队更换了 prism-foundry 的端点和 API Key 来彻底解决。

关键点

  • 错误类型: 403 “Key based authentication is disabled”
  • 受影响模型: gpt-5.4、FW-GLM-5、text-embedding-3-large
  • 根因: Azure 侧 Local Authentication 被禁用
  • 影响范围: LCM 压缩失败(降级为直接截断)、主模型不可用
  • Fallback 机制: 自动降级到 github-copilot/claude-opus-4.5my-azure
  • 最终解决: 更换端点至 clawfood.openai.azure.com

故障影响

直接影响

  • 主模型不可用: prism-foundry 上的 gpt-5.4 和 FW-GLM-5 无法调用
  • LCM 压缩失败: 依赖 prism-foundry 的 LCM 压缩两次都失败
  • 上下文截断: 压缩失败后降级为直接截断,丢失上下文信息
  • Embedding 不可用: text-embedding-3-large 也受影响

附带发现的 Bug

  • Rerank bug: memory-lancedb-probuildRerankRequest() 中 cohere case 使用了未定义的 documents 变量 → 已修复(改为 candidates

技术细节

故障诊断

# 测试 prism-foundry 端点
curl -X POST https://prism-foundry.openai.azure.com/... \
  -H "api-key: <key>" \
  -d '{"messages": [...]}'

# 返回 403: "Key based authentication is disabled"

系统状态检查

正常项:

  • ✅ Gateway 运行正常(pid 2707647)
  • ✅ Docker 容器全部 healthy(19 个)
  • ✅ 记忆插件功能正常
  • ✅ github-copilot/claude-opus-4.6 正常
  • ✅ my-azure/gpt-5.4 正常
  • ✅ my-azure/gpt-4o 正常

异常项:

  • ❌ prism-foundry/gpt-5.4 → 403
  • ❌ prism-foundry/FW-GLM-5 → 403
  • ❌ prism-foundry/text-embedding-3-large → 403

解决方案

  1. 临时方案: 依赖 fallback 机制,自动切换到其他 provider
  2. 中期方案: 将模型端点检查加入 infra-alert-check 定时任务
  3. 长期方案: 更换端点至 clawfood.openai.azure.com,使用新 API Key
  4. 根本方案: 在 Azure Portal 永久启用 Local Authentication,或改用 Entra ID 认证

ACPX 配置(同期完成)

在排查模型问题期间,同时完成了 ACPX 配置:

  • 启用 acpx 插件
  • 配置 ACP:defaultAgent=codexpermissionMode=approve-all
  • 允许的 harness:codex, claude, pi, gemini, opencode, copilot, cursor
  • 安装 Codex CLI 0.115.0

时间线

  • 2026-04-04 18:01: 发现 prism-foundry 403 错误
  • 2026-04-04 18:08: Dora 通知已在 Azure 侧修复
  • 2026-04-04 18:10: 测试确认 gpt-5.4 恢复正常(200)
  • 2026-04-04 18:13: 建立晚间健康检查 cron,后合并进 infra-alert-check
  • 2026-04-04 23:31: 再次检查,prism-foundry 三个模型全部 403
  • 2026-04-04 23:36: 再次恢复,三个模型全部 200
  • 2026-04-05 07:06: 第三次出现 403,确认是反复切换问题
  • 2026-04-05 07:07: 调整 fallback 优先级,my-azure 排前面
  • 2026-04-05 13:20: 更换 prism-foundry 端点和 API Key(clawfood.openai.azure.com)

相关页面