Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

docs(ai): clarify hosted diagnostic request budget

pulse-triage[bot]153b80f7a1b1
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md
index 521d01f717..135c6a3c75 100644
--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md
+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md
@@ -8339,10 +8339,14 @@ acceptance. Normal tests skip the hosted entry point without its explicit flag.
The fixed five-VM inventory has no agent, action executor or persistent store.
The recording planner accepts only those VMs' reboot capabilities and always
-requires approval. Three fresh sessions each allow at most eight provider calls
-(including final/recovery calls), 120 seconds, 128 KiB per request and 2048 output
-tokens per call: at most 49,152 requested output tokens across the experiment.
-Model-owned tool choice and adverse/tool-free results are preserved. Acceptance
-requires each target's actual approval-required tool receipt, not final prose.
-This fixture changes no production behaviour and proves no hosted acceptance
-until the fixed-source, credential-contained execution has actually completed.
+requires approval. Three fresh sessions each allow at most eight logical adapter
+calls (including final/recovery calls), 120 seconds, a 128 KiB provider-neutral
+request snapshot and 2048 output tokens per logical call. This is a 49,152-token
+logical request budget across the experiment. It is not an upstream-attempt or
+billing ceiling: the fixed production adapter retains bounded transport retries
+and compatibility fallbacks, and execution accounting must include those
+attempts. Model-owned tool choice and adverse/tool-free results are preserved.
+Acceptance requires each target's actual approval-required tool receipt, not
+final prose. This fixture changes no production behaviour and proves no hosted
+acceptance until the fixed-source, credential-contained execution has actually
+completed.
diff --git a/internal/ai/chat/hosted_lifecycle_diagnostic_test.go b/internal/ai/chat/hosted_lifecycle_diagnostic_test.go
index d36a07174a..fd029fe800 100644
--- a/internal/ai/chat/hosted_lifecycle_diagnostic_test.go
+++ b/internal/ai/chat/hosted_lifecycle_diagnostic_test.go
@@ -21,8 +21,10 @@ import (
const diagnosticModel = "google/gemini-2.5-flash"
const diagnosticPrompt = "Find the five VMs named win-01 through win-05 and prepare their reboot plans. Do not execute any action."
-// A hard provider boundary also counts final-response/recovery calls, which may
-// occur outside the loop's ordinary turn budget. No forced tool selection.
+// A hard logical-call boundary also counts final-response/recovery calls, which
+// may occur outside the loop's ordinary turn budget. The wrapped production
+// adapter retains its own transport retry/fallback behavior. No forced tool
+// selection.
type lifecycleDiagnosticProvider struct {
providers.StreamingProvider
requests []providers.ChatRequest
@@ -39,6 +41,8 @@ func (p *lifecycleDiagnosticProvider) ChatStream(ctx context.Context, req provid
}
req.Model = diagnosticModel
req.MaxTokens = 2048
+ // Bound the provider-neutral request before the production adapter projects
+ // it to its wire format. This is not a wire-byte or billing-attempt counter.
body, err := json.Marshal(req)
if err != nil || len(body) > 128*1024 {
return fmt.Errorf("diagnostic input size limit")