tongzhou wang
27e16c08c3
Add built-in namespace guidance and budget tool description prefixes ( #62534 )
...
## Why
Namespace-wide guidance can repeat on every entry in flat Code Mode listings. The existing prefix limit covers only reachable `functions` tools, leaving indirect namespace guidance outside the budget.
## What changed
- Add `builtin_tool_namespaces` to put guidance on namespace headers in Code Mode prompts and tool search responses, including headers shared with client tools. The selector applies to namespaces with a registered built-in tool and is omitted from flat listings. Overlapping selectors must agree after trimming.
- Validate all four prefix maps together against the selected model's `description_prefix_budget_bytes`, which defaults to 512. Count each trimmed value once in UTF-8 bytes, including unused selectors. Exclude keys, paragraph separators, and rendered copies.
## Testing
Cover shared headers, flat listings, and conflicting selectors. Exercise the default budget boundary with multibyte text and verify that a model can raise the limit.
GitOrigin-RevId: 1570c23ea1dbad6041cc8e48d0dc2b77f92596c7
2026-11-19 15:31:33 +00:00
..
2026-11-10 01:30:08 +00:00
2026-10-14 06:03:02 +00:00
2026-11-04 13:03:01 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-11-13 22:01:26 +00:00
2026-11-17 20:04:36 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-30 18:33:14 +00:00
2026-11-17 14:20:08 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-10-05 18:52:51 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-11-17 20:04:36 +00:00
2026-10-08 17:25:39 +00:00
2026-11-03 12:33:26 +00:00
2026-11-02 15:09:22 +00:00
2026-11-03 12:33:26 +00:00
2026-11-02 15:28:37 +00:00
2026-11-17 20:04:36 +00:00
2026-10-06 10:39:16 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-04 00:19:12 +00:00
2026-11-03 21:24:16 +00:00
2026-10-30 20:53:25 +00:00
2026-11-03 21:24:16 +00:00
2026-11-03 21:24:16 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 21:40:36 +00:00
2026-11-17 22:58:38 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-10 21:28:22 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 22:58:38 +00:00
2026-11-16 23:58:12 +00:00
2026-11-17 20:04:36 +00:00
2026-10-30 18:33:14 +00:00
2026-11-16 04:54:23 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-11-17 22:58:38 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-13 18:46:45 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 18:24:49 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-17 16:16:36 +00:00
2026-11-18 19:39:41 +00:00
2026-11-02 20:10:37 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 22:58:38 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-19 15:31:33 +00:00
2026-11-04 13:03:01 +00:00
2026-11-02 21:35:56 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-06 03:27:04 +00:00
2026-10-06 03:27:04 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-30 18:33:14 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-10-21 10:40:59 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 22:58:38 +00:00
2026-11-17 22:58:38 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-10-30 18:33:14 +00:00
2026-10-30 18:33:14 +00:00
2026-10-06 10:56:45 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-10-30 18:33:14 +00:00
2026-11-18 15:24:29 +00:00
2026-11-17 23:31:58 +00:00
2026-11-17 03:48:25 +00:00
2026-11-17 03:48:25 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-10-30 20:53:25 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-19 00:59:23 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-10-05 18:52:51 +00:00
2026-11-02 07:27:49 +00:00
2026-11-02 07:27:49 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-10-27 19:11:56 +00:00
2026-11-18 00:45:07 +00:00
2026-11-17 20:04:36 +00:00
2026-11-17 20:04:36 +00:00
2026-11-16 04:54:23 +00:00
2026-11-16 04:54:23 +00:00
2026-10-30 18:33:14 +00:00