Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(search): query's token_budget schema names search.query_budget_unit=auto (#7930)

garrytaneade0bedf6bd
diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.ts
index 4f3cba05e1..c1a7f8a2e2 100644
--- a/src/core/operation-manifest.generated.ts
+++ b/src/core/operation-manifest.generated.ts
@@ -1588,7 +1588,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
},
"token_budget": {
"type": "number",
- "description": "Evidence token cap.",
+ "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
"fullSurfaceOnly": true
},
"expand": {
diff --git a/src/core/ops/search.ts b/src/core/ops/search.ts
index 7f4b4e145e..12ef8fb51e 100644
--- a/src/core/ops/search.ts
+++ b/src/core/ops/search.ts
@@ -869,7 +869,7 @@ const query: Operation = {
snippet_chars: SNIPPET_CHARS_PARAM,
return_unit: RETURN_UNIT_PARAM,
return_window: RETURN_WINDOW_PARAM,
- token_budget: { type: 'number', description: 'Evidence token cap.', fullSurfaceOnly: true },
+ token_budget: { type: 'number', description: 'Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).', fullSurfaceOnly: true },
expand: { type: 'boolean', description: 'Default off; one LLM call, rarely helps.' },
detail: { type: 'string', description: 'low (compiled truth), medium (default) or high (all chunks).', fullSurfaceOnly: true },
fields: FIELDS_PARAM,
diff --git a/test/fixtures/goldens/cli/help-and-errors.json b/test/fixtures/goldens/cli/help-and-errors.json
index dc17e605c3..8fd10027cc 100644
--- a/test/fixtures/goldens/cli/help-and-errors.json
+++ b/test/fixtures/goldens/cli/help-and-errors.json
@@ -752,7 +752,7 @@
" --snippet-chars Chars per row (0 = full).",
" --return-unit Default auto: whole conversations.",
" --return-window Window radius 1-3.",
- " --token-budget Evidence token cap.",
+ " --token-budget Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
" --expand Default off; one LLM call, rarely helps.",
" --detail low (compiled truth), medium (default) or high (all chunks).",
" --fields lean (remote default) or full.",
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index c742bbcd5b..a0056f9ade 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 282967,
- "stdoutSha256": "73f135de04ba7cceced4d9fd952b23aaefd7fb4cad5ebdf3dce1aca953c70f84",
+ "stdoutBytes": 283097,
+ "stdoutSha256": "33d8517ac277e764748923f278a9389114fbfbccf3586542449f11056ee9ceae",
"toolNames": [
"remember",
"entity",
@@ -2053,7 +2053,7 @@
"type": "string"
},
"token_budget": {
- "description": "Evidence token cap.",
+ "description": "Evidence token cap. Without return_unit it caps the chunk payload; with search.query_budget_unit=auto it is the hard delivery cap (below 32 refused).",
"type": "number"
},
"types": {