fix(auth): strip line breaks from pasted keys

This commit is contained in:
Peter Steinberger
2026-02-09 11:25:54 -06:00
parent fb8c653f53
commit 42a07791c4
15 changed files with 293 additions and 30 deletions

View File

@@ -1,3 +1,5 @@
import { normalizeSecretInput } from "../utils/normalize-secret-input.js";
type MinimaxBaseResp = {
status_code?: number;
status_msg?: string;
@@ -44,7 +46,7 @@ export async function minimaxUnderstandImage(params: {
apiHost?: string;
modelBaseUrl?: string;
}): Promise<string> {
const apiKey = params.apiKey.trim();
const apiKey = normalizeSecretInput(params.apiKey);
if (!apiKey) {
throw new Error("MiniMax VLM: apiKey required");
}