Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const modalSource = readFileSync("src/shared/components/OAuthModal.tsx", "utf8");
const errorStepSource = readFileSync(
"src/shared/components/oauthModal/OAuthErrorStep.tsx",
"utf8"
);
test("OAuthModal narrows failed Grok paste results before reading the error", () => {
assert.match(modalSource, /if \(parsed\.ok === false\) \{\s*setError\(parsed\.error\);/);
});
test("OAuthModal adapts the retry action to the button click handler", () => {
// #8688 extracted the error panel; retry stays a Button onClick in OAuthErrorStep,
// wired from OAuthModal via onTryAgain → startOAuthFlow.
assert.match(modalSource, /onTryAgain=\{\(\) => void startOAuthFlow\(\)\}/);
assert.match(
errorStepSource,
/<Button\s+onClick=\{\(\) => \{[\s\S]*?onTryAgain\(\);[\s\S]*?\}\}\s+variant="secondary"\s+fullWidth\s*>/
);
});