mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 10:07:41 +00:00
fix: set authHeader: true by default for MiniMax API provider (#27622)
* Update onboard-auth.config-minimax.ts fix issue #27600 * fix(minimax): default authHeader for implicit + onboarding providers (#27600) Landed from contributor PR #27622 by @riccoyuanft and PR #27631 by @kevinWangSheng. Includes a small TS nullability guard in lane delivery to keep build green on rebased head. Co-authored-by: riccoyuanft <riccoyuan@gmail.com> Co-authored-by: Kevin Shenghui <shenghuikevin@github.com> --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> Co-authored-by: Kevin Shenghui <shenghuikevin@github.com>
This commit is contained in:
@@ -181,6 +181,7 @@ function applyMinimaxApiProviderConfigWithBaseUrl(
|
||||
...existingProviderRest,
|
||||
baseUrl: params.baseUrl,
|
||||
api: "anthropic-messages",
|
||||
authHeader: true,
|
||||
...(normalizedApiKey?.trim() ? { apiKey: normalizedApiKey } : {}),
|
||||
models: mergedModels.length > 0 ? mergedModels : [apiModel],
|
||||
};
|
||||
|
||||
@@ -365,6 +365,7 @@ describe("applyMinimaxApiConfig", () => {
|
||||
expect(cfg.models?.providers?.minimax).toMatchObject({
|
||||
baseUrl: "https://api.minimax.io/anthropic",
|
||||
api: "anthropic-messages",
|
||||
authHeader: true,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -404,6 +405,7 @@ describe("applyMinimaxApiConfig", () => {
|
||||
);
|
||||
expect(cfg.models?.providers?.minimax?.baseUrl).toBe("https://api.minimax.io/anthropic");
|
||||
expect(cfg.models?.providers?.minimax?.api).toBe("anthropic-messages");
|
||||
expect(cfg.models?.providers?.minimax?.authHeader).toBe(true);
|
||||
expect(cfg.models?.providers?.minimax?.apiKey).toBe("old-key");
|
||||
expect(cfg.models?.providers?.minimax?.models.map((m) => m.id)).toEqual([
|
||||
"old-model",
|
||||
|
||||
Reference in New Issue
Block a user