Commit History
-
Enforce YOLO cap across session usage (#313)
Unverified signature* Enforce YOLO cap across session usage Co-authored-by: OpenAI Codex <codex@openai.com> * Address YOLO budget review feedback Co-authored-by: OpenAI Codex <codex@openai.com> * Switch YOLO LLM cap checks to post-call warnings Co-authored-by: OpenAI Codex <codex@openai.com> * Improve YOLO cap reached CTA Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO blocked approval flow Show cap extension controls for pre-execution budget blocks and preserve approved tool parts during approval continuation streams. Co-authored-by: OpenAI Codex <codex@openai.com> * Sync usage meter with YOLO ledger Co-authored-by: OpenAI Codex <codex@openai.com> * Fix YOLO usage accounting drift Co-authored-by: OpenAI Codex <codex@openai.com> * Emit YOLO updates for observed spend Co-authored-by: OpenAI Codex <codex@openai.com> * Handle YOLO updates in active chat stream Co-authored-by: OpenAI Codex <codex@openai.com> * Reconcile YOLO ledger from usage fetches Co-authored-by: OpenAI Codex…d76b37c
-
Add session usage threshold approvals (#310)
Unverified signature* Add session usage threshold approvals Co-authored-by: OpenAI Codex <codex@openai.com> * Address usage threshold review feedback Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>18716c3
-
Implement user-billed model policy (#289)
Unverified signature* Implement user-billed model policy - bill hosted inference to user tokens and remove subsidy quota state - switch web and CLI defaults and remove Sonnet from model lists - add plan-aware inference credit CTAs Co-authored-by: OpenAI Codex <codex@openai.com> * Recommend Opus in model picker Co-authored-by: OpenAI Codex <codex@openai.com> * Remove minimum plan from model config Co-authored-by: OpenAI Codex <codex@openai.com> * Link message failures to Space discussions Co-authored-by: OpenAI Codex <codex@openai.com> * Remove compatibility quota endpoint Co-authored-by: OpenAI Codex <codex@openai.com> * Remove obsolete bill_to_user argument Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model tier metadata Co-authored-by: OpenAI Codex <codex@openai.com> * Remove model picker provider subtitles Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>ded9881
-
Enforce premium quota across sessions daily (#287)
Unverified signatureCo-authored-by: OpenAI Codex <codex@openai.com>cbf5d33
-
Fix endpoint for free calls (#279)
Unverified signature* Recover endpoint for subsidized callsf247952 -
Enable FAL endpoint to lift limits (#278)
Unverified signature* Bill premium models through the HF router on the user's HF account Route Claude Opus 4.6 and GPT-5.5 off Bedrock/native APIs onto the HF Inference Router (huggingface/anthropic/claude-opus-4.6:fal-ai and huggingface/openai/gpt-5.5:fal-ai). The same daily allowance as before (free=1, pro=20) stays company-subsidized via INFERENCE_TOKEN; once a user is past it, the session's premium_user_billed flag flips and the call bills the user's own HF OAuth token (no X-HF-Bill-To) instead of returning the old 429 cap. - llm_params: bill_to_user routes premium (anthropic/ + openai/) router calls to the user's token; free models stay subsidized. - premium_user_billed is persisted/restored and threaded through the main loop, context compaction, the research sub-agent (now downgraded to router Sonnet 4.6), and effort probes. - Frontend: per-session BillingBanner (dismissible daily); remove the now unreachable ClaudeCapDialog + 429 quota-exhausted plumbing; the model chip shows "Billed" p…c9a83ae -
Reclaim idle sessions to fix session-capacity overshoot (#277)
Unverified signature* Reclaim idle sessions and fix session-capacity overshoot Users hit "Server is at capacity (379/200)" and couldn't create sessions: idle/forgotten runtimes never left the global pool, the frontend reactivated every historical session on load, and concurrent creates could overshoot the cap. Backend: - Idle-session reaper (2h): releases the sandbox + RAM of inactive sessions and evicts them from the live pool, leaving them resumable from Mongo (persisted resumable, never "ended"). Teardown uses asyncio.wait so a shutdown cancel can't be swallowed; submit() enqueues under the lock and refuses sessions being reaped. Reaping is skipped when persistence is disabled and aborts if the resumable snapshot (incl. the message bulk_write, via save_snapshot strict mode) can't be durably written. - Global create-slot reservation closes the check-then-create race that let concurrent creates exceed MAX_SESSIONS. - last_active_at drives the reaper, stamped on genuine activity only. - Re…6cf406a
-
Add dataset uploads to Hub (#255)
Unverified signature* Add dataset uploads to Hub Co-authored-by: OpenAI Codex <codex@openai.com> * Address dataset upload review items Co-authored-by: OpenAI Codex <codex@openai.com> * Show dataset upload progress Co-authored-by: OpenAI Codex <codex@openai.com> * Move dataset upload button to composer corner Co-authored-by: OpenAI Codex <codex@openai.com> * Fix dataset upload file handoff Co-authored-by: OpenAI Codex <codex@openai.com> * Show upload alerts below composer Co-authored-by: OpenAI Codex <codex@openai.com> * Improve dataset upload errors and chips Co-authored-by: OpenAI Codex <codex@openai.com> * Link dataset chips to repo Co-authored-by: OpenAI Codex <codex@openai.com> * Expose dataset uploads as configs Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>2b4c539
-
Fallback to free model for gated defaults (#208)
Unverified signature* Fallback to free model for gated defaults Co-authored-by: OpenAI Codex <codex@openai.com> * Cover explicit gated model access for HF users Co-authored-by: OpenAI Codex <codex@openai.com> * Seed model picker from created session Co-authored-by: OpenAI Codex <codex@openai.com> --------- Co-authored-by: OpenAI Codex <codex@openai.com>092f909
-
Bill HF Jobs by namespace credits, drop Pro and org-join gating (#172)
Aksel Joonas ReediUnverified signature* Bill HF Jobs by namespace credits, drop Pro and org-join gating - Drop the Pro/Team subscription pre-check on hf_jobs. Any namespace the caller belongs to is eligible; HF returns a billing error at job creation time if the wallet is empty, which the agent surfaces as a "top up to launch" dialog pointing at /settings/billing. - Remove the "Join ML Agent Explorers" onboarding step. The org-join hook, /auth/org-membership endpoint, and the OAuth orgIds suggestion are gone. - Rework JobsUpgradeDialog: namespace picker shows all eligible accounts/orgs with avatars + select rings; billing mode opens the HF billing page; "Skip this tool call" stays available for both. - Backend pre-flight only forces the picker when the caller has multiple eligible namespaces; single-namespace users default to their personal account silently. - jobs_tool now catches HfHubHTTPError, detects billing failures by pattern + 402 status, emits a tool_state_change(state=billing_required) so t…bed4e38
-
Run jobs under user or org accounts with upgrade / org-pick UX (#132)
Aksel Joonas ReediUnverified signature* agent/core/agent_loop.py: jobs access rewiring * agent/core/telemetry.py: jobs access rewiring * agent/tools/jobs_tool.py: jobs access rewiring * backend/dependencies.py: jobs access rewiring * backend/models.py: jobs access rewiring * backend/routes/agent.py: jobs access rewiring * frontend/src/components/Chat/ChatInput.tsx: jobs access rewiring * frontend/src/components/ClaudeCapDialog.tsx: jobs access rewiring * frontend/src/components/SessionChat.tsx: jobs access rewiring * frontend/src/hooks/useAgentChat.ts: jobs access rewiring * frontend/src/lib/sse-chat-transport.ts: jobs access rewiring * frontend/src/store/agentStore.ts: jobs access rewiring * frontend/src/types/agent.ts: jobs access rewiring * scripts/build_kpis.py: jobs access rewiring * tests/unit/test_build_kpis.py: jobs access rewiring * agent/core/hf_access.py: jobs access rewiring * frontend/src/components/JobsUpgradeDialog.tsx: jobs access rewiring * tests/unit/test_hf_access.py: jobs access rewirin…ff8c636
-
feat(observability)
Aksel Joonas ReediUnverified signature2a2e170
-
Restore expired sessions via summary-based catch-up (#52)
Aksel Joonas ReediUnverified signatureWhen the backend loses a session (typically: HF Space restarted), the chat now shows a small inline banner instead of silently erroring: Where were we? Let me skim the conversation so far and pick up right where we left off — or we can start something new. [ Catch me up ] [ Start fresh ] Flow, in one pass: * Frontend stashes the raw backend messages in localStorage on every mount-hydrate and turn_complete. When the backend 404s for the session id, the SSE transport and the mount effect both fire onSessionDead → the session is flagged `expired` in sessionStore; the sidebar marks it "needs a catch-up". * Catch me up → POST /api/session/restore-summary with the cached messages. Backend creates a fresh session, runs the existing summarizer (factored into summarize_messages() and shared with in-session compaction) with a restore-specific prompt that preserves the tool-call trail, and seeds the new session with that summary wrapped in a [SYS…962191f -
Scope model selection per session instead of globally
Sessions now clone the config on creation, so switching model in one tab only affects that tab. SessionInfo carries a `model` field the selector reads on session change; writes go to a new POST /api/session/{id}/model endpoint. The global /api/config/model route still controls the default for new sessions. Unblocks running Claude in one chat and GLM 5.1 in another concurrently.bf564b6
-
Add message edit and regenerate from any point in conversation
Backend: add truncate_to_user_message() on ContextManager, POST /api/truncate/{session_id} endpoint, and session_manager.truncate() helper to slice conversation history to before a given user message. Frontend: add editAndRegenerate callback in useAgentChat that truncates backend + frontend messages then resubmits via existing chat flow. UserMessage gains an inline edit mode with pencil icon on hover, TextField for editing, Enter/Escape to confirm/cancel.0611031 -
Fix session title only updating on the very first user message
2e60856 -
Show cancelled prompt in shimmer status bar instead of chat input placeholder
3b6a2ca
-
feat: render cancelled tool state in UI after user interrupt
Send tool_state_change(cancelled) events for in-flight tools so the frontend can flip spinners to a muted "cancelled" state. Keep SSE stream open (don't call chat.stop()) so backend events arrive. Show "What should the agent do instead?" placeholder after cancel. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>887da19
-
feat: SSE keepalive, reconnection, and is_processing flag
Prevents SSE streams from being killed by reverse proxies during long operations and lets the frontend recover gracefully after sleep/disconnect. Backend: - SSE keepalive pings every 15s via `: keepalive` comments - New GET /api/events/{session_id} subscribe-only endpoint for reconnection - is_processing flag on AgentSession, exposed in session info API Frontend: - reconnectToStream() re-attaches to a running session via /api/events - Visibility change re-hydrates ALL sessions from backend on wake - Background sessions also re-sync (removed isActive guard on listener) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d7f2a7c -
fix: per-session state management for smooth task switching
Background sessions now maintain their own state snapshots in agentStore so streaming, tool calls, and panel updates are not lost when switching tasks or backgrounding the browser tab. - Add sessionStates map + updateSession/switchActiveSession/syncSnapshot - Side-channel callbacks always update per-session state (no isActiveRef guard) - Global setters (setPanel, setPanelView, etc.) sync to active snapshot - Re-sync state on browser tab visibility change - Fix direct state mutation in switchActiveSession Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f56fa2e
-
fix: clear global activity state when switching away from a session
When a session becomes inactive, reset isProcessing, activityStatus, and panel state so the next session doesn't inherit stale UI (e.g. shimmering banner from a background tool execution). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7554f29
-
fix: protect system prompt in undo, scan backwards for dangling tool calls, gate input on SDK status
a13e8cc -
replace websocket transport with SSE
564aab6
-
sync: org onboarding, model updates, sandbox cleanup, prompt fixes
5af3ab5
-
fix: reconnect WS on session switch instead of deleting dead sessions
838cd50 -
fix: approval UI not updating after approve click
7b34ae7 -
feat: per-session WebSocket architecture for parallel chat sessions
Each session now owns its own useAgentChat + WebSocket transport instead of sharing a single instance. Background sessions process all events (including approval_required) continuously, fixing the bug where approvals from non-active sessions were silently dropped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>27da720