Replies: 2 comments
|
This can be worked around today without patching the installed Harness files or placing a role-rewrite proxy in front of the gateway. dsh plugin --profile web add pi2dsh
dsh plugin --profile web add <Pi provider package for the gateway>pi2dsh registers a transport-carrying Pi provider as a native DSH LLM route through A passthrough recorder verified the actual wire behavior: |
|
Verified against rc.7 ( 1. Source confirmation (rc.7). 2. This cluster is 10+ threads, same root cause. #3076 / #2637 / #2587 / #1643 / #843 / #636 / #551 / #473 / #280 / #2489 / #2388 / #2023 / #2007 / #614 — all "custom OpenAI-compatible gateway rejects 3. A verified fix already exists — from the community. lidao2026-Coding's #551 reply contains a working-tree patch, tested end-to-end against a CodeBuddy/tencent compatibility gateway with 4. Immediate workarounds (until it lands):
5. What the fix should look like upstream (one PR):
10+ reports, one root cause, verified patch, zero upstream movement on rc.7 — this is the highest-leverage small PR in the repo right now. Happy to consolidate the patch + tests if the contribution channel opens. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
@deepseek-ai/dsh-llm-pi-aicannot configuresupportsDeveloperRolefor a custom OpenAI-compatible gateway. For reasoning-capable models the adapter sends the system prompt with thedeveloperrole; several OpenAI-compatible gateways only acceptsystem, so every request fails before reaching the model.Environment
@deepseek-ai/dsh:0.1.0-rc.7@deepseek-ai/dsh-llm-pi-ai:0.1.0-rc.7llm-pi-ai, protocolopenai-completionsConfiguration used
Error
The gateway rejects the request with:
{ "error": { "type": "invalid_request_error", "code": "400001", "message": "Failed to deserialize the JSON body into the target type: messages[0].role: unknown variant `developer`, expected one of `system`, `user`, `assistant`, `tool`, `latest_reminder`" } }Cause
pi-ai uses the
developerrole whenmodel.reasoning && compat.supportsDeveloperRole. For an unrecognized custom base URL,supportsDeveloperRoledefaults totrue. The harness adapter'sPiAiCompatProfileonly exposesthinkingFormatandsupportsReasoningEffort, so a profile cannot setcompat.supportsDeveloperRole: false; the field is dropped by the config schema.Suggested change
Expose
supportsDeveloperRole(and ideally the remaining provider-neutralOpenAICompletionsCompatswitches that affect request acceptance) inPiAiCompatProfile/compatProfile, with the same model → route → installed-catalog → URL-detection resolution order already used forthinkingFormatandsupportsReasoningEffort.Current local workaround
Patching the installed
dsh-llm-pi-aibundle to accept and forwardsupportsDeveloperRolefixes it immediately; the same change should live upstream so custom OpenAI-compatible gateways that only supportsystemroles can use reasoning models without code patches.All reactions