Table of Contents

Mock agents (llmcpp)

Mock agents replace model choices with a deterministic script. The repository's failure fixture deliberately submits invalid code and then gives up:

{
  "model": "mock-model",
  "functions": {
    "*": [
      {"tool": "submit", "arguments": {"body": "not_declared();"}},
      {"respond": {"status": "error", "message": "mock gave up"}}
    ]
  }
}

not_declared() has no declaration in the fixture, so the compiler rejects the body. The following scripted response reports generation failure. This tests an error path without hoping that a live model happens to produce it.

LLMCPP_MOCK_SCRIPT selects a script; LLMCPP_MOCK_LOG can record tool activity. Other fixtures submit corrected bodies or inspect context. The compiler still validates submissions and enforces budgets, keeping tests on the real acceptance path.

Source: 02_failure.json.