Signal · API

SignalError

SignalError is the error a failed Signal call rejects with: a message, a code from ErrorCode, and an optional context. A named provider reads its API key from its environment variable unless apiKey is passed; here it is empty, so the output is the same everywhere. createSignal does not throw: the first call rejects with E_MISSING_API_KEY before any request is sent, and no model is called.

Provider
'groq'
Options, client omitted
{ apiKey: '' }
Prompt
'Which nights does The Tempest play?'
Error
{
  requests: 0,
  code: 'E_MISSING_API_KEY',
  message: 'Missing API key for groq. Set GROQ_API_KEY or pass apiKey.',
}
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.