Skip to main content

voicegw check

Verify that VoiceGateway’s metering and storage pipeline works end to end. check drives one synthetic instrumented request and confirms a request row and a session row land in storage. It is framework-agnostic: no providers, no models, no network. Use it as a pre-deploy check after touching voicegw.yaml, or when triaging a “the dashboard says zero costs” report. VoiceGateway meters the native provider instances you build in your agent (via attach()), so check does not construct providers from config. It proves the path a real attach()ed call writes through: cost resolution (voice-prices), the SQLite store, and session correlation.

Usage

smoke-test is a hidden, deprecated alias for check and behaves identically.

Options

What it checks

  1. Config: voicegw.yaml parses and cost tracking is enabled. check needs SQLite storage to verify the write.
  2. Active project: resolves the same way the gateway does (--project, then default_project, then first non-default project, then default).
  3. Request landed: one synthetic instrumented request is driven through the metering middleware for a priced model id (openai/gpt-4o-mini), and the resulting request row is read back from storage.
  4. Session correlation: the request correlates to a sessions row carrying the modality, request_count, and total_cost_usd. The session id is created, written, and read back inside a single event loop.
If any check fails, the command exits 1 and the report names the failed checks. On success it exits 0. Requires the livekit runtime (the metering wrapper subclasses the LiveKit plugin types); install voicegateway[livekit]. If it is absent, check reports a clear message rather than crashing.

Examples

Sample output

What it does NOT replace

check proves the metering + storage path. It does not connect to a LiveKit server, capture real audio, or measure end-to-end latency. For a real run, add attach() to your agent and place a call:
See Getting started with attach for the pattern.

Exit codes