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

推荐订阅源

雷峰网
雷峰网
B
Blog
博客园_首页
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
罗磊的独立博客
Jina AI
Jina AI
C
Check Point Blog
Martin Fowler
Martin Fowler
J
Java Code Geeks
博客园 - 司徒正美
美团技术团队
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
有赞技术团队
有赞技术团队
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
小众软件
小众软件

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
fix: refresh Bedrock profile credentials live · openclaw/...
steipete · 2026-05-07 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -145,6 +145,7 @@ Docs: https://docs.openclaw.ai

145145

- CLI backends: keep versioned OAuth identity matches reusable when auth profile ids rotate, so Claude CLI sessions do not reset and lose continuity during same-account OAuth refresh/profile alias changes. Fixes #78541.

146146

- Model providers: normalize APNG sniffed PNG uploads, preserve Gemini 3 tool-call thought-signature replay with documented fallback signatures, accept legacy `__env__:VAR` custom-provider keys, and repair snake_case tool-call transcript sanitization. Fixes #51881, #48915, #77566, and #42858.

147147

- Telegram/models: parse provider ids containing dots in `/models` callback buttons so `hf.co` model lists render as inline keyboard buttons. Fixes #38745.

148+

- Amazon Bedrock: refresh shared AWS profile/config file credentials before Bedrock model, discovery, and embedding requests so long-running Gateway processes pick up renewed profile credentials without restart. Fixes #77551.

148149

- Anthropic: reject uppercase provider-prefixed forward-compat model ids locally instead of sending malformed dynamic ids upstream. Fixes #73715.

149150

- OpenAI/embeddings: pass configured output dimensionality through single and batched embedding requests so memory embedding indexes can request smaller vectors. Fixes #55126.

150151

- CLI/infer: normalize HEIC/HEIF image files to JPEG before model-run requests, avoiding providers that reject Apple image container formats. Fixes #50081.

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,42 @@

1+

type SharedIniFileLoader = {

2+

loadSharedConfigFiles(init?: { ignoreCache?: boolean }): Promise<unknown>;

3+

};

4+
5+

let sharedIniFileLoaderForTest: SharedIniFileLoader | null | undefined;

6+
7+

function hasStaticAwsCredentialEnv(env: NodeJS.ProcessEnv): boolean {

8+

return Boolean(env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY);

9+

}

10+
11+

export function shouldRefreshAwsSharedConfigCacheForBedrock(env: NodeJS.ProcessEnv): boolean {

12+

if (env.AWS_BEDROCK_SKIP_AUTH === "1" || env.AWS_BEARER_TOKEN_BEDROCK) {

13+

return false;

14+

}

15+

return !hasStaticAwsCredentialEnv(env);

16+

}

17+
18+

async function loadSharedIniFileLoader(): Promise<SharedIniFileLoader> {

19+

if (sharedIniFileLoaderForTest !== undefined) {

20+

if (!sharedIniFileLoaderForTest) {

21+

throw new Error("AWS shared INI file loader unavailable");

22+

}

23+

return sharedIniFileLoaderForTest;

24+

}

25+

return (await import("@smithy/shared-ini-file-loader")) as SharedIniFileLoader;

26+

}

27+
28+

export async function refreshAwsSharedConfigCacheForBedrock(

29+

env: NodeJS.ProcessEnv = process.env,

30+

): Promise<void> {

31+

if (!shouldRefreshAwsSharedConfigCacheForBedrock(env)) {

32+

return;

33+

}

34+

const loader = await loadSharedIniFileLoader();

35+

await loader.loadSharedConfigFiles({ ignoreCache: true });

36+

}

37+
38+

export function setAwsSharedIniFileLoaderForTest(

39+

loader: SharedIniFileLoader | null | undefined,

40+

): void {

41+

sharedIniFileLoaderForTest = loader;

42+

}

Original file line numberDiff line numberDiff line change

@@ -14,6 +14,7 @@ import {

1414

normalizeLowercaseStringOrEmpty,

1515

normalizeOptionalLowercaseString,

1616

} from "openclaw/plugin-sdk/text-runtime";

17+

import { refreshAwsSharedConfigCacheForBedrock } from "./aws-credential-refresh.js";

1718

import { resolveBedrockConfigApiKey } from "./discovery-shared.js";

1819
1920

const log = createSubsystemLogger("bedrock-discovery");

@@ -481,6 +482,9 @@ export async function discoverBedrockModels(params: {

481482

? createInjectedClientDiscoverySdk()

482483

: await loadBedrockDiscoverySdk();

483484

const clientFactory = params.clientFactory ?? ((region: string) => sdk.createClient(region));

485+

if (!params.clientFactory) {

486+

await refreshAwsSharedConfigCacheForBedrock();

487+

}

484488

const client = clientFactory(params.region);

485489
486490

const discoveryPromise = (async () => {

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,7 @@ import {

55

type MemoryEmbeddingProviderCreateOptions,

66

} from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";

77

import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";

8+

import { refreshAwsSharedConfigCacheForBedrock } from "./aws-credential-refresh.js";

89
910

// ---------------------------------------------------------------------------

1011

// Types & constants

@@ -263,7 +264,6 @@ export async function createBedrockEmbeddingProvider(

263264

): Promise<{ provider: MemoryEmbeddingProvider; client: BedrockEmbeddingClient }> {

264265

const client = resolveBedrockEmbeddingClient(options);

265266

const { BedrockRuntimeClient, InvokeModelCommand } = await loadSdk();

266-

const sdk = new BedrockRuntimeClient({ region: client.region });

267267

const spec = resolveSpec(client.model);

268268

const family = spec?.family ?? inferFamily(client.model);

269269

@@ -275,15 +275,21 @@ export async function createBedrockEmbeddingProvider(

275275

});

276276
277277

const invoke = async (body: string): Promise<string> => {

278-

const res = await sdk.send(

279-

new InvokeModelCommand({

280-

modelId: client.model,

281-

body,

282-

contentType: "application/json",

283-

accept: "application/json",

284-

}),

285-

);

286-

return new TextDecoder().decode(res.body);

278+

await refreshAwsSharedConfigCacheForBedrock();

279+

const sdk = new BedrockRuntimeClient({ region: client.region });

280+

try {

281+

const res = await sdk.send(

282+

new InvokeModelCommand({

283+

modelId: client.model,

284+

body,

285+

contentType: "application/json",

286+

accept: "application/json",

287+

}),

288+

);

289+

return new TextDecoder().decode(res.body);

290+

} finally {

291+

sdk.destroy();

292+

}

287293

};

288294
289295

const isCohere = family === "cohere-v3" || family === "cohere-v4";