openclaw-bridge 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/heartbeat.ts +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-bridge",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"author": "Bill Zhao (https://www.linkedin.com/in/billzhaodi/)",
|
|
5
5
|
"description": "Cross-gateway communication plugin for OpenClaw — agent discovery, file transfer, real-time messaging, and session handoff",
|
|
6
6
|
"type": "module",
|
package/src/heartbeat.ts
CHANGED
|
@@ -90,10 +90,11 @@ export class BridgeHeartbeat {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
private detectVisionSupport(): boolean {
|
|
93
|
+
// Explicit config override takes priority
|
|
93
94
|
if (this.config.supportsVision !== undefined) {
|
|
94
95
|
return this.config.supportsVision;
|
|
95
96
|
}
|
|
96
|
-
if (!this.configPath) return
|
|
97
|
+
if (!this.configPath) return true; // Default to true — most models support vision
|
|
97
98
|
try {
|
|
98
99
|
const raw = readFileSync(this.configPath, "utf-8");
|
|
99
100
|
const config = JSON.parse(raw) as {
|
|
@@ -102,14 +103,17 @@ export class BridgeHeartbeat {
|
|
|
102
103
|
list?: Array<{ id?: string; name?: string }>;
|
|
103
104
|
};
|
|
104
105
|
};
|
|
105
|
-
const defaultModel = config.models?.default ?? "";
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const defaultModel = (config.models?.default ?? "").toLowerCase();
|
|
107
|
+
if (!defaultModel) return true;
|
|
108
|
+
// Known text-only models that do NOT support vision
|
|
109
|
+
const textOnlyPatterns = [
|
|
110
|
+
"minimax", "m2.7", "deepseek-r1", "deepseek-v2", "qwen-turbo",
|
|
111
|
+
"yi-lightning", "glm-3", "glm-4-flash", "mistral-small",
|
|
112
|
+
"codestral", "command-r", "phi-3-mini", "phi-3-small",
|
|
109
113
|
];
|
|
110
|
-
return
|
|
114
|
+
return !textOnlyPatterns.some((p) => defaultModel.includes(p));
|
|
111
115
|
} catch {
|
|
112
|
-
return
|
|
116
|
+
return true;
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
|