Repository navigation
Conversation
Apply the existing 8,192-token gateway ceiling to the managed llama-server preset so malformed or direct requests cannot inherit unlimited generation when max_tokens is omitted. Co-authored-by: Copilot <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 27, 2026, 10:46 AM ET / 14:46 UTC. ClawSweeper reviewWhat this changesThe PR adds the gateway’s 8,192-token output ceiling to the managed llama-server preset and tests that the generated preset and provider definition remain aligned. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain This PR remains necessary: current main generates the managed llama-server preset without an Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherLocal AI generates a llama-server preset for the managed model and separately writes the gateway provider definition. The preset controls the local server’s behavior when a request omits its generation limit. flowchart LR
A[Managed local model] --> B[Preset generator]
D[Gateway output policy] --> B
D --> E[Gateway provider definition]
B --> C[llama-server]
E --> F[Gateway or local request]
F --> C
C --> G[Bounded completion]
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared 8,192-token ceiling for the gateway definition and generated managed preset, with a redacted b10488 request transcript demonstrating the intended default and explicit override behavior. Do we have a high-confidence way to reproduce the issue? Yes from source for the configuration gap: current main omits n-predict while advertising an 8,192-token gateway maximum. The exact pinned-runtime behavior still needs an inspectable b10488 request trace. Is this the best way to solve the issue? Yes, conditional on runtime proof. Reusing the existing shared ceiling at the sole managed-preset generation point avoids a competing limit policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 911f36860b2d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
karkarl
left a comment
There was a problem hiding this comment.
Adversarial dual-model review verdict: SHIP TODAY.
Opus and Codex found no code defects, security issues, race conditions, correctness problems, or release blockers. The intentional compatibility change caps direct loopback callers that omit max_tokens at 8,192; supported gateway callers were already capped, and the first-party direct caller sends an explicit limit. CI is green and the PR is merge-clean.
Summary
n-predictdefault to the managed llama-server model presetMaximumOutputTokenspolicy so server and provider limits stay alignedCloses #1240
Validation
./build.ps1passeddotnet test ./tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restorepassed: 687 passed, 0 failed, 0 skippeddotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restorepassed: 3,817 passed, 0 failed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restorepassed: 2,741 passed, 0 failed, 0 skippedReal behavior proof
Verified on Windows ARM64 with the pinned llama.cpp b10488 runtime, the qualified Qwen 3.6 35B model, and an NVIDIA RTX Spark N1X GPU.
n-predict = 8192max_tokensgenerated 8 tokens and returnedfinish_reason: lengthmax_tokens: 3generated 3 tokens and returnedfinish_reason: lengthThis proves omitted request limits inherit the server default while explicit request limits remain authoritative in b10488.
Review
python .agents/skills/autoreview/scripts/autoreview --mode local: clean, no accepted or actionable findings