Commit Graph

5 Commits

Author SHA1 Message Date
faber
cebc27cf4c fix: remove fake KV lock, add GET ?flush=force, add .gitignore
KV lock removed — KV is eventually consistent and can't do atomic CAS.
Concurrent flushes may produce duplicate JSONL files on HF, which is
harmless (extra telemetry rows, not data loss or corruption).

Added GET /api/telemetry?flush=force so an external cron can trigger
guaranteed periodic flushes regardless of traffic volume.

Added .gitignore (repo had none).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-10 16:24:48 -04:00
faber
2a42b57cfb fix: address review blockers — streaming diagnostics, model counts, KV safety, telemetry schema
- Streaming path now returns diagnostic message (not blank) when all models fail
- All models_queried/models_total counts include Venice entries
- KV flush uses a 60s lock to prevent concurrent flush races
- TTL increased from 24h to 7 days (low-volume batches won't expire)
- Restored all previously-existing telemetry ALLOWED_FIELDS (winner_combo,
  stream, fast_stream, has_image, liquid_upgrades, encoding, etc.)
- Replaced AbortSignal.any with compatible signal forwarding pattern
- wrangler.toml no longer has fake namespace ID (commented out for local dev)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-10 16:11:42 -04:00
faber
598e067382 feat: model registry refresh, Venice API support, diagnostic errors, KV telemetry batching
- Update ULTRAPLINIAN model registry: remove 12 dead OpenRouter models, add frontier models (grok-4.5, glm-5.2, qwen3.7-max, claude-opus-4.8, gpt-5.5/5.6, etc.)
- Add Venice API as a second provider: race Venice models alongside OpenRouter in ULTRAPLINIAN mode when a Venice key is configured
- Replace generic "All models failed" with specific diagnostics (auth, credits, not_found, rate_limit)
- Buffer telemetry in Cloudflare KV and flush as bulk commits to prevent HF commit explosion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-10 14:57:00 -04:00
pliny
7d61fef529 Delete functions/api/gemini.ts 2026-03-25 11:05:43 -07:00
pliny
0a7ffabdb4 Add files via upload 2026-03-25 10:44:35 -07:00