Problem (one or two sentences)
Providers openai.ts, requesty.ts, unbound.ts, and opencode-go.ts each have their own inline reasoning_content check with no fallback to reasoning, and none use the shared extractReasoningFromDelta helper introduced in PR #449. If the fallback logic or whitespace-preservation behavior ever changes, these providers will silently drift out of sync.
Context (who is affected and when)
Affects users of OpenAI, Requesty, Unbound, and OpenCode-Go providers when a model streams reasoning via the reasoning field (rather than reasoning_content). The inconsistency was identified during review of #449 and intentionally deferred to keep that PR focused.
Desired behavior (conceptual, not technical)
All providers that handle streaming reasoning deltas should use extractReasoningFromDelta from src/api/providers/utils/extract-reasoning.ts, so fallback behavior (reasoning_content → reasoning) and whitespace preservation are consistent everywhere.
Constraints / preferences (optional)
Changes should be limited to swapping the inline checks for the shared helper — no behavioral changes beyond gaining the reasoning fallback and whitespace preservation that extractReasoningFromDelta already provides.
Request checklist
Acceptance criteria (optional)
Given any provider that streams reasoning deltas,
When a model sends reasoning_content: null and a populated reasoning field,
Then a { type: "reasoning", text: ... } chunk is yielded (same as LiteLLM and BaseOpenAiCompatibleProvider).
And whitespace-only chunks like " " and "\n\n" are preserved.
Proposed approach (optional)
For each of openai.ts, requesty.ts, unbound.ts, opencode-go.ts: import extractReasoningFromDelta and replace the existing inline reasoning_content check with a call to the helper, matching the pattern in lite-llm.ts:239-241.
Trade-offs / risks (optional)
Low risk — the helper is already tested and in use. The only behavioral delta is that these providers gain the reasoning fallback they were previously missing; existing reasoning_content handling is unchanged.
Tracked from PR #449 review.
Problem (one or two sentences)
Providers
openai.ts,requesty.ts,unbound.ts, andopencode-go.tseach have their own inlinereasoning_contentcheck with no fallback toreasoning, and none use the sharedextractReasoningFromDeltahelper introduced in PR #449. If the fallback logic or whitespace-preservation behavior ever changes, these providers will silently drift out of sync.Context (who is affected and when)
Affects users of OpenAI, Requesty, Unbound, and OpenCode-Go providers when a model streams reasoning via the
reasoningfield (rather thanreasoning_content). The inconsistency was identified during review of #449 and intentionally deferred to keep that PR focused.Desired behavior (conceptual, not technical)
All providers that handle streaming reasoning deltas should use
extractReasoningFromDeltafromsrc/api/providers/utils/extract-reasoning.ts, so fallback behavior (reasoning_content→reasoning) and whitespace preservation are consistent everywhere.Constraints / preferences (optional)
Changes should be limited to swapping the inline checks for the shared helper — no behavioral changes beyond gaining the
reasoningfallback and whitespace preservation thatextractReasoningFromDeltaalready provides.Request checklist
Acceptance criteria (optional)
Given any provider that streams reasoning deltas,
When a model sends
reasoning_content: nulland a populatedreasoningfield,Then a
{ type: "reasoning", text: ... }chunk is yielded (same as LiteLLM and BaseOpenAiCompatibleProvider).And whitespace-only chunks like
" "and"\n\n"are preserved.Proposed approach (optional)
For each of
openai.ts,requesty.ts,unbound.ts,opencode-go.ts: importextractReasoningFromDeltaand replace the existing inlinereasoning_contentcheck with a call to the helper, matching the pattern inlite-llm.ts:239-241.Trade-offs / risks (optional)
Low risk — the helper is already tested and in use. The only behavioral delta is that these providers gain the
reasoningfallback they were previously missing; existingreasoning_contenthandling is unchanged.Tracked from PR #449 review.