Files
devplacepy/fpost.md
T
retoorandClaude Sonnet 5 569f1dcc64 Add OpenCode Zen support, model health/stats dashboard, and gateway fallback fixes
AI gateway:
- Add a generic, admin-selectable `client_profile` field on gateway_providers
  (e.g. "opencode") so a provider needing special request headers (OpenCode
  Zen's client-identity spoofing) is configured like any other provider, not
  hardcoded by name.
- Track per-(provider, model) reliability/speed/latency health in memory,
  seeded from the existing gateway_usage_ledger at startup - purely
  observational, never influences routing.
- New Stats tab on /admin/gateway: request volume, latency, per-model
  breakdowns, and reliability weight, charted with a vendored Chart.js and
  devplace's own theme tokens.
- Record which model a failed request actually fell back to
  (fallback_used_route), surfaced in the Recent Failures table.
- Stop excluding context_length errors from fallback, and skip a primary
  attempt outright when its known context window is already too small for
  the estimated request size, going straight to the fallback.
- gateway_usage_ledger's provider/fallback_used_route columns and indexes
  are ensured centrally in database/schema.py's init_db(), the single point
  of truth for this table's schema.
- Non-OpenAI upstream routing and client-model passthrough; trust only the
  upstream's own X-Gateway-Model header for served-model attribution.

Devii agent:
- Fix a real lockup: plan/verify tools could be individually disabled via
  the admin tool toggles while still being required by the protocol gate,
  permanently bricking any task that needed tools. They can no longer be
  disabled, and the gate now also checks the tool is actually offered.
- Fix compaction being silently calibrated for a 1M-token model while
  running a much smaller one: context budget is now percentage-based and
  the summarizer's own request is sized to fit the real model.
- Give a specific, actionable retry message when plan()'s own arguments get
  cut off by the output limit, and tighten its schema to discourage
  overlong plans.

Other:
- Backup service: offload completed backups to a remote Hetzner Storage Box.
- Container manager: fix orphan blob leaks from sync races, add a two-phase
  plan/execute `system prune` CLI command.
- Admin gateway UI: replace the JS-rendered model/provider tables with
  server-rendered forms and pages.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhmEkvutuwtzFVcLbTrhdo
2026-09-09 07:38:24 +02:00

3.6 KiB

DevPlace Changelog — Last 24 Hours

AI Gateway — Non-OpenAI Upstreams & Client Model Passthrough

The AI gateway now supports routing to non-OpenAI upstream providers. The gateway can target any compatible API endpoint, and client-specified model names are passed through to the upstream instead of being forced to a fixed model. This opens the door for self-hosted providers and alternative APIs.

Files: services/openai_gateway/gateway.py, service.py, thinking.py, vision.py

AI Gateway — Trust Only Upstream X-Gateway-Model Header

The gateway now trusts only the X-Gateway-Model header from the upstream response when determining which model served a request. This prevents spoofing and ensures usage attribution is accurate.

Files: services/openai_gateway/gateway.py, usage.py

Backup Service — Remote Offload to Hetzner Storage Box

Completed backups can now be automatically offloaded to a remote Hetzner Storage Box. The offload module handles the transfer, and the backup service orchestrates the full lifecycle: create, verify, offload, and prune.

Files: services/backup/offload.py, service.py, store.py

Container Manager — Orphan Blob Fix & System Prune

Fixed container sync races that leaked orphan blobs (files on disk with no database reference). Added a new devplace system prune CLI command that safely removes orphan blobs, sweeps unreferenced container workspace dirs, and prunes expired fork/zip job rows. The command supports --dry-run for preview.

Files: cli/system.py, services/containers/store.py, attachments.py, project_files.py

Container Manager — Two-Phase Plan/Execute Report

The system prune CLI command now uses a two-phase plan/execute report: first it shows what would be deleted (plan), then executes and reports what was actually removed.

Files: cli/system.py, cli/containers.py

Post Page — Happy 404, Featured/Related Sidebars, Next-Post Nav

The post page now includes:

  • A "Happy 404" page for missing posts
  • Featured posts sidebar
  • Related posts sidebar
  • Next-post navigation

Files: happy404.py, routers/posts.py, templates/post.html, database/content.py

Static Asset Cache-Busting — Unified with Auto-Bumped App Version

Static asset URLs now use the auto-bumped app version for cache-busting instead of a separate timestamp. This ensures assets are invalidated whenever the app version changes, and eliminates the need for manual cache-bust updates.

Files: config.py, templates/docs/static-caching.html, nginx/nginx.conf.template

Automatic Patch-Version Bumping via Git Pre-Commit Hook

A new .githooks/pre-commit hook automatically bumps the patch version in pyproject.toml on every commit. The hook increments patch (e.g. 1.0.01.0.1) and stages the change. A hand-set major/minor bump in the same commit is left untouched. The hook defers during merges and never blocks a commit.

Files: .githooks/pre-commit, Makefile, CLAUDE.md

Test Infrastructure — Shared run_async Helper

Provision tests now use the shared run_async test helper instead of bare asyncio.run calls, improving consistency and error handling across the test suite.

Files: tests/unit/services/containers/workspace/provision.py

Documentation Updates

  • Updated README.md with new feature documentation
  • Updated CLAUDE.md with new CLI commands and architecture notes
  • Updated docs pages: production nginx, static caching, backups, architecture backend
  • Updated nested CLAUDE.md files for gateway, containers, backup, and posts subsystems

Generated from git log — all commits from the last 24 hours.