Spaces:
Sleeping
Sleeping
Commit History
-
chat: stop, regenerate, inline prompt editing, copy answer
Extracts runQuery(query, prefix) out of send() so a query can run against a truncated conversation -- that's what lets edit and regenerate rewrite history rather than only append to it. - stop: the send button becomes a stop button mid-stream, aborting the fetch. The partial answer is discarded and the abort is not treated as an error; the prompt stays put with a retry beside it. - edit: click the pencil on your own message to edit it in place; submitting drops every turn that followed. - copy/regenerate: icon row under each answer. Regenerate only on the last one, since re-asking mid-thread would silently discard the rest. Also centers the message column at 66rem and tightens the toggle row. copyText() replaces two silent-failure clipboard paths: writeText rejects on an unfocused document and is absent on insecure origins, and neither call site had a catch, so a failed copy gave no feedback at all. Falls back to execCommand. Known gap: a stopped run's spend is not counted.…b3def84 -
images on web-search answers, via Tavily
The OpenRouter web plugin runs search server-side and returns no image data, so image-worthy queries now make one Tavily call of their own. Gated twice over: the query must already be doing a web search, and either a bidder must set the new wants_images flag or the visual-intent regex must fire. Bidders alone proved unreliable -- they disagree with each other on identical queries and miss implicit subjects like a named office-holder or a rocket launch -- so the regex backstop mirrors what _needs_web_heuristic already does for needs_web. Search queries are stripped of conversational scaffolding first: "show me photos of the new iPhone 17" was searching for the literal words "show me photos of" and returning stock art of the phrase. Fails soft everywhere: no key, a timeout, or an empty result all just mean no images, never a degraded answer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>7c53dcc
-
web search: tell verifier answer is web-grounded; add 'searching' stage
- verify_user gets a web_used flag (from state.needs_web): when the answer came from live web search, the verifier is told NOT to mark facts wrong/hallucinated just because they postdate its training — assume cited/web-sourced facts are current. Fixes web answers being marked unverified (2026 world cup: verify 0.0 -> 1.0). - streaming emits a 'searching' stage when web is used; UI shows '🔍 <model> SEARCHING THE WEB…'.b03e13f -
tier-1 lineup: Gemma 4 (general), Qwen3 Coder (coding), DeepSeek V4 Flash (logic/math)
- general: Gemma 4 back (google/gemma-4-26b-a4b-it, free+fallback) - logic/math: DeepSeek V4 Flash (moved from general), math specialty - creative slot + Skyfall removed; toggle creative -> reasoning (logic/math) - hint literal creative->reasoning in schema/api/Chat; labels + arcade updated - _skip_verify auto-disables (no 'creative' hint key), pipeline default -> gemma Verified: general->Gemma 1.0, coding->Qwen 0.95, reasoning->DeepSeek 1.0.f3a0f20
-
tier-1: DeepSeek V4 Flash (general), Qwen (coding), Skyfall 36B V2 (creative)
- general slot: DeepSeek V4 Flash (moved from math); Llama 4 Maverick dropped - creative slot: Skyfall 36B V2 (thedrummer/skyfall-36b-v2, paid $0.55/$0.80) replaces the math/reasoning slot; toggle 'logic/math' -> 'creative' - hint literal reasoning->creative in schema/api/Chat; labels + arcade updated - verifier: subjective exemption broadened to creative writing (poems, stories, role-play) so a competent poem isn't failed for lacking factual correctness (poem test 0.0 -> 0.7) Verified: general->DeepSeek 1.0, creative->Skyfall writes a poem.dabb994 -
deploy hardening: access gate, rate limiting, spend guard, env CORS
Split-deploy ready (Vercel frontend + HF backend). The API key is a server-side secret; the threat is abuse of the endpoints that spend it, so bound the worst case in layers: - access code (X-Access-Code) required on all /api/* routes via one dependency; /health stays open and reports access_required so the frontend gate auto-skips in local dev (no ACCESS_CODE set) - per-IP rate limiting (slowapi) on the query endpoints, real IP from X-Forwarded-For - in-memory daily spend guard -> 503 once DAILY_SPEND_LIMIT_USD hit; fed by every run's cost at persistence time - env-driven CORS allowlist (ALLOWED_ORIGINS) - locking the code also closes the previously-open /api/runs and /api/metrics global leaks Frontend: AccessGate screen, X-Access-Code header on all requests, 401 bounces back to the gate. README gains the split-deploy runbook + env matrix + security model. slowapi added. Verified locally: 401 without code, 429 over rate limit, 503 over spend cap, gate auto-disabled when n…98d4633
-
hard gate: GPT-5 reserved exclusively for hard STEM/reasoning queries
Escalation (weak bids, disagreement, failed verification) is only permitted when mean bid estimated_difficulty >= 0.6 — the level only hard math/coding/reasoning queries reach. Everything else ships the best tier-1 draft; a failed verification marks the answer '(unverified)' in answered_by and the delivering event carries verified:false so the UI shows an UNVERIFIED status. Sole carve-out: all bidders erroring (no difficulty signal) keeps the frontier fallback open — that's infrastructure failure, not routing.e719504 -
stream the hedge draft live from t=0; slow the typewriter to reading pace
The hint model's tokens now flow to the client while bidding is still in progress (multiplexed via a queue); hint-priority routing means the provisional text is usually final. A new 'reset' event clears it when another model wins or the hedge comes up empty. Verification/delivery events moved out of the not-escalated block so a failed hedge verify still reports. Client drain slowed to ~60 chars/s floor, ~370/s ceiling — pacing is for reading now, not catching up.186f67f -
hedged speculative draft with user topic toggle
The hint model (general->Gemma, coding->Qwen, logic->DeepSeek; toggle in the chat UI) starts drafting at t=0 in parallel with the bids. If the auction picks it and the winning bid didn't already carry an answer, the hedge draft is used; otherwise it's cancelled for fractions of a cent. Covers DeepSeek in particular, which never attaches answers to its bids.9eeb459 -
progressive boss-fight status: reasoning ticker with arcade fallback phrases
chat_stream surfaces reasoning deltas from providers that send them; the stream endpoint forwards them as reasoning events. During escalation the chat bubble shows GPT-5's live reasoning summary tail, or rotating arcade-themed thought phrases until real reasoning arrives (provider support varies, so the generic phrases are the guaranteed floor).3a7ce74
-
checkpoint: current behavior before latency work
001f1df
-
AuctionRouter: cost-aware multi-agent LLM router with auction-based selection and verification-gated escalation
- FastAPI + LangGraph backend: parallel bidding, auction scoring (0.7*confidence + 0.2*history - 0.1*cost), verifier gate, frontier escalation via OpenRouter, Mongo/in-memory run store, metrics API - Next.js static-export frontend: retro 8-bit theme, chat with markdown + KaTeX, auction/verification panels, React Flow routing graph, metrics dashboard, pixel bid-arcade idle animation - Docker multi-stage build for Hugging Face Spaces (FastAPI serves the static export on 7860) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>6b3d40b