# v0.4.52 (2026-05-17)

## Features
- Add Vercel AI Gateway provider support (#1183)
- rtk: Kiro format tool result compression — handle conversationState.history & currentMessage, preserve error results, ~13.6% savings (#1194)

## Fixes
- openclaw: normalize agent.model object form `{primary, fallbacks}` before .startsWith → fix TypeError & 'not configured' status (#1216)
- Usage Details pagination: stay inside mobile viewport <640px (#1218)
- Fix test model error
- Fix MIMO provider in Codex
- Disable log file creation when using MITM AG
This commit is contained in:
decolua
2026-05-17 16:37:26 +07:00
parent 9326589452
commit 9abbb8ad9b
12 changed files with 188 additions and 79 deletions
+2 -1
View File
@@ -8,8 +8,9 @@ export const MITM_TOOLS = {
description: "Google Antigravity IDE with MITM",
configType: "mitm",
mitmDomain: "daily-cloudcode-pa.googleapis.com",
modelAliases: ["claude-opus-4-6-thinking", "claude-sonnet-4-6", "gemini-3-flash", "gpt-oss-120b-medium", "gemini-3-pro-high", "gemini-3-pro-low"],
modelAliases: ["claude-opus-4-6-thinking", "claude-sonnet-4-6", "gemini-3-flash", "gpt-oss-120b-medium", "gemini-3-pro-high", "gemini-3-pro-low", "gemini-pro-agent"],
defaultModels: [
{ id: "gemini-pro-agent", name: "Gemini Pro Agent (AG v1.23+ Agent Mode)", alias: "gemini-pro-agent" },
{ id: "gemini-3.1-pro-high", name: "Gemini 3.1 Pro High", alias: "gemini-3.1-pro-high" },
{ id: "gemini-3.1-pro-low", name: "Gemini 3.1 Pro Low", alias: "gemini-3.1-pro-low" },
{ id: "gemini-3-flash", name: "Gemini 3 Flash / Default", alias: "gemini-3-flash" },
+30 -42
View File
@@ -1,52 +1,40 @@
import { machineIdSync } from 'node-machine-id';
import fs from 'node:fs';
import path from 'node:path';
import crypto from 'node:crypto';
import { DATA_DIR } from '@/lib/dataDir';
/**
* Get consistent machine ID using node-machine-id with salt
* This ensures the same physical machine gets the same ID across runs
*
* @param {string} salt - Optional salt to use (defaults to environment variable)
* @returns {Promise<string>} Machine ID (16-character base32)
*/
export async function getConsistentMachineId(salt = null) {
// For server-side, use node-machine-id with salt
const saltValue = salt || process.env.MACHINE_ID_SALT || 'endpoint-proxy-salt';
const MACHINE_ID_FILE = path.join(DATA_DIR, 'machine-id');
let cachedRawId = null;
// Persist raw machine ID to file → guarantees CLI/server/middleware see same value
// even when machineIdSync fails or returns inconsistent values across runtimes.
function loadRawMachineId() {
if (cachedRawId) return cachedRawId;
try {
const rawMachineId = machineIdSync();
// Create consistent ID using salt
const crypto = await import('crypto');
const hashedMachineId = crypto.createHash('sha256').update(rawMachineId + saltValue).digest('hex');
// Return only first 16 characters for brevity
return hashedMachineId.substring(0, 16);
} catch (error) {
console.log('Error getting machine ID:', error);
// Fallback to random ID if node-machine-id fails
return crypto.randomUUID ? crypto.randomUUID() :
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = Math.random() * 16 | 0;
const v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
cachedRawId = fs.readFileSync(MACHINE_ID_FILE, 'utf8').trim();
if (cachedRawId) return cachedRawId;
} catch {}
try {
cachedRawId = machineIdSync();
} catch {
cachedRawId = crypto.randomUUID();
}
try {
fs.mkdirSync(DATA_DIR, { recursive: true });
fs.writeFileSync(MACHINE_ID_FILE, cachedRawId, { mode: 0o600 });
} catch {}
return cachedRawId;
}
export async function getConsistentMachineId(salt = null) {
const saltValue = salt || process.env.MACHINE_ID_SALT || 'endpoint-proxy-salt';
const raw = loadRawMachineId();
return crypto.createHash('sha256').update(raw + saltValue).digest('hex').substring(0, 16);
}
/**
* Get raw machine ID without hashing (for debugging purposes)
* @returns {Promise<string>} Raw machine ID
*/
export async function getRawMachineId() {
// For server-side, use raw node-machine-id
try {
return machineIdSync();
} catch (error) {
console.log('Error getting raw machine ID:', error);
// Fallback to random ID if node-machine-id fails
return crypto.randomUUID ? crypto.randomUUID() :
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = Math.random() * 16 | 0;
const v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
return loadRawMachineId();
}
/**