
Cherry Studio缺失instructions导致OpenAI-Response API访问失败最近在使用Cherry Studio通过OpenAI-Response类型访问兼容OpenAI Responses API的接口时遇到了一个400 Bad Request问题。最终定位发现原因是请求体中缺失有效的顶层instructions字段。问题现象在Cherry Studio中配置OpenAI-Response服务后请求接口https://api.example.com/v1/responses报错如下错误名称: AI_APICallError 错误信息: Bad Request 状态码: 400响应内容{detail:Instructions are required}Cherry Studio实际发送的请求体中虽然已经在助手里配置了提示词You are a helpful assistant.但请求体变成了类似这样{model:gpt-5.5,input:[{role:developer,content:You are a helpful assistant.},{role:user,content:[{type:input_text,text:say hi}]}],instructions:[undefined],text:{verbosity:low},stream:true}可以看到助手提示词被放进了input数组中的developer消息里而顶层的instructions字段却是instructions:[undefined]因此服务端返回Instructions are required原因分析OpenAI Responses API支持顶层instructions字段例如{model:gpt-5.5,instructions:You are a helpful assistant.,input:[{role:user,content:[{type:input_text,text:say hi}]}]}但Cherry Studio在OpenAI-Response模式下并没有自动把助手提示词映射到顶层instructions而是将其作为developer消息放入input。对于某些兼容OpenAI Responses API的中转站或上游服务来说顶层instructions是必填项。因此即使input中存在developer消息仍然会因为缺少有效的instructions而报错。此外请求体中还可能出现多个字符串形式的[undefined]例如temperature:[undefined],top_p:[undefined],max_output_tokens:[undefined],tools:[undefined]这些未设置参数理论上应该被省略而不是以字符串形式发送。解决方法在Cherry Studio的模型或供应商配置中找到自定义参数手动添加{instructions:You are a helpful assistant.}如果希望使用中文提示词也可以写成{instructions:你是一个有帮助的AI助手。}保存后重新测试OpenAI-Response API即可正常访问。修复后的请求体示例添加自定义参数后请求体中会包含有效的顶层instructions{model:gpt-5.5,instructions:You are a helpful assistant.,input:[{role:developer,content:You are a helpful assistant.},{role:user,content:[{type:input_text,text:say hi}]}],text:{verbosity:low},stream:true}虽然此时提示词可能同时出现在instructions和input[0].role developer中但至少可以满足服务端对instructions的要求。问题归因这个问题主要与Cherry Studio的OpenAI-Response请求体构造有关助手提示词没有自动映射到顶层instructions未设置的参数可能被序列化为字符串[undefined]某些Responses API兼容服务要求必须提供顶层instructions。因此这不属于OpenAI官方API本身的问题。中转站只是对instructions字段要求较严格而Cherry Studio没有自动提供该字段。总结如果在Cherry Studio中使用OpenAI-Response时遇到Instructions are required可以优先检查请求体中是否存在有效的顶层instructions:...如果没有直接在Cherry Studio的自定义参数中手动添加instructions即可解决。