Skip to content

Testing: VCR-style HTTP Recording for LLM Testing #782

Description

@lmorchard

Concept from opencode:
To test LLM integrations reliably and cheaply, opencode built a custom HTTP VCR tool. It executes real requests on the first run and caches the payloads as JSON "cassettes", including strict automatic redaction to prevent secret leaks.

How decafclaw could implement this:
decafclaw's current eval suite either hits live LLMs (costly, slow, flaky) or relies on manual mocking that easily drifts from reality.

Proposed Implementation:

  • Integrate vcrpy (or build a lightweight equivalent) into the pytest suite for the llm client.
  • Add a make record-evals command to hit real models and commit sanitized cassettes.
  • Allow make test and make eval-tools to run deterministically and instantly in CI based on the recorded cassettes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions