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

推荐订阅源

D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
B
Blog RSS Feed
H
Help Net Security
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
L
LangChain Blog
Vercel News
Vercel News

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: dedupe OpenAI strict schema downgrade diagnostics (#...
galiniliev · 2026-05-20 · via Recent Commits to openclaw:main

@@ -78,7 +78,9 @@ const AZURE_RESPONSES_FIRST_EVENT_TIMEOUT_MS = 30_000;

7878

const MODEL_STREAM_COOPERATIVE_YIELD_INTERVAL_MS = 12;

7979

const MODEL_STREAM_COOPERATIVE_YIELD_MAX_EVENTS = 64;

8080

const RESPONSE_FAILED_NO_DETAILS_MESSAGE = "Unknown error (no error details in response)";

81+

const MAX_OPENAI_STRICT_TOOL_DOWNGRADE_DIAGNOSTIC_KEYS = 256;

8182

const log = createSubsystemLogger("openai-transport");

83+

const loggedOpenAIStrictToolDowngradeDiagnosticKeys = new Set<string>();

82848385

type ReplayableResponseOutputMessage = Omit<ResponseOutputMessage, "id"> & { id?: string };

8486

type ReplayableResponseReasoningItem = Omit<ResponseReasoningItem, "id"> & { id?: string };

@@ -976,6 +978,9 @@ function resolveOpenAIStrictToolFlagWithDiagnostics(

976978

const strict = resolveOpenAIStrictToolFlagForInventory(tools, strictSetting);

977979

if (strictSetting === true && strict === false && log.isEnabled("debug", "any")) {

978980

const diagnostics = findOpenAIStrictToolSchemaDiagnostics(tools);

981+

if (!shouldLogOpenAIStrictToolDowngradeDiagnostic(diagnostics, context)) {

982+

return strict;

983+

}

979984

const sample = diagnostics.slice(0, 5).map((entry) => ({

980985

tool: entry.toolName ?? `tool[${entry.toolIndex}]`,

981986

violations: entry.violations.slice(0, 8),

@@ -996,6 +1001,44 @@ function resolveOpenAIStrictToolFlagWithDiagnostics(

9961001

return strict;

9971002

}

99810031004+

function buildOpenAIStrictToolDowngradeDiagnosticKey(

1005+

diagnostics: ReturnType<typeof findOpenAIStrictToolSchemaDiagnostics>,

1006+

context: { transport: "responses" | "completions"; model: OpenAIModeModel },

1007+

): string {

1008+

return createHash("sha256")

1009+

.update(

1010+

JSON.stringify({

1011+

transport: context.transport,

1012+

provider: context.model.provider ?? null,

1013+

model: context.model.id ?? null,

1014+

diagnostics: diagnostics.map((entry) => ({

1015+

toolIndex: entry.toolIndex,

1016+

toolName: entry.toolName ?? null,

1017+

violations: entry.violations,

1018+

})),

1019+

}),

1020+

)

1021+

.digest("hex");

1022+

}

1023+1024+

function shouldLogOpenAIStrictToolDowngradeDiagnostic(

1025+

diagnostics: ReturnType<typeof findOpenAIStrictToolSchemaDiagnostics>,

1026+

context: { transport: "responses" | "completions"; model: OpenAIModeModel },

1027+

): boolean {

1028+

const key = buildOpenAIStrictToolDowngradeDiagnosticKey(diagnostics, context);

1029+

if (loggedOpenAIStrictToolDowngradeDiagnosticKeys.has(key)) {

1030+

return false;

1031+

}

1032+

if (

1033+

loggedOpenAIStrictToolDowngradeDiagnosticKeys.size >=

1034+

MAX_OPENAI_STRICT_TOOL_DOWNGRADE_DIAGNOSTIC_KEYS

1035+

) {

1036+

loggedOpenAIStrictToolDowngradeDiagnosticKeys.clear();

1037+

}

1038+

loggedOpenAIStrictToolDowngradeDiagnosticKeys.add(key);

1039+

return true;

1040+

}

1041+9991042

function createResponsesFirstEventTimeoutError(model: Model<Api>, timeoutMs: number): Error {

10001043

return new Error(

10011044

`Azure OpenAI Responses stream did not deliver a first event within ${timeoutMs}ms after HTTP streaming headers. ` +