Skip to content

feat: per-account drop-system-prompt switch for WorkBuddy chat - #4

Merged
caigee-cmd merged 1 commit into
mainfrom
feature/workbuddy-drop-system-prompt
Aug 27, 2026
Merged

caigee-cmd merged 1 commit into
mainfrom
feature/workbuddy-drop-system-prompt

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

English

WorkBuddy upstream content screening rejects many third-party system prompts, surfacing as hard errors on requests that could otherwise succeed.

  • Add a per-account drop_system_prompt switch (migration 005, on by default): caller system/developer messages are stripped before provider-native chat. The flag mirrors into the scheduler pool item and syncs live on PATCH /api/accounts/{id} — no restarts, no cooldown churn.
  • Treat upstream content-screening rejections as request-level errors (invalid_request): return 400 to the caller with no pool failover and no account cooldown, so a rejected request no longer rotates through every WorkBuddy account or penalizes healthy ones.
  • Qoder worker behavior is unchanged: caller system prompts stay preserved there.
  • Console: WorkBuddy account cards get the switch with a hint tooltip (EN/ZH).

中文

WorkBuddy 上游对系统提示词做内容审核,第三方系统提示词经常被拒,本来能成功的请求直接报错。

  • 新增账号级 drop_system_prompt 开关(迁移 005,默认开启):请求发出前剥离调用方 system/developer 消息。标志镜像进调度池,PATCH 后即时生效,不重启、不碰冷却。
  • 上游内容审核拒绝改按请求级错误(invalid_request)处理:直接返回 400,不再向其他账号无谓切换,也不给账号打冷却。
  • Qoder worker 行为不变,仍然保留调用方系统提示词。
  • 控制台:WorkBuddy 账号卡片新增开关(带提示,中英双语)。

Tests

make check green: store default/update, message stripping, flag on/off paths, no-failover-on-content-rejection, Classify 400 + screening-text cases.

WorkBuddy upstream content screening rejects many third-party system
prompts, surfacing as hard failures. Add a per-account switch (on by
default, migration 005) that strips caller system/developer messages
before provider-native chat; the flag lives in the scheduler pool item
and syncs live on PATCH without restarts. Content-screening rejections
are now request-level errors (invalid_request): 400 to the caller, no
pool failover, no account cooldown.
@caigee-cmd
caigee-cmd merged commit f32a933 into main Aug 27, 2026
6 checks passed
@caigee-cmd
caigee-cmd deleted the feature/workbuddy-drop-system-prompt branch August 27, 2026 15:27
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