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

推荐订阅源

P
Proofpoint News Feed
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
量子位
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
IT之家
IT之家
V
Visual Studio Blog
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
D
Docker
V
V2EX

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(agent): resolve compaction model alias to canonical m...
Pick-cat · 2026-06-19 · via Recent Commits to openclaw:main

@@ -391,6 +391,162 @@ describe("buildEmbeddedCompactionRuntimeContext", () => {

391391

expect(result.authProfileId).toBeUndefined();

392392

});

393393394+

it("resolves compaction.model alias to canonical model ref on same provider (#90340)", () => {

395+

const result = resolveEmbeddedCompactionTarget({

396+

config: {

397+

agents: {

398+

defaults: {

399+

models: {

400+

"openai/gpt-5.4-mini": {

401+

alias: "gpt54mini",

402+

params: { thinking: "high" },

403+

},

404+

},

405+

compaction: { model: "gpt54mini" },

406+

},

407+

},

408+

} as unknown as OpenClawConfig,

409+

provider: "openai",

410+

modelId: "gpt-5.5",

411+

authProfileId: "openai:default",

412+

defaultProvider: "openai",

413+

defaultModel: "gpt-5.5",

414+

});

415+

expect(result.provider).toBe("openai");

416+

expect(result.model).toBe("gpt-5.4-mini");

417+

expect(result.authProfileId).toBe("openai:default");

418+

});

419+420+

it("resolves compaction.model alias to canonical model ref on different provider", () => {

421+

const result = resolveEmbeddedCompactionTarget({

422+

config: {

423+

agents: {

424+

defaults: {

425+

models: {

426+

"anthropic/claude-opus-4-6": {

427+

alias: "thinky",

428+

},

429+

},

430+

compaction: { model: "thinky" },

431+

},

432+

},

433+

} as unknown as OpenClawConfig,

434+

provider: "openai",

435+

modelId: "gpt-5.5",

436+

authProfileId: "openai:default",

437+

defaultProvider: "openai",

438+

defaultModel: "gpt-5.5",

439+

});

440+

expect(result.provider).toBe("anthropic");

441+

expect(result.model).toBe("claude-opus-4-6");

442+

// Auth profile must be dropped when provider changes

443+

expect(result.authProfileId).toBeUndefined();

444+

});

445+446+

it("falls back to literal model when alias does not match", () => {

447+

const result = resolveEmbeddedCompactionTarget({

448+

config: {

449+

agents: {

450+

defaults: {

451+

models: {

452+

"openai/gpt-5.4-mini": {

453+

alias: "gpt54mini",

454+

},

455+

},

456+

compaction: { model: "nonexistent-alias" },

457+

},

458+

},

459+

} as unknown as OpenClawConfig,

460+

provider: "openai",

461+

modelId: "gpt-5.5",

462+

authProfileId: "openai:default",

463+

defaultProvider: "openai",

464+

defaultModel: "gpt-5.5",

465+

});

466+

expect(result.provider).toBe("openai");

467+

expect(result.model).toBe("nonexistent-alias");

468+

expect(result.authProfileId).toBe("openai:default");

469+

});

470+471+

it("preserves auth when an omitted provider uses the effective default", () => {

472+

const result = resolveEmbeddedCompactionTarget({

473+

config: {

474+

agents: {

475+

defaults: {

476+

models: {

477+

"openai/gpt-5.4-mini": {

478+

alias: "summary",

479+

},

480+

},

481+

compaction: { model: "summary" },

482+

},

483+

},

484+

} as unknown as OpenClawConfig,

485+

authProfileId: "openai:default",

486+

defaultProvider: "openai",

487+

defaultModel: "gpt-5.5",

488+

});

489+

expect(result.provider).toBe("openai");

490+

expect(result.model).toBe("gpt-5.4-mini");

491+

expect(result.authProfileId).toBe("openai:default");

492+

});

493+494+

it("prefers literal configured model ids over alias collisions (#90340)", () => {

495+

const result = resolveEmbeddedCompactionTarget({

496+

config: {

497+

agents: {

498+

defaults: {

499+

models: {

500+

"openai/gpt-5.4-mini": {

501+

alias: "gpt54mini",

502+

},

503+

"openai/gpt54mini": {},

504+

},

505+

compaction: { model: "gpt54mini" },

506+

},

507+

},

508+

} as unknown as OpenClawConfig,

509+

provider: "openai",

510+

modelId: "gpt-5.5",

511+

authProfileId: "openai:default",

512+

defaultProvider: "openai",

513+

defaultModel: "gpt-5.5",

514+

});

515+

expect(result.provider).toBe("openai");

516+

expect(result.model).toBe("gpt54mini");

517+

expect(result.authProfileId).toBe("openai:default");

518+

});

519+520+

it("keeps current-provider configured model ids over cross-provider alias collisions (#90340)", () => {

521+

const result = resolveEmbeddedCompactionTarget({

522+

config: {

523+

agents: {

524+

defaults: {

525+

models: {

526+

"anthropic/claude-opus-4-6": {

527+

alias: "gpt-5.4-mini",

528+

},

529+

},

530+

compaction: { model: "gpt-5.4-mini" },

531+

},

532+

},

533+

models: {

534+

providers: {

535+

openai: { models: [{ id: "gpt-5.4-mini" }] },

536+

},

537+

},

538+

} as unknown as OpenClawConfig,

539+

provider: "openai",

540+

modelId: "gpt-5.5",

541+

authProfileId: "openai:default",

542+

defaultProvider: "openai",

543+

defaultModel: "gpt-5.5",

544+

});

545+

expect(result.provider).toBe("openai");

546+

expect(result.model).toBe("gpt-5.4-mini");

547+

expect(result.authProfileId).toBe("openai:default");

548+

});

549+394550

it("leaves non-openai providers unchanged", () => {

395551

const result = resolveEmbeddedCompactionTarget({

396552

provider: "anthropic",