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

推荐订阅源

博客园 - 聂微东
GbyAI
GbyAI
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
Visual Studio Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
B
Blog
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
雷峰网
雷峰网
爱范儿
爱范儿
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
P
Proofpoint News Feed
A
About on SuperTechFans
I
InfoQ
F
Fortinet All Blogs
L
LangChain Blog
T
Tailwind CSS 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(config): allow per-agent contextTokens override in ag...
statxc · 2026-04-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

224224

- WhatsApp: transcribe accepted voice notes before agent dispatch while keeping spoken transcripts out of command authorization. (#64120) Thanks @rogerdigital.

225225

- Plugins/CLI: expose channel plugin CLI descriptors during discovery-mode plugin loads so snapshot registries keep channel commands visible without activating full runtimes. (#71309) Thanks @gumadeiras.

226226

- WhatsApp: deliver media generated by tool-result replies while still suppressing text-only tool chatter. (#60968) Thanks @adaclaw.

227+

- Config/agents: accept `agents.list[].contextTokens` in strict config validation so per-agent overrides survive hot reload, letting `/status` reflect the configured model window instead of the 200k fallback. Fixes #70692. (#71247) Thanks @statxc.

227228
228229

## 2026.4.23

229230
Original file line numberDiff line numberDiff line change

@@ -1,4 +1,4 @@

1-

71ef32b7723f64d4a84ac43bb6d41ff21e0d77a099b42e026d8b0d3d5301f917 config-baseline.json

2-

cfab1910132ed23777005e0c650a13f44626b0450963f733e9de56a13323ae2b config-baseline.core.json

1+

5c7709e1686f6ad90beaa8e34ba45e6445e34c48d598407bd837361b58c365ab config-baseline.json

2+

98c83ce8af9ec4703726d7d673add95279be008a801b1d298982cbd9c1785747 config-baseline.core.json

33

22d7cd6d8279146b2d79c9531a55b80b52a2c99c81338c508104729154fdd02d config-baseline.channel.json

44

86f615b7d267b03888af0af7ccb3f8232a6b636f8a741d522ff425e46729ba81 config-baseline.plugin.json

Original file line numberDiff line numberDiff line change

@@ -6432,6 +6432,11 @@ export const GENERATED_BASE_CONFIG_SCHEMA: BaseConfigSchemaResponse = {

64326432

description:

64336433

"Optional per-agent overrides for the focused context budget knobs. Omitted fields inherit agents.defaults.contextLimits.",

64346434

},

6435+

contextTokens: {

6436+

type: "integer",

6437+

exclusiveMinimum: 0,

6438+

maximum: 9007199254740991,

6439+

},

64356440

heartbeat: {

64366441

type: "object",

64376442

properties: {

Original file line numberDiff line numberDiff line change

@@ -95,6 +95,8 @@ export type AgentConfig = {

9595

skillsLimits?: Pick<SkillsLimitsConfig, "maxSkillsPromptChars">;

9696

/** Optional per-agent overrides for selected context/token-heavy limits. */

9797

contextLimits?: AgentContextLimitsConfig;

98+

/** Optional per-agent override for the model's total context window (in tokens). */

99+

contextTokens?: number;

98100

/** Optional per-agent heartbeat overrides. */

99101

heartbeat?: AgentDefaultsConfig["heartbeat"];

100102

identity?: IdentityConfig;

Original file line numberDiff line numberDiff line change

@@ -116,4 +116,19 @@ describe("agent defaults schema", () => {

116116

expect(() => AgentDefaultsSchema.parse({ heartbeat: { timeoutSeconds: 0 } })).toThrow();

117117

expect(() => AgentEntrySchema.parse({ id: "ops", heartbeat: { timeoutSeconds: 0 } })).toThrow();

118118

});

119+
120+

it("accepts per-agent contextTokens override", () => {

121+

const agent = AgentEntrySchema.parse({

122+

id: "ops",

123+

contextTokens: 1_048_576,

124+

});

125+

expect(agent.contextTokens).toBe(1_048_576);

126+

});

127+
128+

it("rejects non-positive contextTokens on agent entries and defaults", () => {

129+

expect(() => AgentEntrySchema.parse({ id: "ops", contextTokens: 0 })).toThrow();

130+

expect(() => AgentEntrySchema.parse({ id: "ops", contextTokens: -1 })).toThrow();

131+

expect(() => AgentEntrySchema.parse({ id: "ops", contextTokens: 1.5 })).toThrow();

132+

expect(() => AgentDefaultsSchema.parse({ contextTokens: 0 })).toThrow();

133+

});

119134

});

Original file line numberDiff line numberDiff line change

@@ -829,6 +829,7 @@ export const AgentEntrySchema = z

829829

humanDelay: HumanDelaySchema.optional(),

830830

skillsLimits: AgentSkillsLimitsSchema,

831831

contextLimits: AgentContextLimitsSchema,

832+

contextTokens: z.number().int().positive().optional(),

832833

heartbeat: HeartbeatSchema,

833834

identity: IdentitySchema,

834835

groupChat: GroupChatSchema,