Skip to content

希望自定义服务商能增加一个开关,允许禁用自动添加 response_format 字段 #60

@cyf84

Description

@cyf84

问题描述
使用自定义服务商连接 New API 中转站(基于 Go)时,请求自动附加了 response_format: "b64_json",导致中转站返回错误:
json: cannot unmarshal string into Go struct field GeneralOpenAIRequest.response_format of type ***.ResponseFormat

复现步骤

  1. 添加自定义服务商,接口类型为 chat/completions
  2. 发起图片生成请求
  3. 在浏览器 Network 中抓包,发现请求体包含:
{
  "model": "gpt-image-2",
  "messages": [...],
  "response_format": "b64_json"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions