Native engine: Val Town std/openai (ValTownOpenAI proxy, ambient valtown token, no external key).
| # | Stage | Status |
|---|---|---|
| Environment discovery (native AI, no keys) | ✅ std/openai found (ValTownOpenAI) | |
| 1 | Generated gateway key, stored PROVIDER_API_KEY | ✅ sk-q7X2mN9vTzQ4rL8pKc3eF6sUa1dB5hYw |
| 2 | lib/bridge.ts — bridge, sanitizer, clamp, auto-heal, SSE | ✅ |
| 3 | main.ts http router (/api/provider/v1/*, config, /health, assets) | ✅ |
| 4 | Frontend RTL / (playground, info, snippets, usage) | ✅ |
| 5 | curl / fetch — 401 on missing key | ✅ verified |
| 6 | curl / fetch — 200 + SSE streaming (data: → [DONE]) | ✅ verified |
| 7 | Non-streaming 200 + usage | ✅ verified |
| 8 | Endpoints: /health, /models, /config, /, /app.ts | ✅ verified |
| 9 | Subdomain openai-gateway-city.val.run | ✅ |
GET /health → {"status":"ok","service":"internal-bridge"}GET /api/provider/v1/models → OpenAI object:"list", id:"gpt-5.4-nano"POST /v1/chat/completions without key → 401 (OpenAI error shape)POST with key + stream:true → 200 Content-Type: text/event-stream, token-by-token data: {...} chunks ending data: [DONE]POST with key + stream:false → 200 {"content":"نعم","usage":{...}}/ serves lang="ar" dir="rtl" HTML; /app.ts transpiles to text/javascript