Skip to content

v1.2.5 - WebUI Refinements and Gateway Reliability

Choose a tag to compare

@maiphucgiang maiphucgiang released this 15 Sep 09:51

WebUI refinements and gateway reliability

codebuddy2api 1.2.5 brings together the WebUI, routing and reliability improvements since 1.2.1, while keeping existing OpenAI and Anthropic client URLs unchanged.

Changes

  • More capable model routing: create public model IDs independently of upstream IDs, bind to an account or region, and preserve strict routing constraints during retries. Models are discovered from each account's root catalog rather than only the client picker; unsupported backend/model combinations are temporarily avoided without borrowing another product's capabilities.
  • Refined WebUI: a collapsible icon sidebar, stronger glass surfaces, animated drawers, background scroll locking and outside-click dismissal. Appearance controls offer light, dark and system modes, with palettes applied only to light mode. OAuth completion closes the credential drawer and refreshes the list without weakening authorization-tab isolation.
  • Useful trends and diagnostics: choose automatic, hourly or daily chart granularity and inspect individual periods by hover, touch or keyboard. Structured cards replace raw JSON where practical; log-detail requests no longer race, and credential downloads handle UTF-8 filenames.
  • Independent account actions: refresh a single credential, check in, synchronize balances or manage Buddy travel. Automatic check-in and travel have separate per-account switches; synchronization does not claim rewards. Domestic travel checks status, claims arrived rewards and dispatches only when idle and below the daily limit.
  • Manual-only trial credits: international WorkBuddy accounts can confirm a one-time claim in the credential drawer. Safe errors, upstream status/business codes and retry times are visible, with administrative audit records and persistent deduplication. Startup, periodic maintenance and balance synchronization never claim trial credits.
  • Protocol and streaming fixes: preserve incomplete-response reasons, Responses event identity and cached-token usage, Anthropic tool-result ordering, stop sequences and tool-error indicators. Unsupported stateful continuation and multiple-choice requests are explicitly rejected. Streaming failures before the first client-visible byte retain the real HTTP status; optional bounded credential failover preserves the original routing rules.
  • Billing and resource safeguards: deduplicate balances by account identity, retain account-specific usage snapshots on refresh failure, expose incomplete synchronization and record generation attempts. Add request/response budgets, inference admission limits and early authentication; keep credential refresh off the event loop and reject non-finite credential timestamps.
  • Reproducible setup: locked uv startup, hash-verified Python requirements, pinned multi-platform Docker inputs and the react-router security update. Published-image quick start no longer requires a local Docker build.

Community contributions

Thanks to @szbfwdy for PR #10, PR #11, PR #14 and PR #18: account-identity balance deduplication, unsupported-backend avoidance, root-catalog routing and streaming failure/failover handling.

Upgrade

Stop the gateway and back up the full writable auth/ directory and existing .env before upgrading. Preserve credentials, both SQLite databases, model policies and reward ledgers; do not delete claim records or share one data directory between instances. New management/audit state may require a matching backup when rolling back older code.

  • All existing /v1/chat/completions, /v1/responses, /v1/messages and /v1/models URLs remain unchanged. Set stream: true explicitly for SSE; omitted stream now returns JSON. Stateful Responses continuation and n != 1 are not supported.
  • Domestic automatic check-in and Buddy travel are enabled by default and can be disabled independently on the credential page. International automatic check-in defaults off and is opt-in; international accounts do not use domestic travel endpoints.
  • CODEBUDDY2API_AUTO_TRIAL and --auto-trial are retired and ignored with a warning. Remove them from deployment configuration and use the manual claim drawer. Keep auth/trial-ledger.json: successful/already-claimed results are permanent, and failed attempts retain a minimum 24-hour backoff. Reverting to older code can reactivate old automatic settings, so check them first.
  • --failover-max remains 0 and --retry-write-timeout remains false by default. Enabling replay can repeat an upstream request that was already processed; this risk is recorded in the audit trail.
  • Keep the image's default startup command. Starting only uvicorn converter:app skips management initialization and can leave /dashboard unavailable. Native startup binds to loopback by default; non-loopback startup requires a nonempty API key unless an explicit unsafe override is supplied.
docker pull ghcr.io/maiphucgiang/codebuddy2api:1.2.5

For published-image Compose deployments, set CODEBUDDY2API_IMAGE=ghcr.io/maiphucgiang/codebuddy2api:1.2.5 in your existing .env, then run:

docker compose pull
docker compose up -d --no-build

Environment changes require recreating the container, not just docker compose restart. For source builds, rebuild before recreating the service.

Distribution

codebuddy2api-1.2.5.tar.gz contains the source and prebuilt web/dist assets, with SHA256SUMS for verification. Native deployment requires Python 3.12+ and the locked Python dependencies, but does not need a frontend build. Credentials, runtime databases, .env and dependency directories are excluded.

Validation

  • 855 Python tests and 2769 subtests, 108 frontend tests, and two isolated browser flows against the real management API passed locally. Targeted release-version/lock verification passed 9 tests and 37 subtests; frontend checks and the production build passed.
  • Release-commit CI passed for be319e3d39cb6765c081c3d6e9afcee06c44271c. CodeQL completed all three language analyses on that commit; the separate main-branch query confirmed 0 open alerts. The underlying manual-claim PR also completed Codex code and security review.
  • An isolated smoke test of the extracted distribution verified version 1.2.5, /health, the bundled dashboard and assets, management authentication, the Cookie/inference boundary, model listing and the retired automatic-trial setting. No real credentials or upstream claims were used.
  • Tag CI passed and published linux/amd64 and linux/arm64 images. Both architectures report version 1.2.5 and the release revision; tags 1.2.5, 1.2, 1 and latest share one manifest.
  • The uploaded distribution and SHA256SUMS were downloaded back and verified byte-for-byte against the locally tested package.

Known limitations

A refreshed trial-status panel can show a broader error category than the immediate claim result; the original safe category remains in the administrative audit log, and backoff still applies. Manual claiming and visible feedback do not establish or resolve the cause of the host-level SSH stalls reported in issue #20.

Documentation

Full changelog: v1.2.1...v1.2.5