src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
/**
* Configuration schema for Reasoning Agent plugin
* Users can set multiple Google AI API keys and other settings via LM Studio UI
*/
export const configSchematics = createConfigSchematics()
.field(
"apiKeys",
"string",
{
displayName: "API Keys",
subtitle:
"Comma-separated list of Google AI API keys. " +
"Plugin rotates keys automatically on quota/errors. Example: key1,key2,key3",
},
""
)
.field(
"modelName",
"string",
{
displayName: "Model Name",
subtitle:
"Google Gemini model to use. Default: gemini-3-flash-preview. " +
"Options: gemini-1.5-pro, gemini-1.5-flash, gemini-2-flash-thinking",
},
"gemini-3-flash-preview"
)
.field(
"maxTokens",
"numeric",
{
displayName: "Max Tokens",
subtitle: "Maximum tokens in response (100-10000)",
min: 100,
max: 10000,
int: true,
slider: {
step: 100,
min: 100,
max: 10000,
},
},
2048
)
.field(
"temperature",
"numeric",
{
displayName: "Temperature",
subtitle: "Response creativity (0=deterministic, 2=creative)",
min: 0,
max: 2,
slider: {
step: 0.1,
min: 0,
max: 2,
},
},
0.7
)
.field(
"retryAttempts",
"numeric",
{
displayName: "Retry Attempts",
subtitle: "Attempts per key before rotating (1-10)",
min: 1,
max: 10,
int: true,
slider: {
step: 1,
min: 1,
max: 10,
},
},
3
)
.field(
"requestTimeoutMs",
"numeric",
{
displayName: "Request Timeout (ms)",
subtitle: "Timeout per request in milliseconds (1000-120000)",
min: 1000,
max: 120000,
int: true,
},
30000
)
.field(
"enableDetailedLogging",
"select",
{
displayName: "Detailed Logging",
subtitle: "Enable debug logging for key rotation",
options: [
{ value: "true", displayName: "Enabled" },
{ value: "false", displayName: "Disabled" },
],
},
"false"
)
.build();