fix(providers): replay DeepSeek reasoning for opencode-zen (#994) - #1068
fix(providers): replay DeepSeek reasoning for opencode-zen (#994)#1068justjxke wants to merge 2 commits into
Conversation
Review readiness checklistThis PR is kept in draft until every requirement below is fulfilled. The tickable checklist has been added to your PR description — tick all four boxes there.
✅ 4/4 boxes ticked. ✅ All four boxes are ticked. |
|
✅ Deterministic PR hygiene checks passed. |
📝 WalkthroughWalkthroughThe ChangesOpenCode Zen DeepSeek reasoning support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/opencode-zen-deepseek-reasoning.test.ts`:
- Around line 75-80: Add focused image-request regression coverage near the
existing tests in tests/opencode-zen-deepseek-reasoning.test.ts for
deepseek-v4-pro, deepseek-v4-flash, and deepseek-v4-flash-free. Exercise the
noVisionModels configuration from the provider registry and assert each model
follows its expected no-vision or vision-sidecar path, while preserving the
existing reasoning replay tests.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 97e90f8b-4585-4bad-8c33-eb36766bf9fa
📒 Files selected for processing (2)
src/providers/registry.tstests/opencode-zen-deepseek-reasoning.test.ts
Summary
opencode-zenwas the only OpenCode provider missing DeepSeek reasoning metadata. The fix(responses): keep DeepSeek reasoning_content on tool-call continuations (#950) #971 replay fix only fires for models inpreserveReasoningContentModels, andopencode-zendeclared none — soopencode-zen/deepseek-v4-flash-freetool-call continuations went upstream without the originalreasoning_content, and the gateway rejected them with HTTP 400.preserveReasoningContentModels, reasoning-effort map,noVisionModels) thatopencode-goandopencode-freealready carry ontoopencode-zen, coveringdeepseek-v4-pro,deepseek-v4-flash, anddeepseek-v4-flash-free.Closes #994
Verification
bun run typecheck— passbun test tests/opencode-zen-deepseek-reasoning.test.ts— pass (regression; red before fix, green after; also asserts effort mapping and that non-listed models are untouched)bun test tests/provider-registry-parity.test.ts tests/opencode-go-deepseek.test.ts tests/reasoning-effort.test.ts tests/deepseek-reasoning-replay.test.ts— passbun run test— 9018 pass, 0 failbun run privacy:scan— passChecklist
Related
reasoning_contenton tool-call continuation for DeepSeek thinking modeopencode-go/opencode-freebut notopencode-zenopencode-zen)Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I fixed all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
xhighmapped to the maximum level.Bug Fixes