v1.0.2 - Thinking Output Restored
Thinking output restored on every endpoint
codebuddy2api 1.0.2 fixes reasoning (thinking) content being dropped whenever the server aggregates the backend stream.
Highlights
- Non-streaming
/v1/chat/completionsresponses now includereasoning_contentwhen the model thinks. - Streaming requests with tools replay reasoning deltas before content and tool calls (previously lost during tool-call aggregation).
/v1/responsesemits areasoningoutput item (summary text) before the message item, and reports realreasoning_tokensin usage./v1/messages(Claude Code / CC Switch) maps reasoning to Anthropicthinkingcontent blocks, streamed asthinking_deltaevents.- Direct streaming without tools was never affected and is unchanged.
Root cause
The backend only speaks SSE, so three code paths aggregate chunks into a final response. All of them merged only content and tool_calls and silently discarded reasoning_content; the Anthropic and Responses adapters also had no thinking/reasoning mapping at all.
Docker
docker pull ghcr.io/maiphucgiang/codebuddy2api:1.0.2Release tags: 1.0.2, 1.0, 1, and latest. Development builds use edge and do not overwrite latest.
Validation
- New
test_reasoning.py(10 tests) covers stream aggregation, pseudo-stream replay, Anthropic thinking blocks, and Responses reasoning items; all existing regression suites still pass. - Verified live against the production backend with
hy4-preview,deepseek-v4.1-flash, andglm-5.3-flashon all four endpoints, streaming and non-streaming. - GitHub Actions built and published both architectures; anonymous manifest inspection confirmed matching
1.0.2,1.0,1, andlatesttags.
For personal learning only. Use only subscriptions and accounts you are authorized to access.