Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP
0
1# Browser HTTP experiment2 3## Current policy: any HTTPS URL4 5The host allowlist has been removed from the transport, model instructions, and UI help. **22 unit tests and all 17 live shell checks passed** on the deployed update, including downloads from previously unlisted `dummyjson.com` and `gist.githubusercontent.com`. Non-HTTPS requests are rejected. Existing CORS, redirect, method, size, timeout, and cancellation behavior remains in place.6 7One additional real MiniCPM5-2B trial fetched a public Gist README and correctly identified its subject as bubble charts in **7.4 seconds**. It made one curl request and also unnecessarily read the local README; the final answer remained correct. This is a focused integration check, not a general reliability estimate. Results: `http-shell-live.json` and `http-any-https.json`. Reproduce with `cd app && node tests/http-live.mjs && node tests/http-any-https.mjs` after building and deploying. The live JavaScript and help page matched the local build; the original victor Space revision was unchanged.8 9## Historical evaluation: initial five-host policy10 11The evaluation below predates removal of the host restriction. Its seven model trials were not repeated for this change.12 13Space: https://huggingface.co/spaces/Mike0021/MiniCPM5-2B-WebGPU-Pi-HTTP14 15Tested September 16, 2026, in real desktop Chromium 152 with an AMD RDNA-3 WebGPU adapter. The app, shell, actual MiniCPM5-2B q4f16 inference, and real public API responses were used; model/tool output was not mocked. Mobile layout was checked at 390×844; no physical-phone performance claim is made.16 17## Transport: works well within browser limits18 19All **15 live shell checks passed**: JSON download/file persistence, GitHub and Hugging Face metadata, raw GitHub content, HEAD, JSON POST, custom headers, HTTP 404, denied hosts, CORS/network failure, redirects, timeout, failed-pipeline status, and cancellation. **22 unit tests passed**, including streamed size limits and cancellation. The production build passed. Requests run in the browser worker with no proxy. The same download also passed through the real Hugging Face iframe UI. This Chromium configuration denied embedded persistent storage; the existing Open workspace in a new tab fallback was visible and the standalone app worked.20 21The experimental allowlist contains api.github.com, raw.githubusercontent.com, huggingface.co, jsonplaceholder.typicode.com, and httpbin.org. GET/HEAD/POST are supported; cookies are omitted; responses are limited to 1 MiB and requests to eight seconds. The installed browser bundle provides curl, not wget. These limits are explicit in the UI help and tool description.22 23Other hosts are rejected. Allowed hosts still need CORS headers: Hugging Face's model API worked, while its homepage could not be read. Browser-manual redirects have opaque status/headers, so the adapter rejects them clearly; use a final, correctly capitalized HTTPS URL. Use `set -o pipefail` with pipelines. Python/Node/native binaries remain unavailable.24 25## Actual model: useful, but imperfect26 27**5 of 7 trials passed review.** Basic completion checks initially accepted all seven; request/transcript review correctly flagged duplicate POSTs and an unsupported failure diagnosis. The raw results retain both assessments. The system prompt already tells the model to use jq, respect browser limitations, and avoid repeated blocked requests; the small model did not always comply.28 29| Trial | Wall time | Observed outcome |30|---|---:|---|31| fetch-and-answer | 7.9 s | Correct title and completion status |32| fetch-count-write | 25.4 s | Correct saved report; recovered from two unavailable-runtime attempts |33| github-api | 9.2 s | Correct repository and Apache-2.0 license |34| post-json | 19.2 s | Partial: correct payload, but sent twice and altered unrelated metadata |35| blocked-host | 20.7 s | Correctly explained the restriction; no outgoing request |36| cors-error | 72.6 s | Partial: admitted failure, but retried and invented bot detection |37| fetch-and-answer-repeat | 5.3 s | Correct repeat on a fresh chat |38 39A separate final-build smoke test also fetched and answered correctly in 9.1 seconds (outside the seven-trial sample). The model restored from its verified browser cache in 4.7 seconds. The first uncached attempt had downloaded all weights but hit an unrelated duplicated-asset hosting failure. Re-uploading and re-registering the copied binary assets fixed that failure while preserving their original bytes. The original victor Space was not modified.40 41**Assessment:** practical for fetching CORS-enabled JSON APIs and processing/saving data locally. Treat agent-driven writes and failure recovery as experimental: transport correctness does not ensure correct or efficient model decisions. These seven trials are a small integration sample, not a benchmark or a success-rate estimate.42 43Historical reproduction: use Space revision `fc90384a16477e80287ddcbc4275b9c795894eac`, then `cd app && npm ci && npm test && npm run build`; run `node tests/http-live.mjs` and `node tests/http-agent-live.mjs` against a deployment of that revision. The latter downloads/caches the model and uses a dedicated test browser profile. The seven-trial results remain in `http-agent-live.json`; `http-shell-live.json` now records the current 17-check run. Public artefacts omit echoed IP addresses and temporary signed CDN URLs.44 