CC Switch local proxy failed while handling Codexendpoint /responses. Provider: ...
错误信息
CC Switch local proxy failed while handling Codexendpoint /responses. Provider: 8stoken; model: gpt-6-astra; upstream_status: HTTP 400; cause: basispointsdoes not accept data:image input while image support isdisabled; ask an administrator to enable the selectedBPS account's 'Ignore image inputs when image supportis disabled' option (openai_excel_bps_ignore_images),enable BPS image support, provide an HTTPS imageURL, or disable Basispoints and start a new conversation(nath-innut[206loutout1
AI 解决方案
原文:CC Switch local proxy failed while handling Codexendpoint /responses. Provider: 8stoken; model: gpt-6-astra; upstream_status: HTTP 400; cause: basispoints does not accept data:image input while image support is disabled; ask an administrator to enable the selectedBPS account's 'Ignore image inputs when image supportis disabled' option (openai_excel_bps_ignore_images),enable BPS image support, provide an HTTPS imageURL, or disable Basispoints and start a new conversation (nath-innut[206loutout1
译文:CC Switch本地代理在处理Codex端点/响应时失败。提供商:8stoken;模型:gpt-6-astra;上游状态:HTTP 400;原因:当图像支持被禁用时,basispoints不接受data:image输入;请管理员启用所选BPS账户的“当图像支持被禁用时忽略图像输入”选项(openai_excel_bps_ignore_images),启用BPS图像支持,提供HTTPS图像URL,或禁用Basispoints并开始新对话。
🎯 原因分析
模型 gpt-6-astra 当前不支持图像输入,但在请求中传递了 data:image 格式的图像数据,触发了上游 API(Basispoints)的 HTTP 400 错误。根本原因是 图像输入与当前模型/账户配置不兼容。
💡 解决方案
根据错误提示,有以下几种修复方式:
方式一:忽略图像输入(推荐)
让管理员启用忽略选项,使带图像的请求降级为纯文本处理:
# 联系管理员在BPS账户设置中启用以下配置
openai_excel_bps_ignore_images = true
方式二:提供 HTTPS 外部图像URL
将 data:image 内联数据替换为公开可访问的 HTTPS URL:
# 修复前
messages = [
{"role": "user", "content": [
{"type": "text", "text": "描述这张图片"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
]}
]
# 修复后 - 使用HTTPS URL
messages = [
{"role": "user", "content": [
{"type": "text", "text": "描述这张图片"},
{"type": "image_url", "image_url": {"url": "https://example.com/image.png"}}
]}
]
方式三:切换支持图像的模型
# 更换为已启用图像支持的模型
model = "gpt-4o" # 或其他支持图像的模型
🛡️ 预防措施
- 模型能力校验:调用前通过配置或文档确认模型的图像支持状态,对不支持图像的模型过滤掉图像内容。
- 统一请求层校验:在代理层或中间件中加入图像输入检查,对不支持图像的模型自动降级为纯文本请求。