推理
Responses
Item 型输出与明确终态
当应用需要类型化 Output Item、结构化事件以及 completed / incomplete 终态时使用 Responses。
创建 Response
向 POST /v1/responses 发送 input、model 与受支持的控制字段。所选路由必须保证所有候选 Provider 都具备所需能力。
curl https://api.octoryn.dev/v1/responses \
-H "Authorization: Bearer $OCTORYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"policy/frontier","input":"Return the top three risks."}'流式事件
Responses 使用命名事件而不是 Chat Chunk。分别处理 Output Item Delta、response.completed、response.incomplete 与 response.failed。
结构化输出
当路由明确支持 JSON Schema 时才请求 response_format,并在应用边界再次验证最终对象。
不要仅凭 HTTP 200 判断成功
流开始并返回 HTTP 200 不代表任务成功。提交下游工作前,必须检查终态事件、incomplete_details 与请求关联信息。
