Options

Everything under the precog key in nuxt.config.ts.
OptionDefaultWhat it does
enabledtrueTurn the whole module off without removing it.
endpoint'/_precog/predict'Path of the Nitro route that talks to Jev.
modelunsetLeave it unset. See the model name is a trap.
providerunset'typesafe' or 'vercel'. Unset, the key decides.
baseURLunsetTypeSafe base URL. Point it at a mock in tests.
mode'prefetch''prefetch', 'prerender' or 'auto'.
thresholds.prefetch0.25Lowest click probability worth a prefetch.
thresholds.prerender0.6Lowest click probability worth a prerender.
budget.maxPrefetch3Most URLs prefetched at once.
budget.maxPrerender1Most URLs prerendered at once.
budget.maxCallsPerMinute20Enforced on the client and on the server.
budget.maxCallsPerSession200Hard stop for one visitor.
maxCandidates30Links sent per request. Capped at 254 by Jev's choice limit.
timeoutMs1500Client deadline. Measured round trips are 340 to 500 ms.
minIntervalMs1200Shortest gap between two predictions.
fallback'native'On failure: 'native' document rules at moderate, or 'none'.
include[]Only these path globs may be speculated. Empty means all.
exclude['/logout', '/signout', '/api/**', '/auth/**', '/cart/**']Never speculated.
cache.ttlSeconds60How long a prediction stays reusable on the server.
privacy.sendQueryfalseSend query strings. Off because they carry tokens.
privacy.sendAnchorTexttrueSend link text.
privacy.sendHistorytrueSend the last five paths.
privacy.requireConsentfalseNothing runs until grantConsent().
overlay'dev'true, false or 'dev'. When false, nothing ships.
takeOverNuxtLinkPrefetchfalseTurn off NuxtLink's viewport prefetch, keep interaction.
documentNavigationfalseExperimental, see below.
pricingunset{ inputPerMillion, outputPerMillion } for the overlay's cost line.

The API key

It never reaches the browser, and there is an e2e test that fails if it ever appears in anything the browser receives.

There are two kinds of key and they are not interchangeable:

VariableKind of keyGoes to
TYPESAFE_API_KEYTypeSafeapi.typesafe.ai
AI_GATEWAY_API_KEYVercel AI Gatewayai-gateway.vercel.sh, selected automatically
NUXT_PRECOG_API_KEYeitherset provider to say which

A gateway key sent to TypeSafe directly answers 401 Cannot authenticate with the server, which reads like a bad key rather than the wrong door. If you see that, check which kind you have before regenerating anything.

The model name is a trap

Leave model unset. advocaat then picks the right one for the service: jev-latest against TypeSafe, typesafe-ai/jev through the gateway.

Setting it to jev-latest explicitly works directly and breaks the gateway, where a bare name gets a typesafe-ai/ prefix and typesafe-ai/jev-latest does not exist. The error is 404 Model 'typesafe-ai/jev-latest' not found.

Glob syntax

include and exclude take path globs, matched against the path with the query stripped:

GlobMatches
/logoutexactly /logout
/blog/*one segment: /blog/hello, not /blog/2026/hello
/api/**any depth: /api/v1/users
/a?one character: /a1

documentNavigation

Experimental.

With it on, a click on a link the module prerendered bypasses the client router and does a real document navigation, so the browser can hand over the copy it already has. Good for content sites that want an MPA feel; it throws away the SPA's state on every click.

Measured behaviour: the click does leave the router out, and the browser serves the document from whatever it already has. In a test that gives it a couple of seconds, that was the prefetch (deliveryType: "navigational-prefetch") rather than a finished prerender. The flag promises a real document navigation that uses what is already there, not "always instant".