Skip to content

The agent that grows with you

feat: browser snapshots drop LLM summarization — truncate-and-store like web_extract; auxiliary.web_extract slot removed

Tekniuma75ea37dc5a8
diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.py
index dba8f840ed6..4cc50167025 100644
--- a/agent/auxiliary_client.py
+++ b/agent/auxiliary_client.py
@@ -195,7 +195,7 @@ def _resolve_aux_verify(base_url: Optional[str]) -> Any:
"""Resolve httpx ``verify`` for an auxiliary-client base_url.
Mirrors the main client's TLS resolution so auxiliary calls (compression,
- vision, web_extract, title generation, etc.) honor per-provider
+ vision, title generation, etc.) honor per-provider
``ssl_ca_cert`` / ``ssl_verify`` config and the ``HERMES_CA_BUNDLE`` /
``SSL_CERT_FILE`` env conventions. Best-effort: any failure falls back to
the httpx/certifi default (``True``).
@@ -5614,7 +5614,7 @@ def _task_minimum_context_length(task: Optional[str]) -> Optional[int]:
Only ``compression`` carries an explicit minimum today (the same
``MINIMUM_CONTEXT_LENGTH`` (64K) floor that
``check_compression_model_feasibility`` already enforces at startup).
- Other tasks (``vision``, ``title_generation``, ``web_extract``,
+ Other tasks (``vision``, ``title_generation``,
``skills_hub``, ``mcp``, ``session_search``) return ``None`` — they
have no per-task context floor and the runtime chain must remain
permissive for them.
@@ -7182,11 +7182,11 @@ def get_text_auxiliary_client(
"""Return (client, default_model_slug) for text-only auxiliary tasks.
Args:
- task: Optional task name ("compression", "web_extract") to check
+ task: Optional task name ("compression", "skills_hub") to check
for a task-specific provider override.
Callers may override the returned model via config.yaml
- (e.g. auxiliary.compression.model, auxiliary.web_extract.model).
+ (e.g. auxiliary.compression.model, auxiliary.skills_hub.model).
"""
provider, model, base_url, api_key, api_mode = _resolve_task_provider_model(task or None)
return resolve_provider_client(
@@ -9439,7 +9439,7 @@ def _call_llm_impl(
handles auth, request formatting, and model-specific arg adjustments.
Args:
- task: Auxiliary task name ("compression", "vision", "web_extract",
+ task: Auxiliary task name ("compression", "vision",
"session_search", "skills_hub", "mcp", "title_generation").
Reads provider:model from config/env. Ignored if provider is set.
provider: Explicit provider override.
diff --git a/agent/tool_executor.py b/agent/tool_executor.py
index 69bcca6075a..5eeef6f4d55 100644
--- a/agent/tool_executor.py
+++ b/agent/tool_executor.py
@@ -123,8 +123,8 @@ def _budget_for_agent(agent) -> BudgetConfig:
# Mirrors the constant in ``run_agent`` for tests/imports that look here.
_MAX_TOOL_WORKERS = 8
_DEFAULT_IMAGE_PARALLEL_REQUESTS = 4
-# Keep this above the stock auxiliary.web_extract timeout (360s) so the batch
-# guard does not preempt a slow-but-valid summarization attempt.
+# Generous ceiling for slow-but-valid tool work (large page fetches, slow
+# remote backends) so the batch guard does not preempt a legitimate attempt.
_DEFAULT_CONCURRENT_TOOL_TIMEOUT_S = 420.0
# Upper bound a concurrent worker will wait at the start-order gate for all
# earlier-ordered tools to advance before proceeding out of order. Long enough
diff --git a/apps/desktop/src/app/settings/model-settings.tsx b/apps/desktop/src/app/settings/model-settings.tsx
index 48210fcf95e..a088aaf8bae 100644
--- a/apps/desktop/src/app/settings/model-settings.tsx
+++ b/apps/desktop/src/app/settings/model-settings.tsx
@@ -109,7 +109,6 @@ interface AuxTaskMeta {
const AUX_TASKS: readonly AuxTaskMeta[] = [
{ key: 'vision' },
- { key: 'web_extract' },
{ key: 'compression' },
{ key: 'skills_hub' },
{ key: 'approval' },
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index b18011c3fc2..474effdc28f 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -866,10 +866,6 @@ export const ar = defineLocale({
label: 'الرؤية',
hint: 'تحليل الصور'
},
- web_extract: {
- label: 'استخراج الويب',
- hint: 'تلخيص الصفحات'
- },
compression: {
label: 'الضغط',
hint: 'ضغط السياق'
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 4cc0e93c655..aa1114eae62 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1074,7 +1074,6 @@ export const en: Translations = {
notInCatalog: "isn't in this provider's model list — calls may fall back to a backup.",
tasks: {
vision: { label: 'Vision', hint: 'Image analysis' },
- web_extract: { label: 'Web extract', hint: 'Page summarization' },
compression: { label: 'Compression', hint: 'Context compaction' },
skills_hub: { label: 'Skills hub', hint: 'Skill search' },
approval: { label: 'Approval', hint: 'Smart auto-approve' },
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 1bdbb57c062..721f2b0c03f 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -996,7 +996,6 @@ export const ja = defineLocale({
providerDefault: '(プロバイダーのデフォルト)',
tasks: {
vision: { label: 'ビジョン', hint: '画像分析' },
- web_extract: { label: 'ウェブ抽出', hint: 'ページの要約' },
compression: { label: '圧縮', hint: 'コンテキストの圧縮' },
skills_hub: { label: 'スキルハブ', hint: 'スキル検索' },
approval: { label: '承認', hint: 'スマート自動承認' },
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 18b9693b687..24aac3e9780 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -962,7 +962,6 @@ export const zhHant = defineLocale({
providerDefault: '(提供方預設)',
tasks: {
vision: { label: '視覺', hint: '圖片分析' },
- web_extract: { label: '網頁擷取', hint: '頁面摘要' },
compression: { label: '壓縮', hint: '上下文壓縮' },
skills_hub: { label: '技能中心', hint: '技能搜尋' },
approval: { label: '核准', hint: '智慧自動核准' },
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index c98d9194ad8..edb2d9c2d55 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -1269,7 +1269,6 @@ export const zh: Translations = {
notInCatalog: '不在该提供方的模型列表中 — 调用可能回退到备用模型。',
tasks: {
vision: { label: '视觉', hint: '图片分析' },
- web_extract: { label: '网页提取', hint: '页面总结' },
compression: { label: '压缩', hint: '上下文压缩' },
skills_hub: { label: '技能中心', hint: '技能搜索' },
approval: { label: '审批', hint: '智能自动批准' },
diff --git a/cli.py b/cli.py
index 0e43c1cde27..97c9b6edf47 100644
--- a/cli.py
+++ b/cli.py
@@ -529,12 +529,6 @@ def load_cli_config() -> Dict[str, Any]:
"base_url": "",
"api_key": "",
},
- "web_extract": {
- "provider": "auto",
- "model": "",
- "base_url": "",
- "api_key": "",
- },
},
"delegation": {
"max_iterations": 45, # Max tool-calling turns per child agent
@@ -735,12 +729,6 @@ def load_cli_config() -> Dict[str, Any]:
"base_url": "AUXILIARY_VISION_BASE_URL",
"api_key": "AUXILIARY_VISION_API_KEY",
},
- "web_extract": {
- "provider": "AUXILIARY_WEB_EXTRACT_PROVIDER",
- "model": "AUXILIARY_WEB_EXTRACT_MODEL",
- "base_url": "AUXILIARY_WEB_EXTRACT_BASE_URL",
- "api_key": "AUXILIARY_WEB_EXTRACT_API_KEY",
- },
"approval": {
"provider": "AUXILIARY_APPROVAL_PROVIDER",
"model": "AUXILIARY_APPROVAL_MODEL",
diff --git a/gateway/run.py b/gateway/run.py
index e7b5167ff49..71aef94ef7d 100644
--- a/gateway/run.py
+++ b/gateway/run.py
@@ -2411,11 +2411,11 @@ if _config_path.exists():
os.environ[_env_var] = str(_val)
# Compression config is read directly from config.yaml by run_agent.py
# and auxiliary_client.py — no env var bridging needed.
- # Auxiliary model/direct-endpoint overrides (vision, web_extract,
+ # Auxiliary model/direct-endpoint overrides (vision,
# approval, plus any plugin-registered auxiliary tasks).
# Each task has provider/model/base_url/api_key; bridge non-default
# values to env vars named AUXILIARY_<KEY_UPPER>_*. The legacy
- # hard-coded list (vision/web_extract/approval) is replaced by a
+ # hard-coded list (vision/approval) is replaced by a
# dynamic loop so plugin-registered tasks benefit from the same
# config→env bridging without core knowing about each one.
_auxiliary_cfg = _cfg.get("auxiliary", {})
@@ -2423,7 +2423,7 @@ if _config_path.exists():
# Built-in tasks that previously had explicit env-var bridging.
# Kept here as the canonical bridged set; plugin tasks are added
# below via the plugin auxiliary registry.
- _aux_bridged_keys = {"vision", "web_extract", "approval"}
+ _aux_bridged_keys = {"vision", "approval"}
try:
from hermes_cli.plugins import get_plugin_auxiliary_tasks
for _entry in get_plugin_auxiliary_tasks():
diff --git a/hermes_cli/config.py b/hermes_cli/config.py
index e06738662ca..a28452d07f8 100644
--- a/hermes_cli/config.py
+++ b/hermes_cli/config.py
@@ -4778,7 +4778,6 @@ def show_config():
auxiliary = config.get('auxiliary', {})
aux_tasks = {
"Vision": auxiliary.get('vision', {}),
- "Web extract": auxiliary.get('web_extract', {}),
}
has_overrides = any(
t.get('provider', 'auto') != 'auto' or t.get('model', '')
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 34600cebe2c..05b36c0ce29 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -1070,15 +1070,11 @@ DEFAULT_CONFIG = {
"reasoning_effort": "", # per-task thinking level: none|minimal|low|medium|high|xhigh|max|ultra (empty = provider default)
"download_timeout": 30, # seconds — image HTTP download timeout; increase for slow connections
},
- "web_extract": {
- "provider": "auto",
- "model": "",
- "base_url": "",
- "api_key": "",
- "timeout": 360, # seconds (6min) — per-attempt LLM summarization timeout; increase for slow local models
- "extra_body": {},
- "reasoning_effort": "", # per-task thinking level: none|minimal|low|medium|high|xhigh|max|ultra (empty = provider default)
- },
+ # Note: web_extract no longer uses an auxiliary LLM — pages are
+ # truncate-and-stored with a read_file pointer (no summarization),
+ # and browser snapshots follow the same pattern. The old
+ # ``auxiliary.web_extract.*`` block was removed here. Existing
+ # values in user config.yaml files are harmless leftovers and ignored.
"compression": {
"provider": "auto",
"model": "",
diff --git a/hermes_cli/main.py b/hermes_cli/main.py
index fbcc01e42e1..e9e08c8d6be 100644
--- a/hermes_cli/main.py
+++ b/hermes_cli/main.py
@@ -4096,7 +4096,6 @@ def _clear_stale_openai_base_url():
_AUX_TASKS: list[tuple[str, str, str]] = [
("vision", "Vision", "image/screenshot analysis"),
("compression", "Compression", "context summarization"),
- ("web_extract", "Web extract", "web page summarization"),
("approval", "Approval", "smart command approval"),
("mcp", "MCP", "MCP tool reasoning"),
("title_generation", "Title generation", "session titles"),
diff --git a/hermes_cli/plugins.py b/hermes_cli/plugins.py
index 03f46cb4f30..d02ee62fb96 100644
--- a/hermes_cli/plugins.py
+++ b/hermes_cli/plugins.py
@@ -3045,7 +3045,7 @@ class PluginContext:
Args:
key: stable task key (snake_case). Used in config ``auxiliary.<key>``
and env vars ``AUXILIARY_<KEY_UPPER>_*``. Must not shadow a
- built-in task key (vision, compression, web_extract, approval,
+ built-in task key (vision, compression, approval,
mcp, title_generation, skills_hub, curator).
display_name: human-readable name shown in the picker.
description: short one-line description shown next to the name.
diff --git a/hermes_cli/web_server.py b/hermes_cli/web_server.py
index bbe3af488a8..f0198f2ded6 100644
--- a/hermes_cli/web_server.py
+++ b/hermes_cli/web_server.py
@@ -7276,7 +7276,6 @@ def get_model_info(profile: Optional[str] = None):
# in hermes_cli/config.py — listed here for deterministic ordering in the UI.
_AUX_TASK_SLOTS: Tuple[str, ...] = (
"vision",
- "web_extract",
"compression",
"skills_hub",
"approval",
diff --git a/tests/agent/test_auxiliary_config_bridge.py b/tests/agent/test_auxiliary_config_bridge.py
index 02241d42dbe..adff241e584 100644
--- a/tests/agent/test_auxiliary_config_bridge.py
+++ b/tests/agent/test_auxiliary_config_bridge.py
@@ -25,8 +25,8 @@ def _run_auxiliary_bridge(config_dict, monkeypatch):
for key in (
"AUXILIARY_VISION_PROVIDER", "AUXILIARY_VISION_MODEL",
"AUXILIARY_VISION_BASE_URL", "AUXILIARY_VISION_API_KEY",
- "AUXILIARY_WEB_EXTRACT_PROVIDER", "AUXILIARY_WEB_EXTRACT_MODEL",
- "AUXILIARY_WEB_EXTRACT_BASE_URL", "AUXILIARY_WEB_EXTRACT_API_KEY",
+ "AUXILIARY_APPROVAL_PROVIDER", "AUXILIARY_APPROVAL_MODEL",
+ "AUXILIARY_APPROVAL_BASE_URL", "AUXILIARY_APPROVAL_API_KEY",
):
monkeypatch.delenv(key, raising=False)
@@ -42,11 +42,11 @@ def _run_auxiliary_bridge(config_dict, monkeypatch):
"base_url": "AUXILIARY_VISION_BASE_URL",
"api_key": "AUXILIARY_VISION_API_KEY",
},
- "web_extract": {
- "provider": "AUXILIARY_WEB_EXTRACT_PROVIDER",
- "model": "AUXILIARY_WEB_EXTRACT_MODEL",
- "base_url": "AUXILIARY_WEB_EXTRACT_BASE_URL",
- "api_key": "AUXILIARY_WEB_EXTRACT_API_KEY",
+ "approval": {
+ "provider": "AUXILIARY_APPROVAL_PROVIDER",
+ "model": "AUXILIARY_APPROVAL_MODEL",
+ "base_url": "AUXILIARY_APPROVAL_BASE_URL",
+ "api_key": "AUXILIARY_APPROVAL_API_KEY",
},
}
for task_key, env_map in aux_task_env.items():
@@ -85,15 +85,15 @@ class TestAuxiliaryConfigBridge:
# auto provider should not be set
assert os.environ.get("AUXILIARY_VISION_PROVIDER") is None
- def test_web_extract_bridged(self, monkeypatch):
+ def test_approval_bridged(self, monkeypatch):
config = {
"auxiliary": {
- "web_extract": {"provider": "nous", "model": "gemini-2.5-flash"},
+ "approval": {"provider": "nous", "model": "gemini-2.5-flash"},
}
}
_run_auxiliary_bridge(config, monkeypatch)
- assert os.environ.get("AUXILIARY_WEB_EXTRACT_PROVIDER") == "nous"
- assert os.environ.get("AUXILIARY_WEB_EXTRACT_MODEL") == "gemini-2.5-flash"
+ assert os.environ.get("AUXILIARY_APPROVAL_PROVIDER") == "nous"
+ assert os.environ.get("AUXILIARY_APPROVAL_MODEL") == "gemini-2.5-flash"
@@ -103,14 +103,14 @@ class TestAuxiliaryConfigBridge:
config = {
"auxiliary": {
"vision": {"provider": "openrouter", "model": ""},
- "web_extract": {"provider": "auto", "model": "custom-llm"},
+ "approval": {"provider": "auto", "model": "custom-llm"},
}
}
_run_auxiliary_bridge(config, monkeypatch)
assert os.environ.get("AUXILIARY_VISION_PROVIDER") == "openrouter"
assert os.environ.get("AUXILIARY_VISION_MODEL") is None
- assert os.environ.get("AUXILIARY_WEB_EXTRACT_PROVIDER") is None
- assert os.environ.get("AUXILIARY_WEB_EXTRACT_MODEL") == "custom-llm"
+ assert os.environ.get("AUXILIARY_APPROVAL_PROVIDER") is None
+ assert os.environ.get("AUXILIARY_APPROVAL_MODEL") == "custom-llm"
@@ -145,8 +145,10 @@ class TestGatewayBridgeCodeParity:
# Built-in bridged keys present
assert "_aux_bridged_keys" in content
assert '"vision"' in content
- assert '"web_extract"' in content
assert '"approval"' in content
+ # web_extract no longer uses an auxiliary LLM (truncate-and-store) —
+ # it must NOT be in the bridged set.
+ assert '_aux_bridged_keys = {"vision", "approval"}' in content
# Plugin-aux-task discovery hooked into bridging
assert "get_plugin_auxiliary_tasks" in content
@@ -214,13 +216,10 @@ class TestDefaultConfigShape:
assert vision["provider"] == "auto"
assert vision["model"] == ""
- def test_web_extract_task_structure(self):
+ def test_web_extract_task_removed(self):
+ """web_extract no longer summarizes via LLM — no aux slot."""
from hermes_cli.config import DEFAULT_CONFIG
- web = DEFAULT_CONFIG["auxiliary"]["web_extract"]
- assert "provider" in web
- assert "model" in web
- assert web["provider"] == "auto"
- assert web["model"] == ""
+ assert "web_extract" not in DEFAULT_CONFIG["auxiliary"]
# ── CLI defaults parity ─────────────────────────────────────────────────────
diff --git a/tests/tools/test_browser_content_none_guard.py b/tests/tools/test_browser_content_none_guard.py
index 0f84f90d33a..4256ec2f4c7 100644
--- a/tests/tools/test_browser_content_none_guard.py
+++ b/tests/tools/test_browser_content_none_guard.py
@@ -1,15 +1,15 @@
"""Tests for None guard on browser_tool LLM response content.
-browser_tool.py has two call sites that access response.choices[0].message.content
-without checking for None — _extract_relevant_content (line 996) and
-browser_vision (line 1626). When reasoning-only models (DeepSeek-R1, QwQ)
-return content=None, these produce null snapshots or null analysis.
+browser_tool.py's browser_vision accesses response.choices[0].message.content
+which can be None when reasoning-only models (DeepSeek-R1, QwQ) return
+content=None. These tests verify the site is guarded.
-These tests verify both sites are guarded.
+The old _extract_relevant_content snapshot-summarization path was removed —
+oversized snapshots now always truncate-and-store (no auxiliary LLM), so its
+None-guard tests are gone with it.
"""
import types
-from unittest.mock import patch
# ── helpers ────────────────────────────────────────────────────────────────
@@ -21,35 +21,7 @@ def _make_response(content):
return types.SimpleNamespace(choices=[choice])
-# ── _extract_relevant_content (line 996) ──────────────────────────────────
-
-class TestExtractRelevantContentNoneGuard:
- """tools/browser_tool.py — _extract_relevant_content()"""
-
- def test_none_content_falls_back_to_truncated(self):
- """When LLM returns None content, should fall back to truncated snapshot."""
- with patch("tools.browser_tool.call_llm", return_value=_make_response(None)), \
- patch("tools.browser_tool._get_extraction_model", return_value="test-model"):
- from tools.browser_tool import _extract_relevant_content
- result = _extract_relevant_content("This is a long snapshot text", "find the button")
-
- assert result is not None
- assert isinstance(result, str)
- assert len(result) > 0
-
-
- def test_empty_string_content_falls_back(self):
- """Empty string content should also fall back to truncated."""
- with patch("tools.browser_tool.call_llm", return_value=_make_response(" ")), \
- patch("tools.browser_tool._get_extraction_model", return_value="test-model"):
- from tools.browser_tool import _extract_relevant_content
- result = _extract_relevant_content("This is a long snapshot text", "task")
-
- assert result is not None
- assert len(result) > 0
-
-
-# ── browser_vision (line 1626) ────────────────────────────────────────────
+# ── browser_vision ─────────────────────────────────────────────────────────
class TestBrowserVisionNoneGuard:
"""tools/browser_tool.py — browser_vision() analysis extraction"""
@@ -83,17 +55,15 @@ class TestBrowserSourceLinesAreGuarded:
with open(os.path.join(base, "tools", "browser_tool.py")) as f:
return f.read()
- def test_extract_relevant_content_guarded(self):
- src = self._read_file()
- # The old unguarded pattern should NOT exist
- assert "return response.choices[0].message.content\n" not in src, (
- "browser_tool.py _extract_relevant_content still has unguarded "
- ".content return — apply None guard"
- )
-
def test_browser_vision_guarded(self):
src = self._read_file()
assert "analysis = response.choices[0].message.content\n" not in src, (
"browser_tool.py browser_vision still has unguarded "
".content assignment — apply None guard"
)
+
+ def test_snapshot_llm_summarization_removed(self):
+ """Snapshots must not route through an auxiliary LLM anymore."""
+ src = self._read_file()
+ assert "_extract_relevant_content" not in src
+ assert "_get_extraction_model" not in src
diff --git a/tests/tools/test_browser_hardening.py b/tests/tools/test_browser_hardening.py
index 185bd7c73ef..b015797f320 100644
--- a/tests/tools/test_browser_hardening.py
+++ b/tests/tools/test_browser_hardening.py
@@ -229,23 +229,23 @@ class TestTruncateSnapshot:
content = Path(stored).read_text(encoding="utf-8")
assert "STOREDSNAPSHOTSECRET" not in content
- def test_extract_relevant_content_appends_stored_pointer(self):
- """LLM-summarized snapshots also point at the stored full text."""
- from unittest.mock import MagicMock
- from tools.browser_tool import _extract_relevant_content
+ def test_truncated_snapshot_appends_stored_pointer(self):
+ """Truncated snapshots point at the stored full text for read_file paging."""
+ from tools.browser_tool import _truncate_snapshot
snapshot = "\n".join(f'- item "Element {i}" [ref=e{i}]' for i in range(400))
- mock_resp = MagicMock()
- mock_resp.choices = [MagicMock()]
- mock_resp.choices[0].message.content = "Summary with button [ref=e5]"
-
- with patch("tools.browser_tool.call_llm", return_value=mock_resp):
- result = _extract_relevant_content(snapshot, "find the button")
+ result = _truncate_snapshot(snapshot, max_chars=500)
- assert result.startswith("Summary with button")
- assert "Full snapshot" in result
+ assert "truncated" in result.lower()
assert "read_file" in result
+ def test_no_llm_summarization_path_remains(self):
+ """Snapshots must never route through an auxiliary LLM (truncate-and-store only)."""
+ import tools.browser_tool as bt
+
+ assert not hasattr(bt, "_extract_relevant_content")
+ assert not hasattr(bt, "_get_extraction_model")
+
# ---------------------------------------------------------------------------
# Scroll optimization
diff --git a/tests/tools/test_browser_secret_exfil.py b/tests/tools/test_browser_secret_exfil.py
index c1be78ae6c4..5a15d310a1a 100644
--- a/tests/tools/test_browser_secret_exfil.py
+++ b/tests/tools/test_browser_secret_exfil.py
@@ -199,65 +199,39 @@ class TestWebExtractSecretExfil:
class TestBrowserSnapshotRedaction:
- """Verify secrets in page snapshots are redacted before auxiliary LLM calls."""
+ """Verify secrets in stored/truncated page snapshots are redacted.
- def test_extract_relevant_content_redacts_secrets(self):
- """Snapshot containing secrets should be redacted before call_llm."""
- from tools.browser_tool import _extract_relevant_content
+ The old LLM summarization path (_extract_relevant_content) is gone —
+ oversized snapshots always truncate-and-store. The security boundary is
+ now the stored file (force-redacted in _store_full_snapshot) and the
+ returned view (_redact_browser_output at the call sites).
+ """
+
+ def test_stored_snapshot_redacts_secrets(self):
+ """Secrets in a snapshot must be masked in the stored full-text file."""
+ from pathlib import Path
+ from tools.browser_tool import _store_full_snapshot
- # Build a snapshot with a fake Anthropic-style key embedded
fake_key = "sk-" + "FAKESECRETVALUE1234567890ABCDEF"
snapshot_with_secret = (
"heading: Dashboard Settings\n"
f"text: API Key: {fake_key}\n"
"button [ref=e5]: Save\n"
)
-
- captured_prompts = []
-
- def mock_call_llm(**kwargs):
- prompt = kwargs["messages"][0]["content"]
- captured_prompts.append(prompt)
- mock_resp = MagicMock()
- mock_resp.choices = [MagicMock()]
- mock_resp.choices[0].message.content = "Dashboard with save button [ref=e5]"
- return mock_resp
-
- with patch("tools.browser_tool.call_llm", mock_call_llm):
- _extract_relevant_content(snapshot_with_secret, "check settings")
-
- assert len(captured_prompts) == 1
- # The middle portion of the key must not appear in the prompt
- assert "FAKESECRETVALUE1234567890" not in captured_prompts[0]
+ stored = _store_full_snapshot(snapshot_with_secret)
+ assert stored is not None
+ content = Path(stored).read_text(encoding="utf-8")
+ assert "FAKESECRETVALUE1234567890" not in content
# Non-secret content should survive
- assert "Dashboard" in captured_prompts[0]
- assert "ref=e5" in captured_prompts[0]
-
- def test_extract_relevant_content_no_task_redacts_secrets(self):
- """Snapshot without user_task should also redact secrets."""
- from tools.browser_tool import _extract_relevant_content
-
- fake_key = "sk-" + "ANOTHERFAKEKEY99887766554433"
- snapshot_with_secret = (
- f"text: OPENAI_API_KEY={fake_key}\n"
- "link [ref=e2]: Home\n"
- )
-
- captured_prompts = []
-
- def mock_call_llm(**kwargs):
- prompt = kwargs["messages"][0]["content"]
- captured_prompts.append(prompt)
- mock_resp = MagicMock()
- mock_resp.choices = [MagicMock()]
- mock_resp.choices[0].message.content = "Page with home link [ref=e2]"
- return mock_resp
+ assert "Dashboard" in content
+ assert "ref=e5" in content
- with patch("tools.browser_tool.call_llm", mock_call_llm):
- _extract_relevant_content(snapshot_with_secret)
+ def test_no_llm_summarization_entry_points(self):
+ """The auxiliary-LLM snapshot path must not exist anymore."""
+ import tools.browser_tool as bt
- assert len(captured_prompts) == 1
- assert "ANOTHERFAKEKEY99887766" not in captured_prompts[0]
+ assert not hasattr(bt, "_extract_relevant_content")
+ assert not hasattr(bt, "_get_extraction_model")
class TestCamofoxAnnotationRedaction:
diff --git a/tools/browser_camofox.py b/tools/browser_camofox.py
index 432ca85f0b3..b5cc1be4573 100644
--- a/tools/browser_camofox.py
+++ b/tools/browser_camofox.py
@@ -628,7 +628,11 @@ def _camofox_private_page_block(session: Dict[str, Any], task_id: Optional[str],
def camofox_snapshot(full: bool = False, task_id: Optional[str] = None,
user_task: Optional[str] = None) -> str:
- """Get accessibility tree snapshot from Camofox."""
+ """Get accessibility tree snapshot from Camofox.
+
+ ``user_task`` is deprecated and ignored — oversized snapshots always
+ truncate-and-store (no LLM summarization), same as the main browser tool.
+ """
try:
session = _get_session(task_id)
if not session["tab_id"]:
@@ -646,18 +650,16 @@ def camofox_snapshot(full: bool = False, task_id: Optional[str] = None,
snapshot = data.get("snapshot", "")
refs_count = data.get("refsCount", 0)
- # Apply same summarization logic as the main browser tool
+ # Same truncate-and-store handling as the main browser tool: cut at
+ # line boundaries, store the full tree to cache/web, append a
+ # read_file pointer.
from tools.browser_tool import (
SNAPSHOT_SUMMARIZE_THRESHOLD,
- _extract_relevant_content,
_truncate_snapshot,
)
if len(snapshot) > SNAPSHOT_SUMMARIZE_THRESHOLD:
- if user_task:
- snapshot = _extract_relevant_content(snapshot, user_task)
- else:
- snapshot = _truncate_snapshot(snapshot)
+ snapshot = _truncate_snapshot(snapshot)
return json.dumps({
"success": True,
diff --git a/tools/browser_tool.py b/tools/browser_tool.py
index dd97238f552..fa6d6b63252 100644
--- a/tools/browser_tool.py
+++ b/tools/browser_tool.py
@@ -289,7 +289,7 @@ MIN_FIRST_OPEN_TIMEOUT = 120
SNAPSHOT_SUMMARIZE_THRESHOLD = 15000
# Hard ceiling on the full-snapshot file written to cache/web when a snapshot
-# is truncated or LLM-summarized. Mirrors web_tools.MAX_STORED_TEXT_CHARS —
+# is truncated. Mirrors web_tools.MAX_STORED_TEXT_CHARS —
# the model only ever sees the truncated view; the stored copy exists for
# read_file paging and must not write unbounded bytes to disk.
MAX_STORED_SNAPSHOT_CHARS = 2_000_000
@@ -444,11 +444,6 @@ def _get_vision_model() -> Optional[str]:
return os.getenv("AUXILIARY_VISION_MODEL", "").strip() or None
-def _get_extraction_model() -> Optional[str]:
- """Model for page snapshot text summarization — same as web_extract."""
- return os.getenv("AUXILIARY_WEB_EXTRACT_MODEL", "").strip() or None
-
-
def _resolve_cdp_override(cdp_url: str) -> str:
"""Normalize a user-supplied CDP endpoint into a concrete connectable URL.
@@ -3165,73 +3160,6 @@ def _store_full_snapshot(snapshot_text: str) -> Optional[str]:
return None
-def _extract_relevant_content(
- snapshot_text: str,
- user_task: Optional[str] = None
-) -> str:
- """Use LLM to extract relevant content from a snapshot based on the user's task.
-
- The full snapshot is stored to cache/web first (summarization is lossy —
- the pointer lets the agent read anything the summary dropped). Falls back
- to simple truncation when no auxiliary text model is configured.
- """
- stored_path = _store_full_snapshot(snapshot_text)
- stored_note = (
- f'\n\n[Summarized from a {len(snapshot_text):,}-char snapshot. Full snapshot '
- f'saved to: {stored_path} — read it with read_file if anything is missing.]'
- ) if stored_path else ""
- if user_task:
- extraction_prompt = (
- f"You are a content extractor for a browser automation agent.\n\n"
- f"The user's task is: {user_task}\n\n"
- f"Given the following page snapshot (accessibility tree representation), "
- f"extract and summarize the most relevant information for completing this task. Focus on:\n"
- f"1. Interactive elements (buttons, links, inputs) that might be needed\n"
- f"2. Text content relevant to the task (prices, descriptions, headings, important info)\n"
- f"3. Navigation structure if relevant\n\n"
- f"Keep ref IDs (like [ref=e5]) for interactive elements so the agent can use them.\n\n"
- f"Page Snapshot:\n{snapshot_text}\n\n"
- f"Provide a concise summary that preserves actionable information and relevant content."
- )
- else:
- extraction_prompt = (
- f"Summarize this page snapshot, preserving:\n"
- f"1. All interactive elements with their ref IDs (like [ref=e5])\n"
- f"2. Key text content and headings\n"
- f"3. Important information visible on the page\n\n"
- f"Page Snapshot:\n{snapshot_text}\n\n"
- f"Provide a concise summary focused on interactive elements and key content."
- )
-
- # Redact secrets from snapshot before sending to auxiliary LLM.
- # Without this, a page displaying env vars or API keys would leak
- # secrets to the extraction model before run_agent.py's general
- # redaction layer ever sees the tool result.
- from agent.redact import redact_sensitive_text
- extraction_prompt = redact_sensitive_text(extraction_prompt)
-
- try:
- call_kwargs = {
- "task": "web_extract",
- "messages": [{"role": "user", "content": extraction_prompt}],
- "max_tokens": 4000,
- "temperature": 0.1,
- }
- model = _get_extraction_model()
- if model:
- call_kwargs["model"] = model
- response = _lazy_call_llm(**call_kwargs)
- extracted = (response.choices[0].message.content or "").strip()
- if not extracted:
- # _truncate_snapshot stores its own pointer (dedupes to the same
- # cache file by content hash), so return it without stored_note.
- return _truncate_snapshot(snapshot_text)
- # Redact any secrets the auxiliary LLM may have echoed back.
- return redact_sensitive_text(extracted) + stored_note
- except Exception:
- return _truncate_snapshot(snapshot_text)
-
-
def _truncate_snapshot(snapshot_text: str, max_chars: int = SNAPSHOT_SUMMARIZE_THRESHOLD) -> str:
"""Structure-aware truncation for snapshots.
@@ -3570,14 +3498,15 @@ def browser_snapshot(
Args:
full: If True, return complete snapshot. If False, return compact view.
task_id: Task identifier for session isolation
- user_task: The user's current task (for task-aware extraction)
+ user_task: Deprecated — accepted for call-site compatibility, unused.
+ Oversized snapshots always truncate-and-store (no LLM pass).
Returns:
JSON string with page snapshot
"""
if _is_camofox_mode():
from tools.browser_camofox import camofox_snapshot
- return camofox_snapshot(full, task_id, user_task)
+ return camofox_snapshot(full, task_id)
effective_task_id = _last_session_key(task_id or "default")
@@ -3624,10 +3553,11 @@ def browser_snapshot(
except Exception as _url_exc:
logger.debug("browser_snapshot: URL safety check failed (%s)", _url_exc)
- # Check if snapshot needs summarization
- if len(snapshot_text) > SNAPSHOT_SUMMARIZE_THRESHOLD and user_task:
- snapshot_text = _extract_relevant_content(snapshot_text, user_task)
- elif len(snapshot_text) > SNAPSHOT_SUMMARIZE_THRESHOLD:
+ # Oversized snapshots truncate at line boundaries; the full
+ # accessibility tree is stored to cache/web and the appended note
+ # tells the agent how to page through it with read_file (same
+ # pattern as web_extract — no LLM summarization).
+ if len(snapshot_text) > SNAPSHOT_SUMMARIZE_THRESHOLD:
snapshot_text = _truncate_snapshot(snapshot_text)
response = {
diff --git a/web/src/pages/ModelsPage.tsx b/web/src/pages/ModelsPage.tsx
index 6cda5c6dfc5..86a1a40d2e8 100644
--- a/web/src/pages/ModelsPage.tsx
+++ b/web/src/pages/ModelsPage.tsx
@@ -52,7 +52,6 @@ const PERIODS = [
// Must match _AUX_TASK_SLOTS in hermes_cli/web_server.py.
const AUX_TASKS: readonly { key: string; label: string; hint: string }[] = [
{ key: "vision", label: "Vision", hint: "Image analysis" },
- { key: "web_extract", label: "Web Extract", hint: "Page summarization" },
{ key: "compression", label: "Compression", hint: "Context compaction" },
{ key: "skills_hub", label: "Skills Hub", hint: "Skill search" },
{ key: "approval", label: "Approval", hint: "Smart auto-approve" },
diff --git a/website/docs/reference/environment-variables.md b/website/docs/reference/environment-variables.md
index 6d77c33a2a0..a2069f5ae84 100644
--- a/website/docs/reference/environment-variables.md
+++ b/website/docs/reference/environment-variables.md
@@ -898,10 +898,10 @@ Older configs with `compression.summary_model`, `compression.summary_provider`,
| `AUXILIARY_VISION_MODEL` | Override model for vision tasks |
| `AUXILIARY_VISION_BASE_URL` | Direct OpenAI-compatible endpoint for vision tasks |
| `AUXILIARY_VISION_API_KEY` | API key paired with `AUXILIARY_VISION_BASE_URL` |
-| `AUXILIARY_WEB_EXTRACT_PROVIDER` | Override provider for web extraction/summarization |
-| `AUXILIARY_WEB_EXTRACT_MODEL` | Override model for web extraction/summarization |
-| `AUXILIARY_WEB_EXTRACT_BASE_URL` | Direct OpenAI-compatible endpoint for web extraction/summarization |
-| `AUXILIARY_WEB_EXTRACT_API_KEY` | API key paired with `AUXILIARY_WEB_EXTRACT_BASE_URL` |
+
+:::note
+`AUXILIARY_WEB_EXTRACT_*` variables are obsolete: `web_extract` and browser snapshots no longer use an auxiliary LLM. Long pages and snapshots are truncated deterministically with the full text stored on disk for `read_file` paging.
+:::
For task-specific direct endpoints, Hermes uses the task's configured API key or `OPENAI_API_KEY`. It does not reuse `OPENROUTER_API_KEY` for those custom endpoints.
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index 4feb4fb5cb6..70040621075 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -1159,7 +1159,7 @@ prompt_caching:
## Auxiliary Models
-Hermes uses "auxiliary" models for side tasks like image analysis, web page summarization, browser screenshot analysis, session-title generation, and context compression. By default (`auxiliary.*.provider: "auto"`), Hermes routes every auxiliary task to your **main chat model** — the same provider/model you picked in `hermes model`. You don't need to configure anything to get started, but be aware that on expensive reasoning models (Opus, MiniMax M2.7, etc.) auxiliary tasks add meaningful cost. If you want cheap-and-fast side tasks regardless of your main model, set `auxiliary.<task>.provider` and `auxiliary.<task>.model` explicitly (for example, Gemini Flash on OpenRouter for vision and web extraction).
+Hermes uses "auxiliary" models for side tasks like image analysis, browser screenshot analysis, session-title generation, and context compression. By default (`auxiliary.*.provider: "auto"`), Hermes routes every auxiliary task to your **main chat model** — the same provider/model you picked in `hermes model`. You don't need to configure anything to get started, but be aware that on expensive reasoning models (Opus, MiniMax M2.7, etc.) auxiliary tasks add meaningful cost. If you want cheap-and-fast side tasks regardless of your main model, set `auxiliary.<task>.provider` and `auxiliary.<task>.model` explicitly (for example, Gemini Flash on OpenRouter for vision). (Web extraction is not an auxiliary task: `web_extract` and browser snapshots truncate long content deterministically and store the full text for `read_file` paging — no LLM involved.)
:::note Why "auto" uses your main model
Earlier builds split aggregator users (OpenRouter, Nous Portal) onto a cheap provider-side default. That was surprising — users who paid for an aggregator subscription would see a different model handling their auxiliary traffic. `auto` now uses the main model for everyone, and per-task overrides in `config.yaml` still win (see [Full auxiliary config reference](#full-auxiliary-config-reference) below).
@@ -1174,7 +1174,6 @@ $ hermes model
→ Configure auxiliary models
[ ] vision currently: auto / main model
-[ ] web_extract currently: auto / main model
[ ] title_generation currently: openrouter / google/gemini-3-flash-preview
[ ] tts_audio_tags currently: auto / main model
[ ] compression currently: auto / main model
@@ -1195,7 +1194,7 @@ If you do not want Hermes to auto-generate titles after the first exchange, set
### Stream-only endpoints
-Some OpenAI-compatible endpoints reject non-streaming chat requests outright (e.g. Tencent Copilot returns HTTP 400 `"Non-stream chat request is currently not supported"`). Interactive chat already streams, but auxiliary tasks (title generation, compression, web extraction) use non-streaming calls and would fail on every attempt. Hermes always treats `copilot.tencent.com` as stream-only; for any other such endpoint, list a URL substring under `auxiliary.stream_only_base_urls`:
+Some OpenAI-compatible endpoints reject non-streaming chat requests outright (e.g. Tencent Copilot returns HTTP 400 `"Non-stream chat request is currently not supported"`). Interactive chat already streams, but auxiliary tasks (title generation, compression, vision) use non-streaming calls and would fail on every attempt. Hermes always treats `copilot.tencent.com` as stream-only; for any other such endpoint, list a URL substring under `auxiliary.stream_only_base_urls`:
```yaml
auxiliary:
@@ -1233,7 +1232,7 @@ Auxiliary task blocks additionally accept a `reasoning_effort` knob:
|-----|-------------|---------|
| `reasoning_effort` | Thinking level for that task's LLM calls: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `ultra` | not set (provider default) |
-This is the per-task counterpart of the global `agent.reasoning_effort`: run compression at `low` or vision at `none` to cut side-task latency and cost when your main model is an expensive reasoning model, without touching your main chat behavior. It works on every auxiliary task block (`vision`, `web_extract`, `compression`, `title_generation`, `curator`, `background_review`, ...), across all three auxiliary wire formats (chat completions, Codex Responses, Anthropic Messages). An explicit `extra_body.reasoning` on the same task wins over the shorthand.
+This is the per-task counterpart of the global `agent.reasoning_effort`: run compression at `low` or vision at `none` to cut side-task latency and cost when your main model is an expensive reasoning model, without touching your main chat behavior. It works on every auxiliary task block (`vision`, `compression`, `title_generation`, `curator`, `background_review`, ...), across all three auxiliary wire formats (chat completions, Codex Responses, Anthropic Messages). An explicit `extra_body.reasoning` on the same task wins over the shorthand.
MoA is the one exception: reasoning depth for Mixture-of-Agents is configured **per slot** in the MoA preset (`moa.presets.<name>.reference_models[].reasoning_effort` / `aggregator.reasoning_effort`), not on the `moa_reference`/`moa_aggregator` auxiliary blocks — see [Mixture of Agents](/user-guide/features/mixture-of-agents).
@@ -1279,14 +1278,6 @@ auxiliary:
# every core and starve the event loop; LLM calls stay fully
# concurrent. Minimum 1; values < 1 are ignored.
- # Web page summarization + browser page text extraction
- web_extract:
- provider: "auto"
- model: "" # e.g. "google/gemini-2.5-flash"
- base_url: ""
- api_key: ""
- timeout: 360 # seconds (6min) — per-attempt LLM summarization
-
# Dangerous command approval classifier
approval:
provider: "auto"
@@ -1366,7 +1357,7 @@ auxiliary:
```
:::tip
-Each auxiliary task has a configurable `timeout` (in seconds). Defaults: vision 120s, web_extract 360s, approval 30s, compression 120s. Increase these if you use slow local models for auxiliary tasks. Vision also has a separate `download_timeout` (default 30s) for the HTTP image download — increase this for slow connections or self-hosted image servers.
+Each auxiliary task has a configurable `timeout` (in seconds). Defaults: vision 120s, approval 30s, compression 120s. Increase these if you use slow local models for auxiliary tasks. Vision also has a separate `download_timeout` (default 30s) for the HTTP image download — increase this for slow connections or self-hosted image servers.
:::
:::info
@@ -1399,7 +1390,7 @@ Each entry supports the same three knobs as any auxiliary task config:
| `model` | Model name for that provider |
| `base_url` | (Optional) Custom OpenAI-compatible endpoint |
-`fallback_chain` is available on any auxiliary task — `compression`, `vision`, `web_extract`, `approval`, `skills_hub`, `mcp`, etc.
+`fallback_chain` is available on any auxiliary task — `compression`, `vision`, `approval`, `skills_hub`, `mcp`, etc.
### Limiting auxiliary concurrency
@@ -1561,12 +1552,8 @@ Auxiliary models can also be configured via environment variables. However, `con
| Vision model | `AUXILIARY_VISION_MODEL` |
| Vision endpoint | `AUXILIARY_VISION_BASE_URL` |
| Vision API key | `AUXILIARY_VISION_API_KEY` |
-| Web extract provider | `AUXILIARY_WEB_EXTRACT_PROVIDER` |
-| Web extract model | `AUXILIARY_WEB_EXTRACT_MODEL` |
-| Web extract endpoint | `AUXILIARY_WEB_EXTRACT_BASE_URL` |
-| Web extract API key | `AUXILIARY_WEB_EXTRACT_API_KEY` |
-Compression and fallback model settings are config.yaml-only.
+Compression and fallback model settings are config.yaml-only. (`AUXILIARY_WEB_EXTRACT_*` variables are obsolete — web extraction no longer uses an auxiliary LLM.)
:::tip
Run `hermes config` to see your current auxiliary model settings. Overrides only show up when they differ from the defaults.
diff --git a/website/docs/user-guide/features/browser.md b/website/docs/user-guide/features/browser.md
index f9687772011..85b5a29e113 100644
--- a/website/docs/user-guide/features/browser.md
+++ b/website/docs/user-guide/features/browser.md
@@ -511,7 +511,7 @@ Get a text-based snapshot of the current page's accessibility tree. Returns inte
- **`full=false`** (default): Compact view showing only interactive elements
- **`full=true`**: Complete page content
-Snapshots over 15,000 characters are automatically truncated or summarized by an LLM (the same per-page budget as `web_extract`). When that happens, the complete snapshot is saved to `~/.hermes/cache/web/` and the tool output includes the file path plus a ready-to-use `read_file` call, so the agent can page through the full accessibility tree — including element refs beyond the cut — without re-snapshotting.
+Snapshots over 15,000 characters are automatically truncated at line boundaries (the same per-page budget as `web_extract` — no LLM summarization). When that happens, the complete snapshot is saved to `~/.hermes/cache/web/` and the tool output includes the file path plus a ready-to-use `read_file` call, so the agent can page through the full accessibility tree — including element refs beyond the cut — without re-snapshotting.
### `browser_click`
@@ -743,7 +743,7 @@ If paid features aren't available on your plan, Hermes automatically falls back
## Limitations
- **Text-based interaction** — relies on accessibility tree, not pixel coordinates
-- **Snapshot size** — large pages may be truncated or LLM-summarized at 15,000 characters (matching `web_extract`); the complete snapshot is saved to `~/.hermes/cache/web/` and the output points at it for `read_file` paging
+- **Snapshot size** — large pages are truncated at 15,000 characters (matching `web_extract`; no LLM summarization); the complete snapshot is saved to `~/.hermes/cache/web/` and the output points at it for `read_file` paging
- **Session timeout** — cloud sessions expire based on your provider's plan settings
- **Cost** — cloud sessions consume provider credits; sessions are automatically cleaned up when the conversation ends or after inactivity. Use `/browser connect` for free local browsing.
- **No file downloads** — cannot download files from the browser
diff --git a/website/docs/user-guide/features/fallback-providers.md b/website/docs/user-guide/features/fallback-providers.md
index dbd824954da..cf0610d0f0b 100644
--- a/website/docs/user-guide/features/fallback-providers.md
+++ b/website/docs/user-guide/features/fallback-providers.md
@@ -11,7 +11,7 @@ Hermes Agent has three layers of resilience that keep your sessions running when
1. **[Credential pools](./credential-pools.md)** — rotate across multiple API keys for the *same* provider (tried first)
2. **Primary model fallback** — automatically switches to a *different* provider:model when your main model fails
-3. **Auxiliary task fallback** — independent provider resolution for side tasks like vision, compression, and web extraction
+3. **Auxiliary task fallback** — independent provider resolution for side tasks like vision and compression
Credential pools handle same-provider rotation (e.g., multiple OpenRouter keys). This page covers cross-provider fallback. Both are optional and work independently.
@@ -194,7 +194,6 @@ Hermes uses separate lightweight models for side tasks. Each task has its own pr
| Task | What It Does | Config Key |
|------|-------------|-----------|
| Vision | Image analysis, browser screenshots | `auxiliary.vision` |
-| Web Extract | Web page summarization | `auxiliary.web_extract` |
| Compression | Context compression summaries | `auxiliary.compression` |
| Skills Hub | Skill search and discovery | `auxiliary.skills_hub` |
| MCP | MCP helper operations | `auxiliary.mcp` |
@@ -242,10 +241,6 @@ auxiliary:
base_url: "" # direct endpoint (takes precedence over provider)
api_key: "" # API key for base_url
- web_extract:
- provider: "auto"
- model: ""
-
compression:
provider: "auto"
model: ""
@@ -427,7 +422,6 @@ See [Scheduled Tasks (Cron)](/user-guide/features/cron) for full configuration d
| Auxiliary tasks (any) — auto users | Full auto-detection chain (main agent model first, then provider chain) on capacity errors | `auxiliary.<task>.provider: auto` |
| Auxiliary tasks (any) — explicit provider | `fallback_chain` (if set) → main agent model → warn + raise, on capacity errors only | `auxiliary.<task>.fallback_chain` |
| Vision | Layered (see above) + internal OpenRouter retry | `auxiliary.vision` |
-| Web extraction | Layered (see above) + internal OpenRouter retry | `auxiliary.web_extract` |
| Context compression | Layered (see above); degrades to no-summary if all layers unavailable | `auxiliary.compression` |
| Skills hub | Layered (see above) | `auxiliary.skills_hub` |
| MCP helpers | Layered (see above) | `auxiliary.mcp` |
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md
index d8747e93954..07ae1020d14 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md
@@ -639,10 +639,10 @@ compression:
| `AUXILIARY_VISION_MODEL` | 覆盖视觉任务的模型 |
| `AUXILIARY_VISION_BASE_URL` | 视觉任务的直接 OpenAI 兼容端点 |
| `AUXILIARY_VISION_API_KEY` | 与 `AUXILIARY_VISION_BASE_URL` 配对的 API 密钥 |
-| `AUXILIARY_WEB_EXTRACT_PROVIDER` | 覆盖网页提取/摘要的提供商 |
-| `AUXILIARY_WEB_EXTRACT_MODEL` | 覆盖网页提取/摘要的模型 |
-| `AUXILIARY_WEB_EXTRACT_BASE_URL` | 网页提取/摘要的直接 OpenAI 兼容端点 |
-| `AUXILIARY_WEB_EXTRACT_API_KEY` | 与 `AUXILIARY_WEB_EXTRACT_BASE_URL` 配对的 API 密钥 |
+
+:::note
+`AUXILIARY_WEB_EXTRACT_*` 变量已废弃:`web_extract` 和浏览器快照不再使用辅助 LLM。长页面和快照会确定性截断,完整文本存储在磁盘上,可通过 `read_file` 分页读取。
+:::
对于特定任务的直接端点,Hermes 使用该任务配置的 API 密钥或 `OPENAI_API_KEY`。不会为这些自定义端点复用 `OPENROUTER_API_KEY`。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/tools-reference.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/tools-reference.md
index 9148b2e5e5b..12c36c6f63c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/tools-reference.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/tools-reference.md
@@ -204,7 +204,7 @@ description: "Hermes 内置工具权威参考,按工具集分组"
| 工具 | 描述 | 所需环境 |
|------|------|----------|
| `web_search` | 在网络上搜索信息。默认返回最多 5 条结果,包含标题、URL 和描述。接受可选的 `limit`(1-100,默认 5)。查询直接传递给配置的后端,因此当后端支持时,`site:domain`、`filetype:pdf`、`intitle:word`、`-term`、`"exact phrase"` 等运算符可能有效。 | EXA_API_KEY 或 PARALLEL_API_KEY 或 FIRECRAWL_API_KEY 或 TAVILY_API_KEY |
-| `web_extract` | 从网页 URL 提取内容。以 Markdown 格式返回页面内容。也支持 PDF URL——直接传入 PDF 链接即可转换为 Markdown 文本。5000 字符以下的页面返回完整 Markdown;更大的页面由 LLM 摘要处理。 | EXA_API_KEY 或 PARALLEL_API_KEY 或 FIRECRAWL_API_KEY 或 TAVILY_API_KEY |
+| `web_extract` | 从网页 URL 提取内容。以 Markdown 格式返回页面内容。也支持 PDF URL——直接传入 PDF 链接即可转换为 Markdown 文本。预算内(默认 15000 字符)的页面完整返回;更大的页面截断为头+尾窗口,完整文本存储在磁盘上供 `read_file` 分页读取(无 LLM 摘要)。 | EXA_API_KEY 或 PARALLEL_API_KEY 或 FIRECRAWL_API_KEY 或 TAVILY_API_KEY |
## `x_search` 工具集
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md
index 3cff264bb5f..f72df7043a5 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md
@@ -787,7 +787,7 @@ Qwen Cloud(阿里巴巴 DashScope)上游将缓存 TTL 限制为 5 分钟,
## 辅助模型
-Hermes 使用"辅助"模型处理图像分析、网页摘要、浏览器截图分析、会话标题生成和上下文压缩等附带任务。默认情况下(`auxiliary.*.provider: "auto"`),Hermes 将每个辅助任务路由到您的**主聊天模型** —— 与您在 `hermes model` 中选择的相同 provider/模型。您无需配置任何内容即可开始,但请注意,在昂贵的推理模型(Opus、MiniMax M2.7 等)上,辅助任务会增加显著成本。如果您希望无论主模型如何都使用便宜且快速的附带任务,请显式设置 `auxiliary.<task>.provider` 和 `auxiliary.<task>.model`(例如,在 OpenRouter 上使用 Gemini Flash 进行视觉和网页提取)。
+Hermes 使用"辅助"模型处理图像分析、浏览器截图分析、会话标题生成和上下文压缩等附带任务。默认情况下(`auxiliary.*.provider: "auto"`),Hermes 将每个辅助任务路由到您的**主聊天模型** —— 与您在 `hermes model` 中选择的相同 provider/模型。您无需配置任何内容即可开始,但请注意,在昂贵的推理模型(Opus、MiniMax M2.7 等)上,辅助任务会增加显著成本。如果您希望无论主模型如何都使用便宜且快速的附带任务,请显式设置 `auxiliary.<task>.provider` 和 `auxiliary.<task>.model`(例如,在 OpenRouter 上使用 Gemini Flash 进行视觉分析)。(网页提取不是辅助任务:`web_extract` 和浏览器快照会确定性截断长内容,并将完整文本存储供 `read_file` 分页读取 —— 不涉及 LLM。)
:::note 为什么 "auto" 使用您的主模型
早期版本将聚合器用户(OpenRouter、Nous Portal)分流到便宜的 provider 端默认值。这令人惊讶 —— 付费购买聚合器订阅的用户会看到不同的模型处理其辅助流量。`auto` 现在对所有人使用主模型,`config.yaml` 中的每任务覆盖仍然优先(见下方[完整辅助配置参考](#full-auxiliary-config-reference))。
@@ -802,7 +802,6 @@ $ hermes model
→ Configure auxiliary models
[ ] vision currently: auto / main model
-[ ] web_extract currently: auto / main model
[ ] title_generation currently: openrouter / google/gemini-3-flash-preview
[ ] compression currently: auto / main model
[ ] approval currently: auto / main model
@@ -864,14 +863,6 @@ auxiliary:
timeout: 120 # 秒 —— LLM API 调用超时;视觉负载需要宽裕的超时
download_timeout: 30 # 秒 —— 图像 HTTP 下载;慢速连接请增加
- # 网页摘要 + 浏览器页面文本提取
- web_extract:
- provider: "auto"
- model: "" # 例如 "google/gemini-2.5-flash"
- base_url: ""
- api_key: ""
- timeout: 360 # 秒(6 分钟)—— 每次尝试的 LLM 摘要
-
# 危险命令审批分类器
approval:
provider: "auto"
@@ -921,7 +912,7 @@ auxiliary:
```
:::tip
-每个辅助任务都有可配置的 `timeout`(秒)。默认值:vision 120s、web_extract 360s、approval 30s、compression 120s。如果您为辅助任务使用慢速本地模型,请增加这些值。Vision 还有单独的 `download_timeout`(默认 30s)用于 HTTP 图像下载 —— 对于慢速连接或自托管图像服务器,请增加此值。
+每个辅助任务都有可配置的 `timeout`(秒)。默认值:vision 120s、approval 30s、compression 120s。如果您为辅助任务使用慢速本地模型,请增加这些值。Vision 还有单独的 `download_timeout`(默认 30s)用于 HTTP 图像下载 —— 对于慢速连接或自托管图像服务器,请增加此值。
:::
:::info
@@ -954,7 +945,7 @@ auxiliary:
| `model` | 该 provider 的模型名称 |
| `base_url` | (可选)自定义 OpenAI 兼容端点 |
-`fallback_chain` 适用于任何辅助任务 —— `compression`、`vision`、`web_extract`、`approval`、`skills_hub`、`mcp` 等。
+`fallback_chain` 适用于任何辅助任务 —— `compression`、`vision`、`approval`、`skills_hub`、`mcp` 等。
### OpenRouter 路由和辅助任务的 Pareto Code
@@ -1097,12 +1088,8 @@ auxiliary:
| Vision 模型 | `AUXILIARY_VISION_MODEL` |
| Vision 端点 | `AUXILIARY_VISION_BASE_URL` |
| Vision API 密钥 | `AUXILIARY_VISION_API_KEY` |
-| Web 提取 provider | `AUXILIARY_WEB_EXTRACT_PROVIDER` |
-| Web 提取模型 | `AUXILIARY_WEB_EXTRACT_MODEL` |
-| Web 提取端点 | `AUXILIARY_WEB_EXTRACT_BASE_URL` |
-| Web 提取 API 密钥 | `AUXILIARY_WEB_EXTRACT_API_KEY` |
-压缩和回退模型设置仅限 config.yaml。
+压缩和回退模型设置仅限 config.yaml。(`AUXILIARY_WEB_EXTRACT_*` 变量已废弃 —— 网页提取不再使用辅助 LLM。)
:::tip
运行 `hermes config` 查看您当前的辅助模型设置。覆盖仅在与默认值不同时显示。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md
index 57a7ac37196..55129b99d62 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md
@@ -409,7 +409,7 @@ Navigate to https://github.com/NousResearch
- **`full=false`**(默认):仅显示交互元素的紧凑视图
- **`full=true`**:完整页面内容
-超过 15,000 字符的快照将被截断或由 LLM 自动摘要(与 `web_extract` 使用相同的单页预算)。发生截断时,完整快照会保存到 `~/.hermes/cache/web/`,工具输出中包含文件路径和可直接使用的 `read_file` 调用,代理无需重新截图即可翻阅完整的可访问性树(包括被截断部分的元素 ref)。
+超过 15,000 字符的快照将按行边界自动截断(与 `web_extract` 使用相同的单页预算 —— 无 LLM 摘要)。发生截断时,完整快照会保存到 `~/.hermes/cache/web/`,工具输出中包含文件路径和可直接使用的 `read_file` 调用,代理无需重新截图即可翻阅完整的可访问性树(包括被截断部分的元素 ref)。
### `browser_click`
@@ -623,7 +623,7 @@ Browserbase 提供自动隐身能力:
## 限制
- **基于文本的交互** — 依赖无障碍树,而非像素坐标
-- **快照大小** — 大型页面可能在 15,000 字符处被截断或由 LLM 摘要(与 `web_extract` 一致);完整快照会保存到 `~/.hermes/cache/web/`,输出中给出路径供 `read_file` 翻阅
+- **快照大小** — 大型页面在 15,000 字符处被截断(与 `web_extract` 一致;无 LLM 摘要);完整快照会保存到 `~/.hermes/cache/web/`,输出中给出路径供 `read_file` 翻阅
- **会话超时** — 云端会话根据提供商计划设置过期
- **费用** — 云端会话消耗提供商额度;对话结束或非活跃后会话自动清理。使用 `/browser connect` 可免费本地浏览。
- **不支持文件下载** — 无法从浏览器下载文件
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/fallback-providers.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/fallback-providers.md
index c0192820aa8..2d0c34220e9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/fallback-providers.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/fallback-providers.md
@@ -185,7 +185,6 @@ Hermes 为附属任务使用独立的轻量级模型。每个任务都有自己
| 任务 | 功能说明 | 配置键 |
|------|-------------|-----------|
| 视觉 | 图像分析、浏览器截图 | `auxiliary.vision` |
-| 网页提取 | 网页内容摘要 | `auxiliary.web_extract` |
| 压缩 | 上下文压缩摘要 | `auxiliary.compression` |
| Skills Hub | 技能搜索与发现 | `auxiliary.skills_hub` |
| MCP | MCP 辅助操作 | `auxiliary.mcp` |
@@ -198,7 +197,7 @@ Hermes 为附属任务使用独立的轻量级模型。每个任务都有自己
当任务的提供商设置为 `"auto"`(默认值)时,Hermes 按顺序尝试各提供商,直到找到可用的:
-**文本任务(压缩、网页提取等):**
+**文本任务(压缩等):**
```text
OpenRouter → Nous Portal → 自定义端点 → Codex OAuth →
@@ -226,10 +225,6 @@ auxiliary:
base_url: "" # 直接端点(优先于 provider)
api_key: "" # base_url 的 API 密钥
- web_extract:
- provider: "auto"
- model: ""
-
compression:
provider: "auto"
model: ""
@@ -403,7 +398,6 @@ cronjob(
| 辅助任务(任意)— auto 用户 | 容量错误时完整自动检测链(主 Agent 模型优先,然后提供商链) | `auxiliary.<task>.provider: auto` |
| 辅助任务(任意)— 显式提供商 | `fallback_chain`(若已设置)→ 主 Agent 模型 → 警告 + 抛出,仅在容量错误时触发 | `auxiliary.<task>.fallback_chain` |
| 视觉 | 分层(见上文)+ 内部 OpenRouter 重试 | `auxiliary.vision` |
-| 网页提取 | 分层(见上文)+ 内部 OpenRouter 重试 | `auxiliary.web_extract` |
| 上下文压缩 | 分层(见上文);所有层不可用时降级为无摘要 | `auxiliary.compression` |
| Skills Hub | 分层(见上文) | `auxiliary.skills_hub` |
| MCP 辅助 | 分层(见上文) | `auxiliary.mcp` |
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/web-search.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/web-search.md
index 8bd34cc2b4e..2e88e5ae8fe 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/web-search.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/web-search.md
@@ -39,39 +39,19 @@ Brave Search、DDGS 和 xAI 均为**仅搜索**——如果同时需要 `web_ext
## `web_extract` 如何处理长页面
-后端返回的原始页面 markdown 可能非常庞大(论坛帖子、文档站点、带嵌入评论的新闻文章)。为保持上下文窗口可用并降低成本,`web_extract` 在将内容交给 agent 之前,会通过 **`web_extract` 辅助模型**对返回内容进行处理。行为完全由大小决定:
+后端返回的原始页面 markdown 可能非常庞大(论坛帖子、文档站点、带嵌入评论的新闻文章)。为保持上下文窗口可用,`web_extract` 采用**确定性字符预算** —— 不涉及任何 LLM 摘要:
| 页面大小(字符数) | 处理方式 |
|------------------------|--------------|
-| 5 000 以下 | 原样返回——不调用 LLM,完整 markdown 直达 agent |
-| 5 000 – 500 000 | 通过 `web_extract` 辅助模型单次摘要,输出上限约 5 000 字符 |
-| 500 000 – 2 000 000 | 分块处理:拆分为 10 万字符的块,并行摘要每块,再合成最终摘要(约 5 000 字符) |
-| 超过 2 000 000 | 拒绝处理,并提示使用更具体的来源 URL |
+| 预算以内(默认 15 000) | 原样返回 —— 完整 markdown 直达 agent |
+| 超出预算 | 头+尾窗口(约 75% 头部 / 25% 尾部,按 markdown 行边界切分),并附带明确的 `[TRUNCATED]` 尾注。完整的干净文本存储到磁盘,尾注告知 agent 文件路径以及分页读取被省略中间部分的确切 `read_file` 调用 |
+| 超过 2 000 000 | 存储的文本上限为 2 MB |
-摘要保留引用、代码块和关键事实的原始格式——它是内容压缩器,而非改写器。如果摘要失败或超时,Hermes 会回退到原始内容的前约 5 000 字符,而非返回无用的错误信息。
+每页预算可通过 `config.yaml` 中的 `web.extract_char_limit` 配置(默认 `15000`,范围限制在 2 000–500 000),agent 也可以通过工具的 `char_limit` 参数按调用提高。
-### 哪个模型负责摘要?
+### 当截断带来不便时
-`web_extract` 辅助任务。默认情况下(`auxiliary.web_extract.provider: "auto"`),使用您的**主聊天模型**——与 `hermes model` 相同的提供商和模型。对大多数配置而言这没问题,但在昂贵的推理模型(Opus、MiniMax M2.7 等)上,每次长页面提取都会产生可观的成本。
-
-若要将提取摘要路由到廉价快速的模型,无论主模型是什么:
-
-```yaml
-# ~/.hermes/config.yaml
-auxiliary:
- web_extract:
- provider: openrouter
- model: google/gemini-3-flash-preview
- timeout: 360 # 秒;如果遇到摘要超时,请调大此值
-```
-
-或交互式选择:`hermes model` → **Configure auxiliary models** → `web_extract`。
-
-完整参考和按任务覆盖模式,请参阅[辅助模型](/user-guide/configuration#auxiliary-models)。
-
-### 摘要处理不适用的情况
-
-如果您明确需要原始、未经摘要的页面内容——例如正在抓取结构化页面,LLM 摘要会丢失重要字段——请改用 `browser_navigate` + `browser_snapshot`。浏览器工具返回实时无障碍树,不经辅助模型改写(在超大页面上受其自身 8 000 字符快照上限约束)。
+如果您明确需要实时 DOM 而非提取的 markdown —— 例如提取内容很少的 JS 密集页面 —— 请改用 `browser_navigate` + `browser_snapshot`。浏览器工具返回实时无障碍树(超大页面受其自身快照上限约束)。
---
@@ -421,13 +401,9 @@ web:
切换到自托管实例(参见上方[方案 A](#option-a--self-host-with-docker-recommended))。使用 Docker,您自己的实例没有速率限制。
-### `web_extract` 返回截断内容并附有"summarization timed out"提示
-
-辅助模型未能在配置的超时时间内完成摘要。可以:
+### `web_extract` 返回截断内容并附有 `[TRUNCATED]` 尾注
-- 在 `config.yaml` 中调大 `auxiliary.web_extract.timeout`(新安装默认 360 秒,若键缺失则为 30 秒)
-- 将 `web_extract` 辅助任务切换到更快的模型(例如 `google/gemini-3-flash-preview`)——参见 [`web_extract` 如何处理长页面](#how-web_extract-handles-long-pages)
-- 对于摘要处理不适用的页面,改用 `browser_navigate`
+对于超出字符预算的页面这是预期行为。尾注会给出保存完整干净文本的磁盘文件,以及分页读取被省略中间部分的确切 `read_file` 调用。若要内联查看更多内容,请在 `config.yaml` 中调大 `web.extract_char_limit`,或在调用时传入更大的 `char_limit`。
---