Skip to content

v1.2.7 - Model Capability Guard and Trusted Management Origins

Latest

Choose a tag to compare

@maiphucgiang maiphucgiang released this 16 Sep 22:51
· 1 commit to main since this release

Model capability guard, shared catalogs and trusted management origins

Changes

  • Publish safe upstream catalog metadata on /v1/models and /admin/models: capability states, token limits and per-profile declarations with catalog_source provenance; account identities, credentials and internal configuration are never exposed. The WebUI model page shows full details and shared-catalog sources (#32).
  • Add model_capability_guard, default on and configurable via CLI, CODEBUDDY2API_MODEL_CAPABILITY_GUARD and a WebUI hot switch. Declared-unsupported images, tools or reasoning, out-of-range effort and over-cap output return 400 without an upstream call (#32).
  • Deduplicate international CLI/WorkBuddy catalogs into a shared view with source tracking, and merge lossless consecutive image-bearing user messages for international profiles only; domestic backends keep native behavior (#25, #32).
  • Fix management login behind HTTPS reverse proxies (#31, #33): trust exact browser origins via admin_allowed_origins (WebUI system settings, hot), CODEBUDDY2API_ADMIN_ORIGINS or --admin-allowed-origins. Bare domains mean HTTPS; strict same-origin matching, the Referer fallback and CSRF token requirements are unchanged.

Upgrade

  • Back up and preserve your existing .env and entire writable data directory, including control.sqlite3, logs.sqlite3, credentials and reward ledgers.
  • Native precedence is CLI > environment > saved WebUI settings > defaults. model_capability_guard and admin_allowed_origins are hot WebUI settings unless locked by an explicit CLI or environment value.
  • Compose keeps container binding at 0.0.0.0:8787; update the image in your existing .env to ghcr.io/maiphucgiang/codebuddy2api:1.2.7, then run docker compose pull && docker compose up -d --no-build.
  • If HTTPS domain login through a reverse proxy fails Origin checks, add the public address to admin_allowed_origins instead of disabling CSRF protection.
  • Existing /v1/* and /admin/* addresses remain unchanged.

Distribution and validation

codebuddy2api-1.2.7.tar.gz includes source and prebuilt WebUI assets; SHA256SUMS verifies the download. It excludes credentials, databases, .env and dependency directories. Native use requires Python 3.12+ and the locked Python dependencies, but no frontend build.

All 55 backend test scripts pass, including new international-catalog, capability, message-normalization and origin-allowlist suites. The extracted distribution passed isolated startup, version, health, asset, environment and authentication checks. Reviewed changes: #32, #33.

Tag CI passed and published linux/amd64 and linux/arm64 images. Both report version 1.2.7 and revision 5d86db585190a8c1676c9fdb8759e5127befb7bf; latest matches the versioned manifest.

Full changelog: v1.2.6...v1.2.7