Skip to content

Commit 380bc24

Browse files
authored
refactor(deadcode): localize AI provider declarations (#101907)
1 parent 3dbe98a commit 380bc24

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

packages/ai/src/providers/azure-openai-responses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function formatAzureOpenAIError(error: unknown): string {
5656
}
5757

5858
// Azure OpenAI Responses-specific options
59-
export interface AzureOpenAIResponsesOptions extends StreamOptions {
59+
interface AzureOpenAIResponsesOptions extends StreamOptions {
6060
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
6161
reasoningSummary?: "auto" | "detailed" | "concise" | null;
6262
azureApiVersion?: string;

packages/ai/src/providers/google-shared.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { stripSystemPromptCacheBoundary } from "../utils/system-prompt-cache-bou
3535
import { describeToolResultMediaPlaceholder, extractToolResultText } from "./tool-result-text.js";
3636
import { transformMessages } from "./transform-messages.js";
3737

38-
export type GoogleApiType = "google-generative-ai" | "google-vertex";
38+
type GoogleApiType = "google-generative-ai" | "google-vertex";
3939

4040
/**
4141
* Thinking level for Gemini 3 models.
@@ -48,9 +48,9 @@ export type GoogleThinkingLevel =
4848
| "MEDIUM"
4949
| "HIGH";
5050

51-
export type GoogleToolChoice = "auto" | "none" | "any";
51+
type GoogleToolChoice = "auto" | "none" | "any";
5252

53-
export type GoogleThinkingOptions = {
53+
type GoogleThinkingOptions = {
5454
enabled: boolean;
5555
budgetTokens?: number;
5656
level?: GoogleThinkingLevel;

packages/ai/src/providers/google-vertex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
} from "./google-shared.js";
2020
import { buildBaseOptions } from "./simple-options.js";
2121

22-
export interface GoogleVertexOptions extends GoogleProviderOptions {
22+
interface GoogleVertexOptions extends GoogleProviderOptions {
2323
project?: string;
2424
location?: string;
2525
}

packages/ai/src/providers/google.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from "./google-shared.js";
1414
import { buildBaseOptions } from "./simple-options.js";
1515

16-
export type GoogleOptions = GoogleProviderOptions;
16+
type GoogleOptions = GoogleProviderOptions;
1717

1818
// Counter for generating unique tool call IDs
1919
let toolCallCounter = 0;

packages/ai/src/providers/mistral.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function createBoundedMistralFetcher(
9898
*/
9999
type MistralReasoningEffort = "none" | "high";
100100

101-
export interface MistralOptions extends StreamOptions {
101+
interface MistralOptions extends StreamOptions {
102102
toolChoice?:
103103
| "auto"
104104
| "none"

packages/ai/src/providers/openai-chatgpt-responses.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const CODEX_RESPONSE_STATUSES = new Set<CodexResponseStatus>([
9595
// Types
9696
// ============================================================================
9797

98-
export interface OpenAICodexResponsesOptions extends StreamOptions {
98+
interface OpenAICodexResponsesOptions extends StreamOptions {
9999
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
100100
reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
101101
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
@@ -914,7 +914,7 @@ type WebSocketConstructor = new (
914914
protocols?: string | string[] | { headers?: Record<string, string> },
915915
) => WebSocketLike;
916916

917-
export interface OpenAICodexWebSocketDebugStats {
917+
interface OpenAICodexWebSocketDebugStats {
918918
requests: number;
919919
connectionsCreated: number;
920920
connectionsReused: number;

packages/ai/src/providers/openai-responses-shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function resolveReplayableResponsesMessageId(params: {
167167
return params.previousReplayItemWasReasoning ? params.textSignatureId : undefined;
168168
}
169169

170-
export interface OpenAIResponsesStreamOptions {
170+
interface OpenAIResponsesStreamOptions {
171171
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
172172
resolveServiceTier?: (
173173
responseServiceTier: ResponseCreateParamsStreaming["service_tier"] | undefined,
@@ -179,7 +179,7 @@ export interface OpenAIResponsesStreamOptions {
179179
) => void;
180180
}
181181

182-
export interface ConvertResponsesMessagesOptions {
182+
interface ConvertResponsesMessagesOptions {
183183
includeSystemPrompt?: boolean;
184184
replayResponsesItemIds?: boolean;
185185
}
@@ -217,7 +217,7 @@ type ResponsesLifecycleStreamOptions = Pick<
217217
type OpenAIResponsesProcessStreamOptions = OpenAIResponsesStreamOptions &
218218
FirstStreamEventInternalOptions;
219219

220-
export type ResponsesReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
220+
type ResponsesReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
221221

222222
function isResponsesReasoningEffort(
223223
effort: string | undefined,
@@ -231,7 +231,7 @@ function isResponsesReasoningEffort(
231231
effort === "max"
232232
);
233233
}
234-
export type ResponsesReasoningSummary = "auto" | "detailed" | "concise" | null;
234+
type ResponsesReasoningSummary = "auto" | "detailed" | "concise" | null;
235235

236236
type ResponsesCommonParamsOptions = Pick<StreamOptions, "maxTokens" | "temperature"> & {
237237
reasoningEffort?: ResponsesReasoningEffort;

0 commit comments

Comments
 (0)