fix: recognize role "developer" as system prompt (DSH 400) - #8
Open
Amer-CN wants to merge 1 commit into
Open
Conversation
…oles DeepSeek Harness (and other DeepSeek-style clients) send system prompts with role "developer". ExtractSystem only matched "system", so the developer message was forwarded verbatim and CommandCode rejected the request with 400 (messages[].role must be user|assistant|tool). - ExtractSystem: treat "developer" like "system" - ConvertMessages: fall back unknown roles to "user" so the upstream schema is never violated
Amer-CN
added a commit
to Amer-CN/command-code-proxy-tools
that referenced
this pull request
Aug 13, 2026
- Core version v1.0.9 -> v1.1.0 (developer-role support, context-aware max_tokens, overflow retry, -debug flag) - README: client compatibility section (DSH developer role, unknown-role fallback, context compression, -debug troubleshooting) - Upstream PR opened: dev2k6/command-code-proxy-server#8 (developer role)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Clients like DeepSeek Harness send system prompts with
role: "developer"(the newer OpenAI/DeepSeek name forsystem).ExtractSystemonly matched"system", so the developer message was forwarded verbatim and CommandCode rejected the whole request with:Fix
ExtractSystem: treat"developer"the same as"system"ConvertMessages: fall back any unknown role to"user"so the upstream schema (user|assistant|tool) is never violatedVerification