From f4b7cdd5dcde79ef28db432ed5dfccfeac321dae Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:01:11 -0500 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=20knowledge:=20advisor=5Fllm=20co?= =?UTF-8?q?nfig=20block=20with=20hard=20budget=20ceilings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> --- .../added-knowledge-advisor-llm-config.md | 1 + src/docs/agent-knowledge-and-memory.md | 5 + src/docs/knowledge-curator.md | 34 ++++ src/pkg/config/knowledge_advisor_llm.go | 160 ++++++++++++++++++ src/pkg/config/knowledge_advisor_llm_test.go | 129 ++++++++++++++ src/pkg/config/knowledge_config.go | 3 + src/pkg/config/validate.go | 8 + 7 files changed, 340 insertions(+) create mode 100644 changelog.d/added-knowledge-advisor-llm-config.md create mode 100644 src/pkg/config/knowledge_advisor_llm.go create mode 100644 src/pkg/config/knowledge_advisor_llm_test.go diff --git a/changelog.d/added-knowledge-advisor-llm-config.md b/changelog.d/added-knowledge-advisor-llm-config.md new file mode 100644 index 0000000000..3af8fc40e6 --- /dev/null +++ b/changelog.d/added-knowledge-advisor-llm-config.md @@ -0,0 +1 @@ +- `knowledge.advisor_llm` config block (mode off/shadow/rank, model, endpoint, key, candidates, pane_lines, timeout_s, holdout_percent, on_error) with hard call ceilings of 6 per agent-hour and 300 per day unless `budget_override: true`; shadow/rank without a model resolves to off with a warning, and `Config.KnowledgeAdvisorLLM()` resolves model/endpoint/key like the reviewer (explicit → `governor.litellm`). Config only; the ranking pass lands separately (hivecommons/hive#17154). diff --git a/src/docs/agent-knowledge-and-memory.md b/src/docs/agent-knowledge-and-memory.md index 5825642e10..2532afd730 100644 --- a/src/docs/agent-knowledge-and-memory.md +++ b/src/docs/agent-knowledge-and-memory.md @@ -117,6 +117,11 @@ knowledge search|list`, and `bd kb search` inside the pod. See [knowledge-toc.md](knowledge-toc.md) and [public-knowledge-mcp.md](public-knowledge-mcp.md). +The mid-task advisor (`knowledge.advisor`) can later rank candidates with a +model; its `knowledge.advisor_llm` block carries hard budget ceilings (6 calls +per agent-hour, 300 per day) that only `budget_override: true` lifts. See +[knowledge-curator.md](knowledge-curator.md#model-ranked-advisor-knowledgeadvisor_llm). + ## 3. AGENTS.md / CLAUDE.md: injected by Hive, not read natively Each agent's CLI starts in `/data/agents/` (`crux.DefaultWorkDir`), diff --git a/src/docs/knowledge-curator.md b/src/docs/knowledge-curator.md index d12d8189c2..7cfaae36a2 100644 --- a/src/docs/knowledge-curator.md +++ b/src/docs/knowledge-curator.md @@ -683,6 +683,40 @@ knowledge: advisor_exclude_agents: [scanner] ``` +### Model-ranked advisor (`knowledge.advisor_llm`) + +`knowledge.advisor_llm` is the config surface for the model-ranked variant +(hivecommons/hive#17054). This release only parses, validates and resolves +it; nothing calls a model yet. It is ignored unless `knowledge.advisor` is on. + +```yaml +knowledge: + advisor: true + advisor_llm: + mode: off # off | shadow | rank + model: "" # required for shadow/rank + endpoint: "" # default: governor.litellm endpoint + api_key_env: "" # or api_key_file; default: governor.litellm key + candidates: 5 + pane_lines: 80 + timeout_s: 15 + max_calls_per_agent_hour: 6 # hard ceiling without budget_override + max_calls_per_day: 300 # hard ceiling without budget_override + budget_override: false + holdout_percent: 0 # 0..100 + on_error: silence # silence | matcher +``` + +- `model`, `endpoint` and the key resolve like the governor reviewer: + explicit value, then `governor.litellm`, then unset. With no endpoint or key + from either place the block is unavailable. +- `shadow` or `rank` with no model resolves to `off` and logs a warning; it + never stops the hive from loading. +- `max_calls_per_agent_hour` above 6 or `max_calls_per_day` above 300 is a load + error naming the key unless `budget_override: true`. +- `holdout_percent` outside 0..100, an unknown `mode` or `on_error`, and a + negative `candidates`, `pane_lines` or `timeout_s` are load errors. + Phase 1 is a pure matcher with no model in the loop; the LLM-ranked variant (OMP's advisor agent as the model) is hivecommons/hive#17054. The advisor is wired only when the agent runtime runs in-process; the `crux serve` sidecar diff --git a/src/pkg/config/knowledge_advisor_llm.go b/src/pkg/config/knowledge_advisor_llm.go new file mode 100644 index 0000000000..4fd638e534 --- /dev/null +++ b/src/pkg/config/knowledge_advisor_llm.go @@ -0,0 +1,160 @@ +package config + +import ( + "fmt" + "strings" +) + +// Defaults and hard ceilings for knowledge.advisor_llm (hivecommons/hive#17054). +const ( + AdvisorLLMModeOff = "off" + AdvisorLLMModeShadow = "shadow" + AdvisorLLMModeRank = "rank" + + AdvisorLLMOnErrorSilence = "silence" + AdvisorLLMOnErrorMatcher = "matcher" + + DefaultAdvisorLLMCandidates = 5 + DefaultAdvisorLLMPaneLines = 80 + DefaultAdvisorLLMTimeoutS = 15 + AdvisorLLMMaxCallsPerAgentHourCap = 6 + AdvisorLLMMaxCallsPerDayCap = 300 +) + +// AdvisorLLMConfig is the knowledge.advisor_llm block. Zero numeric values +// take the defaults above; negative values are load errors. +type AdvisorLLMConfig struct { + Mode string `yaml:"mode,omitempty"` + Model string `yaml:"model,omitempty"` + Endpoint string `yaml:"endpoint,omitempty"` + APIKeyEnv string `yaml:"api_key_env,omitempty"` + APIKeyFile string `yaml:"api_key_file,omitempty"` + Candidates int `yaml:"candidates,omitempty"` + PaneLines int `yaml:"pane_lines,omitempty"` + TimeoutS int `yaml:"timeout_s,omitempty"` + MaxCallsPerAgentHour int `yaml:"max_calls_per_agent_hour,omitempty"` + MaxCallsPerDay int `yaml:"max_calls_per_day,omitempty"` + BudgetOverride bool `yaml:"budget_override,omitempty"` + HoldoutPercent int `yaml:"holdout_percent,omitempty"` + OnError string `yaml:"on_error,omitempty"` +} + +// ResolvedAdvisorLLM is the effective advisor_llm setting with defaults and +// the governor.litellm fallbacks applied. The key value is read from a file or +// env var and is never stored in hive.yaml. +type ResolvedAdvisorLLM struct { + Mode string + Model string + Endpoint string + APIKey string + Candidates int + PaneLines int + TimeoutS int + MaxCallsPerAgentHour int + MaxCallsPerDay int + HoldoutPercent int + OnError string +} + +func orIntDefault(v, def int) int { + if v == 0 { + return def + } + return v +} + +// advisorLLMModel is the explicit model, else governor.litellm's default model. +func (c *Config) advisorLLMModel() string { + if m := strings.TrimSpace(c.Knowledge.AdvisorLLM.Model); m != "" { + return m + } + return strings.TrimSpace(c.Governor.LiteLLM.DefaultModel) +} + +// validateKnowledgeAdvisorLLM returns load errors for malformed values and +// warnings for settings that are tolerated but resolve to off. +func (c *Config) validateKnowledgeAdvisorLLM() (warnings []string, err error) { + a := c.Knowledge.AdvisorLLM + switch a.Mode { + case "", AdvisorLLMModeOff, AdvisorLLMModeShadow, AdvisorLLMModeRank: + default: + return nil, fmt.Errorf("knowledge.advisor_llm.mode: %q is not %q, %q or %q", a.Mode, AdvisorLLMModeOff, AdvisorLLMModeShadow, AdvisorLLMModeRank) + } + switch a.OnError { + case "", AdvisorLLMOnErrorSilence, AdvisorLLMOnErrorMatcher: + default: + return nil, fmt.Errorf("knowledge.advisor_llm.on_error: %q is not %q or %q", a.OnError, AdvisorLLMOnErrorSilence, AdvisorLLMOnErrorMatcher) + } + for _, f := range []struct { + key string + v int + }{ + {"candidates", a.Candidates}, + {"pane_lines", a.PaneLines}, + {"timeout_s", a.TimeoutS}, + {"max_calls_per_agent_hour", a.MaxCallsPerAgentHour}, + {"max_calls_per_day", a.MaxCallsPerDay}, + } { + if f.v < 0 { + return nil, fmt.Errorf("knowledge.advisor_llm.%s: %d must be at least 1 (omit for the default)", f.key, f.v) + } + } + if a.HoldoutPercent < 0 || a.HoldoutPercent > 100 { + return nil, fmt.Errorf("knowledge.advisor_llm.holdout_percent: %d must be between 0 and 100", a.HoldoutPercent) + } + if !a.BudgetOverride { + if a.MaxCallsPerAgentHour > AdvisorLLMMaxCallsPerAgentHourCap { + return nil, fmt.Errorf("knowledge.advisor_llm.max_calls_per_agent_hour: %d exceeds the hard ceiling of %d; set budget_override: true to raise it", a.MaxCallsPerAgentHour, AdvisorLLMMaxCallsPerAgentHourCap) + } + if a.MaxCallsPerDay > AdvisorLLMMaxCallsPerDayCap { + return nil, fmt.Errorf("knowledge.advisor_llm.max_calls_per_day: %d exceeds the hard ceiling of %d; set budget_override: true to raise it", a.MaxCallsPerDay, AdvisorLLMMaxCallsPerDayCap) + } + } + if (a.Mode == AdvisorLLMModeShadow || a.Mode == AdvisorLLMModeRank) && c.advisorLLMModel() == "" { + warnings = append(warnings, fmt.Sprintf("knowledge.advisor_llm.mode %q has no model (set knowledge.advisor_llm.model); resolving to %q", a.Mode, AdvisorLLMModeOff)) + } + return warnings, nil +} + +// KnowledgeAdvisorLLM returns the effective advisor_llm setting. ok is false +// when knowledge.advisor is off (whatever the mode), or when no endpoint or key +// resolves from advisor_llm or governor.litellm. Mode is "off" when shadow/rank +// has no model. Precedence per field is explicit → governor.litellm → unset, +// matching GovernorConfig.ResolveReviewer. +func (c *Config) KnowledgeAdvisorLLM() (ResolvedAdvisorLLM, bool) { + if c == nil || !c.Knowledge.Advisor { + return ResolvedAdvisorLLM{}, false + } + a := c.Knowledge.AdvisorLLM + endpoint := strings.TrimRight(strings.TrimSpace(a.Endpoint), "/") + if endpoint == "" { + endpoint = c.Governor.LiteLLM.ResolveEndpoint() + } + apiKey := resolveKeyFromFileThenEnv(a.APIKeyFile, a.APIKeyEnv) + if apiKey == "" { + apiKey = c.Governor.LiteLLM.ResolveAPIKey() + } + if endpoint == "" || apiKey == "" { + return ResolvedAdvisorLLM{}, false + } + r := ResolvedAdvisorLLM{ + Mode: strings.TrimSpace(a.Mode), + Model: c.advisorLLMModel(), + Endpoint: endpoint, + APIKey: apiKey, + Candidates: orIntDefault(a.Candidates, DefaultAdvisorLLMCandidates), + PaneLines: orIntDefault(a.PaneLines, DefaultAdvisorLLMPaneLines), + TimeoutS: orIntDefault(a.TimeoutS, DefaultAdvisorLLMTimeoutS), + MaxCallsPerAgentHour: orIntDefault(a.MaxCallsPerAgentHour, AdvisorLLMMaxCallsPerAgentHourCap), + MaxCallsPerDay: orIntDefault(a.MaxCallsPerDay, AdvisorLLMMaxCallsPerDayCap), + HoldoutPercent: a.HoldoutPercent, + OnError: strings.TrimSpace(a.OnError), + } + if r.Mode == "" || r.Model == "" { + r.Mode = AdvisorLLMModeOff + } + if r.OnError == "" { + r.OnError = AdvisorLLMOnErrorSilence + } + return r, true +} diff --git a/src/pkg/config/knowledge_advisor_llm_test.go b/src/pkg/config/knowledge_advisor_llm_test.go new file mode 100644 index 0000000000..deafa236b8 --- /dev/null +++ b/src/pkg/config/knowledge_advisor_llm_test.go @@ -0,0 +1,129 @@ +package config + +import ( + "strings" + "testing" + + "gopkg.in/yaml.v3" +) + +func advisorLLMCfg(a AdvisorLLMConfig) *Config { + return &Config{Knowledge: KnowledgeConfig{Enabled: true, Advisor: true, AdvisorLLM: a}} +} + +func TestKnowledgeAdvisorLLM_Validate(t *testing.T) { + tests := []struct { + name string + cfg AdvisorLLMConfig + wantErr string + wantWarn bool + }{ + {"empty block ok", AdvisorLLMConfig{}, "", false}, + {"rank with model ok", AdvisorLLMConfig{Mode: "rank", Model: "m"}, "", false}, + {"bad mode", AdvisorLLMConfig{Mode: "loud"}, "knowledge.advisor_llm.mode", false}, + {"shadow without model warns", AdvisorLLMConfig{Mode: "shadow"}, "", true}, + {"rank without model warns", AdvisorLLMConfig{Mode: "rank"}, "", true}, + {"off without model silent", AdvisorLLMConfig{Mode: "off"}, "", false}, + {"hourly ceiling exceeded", AdvisorLLMConfig{MaxCallsPerAgentHour: 7}, "max_calls_per_agent_hour", false}, + {"daily ceiling exceeded", AdvisorLLMConfig{MaxCallsPerDay: 301}, "max_calls_per_day", false}, + {"ceilings at limit ok", AdvisorLLMConfig{MaxCallsPerAgentHour: 6, MaxCallsPerDay: 300}, "", false}, + {"ceilings raised with override", AdvisorLLMConfig{MaxCallsPerAgentHour: 60, MaxCallsPerDay: 3000, BudgetOverride: true}, "", false}, + {"holdout negative", AdvisorLLMConfig{HoldoutPercent: -1}, "holdout_percent", false}, + {"holdout over 100", AdvisorLLMConfig{HoldoutPercent: 101}, "holdout_percent", false}, + {"holdout 100 ok", AdvisorLLMConfig{HoldoutPercent: 100}, "", false}, + {"bad on_error", AdvisorLLMConfig{OnError: "panic"}, "knowledge.advisor_llm.on_error", false}, + {"on_error matcher ok", AdvisorLLMConfig{OnError: "matcher"}, "", false}, + {"candidates negative", AdvisorLLMConfig{Candidates: -1}, "candidates", false}, + {"pane_lines negative", AdvisorLLMConfig{PaneLines: -1}, "pane_lines", false}, + {"timeout_s negative", AdvisorLLMConfig{TimeoutS: -1}, "timeout_s", false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + warns, err := advisorLLMCfg(tt.cfg).validateKnowledgeAdvisorLLM() + if tt.wantErr == "" && err != nil { + t.Fatalf("unexpected error: %v", err) + } + if tt.wantErr != "" && (err == nil || !strings.Contains(err.Error(), tt.wantErr)) { + t.Fatalf("error = %v, want it to name %q", err, tt.wantErr) + } + if tt.wantWarn != (len(warns) > 0) { + t.Fatalf("warnings = %v, wantWarn %v", warns, tt.wantWarn) + } + }) + } +} + +func TestKnowledgeAdvisorLLM_ShadowWithoutModelResolvesOff(t *testing.T) { + c := advisorLLMCfg(AdvisorLLMConfig{Mode: "shadow", Endpoint: "http://gw.local", APIKeyEnv: "ADV_LLM_TEST_KEY"}) + t.Setenv("ADV_LLM_TEST_KEY", "k") + r, ok := c.KnowledgeAdvisorLLM() + if !ok || r.Mode != AdvisorLLMModeOff { + t.Fatalf("got %+v ok=%v, want ok with mode off", r, ok) + } +} + +func TestKnowledgeAdvisorLLM_DefaultsAndParse(t *testing.T) { + var k KnowledgeConfig + src := "advisor: true\nadvisor_llm:\n mode: rank\n model: small\n endpoint: http://gw.local/\n api_key_env: ADV_LLM_TEST_KEY\n" + if err := yaml.Unmarshal([]byte(src), &k); err != nil { + t.Fatal(err) + } + t.Setenv("ADV_LLM_TEST_KEY", "k") + r, ok := (&Config{Knowledge: k}).KnowledgeAdvisorLLM() + if !ok { + t.Fatal("ok = false") + } + want := ResolvedAdvisorLLM{Mode: "rank", Model: "small", Endpoint: "http://gw.local", APIKey: "k", + Candidates: 5, PaneLines: 80, TimeoutS: 15, MaxCallsPerAgentHour: 6, MaxCallsPerDay: 300, OnError: "silence"} + if r != want { + t.Fatalf("got %+v, want %+v", r, want) + } +} + +func TestKnowledgeAdvisorLLM_RequiresAdvisor(t *testing.T) { + t.Setenv("ADV_LLM_TEST_KEY", "k") + for _, mode := range []string{"off", "shadow", "rank"} { + c := advisorLLMCfg(AdvisorLLMConfig{Mode: mode, Model: "m", Endpoint: "http://gw.local", APIKeyEnv: "ADV_LLM_TEST_KEY"}) + c.Knowledge.Advisor = false + if _, ok := c.KnowledgeAdvisorLLM(); ok { + t.Errorf("mode %q: ok = true with knowledge.advisor false", mode) + } + } + var nilCfg *Config + if _, ok := nilCfg.KnowledgeAdvisorLLM(); ok { + t.Error("nil config ok = true") + } +} + +func TestKnowledgeAdvisorLLM_ResolutionPrecedence(t *testing.T) { + t.Setenv(LiteLLMEndpointEnv, "") + t.Setenv(DefaultLiteLLMAPIKeyEnv, "") + t.Setenv("ADV_LLM_TEST_KEY", "explicit-key") + t.Setenv("ADV_LLM_GOV_KEY", "gov-key") + + gov := func(c *Config) { + c.Governor.LiteLLM = LiteLLMConfig{Endpoint: "http://gov.local", APIKeyEnv: "ADV_LLM_GOV_KEY", DefaultModel: "gov-model"} + } + t.Run("explicit wins", func(t *testing.T) { + c := advisorLLMCfg(AdvisorLLMConfig{Mode: "rank", Model: "own", Endpoint: "http://own.local", APIKeyEnv: "ADV_LLM_TEST_KEY"}) + gov(c) + r, ok := c.KnowledgeAdvisorLLM() + if !ok || r.Endpoint != "http://own.local" || r.APIKey != "explicit-key" || r.Model != "own" { + t.Fatalf("got %+v ok=%v", r, ok) + } + }) + t.Run("absent falls back to governor.litellm", func(t *testing.T) { + c := advisorLLMCfg(AdvisorLLMConfig{Mode: "rank"}) + gov(c) + r, ok := c.KnowledgeAdvisorLLM() + if !ok || r.Endpoint != "http://gov.local" || r.APIKey != "gov-key" || r.Model != "gov-model" || r.Mode != "rank" { + t.Fatalf("got %+v ok=%v", r, ok) + } + }) + t.Run("both absent", func(t *testing.T) { + c := advisorLLMCfg(AdvisorLLMConfig{Mode: "rank", Model: "own"}) + if _, ok := c.KnowledgeAdvisorLLM(); ok { + t.Fatal("ok = true with no endpoint or key anywhere") + } + }) +} diff --git a/src/pkg/config/knowledge_config.go b/src/pkg/config/knowledge_config.go index da88db60f0..4ee173924a 100644 --- a/src/pkg/config/knowledge_config.go +++ b/src/pkg/config/knowledge_config.go @@ -56,6 +56,9 @@ type KnowledgeConfig struct { // AdvisorExcludeAgents lists agents (by name or family base name) the // advisor never types at, e.g. lanes whose work is reading, not editing. AdvisorExcludeAgents []string `yaml:"advisor_exclude_agents,omitempty"` + // AdvisorLLM configures the optional model-ranked advisor pass + // (hivecommons/hive#17054). Ignored unless Advisor is true. + AdvisorLLM AdvisorLLMConfig `yaml:"advisor_llm,omitempty"` } // PublicKnowledgeConfig is the dashboard-persisted owner override for the diff --git a/src/pkg/config/validate.go b/src/pkg/config/validate.go index af639daf52..7ccadaa94a 100644 --- a/src/pkg/config/validate.go +++ b/src/pkg/config/validate.go @@ -2,6 +2,7 @@ package config import ( "fmt" + "log" "net/url" "regexp" "sort" @@ -194,6 +195,13 @@ func (c *Config) ValidateWithOptions(opts ValidateOptions) error { if err := c.validateRepoForges(); err != nil { return err } + advisorWarnings, err := c.validateKnowledgeAdvisorLLM() + if err != nil { + return err + } + for _, w := range advisorWarnings { + log.Printf("WARNING: %s", w) + } if err := ValidateKnowledgeConnectors(c.Knowledge.Connectors); err != nil { return err } From 0b890a256015f82ba0cec30d85f1d5cc18b04433 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:19:11 -0500 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20config:=20allowlist=20adviso?= =?UTF-8?q?r=5Fllm=20leaves=20and=20refresh=20the=20runtime=20golden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The settings parity test requires every hive.yaml leaf to be either in the Settings UI or allowlisted; advisor_llm is yaml-only while it soaks, like knowledge.advisor. The agent-runtime golden gains the new zero-value AdvisorLLM block. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .../config/testdata/agent_runtime_golden.json | 17 ++++++++++++++++- src/pkg/dashboard/settings_parity_allowlist.txt | 13 +++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/pkg/config/testdata/agent_runtime_golden.json b/src/pkg/config/testdata/agent_runtime_golden.json index 5d4bbf6375..d089227a15 100644 --- a/src/pkg/config/testdata/agent_runtime_golden.json +++ b/src/pkg/config/testdata/agent_runtime_golden.json @@ -550,7 +550,22 @@ "AgentScopes": null, "Advisor": false, "AdvisorMaxPerKick": 0, - "AdvisorExcludeAgents": null + "AdvisorExcludeAgents": null, + "AdvisorLLM": { + "Mode": "", + "Model": "", + "Endpoint": "", + "APIKeyEnv": "", + "APIKeyFile": "", + "Candidates": 0, + "PaneLines": 0, + "TimeoutS": 0, + "MaxCallsPerAgentHour": 0, + "MaxCallsPerDay": 0, + "BudgetOverride": false, + "HoldoutPercent": 0, + "OnError": "" + } }, "Hub": { "Enabled": false, diff --git a/src/pkg/dashboard/settings_parity_allowlist.txt b/src/pkg/dashboard/settings_parity_allowlist.txt index c9042441a4..b25f297091 100644 --- a/src/pkg/dashboard/settings_parity_allowlist.txt +++ b/src/pkg/dashboard/settings_parity_allowlist.txt @@ -352,6 +352,19 @@ issues.rfc_existing_check.post_when_nothing_found # triage existing-coverage che issues.sha_hold_trusted_label # TODO #11854 knowledge.advisor # mid-task knowledge advisor, yaml-only while it soaks (#17052) knowledge.advisor_exclude_agents[] # mid-task knowledge advisor, yaml-only while it soaks (#17052) +knowledge.advisor_llm.api_key_env # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.api_key_file # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.budget_override # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.candidates # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.endpoint # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.holdout_percent # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.max_calls_per_agent_hour # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.max_calls_per_day # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.mode # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.model # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.on_error # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.pane_lines # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) +knowledge.advisor_llm.timeout_s # LLM-ranked knowledge advisor, yaml-only while it soaks (#17054) knowledge.advisor_max_per_kick # mid-task knowledge advisor, yaml-only while it soaks (#17052) knowledge.agent_scopes..include_states[] # TODO #11854 knowledge.agent_scopes..layers[] # TODO #11854 From 824386ae9721b206bdf38ace45d2d690089242e2 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:56:53 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8C=B1=20config:=20advisor=5Fllm=20ne?= =?UTF-8?q?gative-value=20error=20names=20the=20check=20it=20performs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zero is accepted as 'use the default'; only negatives are rejected, so say so. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/pkg/config/knowledge_advisor_llm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/config/knowledge_advisor_llm.go b/src/pkg/config/knowledge_advisor_llm.go index 4fd638e534..c2a09dbf2a 100644 --- a/src/pkg/config/knowledge_advisor_llm.go +++ b/src/pkg/config/knowledge_advisor_llm.go @@ -96,7 +96,7 @@ func (c *Config) validateKnowledgeAdvisorLLM() (warnings []string, err error) { {"max_calls_per_day", a.MaxCallsPerDay}, } { if f.v < 0 { - return nil, fmt.Errorf("knowledge.advisor_llm.%s: %d must be at least 1 (omit for the default)", f.key, f.v) + return nil, fmt.Errorf("knowledge.advisor_llm.%s: %d must not be negative (omit or 0 for the default)", f.key, f.v) } } if a.HoldoutPercent < 0 || a.HoldoutPercent > 100 {