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.

SettingDefaultMeaning
jev.api_keyenv TYPESAFE_API_KEYTypeSafe API key
jev.modeljev-latestModel name, or a pin such as jev-1.13.0
jev.threshold0.5Probability at which jev() returns true
jev.batch_size20Rows per API request. Accuracy drops measurably above ~20–25; see How it works
jev.concurrency16Parallel API requests; up to twice that many are queued ahead of the executor
jev.max_prefetch_rows5000How 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.noticesonProgress NOTICE per finished request and a summary per table: requests, tokens, estimated cost, time
jev.api_urlhttps://api.typesafe.ai/v1/systemoneEndpoint (proxies, mocks)
jev.timeout30Seconds per API request. Waits are interruptible: statement_timeout and cancel requests apply within 250 ms
jev.keepalive600Seconds 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_statement0 (off)Abort if the statement would send more rows than this
jev.max_chars_per_statement0 (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.