kind: text из GET /v1/models.
Chat Completions
tools, tool_choice, response_format, logprobs, seed, stop и остальные. Учитывает ли модель поле, решает сама модель.
История диалога.
role: system, developer, user, assistant или tool. content: текст или массив частей (text, image_url, …).chat.completion с choices (message, finish_reason: stop, length, tool_calls, content_filter) и usage. completion_tokens включает скрытые токены рассуждений.
Вызов инструментов
Responses
client.responses.create. Обязательные поля — model и input (строка или массив сообщений); также instructions, max_output_tokens, temperature, tools, stream.
Потоковый вывод
Передайте"stream": true, чтобы получать ответ через Server-Sent Events. Поток заканчивается data: [DONE].
- Chat Completions —
stream_options.include_usageвключён всегда, последний чанк содержитusage. - Responses — события
response.output_text.delta, …,response.completed;usage— вresponse.completed.
data: {"error": {…}} и затем data: [DONE] — считайте полученное неполным ответом.
