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

推荐订阅源

宝玉的分享
宝玉的分享
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
Y
Y Combinator Blog
月光博客
月光博客
IT之家
IT之家
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
L
LangChain Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - Franky
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
V
Visual Studio Blog
小众软件
小众软件
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium

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: defer model pricing refresh · openclaw/openclaw@966e814
steipete · 2026-04-23 · via Recent Commits to openclaw:main

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

1919

collectConfiguredModelPricingRefs,

2020

getCachedGatewayModelPricing,

2121

refreshGatewayModelPricingCache,

22+

startGatewayModelPricingRefresh,

2223

} from "./model-pricing-cache.js";

23242425

describe("model-pricing-cache", () => {

@@ -519,6 +520,39 @@ describe("model-pricing-cache", () => {

519520

});

520521

});

521522523+

it("defers bootstrap refresh work until after the starter returns", async () => {

524+

const config = {

525+

agents: {

526+

defaults: {

527+

model: { primary: "anthropic/claude-opus-4-6" },

528+

},

529+

},

530+

} as unknown as OpenClawConfig;

531+

const fetchImpl = withFetchPreconnect(

532+

vi.fn(async (input: RequestInfo | URL) => {

533+

const url =

534+

typeof input === "string" ? input : input instanceof URL ? input.href : input.url;

535+

if (url.includes("openrouter.ai")) {

536+

return new Response(JSON.stringify({ data: [] }), {

537+

status: 200,

538+

headers: { "Content-Type": "application/json" },

539+

});

540+

}

541+

return new Response(JSON.stringify({}), {

542+

status: 200,

543+

headers: { "Content-Type": "application/json" },

544+

});

545+

}),

546+

);

547+548+

const stop = startGatewayModelPricingRefresh({ config, fetchImpl });

549+550+

expect(fetchImpl).not.toHaveBeenCalled();

551+

await vi.dynamicImportSettled();

552+

expect(fetchImpl).toHaveBeenCalled();

553+

stop();

554+

});

555+522556

it("logs configured timeout seconds when pricing fetches time out", async () => {

523557

const warnings: string[] = [];

524558

loggingState.rawConsole = {

@@ -549,10 +583,10 @@ describe("model-pricing-cache", () => {

549583

expect(warnings).toEqual(

550584

expect.arrayContaining([

551585

expect.stringContaining(

552-

"OpenRouter pricing fetch failed (timeout 15s): TimeoutError: The operation was aborted due to timeout",

586+

"OpenRouter pricing fetch failed (timeout 30s): TimeoutError: The operation was aborted due to timeout",

553587

),

554588

expect.stringContaining(

555-

"LiteLLM pricing fetch failed (timeout 15s): TimeoutError: The operation was aborted due to timeout",

589+

"LiteLLM pricing fetch failed (timeout 30s): TimeoutError: The operation was aborted due to timeout",

556590

),

557591

]),

558592

);