Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Keep multimodal requests out of Jev fast decisions
release-verification6f55ab4e27bc
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.jsindex 3d245a386..7116d3f52 100644--- a/src/chrome/src/agent/agent.js+++ b/src/chrome/src/agent/agent.js@@ -6801,7 +6801,10 @@ export class Agent extends LoopDetector {try {const settings = await this._jevSettings();if (!settings?.systemOneFastClassifications || this._checkAbort(tabId) || !context.isCurrent()) return null;+ // Classification receives plain text only; multimodal requests stay with the active provider.+ if (!state || Object.values(state).some(value => value != null && typeof value !== 'string')) return null;const text = JSON.stringify(state);+ if (/data:(?:image|application)\//i.test(text)) return null;if (/log.?in|sign.?in|password|parola|giriş|oturum|credential|api.?key|secret/i.test(text)) return null;const verdict = await this.evaluateSystemOne(tabId, createSystemOneJudge({ timeoutMs: 1000, maxRetries: 0 }), {apiKey: settings.typesafeApiKey, signal: this._runAbortSignal(tabId),@@ -6848,6 +6851,7 @@ export class Agent extends LoopDetector {async _maybeJevFastTurn(tabId, task, messages, mode, allowed, provider, costState, runOptions = {}, recovery = null) {const context = this.systemOneContext(tabId);if (!['act', 'dev'].includes(mode) || recovery || runOptions.cloudRun || this.selectionGroundingScopes.has(tabId) || this._isStandaloneChatRun(runOptions)+ || messages.some(message => Array.isArray(message?.content) && message.content.some(block => block?.type !== 'text'))|| this._checkAbort(tabId) || /log.?in|sign.?in|password|parola|giriş|oturum|credential|api.?key|secret/i.test(task)) return null;try {const settings = await this._jevSettings();diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.jsindex 4a0ee84d2..ae13c1f65 100644--- a/src/firefox/src/agent/agent.js+++ b/src/firefox/src/agent/agent.js@@ -6585,7 +6585,10 @@ export class Agent extends LoopDetector {try {const settings = await this._jevSettings();if (!settings?.systemOneFastClassifications || this._checkAbort(tabId) || !context.isCurrent()) return null;+ // Classification receives plain text only; multimodal requests stay with the active provider.+ if (!state || Object.values(state).some(value => value != null && typeof value !== 'string')) return null;const text = JSON.stringify(state);+ if (/data:(?:image|application)\//i.test(text)) return null;if (/log.?in|sign.?in|password|parola|giriş|oturum|credential|api.?key|secret/i.test(text)) return null;const verdict = await this.evaluateSystemOne(tabId, createSystemOneJudge({ timeoutMs: 1000, maxRetries: 0 }), {apiKey: settings.typesafeApiKey, signal: this._runAbortSignal(tabId),@@ -6632,6 +6635,7 @@ export class Agent extends LoopDetector {async _maybeJevFastTurn(tabId, task, messages, mode, allowed, provider, costState, runOptions = {}, recovery = null) {const context = this.systemOneContext(tabId);if (!['act', 'dev'].includes(mode) || recovery || runOptions.cloudRun || this.selectionGroundingScopes.has(tabId) || this._isStandaloneChatRun(runOptions)+ || messages.some(message => Array.isArray(message?.content) && message.content.some(block => block?.type !== 'text'))|| this._checkAbort(tabId) || /log.?in|sign.?in|password|parola|giriş|oturum|credential|api.?key|secret/i.test(task)) return null;try {const settings = await this._jevSettings();diff --git a/test/systemone-fast.mjs b/test/systemone-fast.mjsindex 10775f2b9..991b06ed8 100644--- a/test/systemone-fast.mjs+++ b/test/systemone-fast.mjs@@ -51,6 +51,10 @@ for (const build of ['chrome', 'firefox']) {const allowed = new Set(['get_accessibility_tree', 'click_ax']);Object.assign(storage, { systemOneEnabled: true, systemOneFastBrowser: true, systemOneFastClassifications: true, typesafeApiKey: 'synthetic' });assert.equal(await agent._maybeJevFastTurn(1, 'Click Save', [], 'ask', allowed, provider, {}), null);+ assert.equal(await agent._maybeJevFastTurn(1, 'Click the pictured button', [{ role: 'user', content: [{ type: 'image_url', image_url: { url: 'data:image/png;base64,synthetic' } }] }], 'act', allowed, provider, {}), null);+ assert.equal(await agent._jevClassify(1, 'classify', { yes: 'yes' }, { task: [{ type: 'image_url', image_url: { url: 'private' } }] }), null);+ assert.equal(await agent._jevClassify(1, 'classify', { yes: 'yes' }, { task: 'data:image/png;base64,private' }), null);+ assert.equal(calls, 0);agent.strictSecretMode = true; assert.equal(await agent._jevClassify(1, 'classify', { yes: 'yes' }, {}), null);agent.strictSecretMode = false; storage.typesafeApiKey = ''; assert.equal(await agent._jevClassify(1, 'classify', { yes: 'yes' }, {}), null); assert.equal(calls, 0);storage.typesafeApiKey = 'synthetic';