Administration
Jev connection
Connecting ThePredict to Jev, TypeSafe's decision model: the key, the connection settings, the service check, what is sent, and what it costs.
Jev is the decision model of TypeSafe. It answers choice questions with calibrated probabilities and never generates text or runs anything. ThePredict uses it as the final pick among the candidate tactics its own engine prepares. ThePredict is an independent addon: naming Jev does not imply TypeSafe's endorsement.
Jev is optional. Without a key, nothing leaves your server and every bound mob fights with its profile's local planner (level LOCAL), at no cost.
The key
- Recommended: put the key in the environment variable
TYPESAFE_API_KEYof the server process. It wins overjev.apiKey. - Alternative:
jev.apiKeyinconfig.yml, if you cannot set a variable. jev.apiKeyEnvironmentrenames the variable (empty means onlyjev.apiKeyis used). Write the variable's name there, never the key.- Restart the server after setting or changing the key. It is read only at startup;
/thepredict checkre-checks with the key already loaded and does not read a new one.
export TYPESAFE_API_KEY="<your key here>"
java -jar paper.jar --noguiImportant Keep the key private
Never paste the key in chats, screenshots, reports or command arguments. ThePredict never prints it: not in the console, not in /thepredict status, not in migration reports, not in records. If you share a config.yml, blank jev.apiKey first. A key pasted into jev.model by mistake is refused at load without showing its value.
Connection settings
| Key | Default | Notes |
|---|---|---|
jev.baseUrl | https://api.typesafe.ai | https required; plain http only for a loopback host. |
jev.model | jev-1.13.0 | The model tested with this release. |
jev.provider | typesafe | Keep the default. |
jev.timeoutMillis | 800 ms | Must stay below profileDefaults.maximumIntentDurationTicks × 50. |
jev.connectTimeoutMillis | 1500 ms | |
jev.maxResponseBytes | 262144 | |
jev.maxStateChars | 12000 | Largest combat state sent; at most 45 000. |
Checking the service
With a key, the start checks the service with GET /v1/models, which spends no tokens, and reports in the console:
Checking Jev without spending tokens; the result follows in the console.
Jev check: READY (credential valid; model unverified until first inference). Decisions are enabled. The check reads the key and the model list; it does not verify an inference or its quality./thepredict check runs the same check on demand without blocking the server. The current state is the State: line of /thepredict status:
| State | Meaning | What to do |
|---|---|---|
UNCONFIGURED | No key is configured. | Set the TYPESAFE_API_KEY environment variable (or jev.apiKey) and restart. Meanwhile mobs fight with their local planner, at no cost. |
INVALID_CONFIGURATION | config.yml is invalid; the console names the file, the path and the reason. | Fix the file and restart. ThePredict stays inactive; MythicMobs keeps working. |
CHECKING | The service is being checked (at startup, or after a pause). | Wait for the result in the console or in /thepredict status. |
READY | The service accepts requests. | Nothing. |
PAUSED | Requests are paused after a rate limit (429), an overload (529), network or service errors, two timeouts in a row, three invalid answers in a row, or a rejected request (60 s). | Wait: ThePredict retries with a growing pause (1 to 60 s), then a single trial request. If it repeats, check roundtrip latency and the limits. |
INVALID_CREDENTIALS | The key was rejected (401). | Check the key in your TypeSafe account, set it and restart: the key is read only at startup. |
INVALID_MODEL | The configured model does not exist. | Use the tested model ID jev-1.13.0 and restart. |
With INVALID_CREDENTIALS or INVALID_MODEL, ThePredict sends nothing until a restart or a /thepredict check; mobs fight locally meanwhile. A paused service retries by itself.
What Jev receives
One request per encounter: a short summary of the fight in English (bands such as MELEE or CRITICAL, facts such as RAISING_SHIELD), the profile's objective, and one question per mob listing its candidate tactics as plain-English options.
- Players are
player_1,player_2…; other entities areentity_1… with their species. Names, UUIDs, coordinates,Displaynames, MythicMobs IDs and factions never travel. - No numbers from your skills and no choice IDs are sent; skills are described with fixed phrases built from their
Intentionline. - Requests have a size guard: a request whose state plus longest question would pass the model's limit is not sent; that encounter plays locally and the service is not paused.
Question detail
decision.questionDetail (or a profile's Timing.QuestionDetail) sets how much each option says, and so what each request costs. Measured with the real account on the production request (one mob, one player, one contingency, seven options):
| Detail | Tokens per request | Cost per hour of one mob in continuous combat |
|---|---|---|
compact | ≈ 953 | ≈ 0.14 USD |
standard | ≈ 1 701 | ≈ 0.26 USD |
full (default) | ≈ 1 884 | ≈ 0.28 USD |
full + fit checks | ≈ 2 950 | ≈ 0.45 USD |
full is the default because it kept the most acceptable answers at the default confidence threshold; compact costs about half and is available per profile. What each level sends is shown in Profiles, tactics & contexts.
Costs and capacity
Price. At the time this release was tested, Jev cost 0.042 USD per million input tokens, and output was free. TypeSafe can change prices; check their models page before relying on these numbers. /thepredict status estimates the hourly cost from the tokens of the last minute: Input tokens: <t>/600000 in 60 s; estimated cost <c> USD per hour.
One mob. An isolated mob in continuous combat sends about 60 requests a minute (one per heartbeat). Mobs that share an encounter share requests: three mobs on the same player send 60 requests a minute in total, not 180, and each adds its own question but no new state.
Caps. Every request fits budgets you control. When a budget is spent, mobs fall back to local play (NO_BUDGET) without errors.
| Cap | Default | Notes |
|---|---|---|
decision.maxRequestsPerMinute | 600 | Half the account limit (1 200 per minute). Cannot exceed 1 200. |
decision.maxRequestsPerMinutePerWorld | 300 | Usually the cap that binds on a one-world server: about 5 isolated mobs. |
decision.maxInputTokensPerMinute | 600000 | Binds first with many mobs across worlds: about 5 isolated mobs with full. At the cap, about 1.5 USD per hour. |
decision.maxInFlightRequests / decision.maxInFlightRequestsPerWorld | 8 / 4 | Requests waiting at once. |
To fit more mobs, raising the token cap alone is not enough: raise the request caps too, never beyond the account's 1 200 requests per minute (about 20 isolated mobs). To spend less, lower decision.maxInputTokensPerMinute, use compact, or the standard cadence (see How a fight runs).
Before reserving budget, ThePredict prepares the exact request and reserves tokens for its real size, learning the characters-per-token ratio from each answer. The size guard always uses a fixed 1.5 characters per token.
Confidence threshold
Answers below decision.minimumConfidence (0.45) are discarded and the mob keeps its plan or plays locally. 0.45 was chosen on a labeled set of combat scenarios: with full detail it kept most scenarios with about 90 % acceptable answers and no forbidden ones. It is a modest sample and will be revisited with server data. Raise Timing.MinimumConfidence for a boss whose mistakes are expensive: it will drop more doubtful answers and play locally more often. Lowering it without your own evidence is not recommended.
Latency
Measured from the development machine: a decision request took 179 ms at p50, 228 ms at p95 and 328 ms at p99 (1 200 calls, no timeouts); the model check took about 141 ms. Your server's numbers are in /thepredict status under Latency: roundtrip is the time to Jev and back, prepare the encoding on the server thread, tick_work ThePredict's work per tick.