Disable fast path — always run full agent loop

This commit is contained in:
Thomas Friedel 2026-04-18 15:19:57 +02:00
parent 1544ec1944
commit a4898f6d9a
2 changed files with 1 additions and 13 deletions

View File

@ -9,7 +9,6 @@ This is an Open WebUI **Pipe** that exposes Claude Code as a selectable model. E
- **Full Claude Code agent loop** — Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch (configurable allowlist)
- **Per-chat workspaces** — each `chat_id` gets a sandboxed working directory that persists across turns
- **Dual auth** — bring your own Anthropic **API key** (pay-per-token) *or* a **Claude Pro/Max OAuth token** (bills against your subscription)
- **Fast path for trivial messages** — when no tools are needed, bypasses the SDK and hits the Messages API directly (~300 ms instead of multi-second CLI cold start)
- **Streaming UI** — tool calls render inline with previews; generated images/PDFs/CSVs surface as artifacts in the chat
- **Configurable valves** — model, permission mode, tool allowlist, max turns, workspace root

View File

@ -1364,18 +1364,7 @@ class Pipe:
yield "_No user message to send to Claude Code._"
return
# Gate: fast path for simple Q&A, agent path for tasks needing
# tools/files. Same model, different invocation cost. The user can
# always force with `/agent` or `/fast` at the start of their message.
if not _needs_agent(prompt, __files__):
async for chunk in self._run_fast(
body, __user__, __metadata__, __files__, __event_emitter__
):
yield chunk
return
# Agent path: strip the `/agent` prefix (if any) so Claude doesn't
# see it as content.
# Fast path disabled — always run the full agent loop.
prompt = _strip_mode_prefix(prompt)
chat_id = __chat_id__ or "default"