Skip to content

常见接口错误类型说明

常见错误分析文档

本文档记录 new-api 中转服务中常见的错误类型,包括错误码、错误描述、归因分析和推荐解决方案。


错误记录

400 - contents[0].parts[0].data: required oneof field 'data' must have one initialized field

  • 错误码: 400
  • 错误描述: contents[0].parts[0].data: required oneof field 'data' must have one initialized field
  • 归因分析与解决方案: 用户请求问题,图片数据为空或未正确初始化,无需解决

400 - Cannot fetch content from the provided URL

  • 错误码: 400
  • 错误描述: Cannot fetch content from the provided URL
  • 归因分析与解决方案: 用户请求问题,Gemini 无法访问用户提供的 URL,无需解决

400 - Request contains an invalid argument

  • 错误码: 400
  • 错误描述: Request contains an invalid argument
  • 归因分析与解决方案: 用户请求问题,请求参数格式不正确或模型不支持某些参数,无需解决

400 - The input token count exceeds the maximum number of tokens allowed

  • 错误码: 400
  • 错误描述: The input token count exceeds the maximum number of tokens allowed
  • 归因分析与解决方案: 用户请求问题,输入token数超过模型上下文限制,无需解决

400 - The response was filtered due to the prompt triggering Azure OpenAI's content management policy

  • 错误码: 400
  • 错误描述: The response was filtered due to the prompt triggering Azure OpenAI's content management policy
  • 归因分析与解决方案: 用户请求问题,触发了Azure内容过滤策略,无需解决

400 - Unrecognized request argument supplied: enable_thinking

  • 错误码: 400
  • 错误描述: Unrecognized request argument supplied: enable_thinking
  • 归因分析与解决方案: 用户请求问题,请求中包含了目标模型不支持的参数,无需解决

400 - Image part is missing a thought_signature

  • 错误码: 400
  • 错误描述: Image part is missing a thought_signature
  • 归因分析与解决方案: 代码bug,ContentTypeImageURL分支缺少ThoughtSignature处理,需修复代码

400 - does not support output format

  • 错误码: 400
  • 错误描述: does not support output format
  • 归因分析与解决方案: 用户请求问题,该模型不支持请求的输出格式,无需解决

400 - Corrupted thought signature

  • 错误码: 400
  • 错误描述: Corrupted thought signature
  • 归因分析与解决方案: 用户请求问题,多轮对话中传递了损坏或失效的thought_signature,无需解决

400 - The encrypted content could not be verified

  • 错误码: 400
  • 错误描述: The encrypted content could not be verified
  • 归因分析与解决方案: 用户请求问题,请求中包含无法解密的加密内容,无需解决

400 - Invalid schema for function

  • 错误码: 400
  • 错误描述: Invalid schema for function
  • 归因分析与解决方案: 用户请求问题,函数调用的schema格式不正确,无需解决

400 - messages: text content blocks must be non-empty

  • 错误码: 400
  • 错误描述: messages: text content blocks must be non-empty
  • 归因分析与解决方案: 用户请求问题,消息中的文本内容块为空,无需解决

400 - unexpected 'tool_use_id' found in 'tool_result' blocks

  • 错误码: 400
  • 错误描述: unexpected 'tool_use_id' found in 'tool_result' blocks: tooluse_jtppUEOBHYqhTBXrWd96fb. Each 'tool_result' block must have a corresponding 'tool_use' block in the previous message.
  • 归因分析与解决方案: 用户请求问题,工具调用格式错误,tool_result缺少对应的tool_use块,无需解决

400 - Internal error encountered

  • 错误码: 400
  • 错误描述: Internal error encountered.
  • 归因分析与解决方案: 上游问题,上游服务内部错误,需联系上游服务提供商

400 - ValidationException: invalid beta flag

  • 错误码: 400
  • 错误描述: ValidationException: invalid beta flag
  • 归因分析与解决方案: 用户请求问题,AWS Bedrock请求中包含无效的beta标志,无需解决

403 - UnrecognizedClientException: The security token included in the request is invalid

  • 错误码: 403
  • 错误描述: UnrecognizedClientException: The security token included in the request is invalid.
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

400 - prompt is too long: 228527 tokens > 200000 maximum

  • 错误码: 400
  • 错误描述: prompt is too long: 228527 tokens > 200000 maximum
  • 归因分析与解决方案: 用户请求问题,提示词长度超过模型限制,无需解决

400/429 - The image size is not allowed to be zero or larger than 20971520 bytes

  • 错误码: 400/429
  • 错误描述: The image size is not allowed to be zero or larger than 20971520 bytes
  • 归因分析与解决方案: 用户请求问题,图片大小超过20MB限制,无需解决

404 - ResourceNotFoundException: This Model is marked by provider as Legacy

  • 错误码: 404
  • 错误描述: ResourceNotFoundException: This Model is marked by provider as Legacy and you have not been actively using the model in the last 15 days
  • 归因分析与解决方案: 上游问题,AWS Bedrock遗留模型未激活,15天未使用被标记为Legacy

413 - Request exceeds the maximum size

  • 错误码: 413
  • 错误描述: Request exceeds the maximum size
  • 归因分析与解决方案: 用户请求问题,请求体大小超过上游模型或服务器限制,无需解决

429 - received empty response from Gemini: no meaningful content in candidates

  • 错误码: 429
  • 错误描述: received empty response from Gemini: no meaningful content in candidates
  • 归因分析与解决方案: 上游问题,Gemini API返回空响应,上游模型临时故障或负载过高

500 - invalid character '<' looking for beginning of value

  • 错误码: 500
  • 错误描述: invalid character '<' looking for beginning of value
  • 归因分析与解决方案: 渠道API配置错误,去掉API后缀的 /

500 - Concurrency limit exceeded for user, please retry later

  • 错误码: 500
  • 错误描述: Concurrency limit exceeded for user, please retry later
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

503 - system cpu overloaded

  • 错误码: 503
  • 错误描述: system cpu overloaded
  • 归因分析与解决方案: 本机服务器问题,服务器临时故障或负载不足

503 - openai_error

  • 错误码: 503
  • 错误描述: openai_error
  • 归因分析与解决方案: 上游问题,上游服务不可用或上游负载过高

503 - This model is currently experiencing high demand

  • 错误码: 503
  • 错误描述: This model is currently experiencing high demand
  • 归因分析与解决方案: 上游问题,上游模型高负载

504 - bad response status code 504

  • 错误码: 504
  • 错误描述: bad response status code 504
  • 归因分析与解决方案: 上游问题,上游网关超时

429 - You exceeded your current quota

  • 错误码: 429
  • 错误描述: You exceeded your current quota / Quota exceeded for metric: generate_requests_per_model_per_day, limit: 0
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

429 - Resource has been exhausted (e.g. check quota)

  • 错误码: 429
  • 错误描述: Resource has been exhausted (e.g. check quota)
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

429 - Input tokens exceed the configured limit of 272000 tokens

  • 错误码: 429
  • 错误描述: Input tokens exceed the configured limit of 272000 tokens. Your messages resulted in 296616 tokens. Please reduce the length of the messages.
  • 归因分析与解决方案: 用户请求问题,输入token数超过模型上下文限制,无需解决

429 - Too many tokens per day, please wait before trying again

  • 错误码: 429
  • 错误描述: Too many tokens per day, please wait before trying again.
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

429 - You exceeded your current quota, please check your plan and billing details

  • 错误码: 429
  • 错误描述: You exceeded your current quota, please check your plan and billing details. Quota exceeded for metric: generate_content_paid_tier_3_input_token_count, limit: 8000000, model: gemini-3-pro
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

503 - 分组 default 下模型 gemini-2.5-pro 无可用渠道(distributor)

  • 错误码: 503
  • 错误描述: 分组 default 下模型 gemini-2.5-pro 无可用渠道(distributor)
  • 归因分析与解决方案: 本机服务器问题,系统内部分配器配置错误,需检查渠道配置

429 - 上游服务繁忙,请稍后重试

  • 错误码: 429
  • 错误描述: 上游服务繁忙,请稍后重试
  • 归因分析与解决方案: 上游问题,上游服务临时繁忙或负载过高

500 - Extra usage is required for long context requests

  • 错误码: 500
  • 错误描述: Extra usage is required for long context requests.
  • 归因分析与解决方案: 上游资源耗尽或供应商账号失效

500 - error counting image token, media index[0]

  • 错误码: 500
  • 错误描述: error counting image token, media index[0], identifier[ https://imageproxy.zhongzhuan.chat/api/proxy/image/d41d8cd98f00b204e9800998ecf8427e.jpg], err: failed to decode image config: unsupported format
  • 归因分析与解决方案: 用户请求问题,图片格式不支持或无效,无需解决

500 - error getting file type: failed to download file, status code: 400

  • 错误码: 500
  • 错误描述: error getting file type: failed to download file, status code: 400
  • 归因分析与解决方案: 用户请求问题,文件URL无效或无法访问,无需解决

500 - 没有可用token

  • 错误码: 500
  • 错误描述: 没有可用token
  • 归因分析与解决方案: 本机服务器问题,系统内部token池耗尽或token分配失败,需检查token管理配置

503 - Backend returned an error, please try again later, or start a new conversation

  • 错误码: 503
  • 错误描述: Backend returned an error, please try again later, or start a new conversation.
  • 归因分析与解决方案: 上游问题,上游服务临时故障或不可用