Mock Provider¶
Reference provider module for testing and development without making real LLM API calls.
Module ID¶
provider-mock
Installation¶
providers:
- module: provider-mock
source: git+https://github.com/microsoft/amplifier-module-provider-mock@main
config:
responses:
- "Response 1"
- "Response 2"
- "Response 3"
Configuration¶
| Option | Type | Default | Description |
|---|---|---|---|
responses | list | [] | List of pre-configured responses to return in rotation |
debug | bool | false | Enable standard debug events |
raw_debug | bool | false | Enable ultra-verbose raw API I/O logging |
Debug Configuration¶
Standard Debug (debug: true)¶
- Emits
llm:request:debugandllm:response:debugevents - Contains request/response summaries
- Useful for testing event flows
Raw Debug (debug: true, raw_debug: true)¶
- Emits
llm:request:rawandllm:response:rawevents - Contains complete mock request/response objects
- Useful for testing logging infrastructure
Behavior¶
- Returns responses from configured list in rotation
- Can simulate tool calls when prompt contains "read"
- No external API calls
- No authentication required
Use Cases¶
- Unit testing - Test orchestrators and tools without API costs
- Integration testing - Verify event flows and hook behavior
- Development - Rapid iteration without rate limits
- CI/CD - Automated tests without API keys
Example¶
providers:
- module: provider-mock
config:
debug: true
raw_debug: true
responses:
- "I'll help you with that task."
- "The operation completed successfully."
Repository¶
-> GitHub