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

推荐订阅源

D
Docker
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
DataBreaches.Net
B
Blog RSS Feed
博客园_首页
The GitHub Blog
The GitHub Blog
I
InfoQ
L
LangChain Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
美团技术团队
腾讯CDC
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
博客园 - 三生石上(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(agents): forward model maxTokens by default · opencla...
steipete · 2026-05-03 · via Recent Commits to openclaw:main

@@ -995,6 +995,31 @@ describe("openai transport stream", () => {

995995

expect(params.input?.[0]).toMatchObject({ role: "developer" });

996996

});

997997998+

it("uses model maxTokens for Responses params when runtime maxTokens is omitted", () => {

999+

const params = buildOpenAIResponsesParams(

1000+

{

1001+

id: "gpt-5.4",

1002+

name: "GPT-5.4",

1003+

api: "openai-responses",

1004+

provider: "openai",

1005+

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

1006+

reasoning: true,

1007+

input: ["text"],

1008+

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

1009+

contextWindow: 200000,

1010+

maxTokens: 65_536,

1011+

} satisfies Model<"openai-responses">,

1012+

{

1013+

systemPrompt: "system",

1014+

messages: [],

1015+

tools: [],

1016+

} as never,

1017+

undefined,

1018+

) as { max_output_tokens?: unknown };

1019+1020+

expect(params.max_output_tokens).toBe(65_536);

1021+

});

1022+9981023

it("uses top-level instructions for Codex responses and strips unsupported ChatGPT params", () => {

9991024

const params = buildOpenAIResponsesParams(

10001025

{

@@ -2373,6 +2398,57 @@ describe("openai transport stream", () => {

23732398

expect(params).not.toHaveProperty("max_completion_tokens");

23742399

});

237524002401+

it("uses model maxTokens for OpenAI completions params when runtime maxTokens is omitted", () => {

2402+

const params = buildOpenAICompletionsParams(

2403+

{

2404+

id: "gpt-5.4",

2405+

name: "GPT-5.4",

2406+

api: "openai-completions",

2407+

provider: "openai",

2408+

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

2409+

reasoning: true,

2410+

input: ["text"],

2411+

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

2412+

contextWindow: 200000,

2413+

maxTokens: 65_536,

2414+

} satisfies Model<"openai-completions">,

2415+

{

2416+

systemPrompt: "system",

2417+

messages: [],

2418+

tools: [],

2419+

} as never,

2420+

undefined,

2421+

);

2422+2423+

expect(params.max_completion_tokens).toBe(65_536);

2424+

expect(params).not.toHaveProperty("max_tokens");

2425+

});

2426+2427+

it("uses model maxTokens with max_tokens completions compat when runtime maxTokens is omitted", () => {

2428+

const params = buildOpenAICompletionsParams(

2429+

{

2430+

id: "zai-org/GLM-4.7-TEE",

2431+

name: "GLM 4.7 TEE",

2432+

api: "openai-completions",

2433+

provider: "chutes",

2434+

reasoning: true,

2435+

input: ["text"],

2436+

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

2437+

contextWindow: 200000,

2438+

maxTokens: 65_536,

2439+

} as never,

2440+

{

2441+

systemPrompt: "system",

2442+

messages: [],

2443+

tools: [],

2444+

} as never,

2445+

undefined,

2446+

);

2447+2448+

expect(params.max_tokens).toBe(65_536);

2449+

expect(params).not.toHaveProperty("max_completion_tokens");

2450+

});

2451+23762452

it("omits strict tool shaping for Z.ai default-route completions providers", () => {

23772453

const params = buildOpenAICompletionsParams(

23782454

{