fix(opencode): add DeepSeek system prompt - #38229
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: I found one potentially related PR that's worth noting: PR #31867: feat: improve deepseek prompt cache reuse This PR is related to DeepSeek optimization (prompt cache reuse), though it appears to address a different aspect than the current PR. The current PR (38229) is specifically about adding a dedicated DeepSeek system prompt with consistent workflow instructions, while #31867 focuses on cache reuse optimization. These are complementary improvements to DeepSeek support rather than duplicates. The current PR is a newer, more targeted fix for system prompt behavior. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
|
Hi maintainers — this PR is still actively maintained. I resolved the reported conflicts against dev in d12ca0e and verified the targeted tests, package typecheck, and repository-wide pre-push typecheck. Could a maintainer please reopen it for review? Thanks! |
Issue for this PR
Closes #38234
Type of change
What does this PR do?
DeepSeek models currently inherit the generic system prompt, including conflicting instructions that encourage extremely short replies, one-word answers, stopping immediately after an edit, and delegating routine exploration to Task.
This adds a dedicated DeepSeek system prompt with one consistent workflow. It prefers direct read/grep/glob exploration, reserves Task for genuinely independent work, and routes direct, aliased, V4, and provider-prefixed DeepSeek model IDs to that prompt.
How did you verify your code works?
bun test test/session/system.test.tsbun typecheckbun run lint packages/opencode/src/session/system.ts packages/opencode/test/session/system.test.tsbunx prettier --check packages/opencode/src/session/system.ts packages/opencode/test/session/system.test.tsScreenshots / recordings
N/A — no UI changes.
Checklist