- add /v1/responses (and /responses): OpenAI Responses API support
- streaming semantic events, non-streaming aggregation, function tools
- input item / content / tool / tool_choice conversion to chat format
- ensure first message is system: fix upstream 11128
"first message is not system prompt" for non-harness clients
(assistant/tool-leading or missing system); normalize developer role
- fix tool call delta merging (applyToolCallDelta) across streamed chunks
- refactor handleChatCompletions: extract upstreamChat for 429 cooldown
fallback across the account pool
- bump version to 1.8.1
- tests: 37 passing (session normalization, responses conversion,
tool call merge, responses<->chat mapping)
- serve now periodically writes account-pool state (active/cooldown/
disabled, cooldown until, token expiry) to workbuddy-status.json,
refreshed every 3s and immediately on cooldown/disable/refresh events
- new 'monitor' command runs in foreground: refreshes a live panel of
all accounts (usable/cooldown/expired + reasons) every N seconds,
optionally showing recent logs via journalctl (-journal) or a log
file (-logfile)
- statusSnapshotFile excluded from git via .gitignore
- unit tests for tailLines and status snapshot states
- After the per-account status block, print a summary line listing all
loaded credential files (e.g. '已加载凭据文件 (2): workbuddy.json,
workbuddy2.json') so the count is visible even when journalctl/
systemctl truncates the earlier log lines
- Startup banner now prints every account's complete status (nickname,
UID, enterprise, domain, cooldown state, token validity, expiry)
instead of a single-line summary
- Extracted shared formatAccountStatus() used by both status command
and serve startup output, keeping them consistent
- Shows disabled accounts with reason and re-login hint at startup
- When neither -auth nor -auth-dir is specified, scan the working
directory for all workbuddy*.json files and build the account pool
from them (multi-account without any flags)
- Example: /opt/workbuddy-gateway with workbuddy.json + workbuddy2.json
is automatically loaded as a 2-account pool under systemd
- loadDisabledMarkers also auto-discovers *.json.disabled markers
- Fallback to default workbuddy.json when no credential files found
- Unit tests for auto-discovery and fallback behavior
- Support multiple CodeBuddy accounts: -auth comma-separated or -auth-dir
- Round-robin request distribution to balance quota usage across accounts
- Auto-parse 429 rate-limit reset time (e.g. '将在 ... UTC+8 重置'),
cooldown-block the offending account until reset, failover to others
- Per-account serialization lock (same account queues, different accounts parallel)
- status/refresh commands now cover the whole account pool
- Unit tests for reset-time parsing, rate-limit detection and round-robin
- Pure Go, zero CGO, single binary, cross-platform (Windows/Linux/macOS)
- Full model passthrough to Tencent CodeBuddy upstream
- CLI login with ASCII QR, auto token refresh
- OpenAI-compatible API with SSE streaming + non-stream aggregation
- Reasoning-effort passthrough only when client explicitly requests
- No credentials, secrets, IPs or sensitive domains in repo