fix(coding-agent): update Anthropic compaction model and HTTPS package test (#1960)

* fix(coding-agent): use supported Anthropic compaction model

The Anthropic compaction test was pinned to claude-3-7-sonnet-latest, which now fails with a 404 because that model line was retired. Switch the test to the existing claude-sonnet-4-5 convention used elsewhere in coding-agent tests.

* test(coding-agent): disable git prompts in HTTPS parsing test

The HTTPS URL parsing test intentionally clones a nonexistent GitHub repo to verify that bare HTTPS sources dispatch to git. Under a TTY, git can prompt on that path and hang the test run.

Set GIT_TERMINAL_PROMPT=0 in that test so it still exercises real git but fails fast instead of waiting for terminal input.
This commit is contained in:
Daniel Nouri
2026-03-08 21:33:13 +01:00
committed by GitHub
parent 2ef2a5d1ae
commit 758e9eccc3
2 changed files with 16 additions and 6 deletions

View File

@@ -193,8 +193,8 @@ describe.skipIf(!HAS_ANTHROPIC_AUTH)("Compaction with thinking models (Anthropic
return session;
}
it("should compact successfully with claude-3-7-sonnet and thinking level high", async () => {
const model = getModel("anthropic", "claude-3-7-sonnet-latest")!;
it("should compact successfully with claude-sonnet-4-5 and thinking level high", async () => {
const model = getModel("anthropic", "claude-sonnet-4-5")!;
createSession(model, "high");
// Send a simple prompt

View File

@@ -373,12 +373,22 @@ Content`,
it("should recognize github URLs without git: prefix", async () => {
const events: ProgressEvent[] = [];
packageManager.setProgressCallback((event) => events.push(event));
const previousGitTerminalPrompt = process.env.GIT_TERMINAL_PROMPT;
process.env.GIT_TERMINAL_PROMPT = "0";
// This should be parsed as a git source, not throw "unsupported"
try {
await packageManager.install("https://github.com/nonexistent/repo");
} catch {
// Expected to fail - repo doesn't exist
// This should be parsed as a git source, not throw "unsupported"
try {
await packageManager.install("https://github.com/nonexistent/repo");
} catch {
// Expected to fail - repo doesn't exist
}
} finally {
if (previousGitTerminalPrompt === undefined) {
delete process.env.GIT_TERMINAL_PROMPT;
} else {
process.env.GIT_TERMINAL_PROMPT = previousGitTerminalPrompt;
}
}
// Should have attempted clone, not thrown unsupported error