惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Jina AI
Jina AI
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
I
InfoQ
L
LangChain Blog
The Cloudflare Blog
IT之家
IT之家
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
博客园 - 聂微东
美团技术团队
博客园_首页

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten model auth assertions · openclaw/openclaw@5...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -227,6 +227,21 @@ async function resolveCustomProviderAuth(

227227

});

228228

}

229229230+

function expectAuthFields(

231+

auth: Awaited<ReturnType<typeof resolveApiKeyForProvider>>,

232+

expected: {

233+

apiKey: string;

234+

mode: "api-key" | "oauth";

235+

source?: string;

236+

},

237+

) {

238+

expect(auth.apiKey).toBe(expected.apiKey);

239+

expect(auth.mode).toBe(expected.mode);

240+

if (expected.source !== undefined) {

241+

expect(auth.source).toBe(expected.source);

242+

}

243+

}

244+230245

describe("resolveAwsSdkEnvVarName", () => {

231246

it("prefers bearer token over access keys and profile", () => {

232247

const env = {

@@ -735,7 +750,7 @@ describe("resolveApiKeyForProvider", () => {

735750

}),

736751

);

737752738-

expect(resolved).toMatchObject({

753+

expectAuthFields(resolved, {

739754

apiKey: "plugin-web-fallback-key",

740755

source: "plugins.entries.plugin-web.config.webSearch.apiKey",

741756

mode: "api-key",

@@ -779,7 +794,7 @@ describe("resolveApiKeyForProvider", () => {

779794

}),

780795

);

781796782-

expect(resolved).toMatchObject({

797+

expectAuthFields(resolved, {

783798

apiKey: "plugin-web-runtime-key",

784799

source: "plugins.entries.plugin-web.config.webSearch.apiKey",

785800

mode: "api-key",

@@ -861,7 +876,7 @@ describe("resolveApiKeyForProvider", () => {

861876

},

862877

});

863878864-

expect(resolved).toMatchObject({

879+

expectAuthFields(resolved, {

865880

apiKey: "sk-config-live",

866881

source: "models.json",

867882

mode: "api-key",

@@ -885,7 +900,7 @@ describe("resolveApiKeyForProvider", () => {

885900

}),

886901

);

887902888-

expect(resolved).toMatchObject({

903+

expectAuthFields(resolved, {

889904

apiKey: "ollama-local",

890905

mode: "api-key",

891906

});

@@ -1002,7 +1017,7 @@ describe("resolveApiKeyForProvider – synthetic local auth for custom providers

10021017

store: { version: 1, profiles: {} },

10031018

});

100410191005-

expect(auth).toMatchObject({

1020+

expectAuthFields(auth, {

10061021

apiKey: "ollama-local",

10071022

source: "models.json (local marker)",

10081023

mode: "api-key",

@@ -1036,7 +1051,7 @@ describe("resolveApiKeyForProvider – synthetic local auth for custom providers

10361051

store: { version: 1, profiles: {} },

10371052

});

103810531039-

expect(auth).toMatchObject({

1054+

expectAuthFields(auth, {

10401055

apiKey: "ollama-local",

10411056

source: "models.providers.ollama-gpu1 (synthetic local key)",

10421057

mode: "api-key",

@@ -1071,7 +1086,7 @@ describe("resolveApiKeyForProvider – synthetic local auth for custom providers

10711086

store: { version: 1, profiles: {} },

10721087

});

107310881074-

expect(auth).toMatchObject({

1089+

expectAuthFields(auth, {

10751090

apiKey: CUSTOM_LOCAL_AUTH_MARKER,

10761091

source: "models.json (local marker)",

10771092

mode: "api-key",

@@ -1226,10 +1241,8 @@ describe("applyLocalNoAuthHeaderOverride", () => {

12261241

},

12271242

);

122812431229-

expect(model.headers).toMatchObject({

1230-

Authorization: null,

1231-

"X-Test": "1",

1232-

});

1244+

expect(model.headers?.Authorization).toBeNull();

1245+

expect(model.headers?.["X-Test"]).toBe("1");

12331246

});

12341247

});

12351248