Repository navigation
fix: enable DeepSeek DSML filtering for proxy providers via model id detection - #91549
studentzhou-svg wants to merge 1 commit into
Conversation
…detection DSML filtering was gated on thinkingFormat === "deepseek", which resolves only for native deepseek endpoint (api.deepseek.com) or providers with provider key "deepseek". When DeepSeek models are served through proxy providers like SiliconFlow, the endpoint class falls back to "custom" and the filter is never created. This causes DSML markup to leak into visible text, which triggers Feishu streaming-card re-render events that create a feedback loop — resulting in explosive duplicate messages. Fixes by also enabling the filter when the model id contains "deepseek" as a defense-in-depth measure.
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 4:18 PM ET / 20:18 UTC. Summary PR surface: Source +3. Total +3 across 1 file. Reproducibility: yes. for the source-level bug: current main only enables DSML filtering/recovery when resolved compat is Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Proof path suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Use a normalized DSML enablement predicate that preserves explicit non-DeepSeek compatibility overrides, add focused proxy-id and override coverage, and require redacted proxy-provider plus Feishu evidence before merge. Do we have a high-confidence way to reproduce the issue? Yes for the source-level bug: current main only enables DSML filtering/recovery when resolved compat is Is this the best way to solve the issue? No, not yet: the response-side DSML gate is the right owner path, but this implementation should preserve explicit non-DeepSeek compat, normalize model ids, add focused coverage, and include real Feishu/proxy proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 640258d7b31d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +3. Total +3 across 1 file. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Root Cause
DSML filtering was gated on
compat.thinkingFormat === "deepseek", which resolves only for native deepseek endpoint (api.deepseek.com) or providers with provider key "deepseek". When DeepSeek models are served through proxy providers like SiliconFlow, the endpoint class falls back to "custom" and the filter is never created.Impact
This causes
<|DSML|function_calls>markup to leak into visible text, which triggers Feishu streaming-card re-render events that create a feedback loop — resulting in explosive duplicate messages.Fix
One-line change to
shouldFilterDeepSeekDsmlText: fall back to checking whether the model id contains "deepseek" when endpoint-based detection fails. This is a defense-in-depth measure that catches any proxy-hosted DeepSeek models.Reproduce
Verification
Before:
thinkingFormat === "deepseek"→ false for proxy providers → DSML unfiltered → card re-render → feedback loopAfter:
thinkingFormat === "deepseek" || modelId?.includes("deepseek")→ true → DSML stripped → clean text → no loop