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

推荐订阅源

小众软件
小众软件
博客园 - Franky
罗磊的独立博客
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
V
V2EX
F
Fortinet All Blogs
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
U
Unit 42
GbyAI
GbyAI
A
About on SuperTechFans
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
Martin Fowler
Martin Fowler
D
DataBreaches.Net
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | 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
feat(openai): add chat-latest model override · openclaw/o...
vincentkoc · 2026-05-07 · via Recent Commits to openclaw:main

@@ -5,7 +5,7 @@ import { describe, expect, it } from "vitest";

55

import { buildOpenAIProvider } from "./openai-provider.js";

6677

const OPENAI_API_KEY = process.env.OPENAI_API_KEY ?? "";

8-

const DEFAULT_LIVE_MODEL_IDS = ["gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano"] as const;

8+

const DEFAULT_LIVE_MODEL_IDS = ["chat-latest", "gpt-5.5", "gpt-5.4-mini", "gpt-5.4-nano"] as const;

99

const liveEnabled = OPENAI_API_KEY.trim().length > 0 && process.env.OPENCLAW_LIVE_TEST === "1";

1010

const describeLive = liveEnabled ? describe : describe.skip;

1111

@@ -16,6 +16,8 @@ type LiveModelCase = {

1616

cost: { input: number; output: number; cacheRead: number; cacheWrite: number };

1717

contextWindow: number;

1818

maxTokens: number;

19+

reasoning: boolean;

20+

textVerbosity: "low" | "medium";

1921

};

20222123

function findOpenAIModel(modelId: string): Model<Api> | null {

@@ -24,6 +26,17 @@ function findOpenAIModel(modelId: string): Model<Api> | null {

24262527

function resolveLiveModelCase(modelId: string): LiveModelCase {

2628

switch (modelId) {

29+

case "chat-latest":

30+

return {

31+

modelId,

32+

templateId: "gpt-5.5",

33+

templateName: "GPT-5.5",

34+

cost: { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 },

35+

contextWindow: 400_000,

36+

maxTokens: 128_000,

37+

reasoning: false,

38+

textVerbosity: "medium",

39+

};

2740

case "gpt-5.5":

2841

return {

2942

modelId,

@@ -32,6 +45,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

3245

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

3346

contextWindow: 1_000_000,

3447

maxTokens: 128_000,

48+

reasoning: true,

49+

textVerbosity: "low",

3550

};

3651

case "gpt-5.5-pro":

3752

return {

@@ -41,6 +56,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

4156

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

4257

contextWindow: 1_000_000,

4358

maxTokens: 128_000,

59+

reasoning: true,

60+

textVerbosity: "low",

4461

};

4562

case "gpt-5.4":

4663

return {

@@ -50,6 +67,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

5067

cost: { input: 1.75, output: 14, cacheRead: 0.175, cacheWrite: 0 },

5168

contextWindow: 400_000,

5269

maxTokens: 128_000,

70+

reasoning: true,

71+

textVerbosity: "low",

5372

};

5473

case "gpt-5.4-pro":

5574

return {

@@ -59,6 +78,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

5978

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

6079

contextWindow: 400_000,

6180

maxTokens: 128_000,

81+

reasoning: true,

82+

textVerbosity: "low",

6283

};

6384

case "gpt-5.4-mini":

6485

return {

@@ -68,6 +89,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

6889

cost: { input: 0.25, output: 2, cacheRead: 0.025, cacheWrite: 0 },

6990

contextWindow: 400_000,

7091

maxTokens: 128_000,

92+

reasoning: true,

93+

textVerbosity: "low",

7194

};

7295

case "gpt-5.4-nano":

7396

return {

@@ -77,6 +100,8 @@ function resolveLiveModelCase(modelId: string): LiveModelCase {

77100

cost: { input: 0.05, output: 0.4, cacheRead: 0.005, cacheWrite: 0 },

78101

contextWindow: 400_000,

79102

maxTokens: 128_000,

103+

reasoning: true,

104+

textVerbosity: "low",

80105

};

81106

default:

82107

throw new Error(`Unsupported live OpenAI model: ${modelId}`);

@@ -113,7 +138,7 @@ describeLive("buildOpenAIProvider live", () => {

113138

provider: "openai",

114139

api: "openai-completions",

115140

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

116-

reasoning: true,

141+

reasoning: liveCase.reasoning,

117142

input: ["text", "image"],

118143

cost: liveCase.cost,

119144

contextWindow: liveCase.contextWindow,

@@ -146,6 +171,7 @@ describeLive("buildOpenAIProvider live", () => {

146171

id: liveCase.modelId,

147172

api: "openai-responses",

148173

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

174+

reasoning: liveCase.reasoning,

149175

});

150176151177

const client = new OpenAI({

@@ -158,8 +184,8 @@ describeLive("buildOpenAIProvider live", () => {

158184

instructions: "Return exactly OK and no other text.",

159185

input: "Return exactly OK.",

160186

max_output_tokens: 64,

161-

reasoning: { effort: "none" },

162-

text: { verbosity: "low" },

187+

...(liveCase.reasoning ? { reasoning: { effort: "none" as const } } : {}),

188+

text: { verbosity: liveCase.textVerbosity },

163189

});

164190165191

expect(response.output_text.trim()).toMatch(/^OK[.!]?$/);