paperclipai/paperclip · error
Enter the Kimi API model name.
Error message
Enter the Kimi API model name.
What it means
When the hermes_gateway connection is configured to use the Kimi API (usingKimiApi is true), preparedConfig() requires a non-empty kimiModel value and throws "Enter the Kimi API model name." otherwise. The Kimi model name is passed through to the gateway, so a blank value would produce an unusable connection config.
Source
Thrown at ui/src/components/new-agent/NewAgentSetup.tsx:400
["cursor_cloud", "hermes_gateway"].includes(adapterType) &&
!apiKey.trim() &&
!selectedBinding
)
throw new Error(
adapterType === "cursor_cloud"
? "Enter a Cursor API key."
: `Enter ${envKey} or select an organization secret.`,
);
if (adapterType === "hermes_gateway") {
try {
const url = new URL(gatewayUrl.trim());
if (!["https:", "http:"].includes(url.protocol)) throw new Error();
} catch {
throw new Error("Enter the Hermes API base URL.");
}
}
if (usingKimiApi && !kimiModel.trim())
throw new Error("Enter the Kimi API model name.");
return buildConfig(nextConnection);
}
function pendingCredentials(nextConnection = connection) {
return {
...nextConnection?.credentials,
...(hasCredentialField && apiKey.trim()
? { [envKey]: apiKey.trim() }
: {}),
};
}
async function runTest(nextConnection = connection): Promise<boolean> {
if (!ready) return false;
const run = ++generation.current;
setTestState("running");
setResult(null);
setError(null);
try {View on GitHub (pinned to 01ad858492)
Solutions
- Enter the Kimi API model name (e.g. moonshot-v1-32k) in the Kimi model field.
- If Kimi is not needed, disable the Kimi API option so the field is not required.
- Re-check the field after toggling the Kimi option on — it starts empty.
- Ensure the value is not just whitespace.
Example fix
// before usingKimiApi: true, kimiModel: "" // after usingKimiApi: true, kimiModel: "moonshot-v1-32k"
Defensive patterns
Strategy: validation
Validate before calling
const kimiOk = !usingKimiApi || kimiModel.trim().length > 0;
if (!kimiOk) showError("Enter the Kimi API model name."); Type guard
const kimiModelRequired = (opts: { usingKimiApi: boolean; kimiModel: string }): boolean =>
opts.usingKimiApi && opts.kimiModel.trim().length === 0; Try / catch
try {
const cfg = preparedConfig();
submit(cfg);
} catch (e) {
if (e instanceof Error && e.message.includes("Kimi API model")) {
setKimiFieldError(e.message);
} else throw e;
} Prevention
- Make the Kimi model field required whenever the Kimi API toggle is on.
- Clear/require dependent fields when feature toggles change.
- Trim values so whitespace-only entries are caught.
When it happens
Trigger: Submitting setup with adapterType "hermes_gateway", the Kimi API option enabled, and the Kimi model field empty or whitespace-only.
Common situations: Toggling the Kimi API switch but not filling the dependent model field; copying a config where Kimi was disabled; whitespace-only paste that passes the visual check but fails trim().
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Choose or enter a model in provider/model format.
- Enter the Hermes API base URL.
- ${label} is not a regular file at ${canonical}.
- Claude Managed evals require exact model claude-sonnet-5
- AWS AgentCore evals require exact model global.anthropic.cla
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/9712ae4b1a4b9b27.
Report an issue: GitHub.