• Stefy Lanza (nextime / spora )'s avatar
    front: batch page-load reads into one request; bound admin-API GETs · cd24ff1f
    Stefy Lanza (nextime / spora ) authored
    The Models page fired ~10 /admin/api reads on load. Browsers cap ~6 connections
    per host, so during a generation (engine event loop GIL-busy) the proxied reads
    pile up, saturate the limit and freeze the whole page behind them.
    
    Two fixes:
    
    1. New front endpoint POST /admin/api/batch: fans out several engine GET reads
       CONCURRENTLY server-side (front's own un-capped pool), each individually
       bounded, and returns them in one response. A slow/blocked sub-call returns an
       error marker without holding up the rest. base.html gains bootstrapPage() +
       pageFetch(): the page batch-loads its first-paint reads in ONE request, and the
       existing loaders transparently serve from the bundle (falling back to a normal
       fetch on miss). models.html now collapses settings/cache-stats/cached-models/
       models/quantize-status/downloads into a single batched call, plus an in-flight
       guard on the downloads poller so ticks can't stack up.
    
    2. Bound /admin/api/* GET proxying (catch-all) with a finite read timeout +
       graceful 503 fallback, so a busy engine can never hang a page forever (HF hub
       lookups and streaming endpoints keep the unbounded path).
    
    Verified: batch unit test (concurrent aggregation, error markers, path filtering,
    auth) and node syntax-check of the bootstrap script.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_011DDv7BchtZQWsnPG6Jm49m
    cd24ff1f
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...
video_editor.config.json Loading commit data...