You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ak...@apache.org on 2026/06/16 03:21:08 UTC

(tooling-agents) 10/14: Sonnet 4.5 -> 4.6 everywhere: 1M context + 64K output headroom

This is an automated email from the ASF dual-hosted git repository.

andrewmusselman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-agents.git

commit 9dafef8d4205beacdd072836a2d5fb4d712e585e
Author: Andrew Musselman <ak...@apache.org>
AuthorDate: Sun Jun 7 20:34:52 2026 +0000

    Sonnet 4.5 -> 4.6 everywhere: 1M context + 64K output headroom
    
    Move every Sonnet usage off claude-sonnet-4-5-20250929-v1:0 onto the
    dateless inference-profile id us.anthropic.claude-sonnet-4-6 (verified
    against AWS/Anthropic docs: 1M context window, 64K max output, same
    $3/$15 pricing). Because every SONNET_CONTEXT / CONTEXT_WINDOW budget is
    derived via get_context_window (which reads context_window from the
    provider config = 1,000,000), the larger input window propagates to all
    batch-sizing automatically — discover packs far more files per
    classification call, and the inventory batchers in audit/bundle get a
    400K input budget (0.40 * 1M).
    
    max_tokens retuned toward the new 64K output ceiling (4.5 capped at 32K):
    - audit/bundle SONNET_PARAMS inventory: 16384 -> 32768
    - audit/bundle single-pass consolidation: 32000 -> 48000
    - audit/bundle multi-round consolidation: 16384 -> 32768
    - consolidate FAST_PARAMS default: 16384 -> 32768 (big report calls
      already passed an explicit 64000, valid on 4.6)
    - discover PARAMS: 16384 -> 32768
    
    All Sonnet max_tokens kept at or under 64000; only Opus uses 128000.
    Files touched: asvs_audit, asvs_bundle, asvs_consolidate, asvs_discover.
---
 ASVS/agents/asvs_audit.py       | 20 ++++++++++++++++----
 ASVS/agents/asvs_bundle.py      | 16 ++++++++++++----
 ASVS/agents/asvs_consolidate.py |  5 ++++-
 ASVS/agents/asvs_discover.py    | 10 ++++++++--
 4 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/ASVS/agents/asvs_audit.py b/ASVS/agents/asvs_audit.py
index 42c1a20..0d3e1e2 100644
--- a/ASVS/agents/asvs_audit.py
+++ b/ASVS/agents/asvs_audit.py
@@ -128,7 +128,10 @@ BATCH RESULTS TO CONSOLIDATE:
         """ + "\n---\n".join(results)
 
             messages = [{"role": "user", "content": prompt}]
-            consolidation_params = {**params, "max_tokens": 32000}
+            # Sonnet 4.6 allows up to 64K output (vs 4.5's 32K). Consolidation
+            # is output-heavy (it re-emits merged findings), so raise the cap
+            # to 48000 — generous headroom without crowding the 64000 ceiling.
+            consolidation_params = {**params, "max_tokens": 48000}
             try:
                 resp, _ = await call_llm(
                     provider=provider, model=model,
@@ -158,7 +161,10 @@ ASVS Requirement: {asvs}
 
 BATCH RESULTS TO CONSOLIDATE:
         """
-            consolidation_params = {**params, "max_tokens": 16384}
+            # Sonnet 4.6 allows 64K output; raise from 16384 so each
+            # consolidation round can emit more merged content per pass and
+            # need fewer rounds. Kept under the 64000 ceiling.
+            consolidation_params = {**params, "max_tokens": 32768}
             template_tokens = count_tokens(template, provider, model)
             max_cons_content = int(context_window * 0.40) - template_tokens
 
@@ -397,8 +403,14 @@ This means one of the following:
         # Model configuration
         # =============================================================
         SONNET_PROVIDER = "bedrock"
-        SONNET_MODEL = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
-        SONNET_PARAMS = {"temperature": 0.7, "max_tokens": 16384}
+        # Sonnet 4.6: 1M-token context window (up from 4.5's 200K) and 64K
+        # max output (up from 32K). The SONNET_CONTEXT-derived batch budgets
+        # below recompute against 1M automatically via get_context_window.
+        # max_tokens raised 16384 -> 32768 for inventory: a larger input
+        # window means fatter inventory batches, which want more room to
+        # emit structure. Stay well under the 64000 output ceiling.
+        SONNET_MODEL = "us.anthropic.claude-sonnet-4-6"
+        SONNET_PARAMS = {"temperature": 0.7, "max_tokens": 32768}
 
         # T9: Haiku for relevance filtering (cheap classification)
         HAIKU_PROVIDER = "bedrock"
diff --git a/ASVS/agents/asvs_bundle.py b/ASVS/agents/asvs_bundle.py
index 20606d3..808f0f7 100644
--- a/ASVS/agents/asvs_bundle.py
+++ b/ASVS/agents/asvs_bundle.py
@@ -286,7 +286,9 @@ BATCH RESULTS TO CONSOLIDATE:
         """ + "\n---\n".join(results)
 
             messages = [{"role": "user", "content": prompt}]
-            consolidation_params = {**params, "max_tokens": 32000}
+            # Sonnet 4.6 allows up to 64K output (vs 4.5's 32K).
+            # Consolidation is output-heavy; raise to 48000, under the ceiling.
+            consolidation_params = {**params, "max_tokens": 48000}
             try:
                 resp, _ = await call_llm(
                     provider=provider, model=model,
@@ -322,7 +324,9 @@ NOTE: This is a bundled multi-section audit. Preserve per-section structure
 
 BATCH RESULTS TO CONSOLIDATE:
         """
-            consolidation_params = {**params, "max_tokens": 16384}
+            # Sonnet 4.6 allows 64K output; raise from 16384 so each round
+            # emits more and fewer rounds are needed. Under the ceiling.
+            consolidation_params = {**params, "max_tokens": 32768}
             template_tokens = count_tokens(template, provider, model)
             max_cons_content = int(context_window * 0.40) - template_tokens
 
@@ -474,8 +478,12 @@ BATCH RESULTS TO CONSOLIDATE:
         # Model configuration
         # =============================================================
         SONNET_PROVIDER = "bedrock"
-        SONNET_MODEL = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
-        SONNET_PARAMS = {"temperature": 0.7, "max_tokens": 16384}
+        # Sonnet 4.6: 1M context (up from 200K) + 64K max output (up from
+        # 32K). SONNET_CONTEXT budgets below recompute against 1M via
+        # get_context_window. max_tokens 16384 -> 32768 for fatter inventory
+        # batches; stays under the 64000 output ceiling.
+        SONNET_MODEL = "us.anthropic.claude-sonnet-4-6"
+        SONNET_PARAMS = {"temperature": 0.7, "max_tokens": 32768}
 
         # T9: Haiku for relevance filtering — cheaper and faster
         HAIKU_PROVIDER = "bedrock"
diff --git a/ASVS/agents/asvs_consolidate.py b/ASVS/agents/asvs_consolidate.py
index 01e6c71..5cdc2db 100644
--- a/ASVS/agents/asvs_consolidate.py
+++ b/ASVS/agents/asvs_consolidate.py
@@ -322,7 +322,10 @@ async def run(input_dict, tools):
         # id on Bedrock (verified against the Claude Code Bedrock docs);
         # confirm it is enabled in your region before deploying.
         FAST_MODEL = "us.anthropic.claude-sonnet-4-6"
-        FAST_PARAMS = {"temperature": 0.7, "max_tokens": 16384}
+        # max_tokens default raised 16384 -> 32768 for the lighter FAST
+        # calls now that Sonnet 4.6 permits 64K output. The big
+        # report-generation calls below already pass an explicit 64000.
+        FAST_PARAMS = {"temperature": 0.7, "max_tokens": 32768}
 
         HEAVY_PROVIDER = "bedrock"
         HEAVY_MODEL = "us.anthropic.claude-opus-4-8"
diff --git a/ASVS/agents/asvs_discover.py b/ASVS/agents/asvs_discover.py
index 2247149..5dd9417 100644
--- a/ASVS/agents/asvs_discover.py
+++ b/ASVS/agents/asvs_discover.py
@@ -62,8 +62,14 @@ async def run(input_dict, tools):
         # Model configuration
         # =============================================================
         PROVIDER = "bedrock"
-        MODEL = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
-        PARAMS = {"temperature": 0.7, "max_tokens": 16384}
+        # Sonnet 4.6: 1M context (up from 200K). CONTEXT_WINDOW and
+        # SAFE_LIMIT below recompute against 1M via get_context_window, so
+        # the classification batcher packs far more files per call and emits
+        # many fewer batches over a large tree. max_tokens 16384 -> 32768
+        # (the domain-generation call already overrides to 32000); under the
+        # 64000 output ceiling.
+        MODEL = "us.anthropic.claude-sonnet-4-6"
+        PARAMS = {"temperature": 0.7, "max_tokens": 32768}
         CONTEXT_WINDOW = get_context_window(PROVIDER, MODEL)
         SAFE_LIMIT = int(CONTEXT_WINDOW * 0.40)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org