linguo2625469/workbuddy2api-panel
把腾讯WorkBuddy账号变成 OpenAI 兼容 API 的多账号网关,同时自动完成任务中心全部任务,附 Web 管理面板(账号池可视化 / 积分任务 / 配置热更新)。基于 Sliverkiss/workbuddy2api 的增强分支
What it solves
Tencent CodeBuddy doesn't offer an OpenAI-compatible API, so existing tools and SDKs can't talk to it directly. This project wraps one or more CodeBuddy accounts into a single /v1/chat/completions endpoint, letting any OpenAI-compatible client use them with zero changes. It also handles the messy parts of running multiple accounts: picking the best account, recovering from failures, keeping multi-turn conversations on the same account, and automating routine tasks like daily check-ins and growth-plan rewards.
How it works
You log in with OAuth device authorization (from the web panel or a script), and the gateway stores the account tokens locally. When a request comes in, it picks an account from a pool using weighted random selection that favors accounts with expiring credits and lower cost tiers. It applies circuit breakers and cooldowns for errors (429, 404, 402), and uses session stickiness so a conversation stays on the same account unless it fails. Scheduled tasks run at set times for check-in, activity reporting, cat travel, and token keepalive. The gateway also rewrites outbound requests: it forces streaming, injects reasoning chains for DeepSeek models, sanitizes fingerprint fields, and replaces system prompts to avoid content misattribution. A built-in web panel lets you add accounts, view status, edit config live, and trigger one-click completion of 17 out of 18 growth tasks.
Who it’s for
Individuals who own their own CodeBuddy accounts and want to use them through OpenAI-compatible tools, or who want to automate routine account maintenance like check-ins and growth rewards. It is explicitly not for reselling API access, sharing account pools, or any commercial use. The project is now unmaintained and may stop working if Tencent tightens restrictions.
Highlights
- Web management panel – add accounts via OAuth in the browser, view account health, credits, cooldowns, and logs, all in a single-page UI.
- One-click growth tasks – completes 17 of 18 official growth tasks via pure API calls, including auto-claiming rewards.
- Multi-account pool – weighted random selection, cost-tier awareness, circuit breakers, and cooldowns to keep the pool healthy.
- Session stickiness – keeps multi-turn conversations on the same account, with automatic unbinding on failure.
- Scheduled automation – daily check-in, activity reporting, cat travel, and token keepalive, all independently toggleable.
- Streaming and non-streaming – forces streaming outbound, rebuilds SSE frames, and aggregates non-streaming responses locally.
- Reasoning model support – injects DeepSeek thinking chains and handles
reasoning_contentbackfill. - Web search endpoint – exposes an Anthropic Messages–compatible search API that reuses the account pool.
- System prompt replacement – replaces client system prompts to avoid content misattribution, with fallback modes.
- Fingerprint sanitization – strips blacklisted fingerprint fields from outbound requests.
- Observability – per-request table logs, health endpoint, and request metadata archiving (without prompts or credentials).
- State persistence – local atomic writes plus optional Upstash Redis mirror for restart recovery.
Related
- Project
- Project
- Project
- Project
- Project