Skip to content

fix(proxy), feat(panel): Added support for use with the CodeBuddy CLI, fixed compatibility issues with DeepSeek/CodeBuddy's "thinking" process, and added support for deleting chat history - #958

Open
Jeffrey1799 wants to merge 4 commits into
TencentCloud:feat/server_teamfrom
Jeffrey1799:feat/server_team
Open

fix(proxy), feat(panel): Added support for use with the CodeBuddy CLI, fixed compatibility issues with DeepSeek/CodeBuddy's "thinking" process, and added support for deleting chat history#958
Jeffrey1799 wants to merge 4 commits into
TencentCloud:feat/server_teamfrom
Jeffrey1799:feat/server_team

Conversation

@Jeffrey1799

@Jeffrey1799 Jeffrey1799 commented Aug 12, 2026

Copy link
Copy Markdown

Description | 描述

Production-grade compatibility and deployment improvements for the proxy and panel:

  • Reasoning protocol adapter — capability-driven reasoning_content / thinking round-trip
    • DeepSeek thinking family models (reasoner / r1* / v4* incl. deepseek-v4-flash / think*) require reasoning_content (may be empty) on tool-call history messages → backfilled before forwarding (OpenAI protocol)
    • Anthropic protocol: thinking.type adaptiveenabled downgrade for non-adaptive upstreams + tool_use thinking-block backfill
    • No silent injection for other providers (fail-closed policy per provider+model)
  • CodeBuddy CLI compatibilityAskUserQuestion form (Team → Agent → Task session init), JSON/XML dual-format extraction
  • Chat memory deletion — panel L0/L1/L2 memory deletion (v2 route + tests)
  • Deployment (fork mode)Dockerfile.proxy-fork + build-proxy-fork.sh + ensure_proxy_image(): start-all.sh auto-builds/reuses a fork image with fixes baked in, no hot-patch scripts needed
    • Retires the old patch-*.sh hot-patch workflow (kept for reference)

Related Issue | 关联 Issue

N/A

Change Type | 修改类型

  • Bug fix | Bug 修复
  • New feature | 新功能
  • Documentation update | 文档更新
  • Code optimization | 代码优化

Self-test Checklist | 自测清单

  • Verified locally | 本地验证通过
    • vitest run src/reasoning — 28 tests pass (incl. v4-flash backfill cases)
    • End-to-end: simulated CodeBuddy CLI session-init request (AskUserQuestion tool_call history without reasoning_content) → HTTP 200
    • ./start-all.sh one-shot boots memory-core + memory-hub + proxy; fork image auto-built/reused
  • No existing features affected | 无影响现有功能

Additional Notes | 其他说明

  • Proxy logs confirm REASONING provider=deepseek backfilled after the fix.
  • Fork mode deployment makes container rebuilds keep fixes without re-patching (old patch-*.sh scripts are deprecated and kept for reference only).

Split PR TencentCloud#946 into four independently testable/rollbackable modules:

- 946-B CodeBuddy protocol adapter: stable question ids + typed ParsedFormResult, parsing no longer relies on option ordering
- 946-A Reasoning protocol adapter: canonical representation + capability-driven; only DeepSeek reasoning backfills reasoning_content, Anthropic downgrades adaptive→enabled for non-adaptive upstreams; removed hardcoded injection from generic handlers
- 946-C Chat memory deletion V2 (panel layer): owner-only delete; L0 cursor deep-scan replaces limit=100; per-item results; L2 removed=false no longer reports success; panel-level idempotency + audit
- 946-D Deployment cleanup: hotpatch scripts guarded by ALLOW_UNSUPPORTED_HOTPATCH, refused in production, records changed file hashes

Verification: MemoryProxy vitest 42 passed, MemoryPanel vitest 5 passed, tsc clean.
@Jeffrey1799 Jeffrey1799 changed the title fix(proxy), feat(panel): fix DeepSeek/CodeBuddy thinking compatibility and support deleting chat memories fix(proxy), feat(panel): Added support for use with the CodeBuddy CLI, fixed compatibility issues with DeepSeek/CodeBuddy's "thinking" process, and added support for deleting chat history Aug 12, 2026
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Thank you for your attention and contribution! We will schedule an internal review of this PR, and we will share any feedback right here.

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.

2 participants