Skip to main content

MODEL_AUTHENTICATION

你的模型提供商拒绝你访问他们的服务。

¥Your model provider is denying you access to their service.

故障排除

¥Troubleshooting

以下内容可能有助于解决此错误:

¥The following may help resolve this error:

  • 确认你的 API 密钥或其他凭据正确无误。

    ¥Confirm that your API key or other credentials are correct.

  • 如果你依赖环境变量进行身份验证,请确认变量名称正确且已设置值。

    ¥If you are relying on an environment variable to authenticate, confirm that the variable name is correct and that it has a value set.

    • 请注意,某些环境(例如 Cloudflare Workers)不支持环境变量。

      ¥Note that some environments, like Cloudflare Workers, do not support environment variables.

    • 适用于需要以节省内存的方式处理大型存储库的情况。

      ¥For some models, you can try explicitly passing an apiKey parameter to rule out any environment variable issues like this:

const model = new ChatOpenAI({
apiKey: "YOUR_KEY_HERE",
});
  • 如果你使用代理或其他自定义端点,请确保你的自定义提供程序不期望使用备用身份验证方案。

    ¥If you are using a proxy or other custom endpoint, make sure that your custom provider does not expect an alternative authentication scheme.