Skip to content

fix(opencode): add DeepSeek system prompt - #38229

Closed
punkisnotdead3 wants to merge 2 commits into
anomalyco:devfrom
punkisnotdead3:deepseek-prompt
Closed

fix(opencode): add DeepSeek system prompt#38229
punkisnotdead3 wants to merge 2 commits into
anomalyco:devfrom
punkisnotdead3:deepseek-prompt

Conversation

@punkisnotdead3

@punkisnotdead3 punkisnotdead3 commented Jul 22, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #38234

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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.ts
  • bun typecheck
  • bun run lint packages/opencode/src/session/system.ts packages/opencode/test/session/system.test.ts
  • bunx prettier --check packages/opencode/src/session/system.ts packages/opencode/test/session/system.test.ts
  • Push hook: repository-wide Turbo typecheck (30/30 packages passed)

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

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
#31867

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.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions

Copy link
Copy Markdown
Contributor

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

@punkisnotdead3

Copy link
Copy Markdown
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeepSeek V4 inherits conflicting default system prompt

1 participant