慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311
修(pdf):用MiniMax文本模型备选 · openclaw/openclaw@89bb62e
neeravmakwan · 2026-05-24 · via Recent Commits to openclaw:main

@@ -5,7 +5,7 @@ import {

55

resolveDefaultMediaModel,

66

} from "../../media-understanding/defaults.js";

77

import type { AuthProfileStore } from "../auth-profiles/types.js";

8-

import { isMinimaxVlmProvider } from "../minimax-vlm.js";

8+

import { isMinimaxVlmModel, isMinimaxVlmProvider } from "../minimax-vlm.js";

99

import {

1010

coerceImageModelConfig,

1111

type ImageModelConfig,

@@ -55,6 +55,78 @@ function resolveImageCandidateRefs(params: {

5555

.filter((value): value is string => Boolean(value));

5656

}

575758+

function formatProviderModelRef(providerId: string, modelId: string): string {

59+

const slash = modelId.indexOf("/");

60+

if (slash > 0 && modelId.slice(0, slash).trim() === providerId) {

61+

return modelId;

62+

}

63+

return `${providerId}/${modelId}`;

64+

}

65+66+

function isMinimaxVlmModelRef(ref: string): boolean {

67+

const slash = ref.indexOf("/");

68+

if (slash <= 0) {

69+

return false;

70+

}

71+

return isMinimaxVlmModel(ref.slice(0, slash), ref.slice(slash + 1));

72+

}

73+74+

function resolveMinimaxTextExtractionCandidateRefs(params: {

75+

cfg?: OpenClawConfig;

76+

primary: { provider: string; model: string };

77+

primaryProviderOk: boolean;

78+

agentDir: string;

79+

authStore?: AuthProfileStore;

80+

}): string[] {

81+

const candidates: string[] = [];

82+

const addCandidate = (providerId: string, modelId: string) => {

83+

const provider = providerId.trim();

84+

const model = modelId.trim();

85+

if (!provider || !model || isMinimaxVlmModel(provider, model)) {

86+

return;

87+

}

88+

const ref = formatProviderModelRef(provider, model);

89+

if (!candidates.includes(ref)) {

90+

candidates.push(ref);

91+

}

92+

};

93+94+

if (params.primaryProviderOk && isMinimaxVlmProvider(params.primary.provider)) {

95+

addCandidate(params.primary.provider, params.primary.model);

96+

}

97+98+

const providers = params.cfg?.models?.providers;

99+

if (!providers || typeof providers !== "object") {

100+

return candidates;

101+

}

102+103+

for (const [providerKey, providerCfg] of Object.entries(providers)) {

104+

const providerId = providerKey.trim();

105+

if (

106+

!providerId ||

107+

!isMinimaxVlmProvider(providerId) ||

108+

!hasAuthForProvider({

109+

provider: providerId,

110+

agentDir: params.agentDir,

111+

authStore: params.authStore,

112+

})

113+

) {

114+

continue;

115+

}

116+

const modelId = (providerCfg?.models ?? [])

117+

.find((model) => {

118+

const id = model?.id?.trim();

119+

return Boolean(id) && Array.isArray(model?.input) && model.input.includes("text");

120+

})

121+

?.id?.trim();

122+

if (modelId) {

123+

addCandidate(providerId, modelId);

124+

}

125+

}

126+127+

return candidates;

128+

}

129+58130

export function resolvePdfModelConfigForTool(params: {

59131

cfg?: OpenClawConfig;

60132

agentDir: string;

@@ -138,6 +210,13 @@ export function resolvePdfModelConfigForTool(params: {

138210

agentDir: params.agentDir,

139211

workspaceDir: params.workspaceDir,

140212

authStore: params.authStore,

213+

}).filter((ref) => !isMinimaxVlmModelRef(ref));

214+

const minimaxTextExtractionCandidates = resolveMinimaxTextExtractionCandidateRefs({

215+

cfg: params.cfg,

216+

primary,

217+

primaryProviderOk: providerOk,

218+

agentDir: params.agentDir,

219+

authStore: params.authStore,

141220

});

142221143222

if (params.cfg?.models?.providers && typeof params.cfg.models.providers === "object") {

@@ -180,11 +259,19 @@ export function resolvePdfModelConfigForTool(params: {

180259

} else if (providerOk && primarySupportsNativePdf && (providerVision || providerDefault)) {

181260

preferred = providerVision ?? `${primary.provider}/${providerDefault}`;

182261

} else {

183-

preferred = nativePdfCandidates[0] ?? genericImageCandidates[0] ?? null;

262+

preferred =

263+

nativePdfCandidates[0] ??

264+

minimaxTextExtractionCandidates[0] ??

265+

genericImageCandidates[0] ??

266+

null;

184267

}

185268186269

if (preferred?.trim()) {

187-

for (const candidate of [...nativePdfCandidates, ...genericImageCandidates]) {

270+

for (const candidate of [

271+

...nativePdfCandidates,

272+

...minimaxTextExtractionCandidates,

273+

...genericImageCandidates,

274+

]) {

188275

if (candidate !== preferred) {

189276

addFallback(candidate);

190277

}