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

推荐订阅源

D
DataBreaches.Net
F
Fortinet All Blogs
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
罗磊的独立博客
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
U
Unit 42
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
G
Google Developers Blog
H
Help Net Security

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: stabilize OpenAI tool payload ordering · openclaw/op...
galiniliev · 2026-05-17 · via Recent Commits to openclaw:main

@@ -2932,6 +2932,53 @@ describe("openai transport stream", () => {

29322932

expect(params.tool_choice).toBe("required");

29332933

});

293429342935+

it("sorts Responses tools by name for stable prompt-cache payloads", () => {

2936+

const model = {

2937+

id: "gpt-5.4",

2938+

name: "GPT-5.4",

2939+

api: "openai-responses",

2940+

provider: "openai",

2941+

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

2942+

reasoning: true,

2943+

input: ["text"],

2944+

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

2945+

contextWindow: 200000,

2946+

maxTokens: 8192,

2947+

} satisfies Model<"openai-responses">;

2948+

const zetaTool = {

2949+

name: "zeta",

2950+

description: "Z",

2951+

parameters: { type: "object", properties: {}, additionalProperties: false },

2952+

};

2953+

const alphaTool = {

2954+

name: "alpha",

2955+

description: "A",

2956+

parameters: { type: "object", properties: {}, additionalProperties: false },

2957+

};

2958+2959+

const first = buildOpenAIResponsesParams(

2960+

model,

2961+

{

2962+

systemPrompt: "system",

2963+

messages: [],

2964+

tools: [zetaTool, alphaTool],

2965+

} as never,

2966+

{ sessionId: "session-123" } as never,

2967+

) as { tools?: Array<{ name?: string }> };

2968+

const second = buildOpenAIResponsesParams(

2969+

model,

2970+

{

2971+

systemPrompt: "system",

2972+

messages: [],

2973+

tools: [alphaTool, zetaTool],

2974+

} as never,

2975+

{ sessionId: "session-123" } as never,

2976+

) as { tools?: Array<{ name?: string }> };

2977+2978+

expect(first.tools?.map((tool) => tool.name)).toEqual(["alpha", "zeta"]);

2979+

expect(first.tools).toEqual(second.tools);

2980+

});

2981+29352982

it("falls back to strict:false when a native OpenAI tool schema is not strict-compatible", () => {

29362983

const params = buildOpenAIResponsesParams(

29372984

{

@@ -3809,6 +3856,54 @@ describe("openai transport stream", () => {

38093856

expect(notOptedIn.prompt_cache_key).toBeUndefined();

38103857

});

381138583859+

it("sorts Chat Completions tools by function name for stable prompt-cache payloads", () => {

3860+

const model = {

3861+

id: "custom-model",

3862+

name: "Custom Model",

3863+

api: "openai-completions",

3864+

provider: "custom-cpa",

3865+

baseUrl: "https://proxy.example.com/v1",

3866+

compat: { supportsPromptCacheKey: true },

3867+

reasoning: false,

3868+

input: ["text"],

3869+

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

3870+

contextWindow: 32768,

3871+

maxTokens: 8192,

3872+

} as unknown as Model<"openai-completions">;

3873+

const zetaTool = {

3874+

name: "zeta",

3875+

description: "Z",

3876+

parameters: { type: "object", properties: {} },

3877+

};

3878+

const alphaTool = {

3879+

name: "alpha",

3880+

description: "A",

3881+

parameters: { type: "object", properties: {} },

3882+

};

3883+3884+

const first = buildOpenAICompletionsParams(

3885+

model,

3886+

{

3887+

systemPrompt: "system",

3888+

messages: [],

3889+

tools: [zetaTool, alphaTool],

3890+

} as never,

3891+

{ sessionId: "session-123" },

3892+

) as { tools?: Array<{ function?: { name?: string } }> };

3893+

const second = buildOpenAICompletionsParams(

3894+

model,

3895+

{

3896+

systemPrompt: "system",

3897+

messages: [],

3898+

tools: [alphaTool, zetaTool],

3899+

} as never,

3900+

{ sessionId: "session-123" },

3901+

) as { tools?: Array<{ function?: { name?: string } }> };

3902+3903+

expect(first.tools?.map((tool) => tool.function?.name)).toEqual(["alpha", "zeta"]);

3904+

expect(first.tools).toEqual(second.tools);

3905+

});

3906+38123907

it("disables developer-role-only compat defaults for configured custom proxy completions providers", () => {

38133908

const params = buildOpenAICompletionsParams(

38143909

{