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
Merge main into browser model cooldown and resolve test scripts
Barack Sokullu74b120371dc9
diff --cc package.jsonindex 35676a7e7,693360100..1fa7b1b44--- a/package.json+++ b/package.json@@@ -10,7 -10,8 +10,8 @@@"test:captcha:bridge:ui": "node test/captcha-callback-bridge-ui.mjs","test:billing-notice": "node test/billing-payment-notice.mjs","test:provider-limits": "node test/provider-model-limits.mjs",+ "test:provider-catalog": "node test/provider-catalog-integrations.mjs",- "test:openrouter-capabilities": "node --test test/openrouter-model-capabilities.mjs test/muse-tool-choice.mjs",+ "test:openrouter-capabilities": "node --test test/openrouter-model-capabilities.mjs test/muse-tool-choice.mjs test/model-retry.mjs","test:markdown": "node --test test/markdown-render.mjs","test:accessibility-tree-benchmark": "node --test test/llm/lib/accessibility-tree-formats.test.mjs && node test/llm/accessibility-tree-benchmark.mjs --no-exact-tokenizer --check","test:attachment-drop": "node test/attachment-drop.mjs",diff --cc src/chrome/src/providers/openai.jsindex 8ab18621b,c31f61fc8..06844d7ca--- a/src/chrome/src/providers/openai.js+++ b/src/chrome/src/providers/openai.js@@@ -420,12 -419,17 +420,18 @@@ export class OpenAICompatibleProvider ereturn body;}- _httpError(status, body, prefix) {+ _httpError(status, body, prefix, retryAfter = null) {const error = new Error(`${prefix}: ${this._formatHttpError(status, body)}`);error.httpStatus = status;+ if (status === 429) error.retryAfterMs = retryAfterMs(retryAfter);try {- const providerCode = JSON.parse(body || '{}')?.error?.code;+ const parsed = JSON.parse(body || '{}');+ const providerCode = parsed?.error?.code;+ if (status === 402 && (this.config.providerName || '').toLowerCase() === 'webbrain-cloud') {+ error.quota = { code: providerCode, usage: parsed.usage || {},+ subscribe_url: parsed.subscribe_url || this._webbrainSubscribeUrl(),+ upgrade_url: parsed.upgrade_url, manage_billing_url: parsed.manage_billing_url };+ }if (typeof providerCode === 'string' && providerCode) error.code = providerCode;} catch { /* keep the formatted HTTP error without provider metadata */ }return error;diff --cc src/firefox/src/providers/openai.jsindex 167a4f7d0,02934bc73..4112f04d7--- a/src/firefox/src/providers/openai.js+++ b/src/firefox/src/providers/openai.js@@@ -437,12 -436,17 +437,18 @@@ export class OpenAICompatibleProvider ereturn body;}- _httpError(status, body, prefix) {+ _httpError(status, body, prefix, retryAfter = null) {const error = new Error(`${prefix}: ${this._formatHttpError(status, body)}`);error.httpStatus = status;+ if (status === 429) error.retryAfterMs = retryAfterMs(retryAfter);try {- const providerCode = JSON.parse(body || '{}')?.error?.code;+ const parsed = JSON.parse(body || '{}');+ const providerCode = parsed?.error?.code;+ if (status === 402 && (this.config.providerName || '').toLowerCase() === 'webbrain-cloud') {+ error.quota = { code: providerCode, usage: parsed.usage || {},+ subscribe_url: parsed.subscribe_url || this._webbrainSubscribeUrl(),+ upgrade_url: parsed.upgrade_url, manage_billing_url: parsed.manage_billing_url };+ }if (typeof providerCode === 'string' && providerCode) error.code = providerCode;} catch { /* keep the formatted HTTP error without provider metadata */ }return error;