Files
codewhale/crates
Zhongyue Lin 323f43df60 fix(client): align stream reasoning classification with replay (review #1743)
Address gemini-code-assist review on PR #1743:

- HIGH: should_replay_reasoning_content_for_provider was made model-aware
  in the previous commit, but handle_chat_completion_stream still computed
  is_reasoning_model = requires_reasoning_content(model) &&
  provider_accepts_reasoning_content(provider). On the openai provider +
  a DeepSeek model that was false during SSE parsing, so reasoning tokens
  were stored as content (not reasoning_content) and the next request
  still 400'd -- the fix was incomplete. Extract is_reasoning_model_for_stream()
  and route the stream call site through it; add an equivalence test
  locking it to the replay predicate so the two paths can't drift.
- MEDIUM: rename generic_openai_provider_drops_deepseek_reasoning_content
  -> generic_openai_provider_drops_reasoning_content_for_non_deepseek_models
  (now uses gpt-4o; old name was misleading).

Non-DeepSeek models on any provider are unaffected (#1542 not regressed).

Refs #1739, #1694, #1542.
2026-05-18 23:06:52 +08:00
..
2026-05-17 16:36:21 +08:00
2026-05-17 16:36:21 +08:00
2026-05-17 16:36:21 +08:00
2026-05-17 16:36:21 +08:00
2026-05-17 16:36:21 +08:00
2026-05-14 00:31:18 -05:00
2026-05-17 16:36:21 +08:00