src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"jevApiKey",
"string",
{
displayName: "Jev API key",
subtitle: "TypeSafe API key used to safety-check commands. Leave blank to use the JEV_API_KEY environment variable.",
isProtected: true,
placeholder: "paste your key here",
},
"",
)
.field(
"blockThreshold",
"numeric",
{
displayName: "Block threshold",
subtitle: "If jev rates any hazard at or above this probability, the command is refused as unsafe.",
min: 0,
max: 1,
step: 0.05,
precision: 2,
},
0.7,
)
.field(
"reviewThreshold",
"numeric",
{
displayName: "Uncertain threshold",
subtitle: "Hazard probabilities at or above this (but below the block threshold) are refused as unconfirmed.",
min: 0,
max: 1,
step: 0.05,
precision: 2,
},
0.35,
)
.field(
"severityBlock",
"numeric",
{
displayName: "Severity block level",
subtitle: "Refuse when jev's worst-case severity (0 harmless to 3 severe) reaches this level.",
min: 0,
max: 3,
step: 0.5,
precision: 1,
},
2,
)
.field(
"defaultTimeoutSec",
"numeric",
{ displayName: "Default timeout (s)", subtitle: "Used when the model does not pass a timeout.", min: 1, max: 600, int: true },
30,
)
.field(
"maxTimeoutSec",
"numeric",
{ displayName: "Maximum timeout (s)", subtitle: "Upper limit on any command's runtime.", min: 1, max: 600, int: true },
120,
)
.field(
"maxOutputChars",
"numeric",
{ displayName: "Max output (chars)", subtitle: "Command output beyond this is truncated.", min: 1000, max: 200000, int: true },
20000,
)
.build();
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"jevApiKey",
"string",
{
displayName: "Jev API key",
subtitle: "TypeSafe API key used to safety-check commands. Leave blank to use the JEV_API_KEY environment variable.",
isProtected: true,
placeholder: "paste your key here",
},
"",
)
.field(
"blockThreshold",
"numeric",
{
displayName: "Block threshold",
subtitle: "If jev rates any hazard at or above this probability, the command is refused as unsafe.",
min: 0,
max: 1,
step: 0.05,
precision: 2,
},
0.7,
)
.field(
"reviewThreshold",
"numeric",
{
displayName: "Uncertain threshold",
subtitle: "Hazard probabilities at or above this (but below the block threshold) are refused as unconfirmed.",
min: 0,
max: 1,
step: 0.05,
precision: 2,
},
0.35,
)
.field(
"severityBlock",
"numeric",
{
displayName: "Severity block level",
subtitle: "Refuse when jev's worst-case severity (0 harmless to 3 severe) reaches this level.",
min: 0,
max: 3,
step: 0.5,
precision: 1,
},
2,
)
.field(
"defaultTimeoutSec",
"numeric",
{ displayName: "Default timeout (s)", subtitle: "Used when the model does not pass a timeout.", min: 1, max: 600, int: true },
30,
)
.field(
"maxTimeoutSec",
"numeric",
{ displayName: "Maximum timeout (s)", subtitle: "Upper limit on any command's runtime.", min: 1, max: 600, int: true },
120,
)
.field(
"maxOutputChars",
"numeric",
{ displayName: "Max output (chars)", subtitle: "Command output beyond this is truncated.", min: 1000, max: 200000, int: true },
20000,
)
.build();