From fc8542b377079b76e493bbcd92fba358af4da28b Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 21 Jun 2026 14:58:12 +0800 Subject: [PATCH] chore(deadcode): remove stale internal exports --- src/agents/tools/gateway.ts | 2 -- src/auto-reply/reply/agent-runner-utils.test.ts | 17 ++++++++++++++--- src/auto-reply/reply/agent-runner-utils.ts | 12 +----------- src/auto-reply/thinking.ts | 5 ----- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/agents/tools/gateway.ts b/src/agents/tools/gateway.ts index 21dbb570cde2..aafe7bcb8209 100644 --- a/src/agents/tools/gateway.ts +++ b/src/agents/tools/gateway.ts @@ -28,8 +28,6 @@ import { import { formatErrorMessage } from "../../infra/errors.js"; import { readPositiveIntegerParam, readStringParam } from "./common.js"; -export const DEFAULT_GATEWAY_URL = "ws://127.0.0.1:18789"; - /** Optional gateway connection overrides accepted by agent tools. */ export type GatewayCallOptions = { gatewayUrl?: string; diff --git a/src/auto-reply/reply/agent-runner-utils.test.ts b/src/auto-reply/reply/agent-runner-utils.test.ts index c15c1ab52e7c..1408a8447387 100644 --- a/src/auto-reply/reply/agent-runner-utils.test.ts +++ b/src/auto-reply/reply/agent-runner-utils.test.ts @@ -28,7 +28,6 @@ const { buildEmbeddedRunContexts, buildEmbeddedRunExecutionParams, resolveModelFallbackOptions, - resolveEnforceFinalTag, resolveProviderScopedAuthProfile, } = await import("./agent-runner-utils.js"); @@ -233,9 +232,21 @@ describe("agent-runner-utils", () => { }); it("does not force final-tag enforcement for minimax providers", () => { - const run = makeRun(); + const run = makeRun({ enforceFinalTag: false }); + const authProfile = resolveProviderScopedAuthProfile({ + provider: "minimax", + primaryProvider: "minimax", + }); - expect(resolveEnforceFinalTag(run, "minimax", "MiniMax-M2.7")).toBe(false); + const resolved = buildEmbeddedRunBaseParams({ + run, + provider: "minimax", + model: "MiniMax-M2.7", + runId: "run-1", + authProfile, + }); + + expect(resolved.enforceFinalTag).toBe(false); expect(hoisted.isReasoningTagProviderMock).toHaveBeenCalledWith("minimax", { config: run.config, workspaceDir: run.workspaceDir, diff --git a/src/auto-reply/reply/agent-runner-utils.ts b/src/auto-reply/reply/agent-runner-utils.ts index b07458177e13..f5af35258822 100644 --- a/src/auto-reply/reply/agent-runner-utils.ts +++ b/src/auto-reply/reply/agent-runner-utils.ts @@ -29,10 +29,7 @@ import { resolveRunAuthProfile, } from "./agent-runner-auth-profile.js"; export { resolveProviderScopedAuthProfile, resolveRunAuthProfile }; -import { - buildEmbeddedRunBaseParams as buildEmbeddedRunBaseParamsCore, - resolveEnforceFinalTagWithResolver, -} from "./agent-runner-run-params.js"; +import { buildEmbeddedRunBaseParams as buildEmbeddedRunBaseParamsCore } from "./agent-runner-run-params.js"; export { resolveModelFallbackOptions } from "./agent-runner-run-params.js"; import { hasInboundAudio } from "./inbound-media.js"; import { resolveOriginMessageProvider, resolveOriginMessageTo } from "./origin-routing.js"; @@ -200,13 +197,6 @@ export const formatBunFetchSocketError = (message: string) => { ].join("\n"); }; -/** Resolves whether final-answer tags should be enforced for a queued run. */ -export const resolveEnforceFinalTag = ( - run: FollowupRun["run"], - provider: string, - model = run.model, -) => resolveEnforceFinalTagWithResolver(run, provider, model, isReasoningTagProvider); - /** Builds base embedded run params with auth and provider runtime hints. */ export function buildEmbeddedRunBaseParams( params: Parameters[0], diff --git a/src/auto-reply/thinking.ts b/src/auto-reply/thinking.ts index 19b30bc26043..85e7a2960b83 100644 --- a/src/auto-reply/thinking.ts +++ b/src/auto-reply/thinking.ts @@ -268,11 +268,6 @@ function supportsThinkingLevel( ); } -/** Return whether provider/model supports the xhigh thinking level. */ -export function supportsXHighThinking(provider?: string | null, model?: string | null): boolean { - return supportsThinkingLevel(provider, model, "xhigh"); -} - /** List thinking level ids supported by provider/model. */ export function listThinkingLevels( provider?: string | null,