Skip to content

fix: recognize role "developer" as system prompt (DSH 400) - #8

Open
Amer-CN wants to merge 1 commit into
dev2k6:mainfrom
Amer-CN:fix/developer-role
Open

fix: recognize role "developer" as system prompt (DSH 400)#8
Amer-CN wants to merge 1 commit into
dev2k6:mainfrom
Amer-CN:fix/developer-role

Conversation

@Amer-CN

@Amer-CN Amer-CN commented Aug 13, 2026

Copy link
Copy Markdown

Problem

Clients like DeepSeek Harness send system prompts with role: "developer" (the newer OpenAI/DeepSeek name for system). ExtractSystem only matched "system", so the developer message was forwarded verbatim and CommandCode rejected the whole request with:

400 Invalid option: expected one of "user"|"assistant" at "params.messages[0].role"

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 violated

Verification

  • Reproduced with a real DeepSeek Harness multi-turn tool-calling session (400 before, 200 after)
  • Existing tool-call round-trips (Codex etc.) unaffected

…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant