Skip to main content

llm-matched-responses

An llm plugin that provides a matched-responses model for testing. Returns configurable responses based on input patterns, so you can test LLM-based systems without real API keys.

Installation

llm install llm-matched-responses

Usage

# Default: echoes back the input
llm -m matched-responses "Hello world"
# Output: Echo: Hello world

# Static response for all inputs (via env var)
LLM_MATCHED_RESPONSE="Fixed reply" llm -m matched-responses "anything"
# Output: Fixed reply

# Substring-matched responses from a JSON file
echo '{"hello": "Hi there!", "help": "I can help."}' > responses.json
LLM_MATCHED_RESPONSES_FILE=responses.json llm -m matched-responses "hello world"
# Output: Hi there!

Response resolution order

  1. LLM_MATCHED_RESPONSE env var: if set, always return this exact string
  2. LLM_MATCHED_RESPONSES_FILE env var: path to a JSON file mapping input substrings to responses. The first matching key wins.
  3. Default: returns "Echo: <input>" (or "Echo: (empty message)" for empty input)

Responses file format

{
    "hello": "Hello! I am the test model.",
    "help": "I am a test model that returns matched responses.",
    "code": "Here is some code:\n```python\nprint('hello')\n```"
}

Keys are matched as substrings of the user's message. The first match wins.

Metadata

Release files for llm-matched-responses 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-matched-responses 0.0.4
File Size Uploaded Provenance Actions
llm_matched_responses-0.0.4.tar.gz 7.3 kB With provenance Details for llm_matched_responses-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-matched-responses 0.0.4
File Interpreter ABI Platform Actions
llm_matched_responses-0.0.4-py3-none-any.whl Python 3 none any Details for llm_matched_responses-0.0.4-py3-none-any.whl

Total release size: 15.4 kB

Release files / llm_matched_responses-0.0.4.tar.gz

Download URL llm_matched_responses-0.0.4.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d0c60b6123924209d9ff10d26cc396d9fb8d3356d086e6129cd4a5e0e348975
BLAKE2b-256 checksum
How to use checksums
4fab2951a9513999a87933971b65883197b3db1ec6dbed2e37bb9f887505766b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / llm_matched_responses-0.0.4-py3-none-any.whl

Download URL llm_matched_responses-0.0.4-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ea5e38f88c6050ad9f0ee6af4bd6ea47d5877e1e48d7192ebb5a9efbaf0848b
BLAKE2b-256 checksum
How to use checksums
d40283608286f4c043be1769888bcb75f4570c9179235e0ec216354c3076db37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Security for llm-matched-responses 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_matched_responses-0.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page