Files
OmniRoute/tests/unit/grok-cli-proxy-selection.test.ts
backryun 0df0ff2ddb feat(grok-cli): align with official Grok Build client (#7358)
Rebuilt clean on release/v3.8.49 (branch forked from old main, ~drift). Resolved
2 real conflicts against the current tip: providerModelsConfig.ts keeps BOTH the
tip's DashScope text-model helpers (#7882) and this PR's ProviderModelsHeaderContext
type; OAuthModal.tsx takes this PR's DEVICE_CODE_PROVIDERS set (superset of the
tip's hardcoded chain + grok-cli), dropping the now-dead qwen entry (#7866 removed
qwen OAuth).

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-20 19:28:21 -03:00

16 lines
804 B
TypeScript

// Regression test for #7244: Grok Build inference used to bypass the configured
// proxy because the legacy executor overrode execute() with raw https.request().
// The official-client implementation must stay on BaseExecutor's shared fetch
// transport, which is patched by proxyFetch and receives the active proxy context.
import test from "node:test";
import assert from "node:assert/strict";
import { BaseExecutor } from "../../open-sse/executors/base.ts";
import { GrokCliExecutor } from "../../open-sse/executors/grok-cli.ts";
test("grok-cli inherits the shared proxy-aware BaseExecutor transport", () => {
const executor = new GrokCliExecutor();
assert.equal(Object.hasOwn(GrokCliExecutor.prototype, "execute"), false);
assert.equal(executor.execute, BaseExecutor.prototype.execute);
});