Disable fast path — always run full agent loop
This commit is contained in:
parent
1544ec1944
commit
a4898f6d9a
|
|
@ -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)
|
- **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
|
- **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)
|
- **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
|
- **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
|
- **Configurable valves** — model, permission mode, tool allowlist, max turns, workspace root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1364,18 +1364,7 @@ class Pipe:
|
||||||
yield "_No user message to send to Claude Code._"
|
yield "_No user message to send to Claude Code._"
|
||||||
return
|
return
|
||||||
|
|
||||||
# Gate: fast path for simple Q&A, agent path for tasks needing
|
# Fast path disabled — always run the full agent loop.
|
||||||
# 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.
|
|
||||||
prompt = _strip_mode_prefix(prompt)
|
prompt = _strip_mode_prefix(prompt)
|
||||||
|
|
||||||
chat_id = __chat_id__ or "default"
|
chat_id = __chat_id__ or "default"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue