mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Revert "fix(mesh): bound local agent generation"
This reverts commit a1a095421b.
Signed-off-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
@@ -42,15 +42,12 @@ pub fn apply_relay_mesh_env(
|
||||
RELAY_MESH_PREFER_MESH_FOR_AUTO_ENV.to_string(),
|
||||
"1".to_string(),
|
||||
);
|
||||
// Keep the entire turn inside smaller local-model context windows, and
|
||||
// spend a bounded output budget on an answer/tool call instead of hidden
|
||||
// reasoning. The ordinary buzz-agent defaults (200K context / 32K output)
|
||||
// are appropriate for frontier APIs but can wedge a local Mesh runtime.
|
||||
// Keep the requested response inside smaller local-model context windows,
|
||||
// and spend that budget on an answer/tool call instead of hidden reasoning.
|
||||
// These are defaults, not policy: the effective agent/persona/global env
|
||||
// may deliberately choose a smaller cap or enable thinking. This function
|
||||
// runs after those layers during readiness, so never clobber their values.
|
||||
insert_default_if_unset(env, "BUZZ_AGENT_MAX_CONTEXT_TOKENS", "32768");
|
||||
insert_default_if_unset(env, "BUZZ_AGENT_MAX_OUTPUT_TOKENS", "1024");
|
||||
insert_default_if_unset(env, "BUZZ_AGENT_MAX_OUTPUT_TOKENS", "4096");
|
||||
insert_default_if_unset(env, "BUZZ_AGENT_THINKING_EFFORT", "none");
|
||||
}
|
||||
|
||||
@@ -76,11 +73,7 @@ pub fn relay_mesh_process_env(
|
||||
model: &str,
|
||||
) -> std::collections::BTreeMap<String, String> {
|
||||
let mut env = std::collections::BTreeMap::new();
|
||||
for key in [
|
||||
"BUZZ_AGENT_MAX_CONTEXT_TOKENS",
|
||||
"BUZZ_AGENT_MAX_OUTPUT_TOKENS",
|
||||
"BUZZ_AGENT_THINKING_EFFORT",
|
||||
] {
|
||||
for key in ["BUZZ_AGENT_MAX_OUTPUT_TOKENS", "BUZZ_AGENT_THINKING_EFFORT"] {
|
||||
if let Some(value) = effective_env.get(key) {
|
||||
env.insert(key.to_string(), value.clone());
|
||||
}
|
||||
@@ -104,13 +97,9 @@ mod tests {
|
||||
Some(RELAY_MESH_AUTO_MODEL_ID),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_CONTEXT_TOKENS").map(String::as_str),
|
||||
Some("32768")
|
||||
);
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_OUTPUT_TOKENS").map(String::as_str),
|
||||
Some("1024")
|
||||
Some("4096")
|
||||
);
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_THINKING_EFFORT").map(String::as_str),
|
||||
@@ -126,10 +115,6 @@ mod tests {
|
||||
#[test]
|
||||
fn native_provider_preserves_explicit_generation_controls() {
|
||||
let mut env = BTreeMap::from([
|
||||
(
|
||||
"BUZZ_AGENT_MAX_CONTEXT_TOKENS".to_string(),
|
||||
"65536".to_string(),
|
||||
),
|
||||
(
|
||||
"BUZZ_AGENT_MAX_OUTPUT_TOKENS".to_string(),
|
||||
"2048".to_string(),
|
||||
@@ -142,10 +127,6 @@ mod tests {
|
||||
Some(RELAY_MESH_AUTO_MODEL_ID),
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_CONTEXT_TOKENS").map(String::as_str),
|
||||
Some("65536")
|
||||
);
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_OUTPUT_TOKENS").map(String::as_str),
|
||||
Some("2048")
|
||||
@@ -159,10 +140,6 @@ mod tests {
|
||||
#[test]
|
||||
fn process_env_seeds_controls_without_restoring_unrelated_credentials() {
|
||||
let effective_env = BTreeMap::from([
|
||||
(
|
||||
"BUZZ_AGENT_MAX_CONTEXT_TOKENS".to_string(),
|
||||
"16384".to_string(),
|
||||
),
|
||||
(
|
||||
"BUZZ_AGENT_MAX_OUTPUT_TOKENS".to_string(),
|
||||
"1024".to_string(),
|
||||
@@ -172,10 +149,6 @@ mod tests {
|
||||
|
||||
let env = relay_mesh_process_env(&effective_env, "Gemma-4");
|
||||
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_CONTEXT_TOKENS").map(String::as_str),
|
||||
Some("16384")
|
||||
);
|
||||
assert_eq!(
|
||||
env.get("BUZZ_AGENT_MAX_OUTPUT_TOKENS").map(String::as_str),
|
||||
Some("1024")
|
||||
|
||||
Reference in New Issue
Block a user