Settings
GUCs for the API key, model, batching, notices, timeouts, connection keep-alive, and spend guards.
All settings are ordinary PostgreSQL GUCs: SET jev.<name> = ..., ALTER ROLE ... SET, ALTER DATABASE ... SET, or postgresql.conf.
| Setting | Default | Meaning |
|---|---|---|
jev.api_key | env TYPESAFE_API_KEY | TypeSafe API key |
jev.model | jev-latest | Model name, or a pin such as jev-1.13.0 |
jev.threshold | 0.5 | Probability at which jev() returns true |
jev.batch_size | 20 | Rows per API request. Accuracy drops measurably above ~20–25; see How it works |
jev.concurrency | 16 | Parallel API requests; up to twice that many are queued ahead of the executor |
jev.max_prefetch_rows | 5000 | How far past a cache miss the read-ahead scans to find the requested row, and how many skipped rows it keeps for later requests (memory bound) |
jev.notices | on | Progress NOTICE per finished request and a summary per table: requests, tokens, estimated cost, time |
jev.api_url | https://api.typesafe.ai/v1/systemone | Endpoint (proxies, mocks) |
jev.timeout | 30 | Seconds per API request. Waits are interruptible: statement_timeout and cancel requests apply within 250 ms |
jev.keepalive | 600 | Seconds a pooled API connection may sit idle before it is reconnected. The first request on a fresh connection is the slow one (TLS plus up to 1.5 s of server-side setup) |
jev.max_rows_per_statement | 0 (off) | Abort if the statement would send more rows than this |
jev.max_chars_per_statement | 0 (off) | Abort if the statement would send more characters of row data than this |
sql
SET jev.api_key = 'your-key';
ALTER ROLE analyst SET jev.api_key = 'your-key';
SET jev.threshold = 0.7;
SET jev.max_rows_per_statement = 2000;jev.api_key falls back to the TYPESAFE_API_KEY environment variable of the server process, not of your psql client.
The last two settings are spend guards for shared deployments. 0 means off. Large tables shows how to use them. How it works explains batch size, concurrency, and the cache.