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

推荐订阅源

GbyAI
GbyAI
The GitHub Blog
The GitHub Blog
小众软件
小众软件
美团技术团队
博客园 - 司徒正美
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
罗磊的独立博客
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
J
Java Code Geeks
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
V
V2EX
C
Check Point Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog

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(agents): resolve Codex static-catalog cold start · op...
yetval · 2026-06-01 · via Recent Commits to openclaw:main

@@ -556,6 +556,119 @@ describe("resolveModel", () => {

556556

expect(discoverModels).not.toHaveBeenCalled();

557557

});

558558559+

it("falls back to bundled static catalog rows without agent discovery", async () => {

560+

const cfg = {

561+

models: {

562+

providers: {

563+

openai: {

564+

api: "openai-responses",

565+

baseUrl: "https://api.openai.com/v1",

566+

models: [],

567+

},

568+

},

569+

},

570+

} as unknown as OpenClawConfig;

571+

resolveBundledStaticCatalogModelMock.mockReturnValueOnce({

572+

provider: "openai",

573+

id: "gpt-5.3-codex",

574+

name: "GPT-5.3 Codex",

575+

api: "openai-chatgpt-responses",

576+

baseUrl: "https://chatgpt.com/backend-api",

577+

reasoning: true,

578+

input: ["text", "image"],

579+

cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },

580+

contextWindow: 400_000,

581+

maxTokens: 128_000,

582+

});

583+

const baseRuntimeHooks = createRuntimeHooks();

584+

const prepareProviderDynamicModel = vi.fn(baseRuntimeHooks.prepareProviderDynamicModel);

585+

const runProviderDynamicModel = vi.fn(() => undefined);

586+587+

const result = await resolveModelAsync("openai", "gpt-5.3-codex", "/tmp/agent", cfg, {

588+

allowBundledStaticCatalogFallback: true,

589+

preferBundledStaticCatalogTransport: true,

590+

runtimeHooks: {

591+

...baseRuntimeHooks,

592+

prepareProviderDynamicModel,

593+

runProviderDynamicModel,

594+

},

595+

skipAgentDiscovery: true,

596+

});

597+598+

expectRecordFields(expectResolvedModel(result), {

599+

provider: "openai",

600+

id: "gpt-5.3-codex",

601+

api: "openai-chatgpt-responses",

602+

baseUrl: "https://chatgpt.com/backend-api",

603+

contextWindow: 400_000,

604+

maxTokens: 128_000,

605+

});

606+

expect(resolveBundledStaticCatalogModelMock).toHaveBeenCalledTimes(1);

607+

expect(resolveBundledStaticCatalogModelMock).toHaveBeenCalledWith(

608+

expect.objectContaining({

609+

provider: "openai",

610+

modelId: "gpt-5.3-codex",

611+

cfg,

612+

}),

613+

);

614+

expect(prepareProviderDynamicModel).toHaveBeenCalled();

615+

expect(runProviderDynamicModel).toHaveBeenCalled();

616+

expect(discoverAuthStorage).not.toHaveBeenCalled();

617+

expect(discoverModels).not.toHaveBeenCalled();

618+

});

619+620+

it("keeps provider dynamic metadata for runtime-preferred models", async () => {

621+

resolveBundledStaticCatalogModelMock.mockReturnValueOnce({

622+

provider: "openai",

623+

id: "gpt-5.5-pro",

624+

name: "GPT-5.5 Pro",

625+

api: "openai-chatgpt-responses",

626+

baseUrl: "https://chatgpt.com/backend-api",

627+

reasoning: true,

628+

input: ["text", "image"],

629+

cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 },

630+

contextWindow: 123_456,

631+

maxTokens: 64_000,

632+

});

633+

const baseRuntimeHooks = createRuntimeHooks();

634+

const prepareProviderDynamicModel = vi.fn(baseRuntimeHooks.prepareProviderDynamicModel);

635+

const runProviderDynamicModel = vi.fn(() => ({

636+

provider: "openai",

637+

id: "gpt-5.5-pro",

638+

name: "GPT-5.5 Pro",

639+

api: "openai-chatgpt-responses" as const,

640+

baseUrl: "https://chatgpt.com/backend-api",

641+

reasoning: true,

642+

input: ["text", "image"],

643+

cost: { input: 30, output: 180, cacheRead: 0, cacheWrite: 0 },

644+

contextWindow: 1_000_000,

645+

maxTokens: 128_000,

646+

}));

647+

const shouldPreferProviderRuntimeResolvedModel = vi.fn(() => true);

648+649+

const result = await resolveModelAsync("openai", "gpt-5.5-pro", "/tmp/agent", undefined, {

650+

allowBundledStaticCatalogFallback: true,

651+

runtimeHooks: {

652+

...baseRuntimeHooks,

653+

prepareProviderDynamicModel,

654+

runProviderDynamicModel,

655+

shouldPreferProviderRuntimeResolvedModel,

656+

},

657+

skipAgentDiscovery: true,

658+

});

659+660+

expectRecordFields(expectResolvedModel(result), {

661+

provider: "openai",

662+

id: "gpt-5.5-pro",

663+

api: "openai-chatgpt-responses",

664+

contextWindow: 1_000_000,

665+

maxTokens: 128_000,

666+

});

667+

expect(prepareProviderDynamicModel).toHaveBeenCalled();

668+

expect(runProviderDynamicModel).toHaveBeenCalled();

669+

expect(shouldPreferProviderRuntimeResolvedModel).toHaveBeenCalled();

670+

});

671+559672

it("looks up each static fallback candidate with its own normalized model id", async () => {

560673

resolveBundledStaticCatalogModelMock.mockImplementation(({ provider, modelId }) => ({

561674

provider,