mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
The kilocode provider uses OAuth device flow + direct HTTPS to api.kilo.ai and never depends on the local kilocode CLI binary at runtime. The connection test was hard-failing with "Local CLI runtime is not installed" even when the OAuth token itself was perfectly valid, blocking all kilocode setups on hosts where the CLI binary was not also installed. Removed kilocode from CLI_RUNTIME_PROVIDER_MAP and extracted the constant to a dedicated module so unit tests can pin the contract without dragging the full Next.js route + DB initialization into the test runtime. CLI Tools integration (/api/cli-tools/kilo-settings, used to configure the Kilo VSCode extension to point at OmniRoute) keeps its own runtime check since it actually does need the CLI binary to be present.
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { CLI_RUNTIME_PROVIDER_MAP } from "../../src/app/api/providers/[id]/test/cliRuntimeProviderMap";
|
|
|
|
// #2404 — Before this fix, the kilocode provider (OAuth device flow + direct HTTPS
|
|
// to api.kilo.ai) was gated on the local `kilocode` CLI binary being installed,
|
|
// which made the connection test hard-fail with "Local CLI runtime is not installed"
|
|
// even when the OAuth token itself was perfectly valid. The CLI binary is only
|
|
// relevant for the dashboard's CLI-tools integration, not for the provider itself.
|
|
test("CLI_RUNTIME_PROVIDER_MAP must not gate kilocode on a local CLI binary (#2404)", () => {
|
|
assert.equal(
|
|
CLI_RUNTIME_PROVIDER_MAP.kilocode,
|
|
undefined,
|
|
"kilocode is an OAuth+HTTPS provider; it must not require the local CLI binary at test time"
|
|
);
|
|
});
|
|
|
|
test("CLI_RUNTIME_PROVIDER_MAP still gates providers that actually need a local CLI", () => {
|
|
// cline and qoder both read credentials from a local CLI auth file when used
|
|
// in their CLI-flavored auth mode, so the runtime check stays meaningful.
|
|
assert.equal(CLI_RUNTIME_PROVIDER_MAP.cline, "cline");
|
|
assert.equal(CLI_RUNTIME_PROVIDER_MAP.qoder, "qoder");
|
|
});
|