internal/agent/tools/fetch.go 🔗
@@ -18,7 +18,7 @@ import (
const (
FetchToolName = "fetch"
- MaxFetchSize = 1 * 1024 * 1024 // 1MB
+ MaxFetchSize = 100 * 1024 // 100KB
)
//go:embed fetch.md
Andrey Nering created
Some models like Kimi K2.5 and GLM 5 simply don't handle well that many
content. When a big page or JSON API is fetch, it can break Crush
sessions.
We're drastically reducing the truncation size here, to 1/10 of what we
had before. It may look too much at first look, but 100KB it's actually
very reasonable. For example, the entire Task guide, which is
significantly large, is only 61KB:
https://taskfile.dev/docs/guide.md
internal/agent/tools/fetch.go | 2 +-
internal/agent/tools/fetch.md | 4 ++--
internal/agent/tools/view.go | 2 +-
internal/agent/tools/view.md | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
@@ -18,7 +18,7 @@ import (
const (
FetchToolName = "fetch"
- MaxFetchSize = 1 * 1024 * 1024 // 1MB
+ MaxFetchSize = 100 * 1024 // 100KB
)
//go:embed fetch.md
@@ -1,4 +1,4 @@
-Fetch raw content from a URL as text, markdown, or html (max 5MB); no AI processing. For analysis or extraction use agentic_fetch.
+Fetch raw content from a URL as text, markdown, or html (max 100KB); no AI processing. For analysis or extraction use agentic_fetch.
<when_to_use>
Use this tool when you need:
@@ -29,7 +29,7 @@ DO NOT use this tool when you need to:
</features>
<limitations>
-- Max response size: 5MB
+- Max response size: 100KB
- Only supports HTTP and HTTPS protocols
- Cannot handle authentication or cookies
- Some websites may block automated requests
@@ -53,7 +53,7 @@ type ViewResponseMetadata struct {
const (
ViewToolName = "view"
- MaxViewSize = 1 * 1024 * 1024 // 1MB
+ MaxViewSize = 100 * 1024 // 100KB
DefaultReadLimit = 2000
MaxLineLength = 2000
)
@@ -1,4 +1,4 @@
-Read a file by path with line numbers; supports offset and line limit (default 2000, max 5MB); renders images (PNG, JPEG, GIF, BMP, SVG, WebP); use ls for directories.
+Read a file by path with line numbers; supports offset and line limit (default 2000, max 100KB); renders images (PNG, JPEG, GIF, BMP, SVG, WebP); use ls for directories.
<usage>
- Provide file path to read
@@ -18,7 +18,7 @@ Read a file by path with line numbers; supports offset and line limit (default 2
</features>
<limitations>
-- Max file size: 5MB
+- Max file size: 100KB
- Default limit: 2000 lines
- Lines >2000 chars truncated
- Binary files (except images) cannot be displayed