":{"message":"The requested item was created under a different Azure OpenAI reso...

2026年10月21日 15:54 10.99 秒 success

错误信息

{"error":{"message":"The requested item was created under a different Azure OpenAI resource. Use the same resource that created the item to access it.","type":"invalid_request_error","param":"","code":null}}

AI 解决方案

🌐 错误翻译

原文:The requested item was created under a different Azure OpenAI resource. Use the same resource that created the item to access it.
译文:请求的项目是在不同的 Azure OpenAI 资源下创建的。请使用创建该项目的同一资源来访问它。

🎯 原因分析

该错误的根本原因是资源不匹配,即当前请求使用的 Azure OpenAI 资源与创建目标项目(如模型、部署或数据)时所使用的资源不一致,导致访问失败。错误发生在发起访问请求的阶段,系统校验资源归属时触发了该校验逻辑。

💡 解决方案

  • 确认创建目标项目时使用的资源名称、区域、订阅 ID 等核心信息;

  • 将当前请求的配置更新为创建项目时使用的 Azure OpenAI 资源参数,确保请求指向正确的资源。

🛡️ 预防措施

  • 统一资源配置:在项目中通过配置中心或环境变量统一管理 Azure OpenAI 资源参数,避免在多处手动修改导致资源不一致。

  • 前置资源校验:在调用 Azure OpenAI 接口前,通过 API 查询目标项目的归属资源信息,提前发现资源不匹配问题,降低报错概率。