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
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/CodexProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
} from "./codexUsageLimits.ts";
import packageJson from "../../../package.json" with { type: "json" };
const isCodexAppServerSpawnError = Schema.is(CodexErrors.CodexAppServerSpawnError);
const RATE_LIMITS_PROBE_TIMEOUT_MS = 3_000;
const RATE_LIMITS_PROBE_TIMEOUT_MS = 10_000;

type CodexRateLimitsProbe =
| {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/CursorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ function getCursorFallbackModels(
}

/** Timeout for `agent about` — it's slower than a simple `--version` probe. */
const ABOUT_TIMEOUT_MS = 8_000;
const ABOUT_TIMEOUT_MS = 10_000;

/** Strip ANSI escape sequences so we can parse plain key-value lines. */
function stripAnsi(text: string): string {
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/provider/Layers/GrokProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const EMPTY_CAPABILITIES: ModelCapabilities = createModelCapabilities({
optionDescriptors: [],
});

const VERSION_PROBE_TIMEOUT_MS = 4_000;
const VERSION_PROBE_TIMEOUT_MS = 10_000;
// `initialize` is a single local round trip, so this is generous even on slow machines.
const GROK_ACP_INITIALIZE_TIMEOUT_MS = 8_000;
const GROK_ACP_INITIALIZE_TIMEOUT_MS = 10_000;
const GROK_API_KEY_ENV = "XAI_API_KEY";

const GROK_BUILT_IN_MODELS: ReadonlyArray<ServerProviderModel> = [
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/provider/Layers/OpenCodeProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,14 @@ it.layer(testLayer)("checkOpenCodeProviderStatus", (it) => {
const probeFiber = yield* checkProvider(makeOpenCodeSettings()).pipe(Effect.forkChild);

yield* Effect.yieldNow;
yield* TestClock.adjust("4 seconds");
yield* TestClock.adjust("10 seconds");
const snapshot = yield* Fiber.join(probeFiber);

NodeAssert.equal(snapshot.status, "error");
NodeAssert.equal(snapshot.installed, true);
NodeAssert.equal(
snapshot.message,
"Failed to execute OpenCode CLI health check: OpenCode CLI version probe timed out after 4 seconds.",
"Failed to execute OpenCode CLI health check: OpenCode CLI version probe timed out after 10 seconds.",
);
}).pipe(Effect.provide(TestClock.layer())),
);
Expand Down
5 changes: 4 additions & 1 deletion apps/server/src/provider/Layers/OpenCodeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const OPENCODE_PRESENTATION = {
displayName: "OpenCode",
showInteractionModeToggle: false,
} as const;
const OPENCODE_VERSION_PROBE_TIMEOUT = "4 seconds";
// `opencode --version` takes 2-4s on Windows (Node shim + Defender cold start),
// so the old 4s cap flapped to Unavailable under any load. Match the 10s auth-probe
// budget used for Codex/Grok (see AUTH_PROBE_TIMEOUT_MS).
const OPENCODE_VERSION_PROBE_TIMEOUT = "10 seconds";

class OpenCodeProbeError extends Data.TaggedError("OpenCodeProbeError")<{
readonly cause?: unknown;
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/providerSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { isWindowsCommandNotFound } from "../processRunner.ts";
import { createProviderVersionAdvisory } from "./providerMaintenance.ts";
import { collectUint8StreamText } from "../stream/collectUint8StreamText.ts";

export const DEFAULT_TIMEOUT_MS = 4_000;
export const DEFAULT_TIMEOUT_MS = 10_000;
// Auth status checks involve disk/network lookups and can be slow on first run (especially Windows)
export const AUTH_PROBE_TIMEOUT_MS = 10_000;

Expand Down
Loading