Artifact e5ee23e992a5712ee19cdf75464d2f94995af58b416970a6f8a6f483915c74ba:
- File
test/fuzz/chat-seeds/reasoning_content
— part of check-in
[55cff08c2c]
at
2026-11-19 00:56:53
on branch stage-4
— Add the Chat Completions adapter for OpenAI, OpenRouter and compatibles
A chunk decoder following Pi: text, reasoning from reasoning_content, reasoning or reasoning_text kept under its field, OpenRouter reasoning_details verbatim, tool calls by index, usage, finish_reason, and in-stream errors. Requests follow Pi too: system or developer role, tools as functions, tool messages, stream_options, store and reasoning by dialect. The retry loop and header assembly move into a shared module both adapters use. Recorded streams, a fuzz target and fake server cases cover it, including a conversation moving between the two APIs in both directions. (user: dmestas, size: 331) [annotate] [blame] [check-ins using] [more...]
data: {"id":"c3","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"Two plus "},"finish_reason":null}]}
data: {"id":"c3","choices":[{"index":0,"delta":{"reasoning_content":"two."},"finish_reason":null}]}
data: {"id":"c3","choices":[{"index":0,"delta":{"content":"4"},"finish_reason":"stop"}]}
data: [DONE]