Skip to content

feat(agents): add tier-1 buzz-agent model-tuning fields to Create/Edit dialogs#1534

Merged
wpfleger96 merged 2 commits into
duncan/global-agent-configfrom
duncan/ba-config-ui-fields
Jul 6, 2026
Merged

feat(agents): add tier-1 buzz-agent model-tuning fields to Create/Edit dialogs#1534
wpfleger96 merged 2 commits into
duncan/global-agent-configfrom
duncan/ba-config-ui-fields

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Closes the #1470 UI gap: adds four dedicated editable fields to the managed-agent Create and Edit dialogs so users can configure buzz-agent model-tuning knobs without hand-typing raw env var keys.

What this adds

Four fields rendered inside CreateAgentRuntimeFields (shared by both dialogs), gated on isBuzzAgentRuntime(modelTuningRuntimeId) — non-buzz-agent runtimes see nothing:

Field Env var Input type
Thinking / Effort BUZZ_AGENT_THINKING_EFFORT <select> — 7 values + Inherit
Max rounds BUZZ_AGENT_MAX_ROUNDS numeric (0 = unlimited)
Max output tokens BUZZ_AGENT_MAX_OUTPUT_TOKENS numeric
Context limit BUZZ_AGENT_MAX_CONTEXT_TOKENS numeric

Inherit pattern (matches #1448)

Empty field = inherit: key is absent from envVars; placeholder shows the inherited baseline from inheritedEnvVars (global + persona chain). Non-empty = explicit override written into envVars. No payload shape change — values already ride in the envVars map.

  • CreateAgentDialog passes globalConfig.env_vars as the baseline (global-only; no persona on create)
  • EditAgentDialog passes inheritedWithGlobal (global + linked persona, matching the existing EnvVarsEditor wiring)

Prop split: modelTuningRuntimeId vs selectedRuntimeId

The Edit dialog collapses selectedRuntimeId to an "inherit"/"custom" sentinel that drives the custom-command input. A separate modelTuningRuntimeId prop carries the real/prospective runtime id for the model-tuning gate:

  • Edit passes prospectiveRuntimeId (resolves inherit → persona command; covers both inherited and pinned buzz-agent)
  • Create passes selectedRuntimeId directly (no sentinel needed; the real id is always available)

Files

  • buzzAgentConfig.ts — source-of-truth constants: env var key names, BUZZ_AGENT_THINKING_EFFORT_VALUES (mirrors parse_thinking_effort in crates/buzz-agent/src/config.rs), isBuzzAgentRuntime
  • buzzAgentConfig.test.mjs — 18 behavior-focused unit tests (14 original + 4 regression tests for the Edit runtime-id mapping)
  • CreateAgentDialogSections.tsx — 4 new fields + modelTuningRuntimeId prop split; private BuzzAgentModelTuningFields component
  • CreateAgentDialog.tsx / EditAgentDialog.tsx — wire the new props

Stack: #1411#1448 → this PR

Related: #1411, #1448, #1470

npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 and others added 2 commits July 6, 2026 11:08
…t dialogs

Adds four dedicated, editable fields to the managed-agent Create and
Edit dialogs so users can configure buzz-agent model-tuning knobs
without hand-typing raw env var keys:

- Thinking / Effort (select: none|minimal|low|medium|high|xhigh|max)
- Max rounds (numeric)
- Max output tokens (numeric)
- Context limit (numeric)

Each field writes its value as a BUZZ_AGENT_* key into the existing
envVars map — no new persistence path or record-schema change. Empty
field = inherit: the key is absent from envVars and the placeholder
shows the global/persona baseline from inheritedEnvVars. Non-empty =
explicit override.

Fields are gated on isBuzzAgentRuntime(selectedRuntimeId) and rendered
via a private BuzzAgentModelTuningFields component — non-buzz-agent
runtimes see nothing.

A source-of-truth constant BUZZ_AGENT_THINKING_EFFORT_VALUES mirrors
parse_thinking_effort in crates/buzz-agent/src/config.rs.

14 behavior-focused unit tests cover: empty→inherit, set→writes key,
clear→deletes key, correct key names, bounded select values, multi-
field isolation.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The Edit dialog collapses selectedRuntimeId to an 'inherit'/'custom'
sentinel that drives the custom-command input visibility. The tier-1
model-tuning gate was using this same prop, so isBuzzAgentRuntime always
saw 'inherit' in Edit and the fields were never rendered.

Fixes:
- Add modelTuningRuntimeId prop to CreateAgentRuntimeFields, separate
  from the existing selectedRuntimeId sentinel. Gate the tier-1 fields
  on isBuzzAgentRuntime(modelTuningRuntimeId).
- Edit passes prospectiveRuntimeId (already resolves inherit→persona
  command, covers both inherited and pinned buzz-agent personas).
- Create passes selectedRuntimeId (no sentinel needed; the real id is
  always available there).
- Fix min="0" on Max Rounds (backend default is 0 = unlimited; explicit
  0 is a valid override to lift a finite cap set via persona/global).
  Add '0 = unlimited' to the help text.
- Add 4 regression tests covering the Edit runtime-id mapping: sentinel
  'inherit' must not trigger fields; prospectiveRuntimeId 'buzz-agent'
  must; goose/empty must not.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96

Copy link
Copy Markdown
Collaborator Author

Tier-1 buzz-agent model-tuning fields

New dedicated fields for THINKING_EFFORT, MAX_OUTPUT_TOKENS, MAX_CONTEXT_TOKENS, and max rounds, in both the Create and Edit Agent dialogs for a buzz-agent runtime. Empty field = inherit baseline (shown as placeholder); a typed value = explicit override written to env_vars.

Create — inherited baseline

Fields empty; placeholders show the inherited baseline values.
create-inherit

Create — explicit overrides

Values typed into the fields become explicit BUZZ_AGENT_* overrides.
create-override

Edit — inherited baseline

Opening an existing buzz-agent agent for edit now renders the fields (the Pass-1 fix); empty fields show inherited placeholders.
edit-inherit

Edit — explicit overrides

Edited values persist as explicit overrides.
edit-override

wpfleger96 pushed a commit that referenced this pull request Jul 6, 2026
@wpfleger96 wpfleger96 merged commit 764bac0 into duncan/global-agent-config Jul 6, 2026
25 checks passed
@wpfleger96 wpfleger96 deleted the duncan/ba-config-ui-fields branch July 6, 2026 18:35
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 6, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 7, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 7, 2026
…mmands

#1534 (buzz-agent model-tuning) added Tauri commands for reading and writing
the model-tuning fields, growing agents.rs by 6 lines beyond the 1449
exception. Bump to 1455 to cover the merged total. Queued to split.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wpfleger96 added a commit that referenced this pull request Jul 7, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
wpfleger96 added a commit that referenced this pull request Jul 8, 2026
…t dialogs (#1534)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants