Fake (testing)
In-repo fake models for offline development and tests.
The fake plugin registers the in-repo test doubles (llm.FakeLLM,
stt.FakeSTT, tts.FakeTTS, vad.FakeVAD) so "fake/…" specs resolve with no
cloud accounts. It's the fastest way to exercise the turn loop in tests, examples,
and CI.
Capabilities
LLM · STT · TTS · VAD
Install & import
import _ "github.com/webdeveloperben/agents-go/plugins/fake"Import for its side effect — it self-registers the fake provider.
Model specs
Registered as fake. For STT, the :variant is used as the canned transcript.
| Spec | Behaviour |
|---|---|
fake/llm | echoes a canned reply |
fake/stt:hello | transcribes every utterance as hello |
fake/tts | emits silent PCM at the default rate |
fake/vad | fake voice-activity events |
session, _ := agents.NewSession(agents.Config{
LLM: "fake/llm", STT: "fake/stt:hello", TTS: "fake/tts", VAD: "fake/vad",
})Typed constructors
The underlying doubles live in the core packages and take options directly, so you
can also pass a concrete value into Config (e.g. to set a sample rate):
Config{ TTS: tts.NewFakeTTS(tts.WithFakeSampleRate(24000)) }llm.NewFakeLLM, stt.NewFakeSTT (stt.WithFakeTranscript), tts.NewFakeTTS
(tts.WithFakeSampleRate), vad.NewFakeVAD.
Caveats
Test doubles only — no real recognition or synthesis. Not for production.
Related
- Models & providers
- Build a voice agent — uses fake specs offline.