Skip to content

fix(pixel): compile large tool strings in llama.cpp grammar - #4991

Open
0xacee wants to merge 1 commit into
Osmantic:public-betafrom
0xacee:fix/pixel-keep-tool-schemas-within-grammar-limits
Open

fix(pixel): compile large tool strings in llama.cpp grammar#4991
0xacee wants to merge 1 commit into
Osmantic:public-betafrom
0xacee:fix/pixel-keep-tool-schemas-within-grammar-limits

Conversation

@0xacee

@0xacee 0xacee commented Sep 14, 2026

Copy link
Copy Markdown

Why this matters

Pixel registers research, download promotion and host-command proposal tools whose string schemas expand to char{1,16000}, char{8,4096} and char{1,16384}. The GBNF parser in ODS's default Compose runtime, llama.cpp b9014, rejects each schema before even short valid arguments can be generated. This is a schema compilation failure, independent of the length of the requested command or research brief.

Remove only those three schema maxLength declarations and describe their existing limits. Execution still rejects oversized values before HTTP, promotion RPC, or broker publication. Required fields, types, smaller bounds, exact receipts and owner approval remain intact. Rolling back restores the incompatible schema declarations.

Regression evidence and validation

  • Built the native C++ schema converter and grammar engine from b9014, commit d4b0c22f9e67f0295e91dc1ab4f17c0fb2557fa4, matching ods/docker-compose.base.yml. All three offered schemas fail on the base with “number of repetitions exceeds sane defaults.” Parser source.
  • New model-free native bridge compiles each real tool schema and feeds JSON arguments through the grammar engine. Short and full-size arguments pass after the fix; missing fields and wrong types remain invalid. Six new tests pass, including execution-boundary length/UTF-8 byte checks and an actual temporary broker queue.
  • Full node --test extensions/services/pixel-agent/tests/*.test.mjs: 1,072 pass, one existing installed-runtime compaction check skipped. The native tests ran, with no native-test skips. Focused selection: 38 pass.
  • Added a targeted Linux CI job that builds the pinned converter/parser and requires the native tests. No model weights or inference are needed. git diff --check passes.

Overlap check

Searched live open/closed PRs by grammar/schema terms and all three production paths. #4406 fixes RPC deadlines; #4334/#4328 fix research response handling; #4905 fixes promotion filenames; #4396 changes public naming; #4479 adds extension proposals. None changes these large string schema bounds. The already-merged web-extract tool has its own smaller URL bound and is unchanged here.

Combined the exact shared-file changes from #4396, then #4479, plus #4905 and its promotion regression: 39 selected tests pass. Prefer this PR before rebasing #4396#4479; #4905's disjoint filename changes can land in either order. This checks the shared plugin files, not the entire unrelated feature branches.

Remaining validation

Ready for review; hosted CI and independent review pending. Native schema compilation is verified on Linux x86-64, not an installed OpenClaw/llama.cpp generation run. Actual model tool generation and deployed runtime reload remain unverified. No gateway, model, broker action or access mode was activated.

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.

1 participant