Skip to content

fix(mantis): pin harness pdf tool model to the catalog model - #127882

Merged
obviyus merged 1 commit into
mainfrom
t3code/mantis-pdf-model
Aug 22, 2026
Merged

obviyus merged 1 commit into
mainfrom
t3code/mantis-pdf-model

Conversation

@obviyus

@obviyus obviyus commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Mantis run 32572580656 (proof attempt on #127770) got past scripting the Code Mode exec(pdf) turn, but both lanes then died inside the pdf tool with Unknown model: openai/gpt-5.5 before the native-vs-fallback provider dispatch the scenario exists to compare.

Root cause: createPdfTool auto-resolves its model through the media-understanding defaults, which walk plugin manifest defaults and pick openai/gpt-5.5 (extensions/openai/openclaw.plugin.json). The Mantis SUT catalog defines exactly one model, gpt-5.6-luna (scripts/e2e/telegram-mantis-sut.ts), so the resolved ref cannot be constructed and the tool fails.

Why This Change Was Made

Explicit agents.defaults.pdfModel short-circuits the auto-resolution path entirely (src/agents/tools/pdf-tool.model-config.ts:200-207), so the harness config — the owner of "the SUT's only model is gpt-5.6-luna" — pins it there. Every media recipe benefits, not just the staged-PDF one.

With the pdf tool actually running, its own provider call becomes a real mock request that consumes the staged-media script's second response (mock-openai repeats the exhausted script's last entry, so the follow-up turn still resolves). The recipe wait moves from --until-provider-requests 3 to 4, the prose names the pdf tool's request as the point where the lanes diverge (input_file vs extracted text), and the workflow-test recipe pins follow.

User Impact

Maintainer/CI tooling only — no product code. Mantis staged-media proofs on PDF-path PRs (first consumer: #127770, which flips openai nativeDocumentInputs to ["pdf"]) can now reach the provider dispatch under comparison instead of failing on model resolution.

Evidence

  • Failing behavior: run 32572580656 verdict — both lanes Unknown model: openai/gpt-5.5 inside the pdf tool bridge.
  • node scripts/run-vitest.mjs test/scripts/mantis-telegram-desktop-proof-workflow.test.ts — pass.
  • node scripts/check-changed.mjs -- <3 changed files> — pass (format, lint, guards).
  • Autoreview (codex gpt-5.6-sol, high): clean, "patch is correct" 0.98.
  • Live proof: next Mantis dispatch on feat(pdf): add explicit OpenAI native document opt-in #127770 after this lands exercises the changed path end to end.

The pdf tool auto-resolves its model from plugin manifest defaults
(openai gpt-5.5), which the Mantis SUT catalog does not define, so every
pdf round trip died with "Unknown model: openai/gpt-5.5" before
native-vs-fallback dispatch (run 32572580656). Pin
agents.defaults.pdfModel to the only harness model and account for the
pdf tool's own provider request in the staged-media recipe wait/pins.
@clawsweeper

clawsweeper Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@obviyus
obviyus marked this pull request as ready for review August 22, 2026 12:44
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 22, 2026
@obviyus
obviyus merged commit e8e656f into main Aug 22, 2026
194 of 195 checks passed
@obviyus
obviyus deleted the t3code/mantis-pdf-model branch August 22, 2026 12:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 23, 2026
…w#127882)

The pdf tool auto-resolves its model from plugin manifest defaults
(openai gpt-5.5), which the Mantis SUT catalog does not define, so every
pdf round trip died with "Unknown model: openai/gpt-5.5" before
native-vs-fallback dispatch (run 32572580656). Pin
agents.defaults.pdfModel to the only harness model and account for the
pdf tool's own provider request in the staged-media recipe wait/pins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant