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

推荐订阅源

IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
小众软件
小众软件
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
J
Java Code Geeks
WordPress大学
WordPress大学
The Cloudflare 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: preserve OpenAI Codex OAuth transport (#75111) · ope...
keshavbotage · 2026-05-01 · via Recent Commits to openclaw:main

@@ -980,7 +980,7 @@ describe("openai transport stream", () => {

980980

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

981981

});

982982983-

it("uses top-level instructions for Codex responses without dropping parity fields", () => {

983+

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

984984

const params = buildOpenAIResponsesParams(

985985

{

986986

id: "gpt-5.4",

@@ -1020,15 +1020,122 @@ describe("openai transport stream", () => {

10201020

false,

10211021

);

10221022

expect(params.prompt_cache_key).toBe("session-123");

1023-

expect(params.prompt_cache_retention).toBeUndefined();

1023+

expect(params.store).toBe(false);

1024+

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

1025+

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

1026+

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

1027+

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

1028+

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

1029+

});

1030+1031+

it("sanitizes Codex responses params after payload hooks mutate them", () => {

1032+

const payload = {

1033+

model: "gpt-5.4",

1034+

input: [],

1035+

stream: true,

1036+

max_output_tokens: 1024,

1037+

metadata: { openclaw_session_id: "session-123" },

1038+

prompt_cache_key: "session-123",

1039+

prompt_cache_retention: "24h",

1040+

service_tier: "auto",

1041+

temperature: 0.2,

1042+

};

1043+1044+

const sanitized = __testing.sanitizeOpenAICodexResponsesParams(

1045+

{

1046+

id: "gpt-5.4",

1047+

name: "GPT-5.4",

1048+

api: "openai-codex-responses",

1049+

provider: "openai-codex",

1050+

baseUrl: "https://chatgpt.com/backend-api",

1051+

reasoning: true,

1052+

input: ["text"],

1053+

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

1054+

contextWindow: 200000,

1055+

maxTokens: 8192,

1056+

} satisfies Model<"openai-codex-responses">,

1057+

payload,

1058+

);

1059+1060+

expect(sanitized.prompt_cache_key).toBe("session-123");

1061+

expect(sanitized).not.toHaveProperty("metadata");

1062+

expect(sanitized).not.toHaveProperty("max_output_tokens");

1063+

expect(sanitized).not.toHaveProperty("prompt_cache_retention");

1064+

expect(sanitized).not.toHaveProperty("service_tier");

1065+

expect(sanitized).not.toHaveProperty("temperature");

1066+

});

1067+1068+

it("preserves custom Codex-compatible responses params", () => {

1069+

const params = buildOpenAIResponsesParams(

1070+

{

1071+

id: "gpt-5.4",

1072+

name: "GPT-5.4",

1073+

api: "openai-codex-responses",

1074+

provider: "openai-codex",

1075+

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

1076+

reasoning: true,

1077+

input: ["text"],

1078+

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

1079+

contextWindow: 200000,

1080+

maxTokens: 8192,

1081+

} satisfies Model<"openai-codex-responses">,

1082+

{

1083+

systemPrompt: `Stable prefix${SYSTEM_PROMPT_CACHE_BOUNDARY}Dynamic suffix`,

1084+

messages: [{ role: "user", content: "Hello", timestamp: 1 }],

1085+

tools: [],

1086+

} as never,

1087+

{

1088+

cacheRetention: "long",

1089+

maxTokens: 1024,

1090+

sessionId: "session-123",

1091+

temperature: 0.2,

1092+

},

1093+

{

1094+

openclaw_session_id: "session-123",

1095+

openclaw_turn_id: "turn-123",

1096+

},

1097+

) as Record<string, unknown>;

1098+1099+

expect(params.instructions).toBe("Stable prefix\nDynamic suffix");

1100+

expect(params.prompt_cache_key).toBe("session-123");

10241101

expect(params.metadata).toEqual({

10251102

openclaw_session_id: "session-123",

10261103

openclaw_turn_id: "turn-123",

10271104

});

1028-

expect(params.store).toBe(false);

10291105

expect(params.max_output_tokens).toBe(1024);

10301106

expect(params.temperature).toBe(0.2);

1031-

expect(params.service_tier).toBe("auto");

1107+

});

1108+1109+

it("preserves custom Codex-compatible responses params after payload hooks mutate them", () => {

1110+

const payload = {

1111+

model: "gpt-5.4",

1112+

input: [],

1113+

stream: true,

1114+

max_output_tokens: 1024,

1115+

metadata: { openclaw_session_id: "session-123" },

1116+

prompt_cache_key: "session-123",

1117+

prompt_cache_retention: "24h",

1118+

service_tier: "auto",

1119+

temperature: 0.2,

1120+

};

1121+1122+

const sanitized = __testing.sanitizeOpenAICodexResponsesParams(

1123+

{

1124+

id: "gpt-5.4",

1125+

name: "GPT-5.4",

1126+

api: "openai-codex-responses",

1127+

provider: "openai-codex",

1128+

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

1129+

reasoning: true,

1130+

input: ["text"],

1131+

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

1132+

contextWindow: 200000,

1133+

maxTokens: 8192,

1134+

} satisfies Model<"openai-codex-responses">,

1135+

payload,

1136+

);

1137+1138+

expect(sanitized).toEqual(payload);

10321139

});

1033114010341141

it("adds minimal user input for Codex responses when only the system prompt is present", () => {