Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

misakano7545/workbuddy2api-panel

AI Engineering

Self-hosted gateway that turns Tencent CodeBuddy accounts into OpenAI-, Anthropic- and MCP-compatible endpoints, with a web panel.

1,420
359
Go
MIT
2 months old

What it does

WorkBuddy2API Panel is a self-hosted reverse proxy that exposes Tencent CodeBuddy (WorkBuddy) accounts through API shapes that existing clients already speak: POST /v1/chat/completions, POST /v1/responses, and POST /v1/messages (/messages is also accepted). It handles OAuth device login, token refresh, account-pool scheduling, cooldowns/circuit breaking, and session affinity, so a multi-account setup behaves like one endpoint and switches away from a failing account automatically.

Beyond chat it wraps the upstream media models as OpenAI-style routes for image generation/editing (/v1/images/generations, /v1/images/edits), asynchronous video tasks (/v1/videos/*), and optional 3D generation (/v1/3d/*, disabled by default). A single MCP endpoint (POST /mcp) exposes image, video, and optionally 3D tools to Claude Code, Codex, Cursor, and other HTTP MCP hosts. An embedded web panel covers account health, credit trends, proxy bindings, live config edits, and a task center.

The project is a fork of a fork: upstream Sliverkiss/workbuddy2api has been deleted, and the direct parent linguo2625469/workbuddy2api-panel stopped maintenance in October 2026. This branch keeps evolving independently and states that issues and PRs are handled here.

Getting started

Requirements: Go 1.26.10 if building from source, an authorized CodeBuddy account, and a writable directory for config/state. First launch generates config.json with a random api_key.

  1. Start the binary (or container) so it listens on its default local address; the panel is served from the same process.
  2. Open the panel and use Add account to complete the OAuth device authorization. Credentials are written to disk and hot-loaded into the pool without restarting. login.sh provides the same flow from the command line.
  3. Call an endpoint using the generated key:
curl -s http://127.0.0.1:7863/v1/chat/completions \
  -H "Authorization: Bearer $WB2API_KEY" -H 'Content-Type: application/json' \
  -d '{"model":"cn:hunyuan-image-alpha","messages":[{"role":"user","content":"hi"}]}'

Media and MCP usage is documented with concrete request bodies, for example the image generation endpoint and the MCP initialize call. Check readiness with curl http://127.0.0.1:7863/healthz; it returns an identity tag usable by load balancers.

Configuration and operations

Optional pieces are switched on through config.json fields such as features.embeddings_enabled, features.tts_enabled, features.asr_enabled, features.three_d_enabled, and features.watermark_strip_enabled. Most panel edits take effect immediately; assembly-time fields like listen require a restart.

Scheduling covers check-in, activity, cat travel, token keep-alive, window probes, and a growth-task queue. A proxy pool accepts http, https, socks5, and socks5h URLs plus subscription text; accounts can be pinned to a fixed exit or inherit a realm default. State is written atomically to disk, with optional Redis mirroring.

The binary does not include service supervision. For always-on Windows use, the README documents NSSM or Task Scheduler; note that Task Scheduler's restart only fires on non-zero exit codes. A third-party macOS menu-bar launcher exists in a separate repository and is not built or verified by this project.

Constraints

This is an unofficial gateway over CodeBuddy accounts. The README limits it to your own authorized accounts in local/private testing and warns that upstream changes or account risk controls can break or block access. Media outputs are signed URLs with limited lifetimes (about 24 hours for images, about 12 hours for video), and video/3D task-to-account ledgers live in process memory, so after a restart queries degrade to probing accounts. 3D generation and the media helper endpoints are off by default. A single shared API key means anyone holding it can query any task ID, so do not expose it to multi-tenant use. The project is MIT-licensed and explicitly not backed by an SLA.

HotRepo's take

The repo recorded 1,420 stars and 359 forks, gaining 216 stars over the weekly Go list ending 2026-11-23, where it ranked 15th; there is no all-language daily rank or star-history sample to compare against. What stands out is not the proxy itself but the breadth of its engineering around CodeBuddy's quirks: protocol-level compatibility work for DeepSeek-style tool calls and reasoning fields, explicit failure modes such as zero_output_length and model_not_allowed, and a documented investigation of upstream risk-control behavior (11140). The README also documents maintenance limits directly: the deleted upstream chain, the AI-assisted review workflow, and the author's availability. That candidness is useful, but the dependency on a non-public upstream means the compatibility surface is inherently fragile.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. linguo2625469/workbuddy2api-panelSelf-hosted gateway that turns CodeBuddy accounts into an OpenAI-compatible API with account pooling and a web panel.Go4,945
  2. niyouqianma/workbuddy2api-hubLocal gateway that wraps WorkBuddy and CodeArts accounts behind an OpenAI-compatible API.Python225
  3. basketikun/chatgpt2apiReverse-engineers ChatGPT's web endpoints into an OpenAI-compatible API for image, text, and voice tasks with account-pool management.Go6,926
  4. do-whilefor/zcode2apiSelf-hosted gateway that reshapes ZCode free-account access into OpenAI- and Anthropic-compatible APIs.Go106
  5. lbjlaq/Antigravity-ManagerDesktop and Docker tool that manages multiple AI service accounts and exposes them as OpenAI, Anthropic and Gemini-compatible API endpoints.Rust33,364