Repository navigation
Conversation
DeepSeek API does not support the `developer` role, only `system`. This patch adds DeepSeek to the list of non-standard providers in @mariozechner/pi-ai so that it uses `system` role instead. Fixes #3566
SynthWorkIO
reviewed
Jan 28, 2026
SynthWorkIO
left a comment
There was a problem hiding this comment.
Review Summary
Pragmatic fix for DeepSeek API compatibility.
Findings
- [P1]
package.json— Patching@mariozechner/pi-aicreates maintenance burden. Submit this fix upstream and add a TODO comment linking to the upstream PR. - [P2]
package.json:249— Patch pinned to exact version0.49.3. Add comment noting this must be verified on pi-ai updates.
Overall
COMMENT — Fix is correct and follows existing provider detection patterns. Acceptable to merge as temporary workaround; track upstream submission to eliminate patch debt.
🦞 Reviewed by SynthWork.io multi-agent review system
supmo668
added a commit
to Syntropy-Health/openclaw
that referenced
this pull request
Jul 13, 2026
…th deny-unknown posture (CTO openclaw#3578) (#62) SECURITY (PHI boundary). B5 render-policy's KNOWN_THIRD_PARTY_CHANNELS was an explicit DENYLIST that omitted 'irc' — so an operator could put 'irc' (or any unlisted/future channel) in phiApprovedChannels and leak a health-bearing ui.summary. A runtime fail-open, not just a lint gap. FIX (deny-unknown posture, per CTO openclaw#3578): flip isThirdPartyChannel from denylist-membership to a FIRST_PARTY_PHI_CHANNELS allowlist — a channel is third-party (PHI-denied) UNLESS explicitly first-party {shrinemobile, webchat, matrix}. So irc AND any unknown/future channel is REFUSED AT RUNTIME (not merely linted); a newly-added channel is safe-by-default (denied) until deliberately allowlisted. Added 'irc' to KNOWN_THIRD_PARTY_CHANNELS (now documentation only; the allowlist is enforcement). Red-first: 5 new SEC-IRC tests went red→green — incl. the BEHAVIORAL pin (a phiApproved-irc config → minimized, no health leak), a deny-unknown pin (arbitrary unknown channel refused), a CHAT_CHANNEL_ORDER registry-completeness assertion (no core channel can be first-party by omission), and a regression guard (shrinemobile/webchat/matrix stay approvable). 65 tests pass (render-policy 29 + deliver 36, zero regression), tsgo clean, oxlint clean. QG: 2-reviewer (security + correctness). Security: SOUND, no CRIT/HIGH/MED — deny-unknown closes the fail-open at runtime for irc/unknown/case-variants, all asymmetries fail-closed. Correctness: CORRECT, no findings. Both LOW/INFO notes applied (tightened the KNOWN_THIRD_PARTY_CHANNELS docstring to reflect it's documentation not enforcement; moved the CHAT_CHANNEL_ORDER import to the top). FOLLOW-UP (CTO openclaw#3581, separate): demote matrix to third-party (federated protocol, counsel-gate class) → first-party = {shrinemobile, webchat}. Precondition verified: no live config depends on matrix-PHI (only a test). Lands next under the same deny-unknown completeness pin. Generated-With: Claude Code Co-authored-by: cto <[email protected]> Co-authored-by: Claude <[email protected]>
supmo668
added a commit
to Syntropy-Health/openclaw
that referenced
this pull request
Jul 13, 2026
…rated messaging is the counsel-gate class (CTO openclaw#3581) (#64) Follow-up to the deny-unknown PHI fix (#62), under the same completeness pin. CTO openclaw#3581 ruled matrix is NOT first-party: a federated messaging provider is squarely the SEC-4 counsel-gate class ('third-party messaging providers can NEVER be phiApproved'). Removed matrix from FIRST_PARTY_PHI_CHANNELS → first-party = {shrinemobile, webchat} only (the app's own surfaces). Precondition verified (per CTO): NO live operator config depends on matrix-PHI — matrix only appeared in a single test. Red-first: added a MATRIX-DEMOTED test (isThirdPartyChannel(matrix)===true + behavioral planChannelRender(matrix, phiApproved:[matrix]) → minimized, no health leak) that went red→green. Switched the deliver positive-path test from matrix→webchat (preserves 'first-party channel gets full summary' coverage on a genuine first-party surface). 66 tests pass (render-policy 30 + deliver 36), tsgo clean, oxlint clean. STRICTLY MORE RESTRICTIVE: this removes an approval, so it can only reduce PHI egress — it cannot create a leak; the deny-unknown mechanism itself (already 2-reviewer-QG'd in #62) is unchanged. A federation-disabled self-hosted homeserver may re-argue first-party later WITH deployment evidence (documented inline). Generated-With: Claude Code Co-authored-by: cto <[email protected]> Co-authored-by: Claude <[email protected]>
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.
Summary
This PR fixes the
Message ordering conflicterror when using DeepSeek models.Problem
DeepSeek API does not support the
developerrole, onlysystem,user,assistant, andtool. When using DeepSeek models (deepseek-chat, deepseek-reasoner), the API returns:Solution
This PR adds a pnpm patch for
@mariozechner/pi-aithat adds DeepSeek to the list of "non-standard" providers in thedetectCompat()function. This makessupportsDeveloperRolereturnfalsefor DeepSeek, causing the code to usesystemrole instead ofdeveloper.Changes
patches/@[email protected]with the fixpackage.jsonto reference the patch via pnpm patchedDependenciesTesting
Tested locally by applying the patch directly to the installed package. DeepSeek Chat works correctly after the fix.
Fixes #3566
🤖 Generated with Claude Code