Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/unit/autoCombo/provider-family-combos.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,16 @@ describe("auto/<family> materialization (#6453)", () => {
// `zcode` joined for the same documented reason too — #10184 added the local
// ZCode app-server backend whose registry (registry/zcode) advertises the
// full GLM_SHARED_MODELS line-up, so it genuinely serves the family.
assert.deepEqual(providerIds, ["auggie", "devin-cli-agentic", "glm", "zai", "zcode"]);
// cloudflare-playground advertises zai-org/glm-* models, so its no-auth
// catalog belongs in auto/glm too.
assert.deepEqual(providerIds, [
"auggie",
"cloudflare-playground",
"devin-cli-agentic",
"glm",
"zai",
"zcode",
]);
// Every candidate must be a glm-family model (the Cartesian pool now surfaces
// each backend's full glm line-up, not only the glm-5.2 default), and the
// connected openai/gpt-4o-mini backend must be excluded — same family
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/cli-oauth-commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ test("runOAuthStatus consumes the connections envelope", async () => {
globalThis.fetch = ((url: string) => {
assert.ok(url.includes("/api/providers"));
return Promise.resolve(makeResp({ connections: CONNECTIONS }));
}) as any;
}) as typeof fetch;

try {
const { runOAuthStatus } = await import("../../bin/cli/commands/oauth.mjs");
const out = await captureStdout(() => runOAuthStatus({}, makeCmd() as any));
const out = await captureStdout(() =>
runOAuthStatus({}, makeCmd() as Parameters<typeof runOAuthStatus>[1])
);
const parsed = JSON.parse(out);
assert.deepEqual(
parsed.map((connection: { id: string }) => connection.id),
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/executor-gitlab.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ test("GitlabExecutor falls back to the public Code Suggestions endpoint when dir
"https://gitlab.example.com/api/v4/code_suggestions/completions",
]);

const body = (await result.response.json()) as any;
const body = (await result.response.json()) as {
model: string;
choices: Array<{ message: { content: string } }>;
};
assert.equal(body.model, "code-gecko");
assert.match(body.choices[0].message.content, /monolith fallback works/i);
} finally {
Expand Down
Loading