refactor: trim openai helper exports · openclaw/openclaw@f52fdd8
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ type OpenAICompletionsCompatDefaultsInput = {
|
11 | 11 | usesExplicitProxyLikeEndpoint?: boolean; |
12 | 12 | }; |
13 | 13 | |
14 | | -export type OpenAICompletionsCompatDefaults = { |
| 14 | +type OpenAICompletionsCompatDefaults = { |
15 | 15 | supportsStore: boolean; |
16 | 16 | supportsDeveloperRole: boolean; |
17 | 17 | supportsReasoningEffort: boolean; |
@@ -22,7 +22,7 @@ export type OpenAICompletionsCompatDefaults = {
|
22 | 22 | supportsStrictMode: boolean; |
23 | 23 | }; |
24 | 24 | |
25 | | -export type DetectedOpenAICompletionsCompat = { |
| 25 | +type DetectedOpenAICompletionsCompat = { |
26 | 26 | capabilities: ProviderRequestCapabilities; |
27 | 27 | defaults: OpenAICompletionsCompatDefaults; |
28 | 28 | }; |
@@ -97,7 +97,7 @@ export function resolveOpenAICompletionsCompatDefaults(
|
97 | 97 | }; |
98 | 98 | } |
99 | 99 | |
100 | | -export function resolveOpenAICompletionsCompatDefaultsFromCapabilities( |
| 100 | +function resolveOpenAICompletionsCompatDefaultsFromCapabilities( |
101 | 101 | input: Pick< |
102 | 102 | ProviderRequestCapabilities, |
103 | 103 | | "endpointClass" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,7 @@ type OpenAIResponsesEndpointClass =
|
41 | 41 | | "custom" |
42 | 42 | | "invalid"; |
43 | 43 | |
44 | | -export type OpenAIResponsesPayloadPolicy = { |
| 44 | +type OpenAIResponsesPayloadPolicy = { |
45 | 45 | allowsServiceTier: boolean; |
46 | 46 | compactThreshold: number; |
47 | 47 | explicitStore: boolean | undefined; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ type OpenAIStrictToolModel = {
|
13 | 13 | |
14 | 14 | const optionalString = readStringValue; |
15 | 15 | |
16 | | -export function resolvesToNativeOpenAIStrictTools( |
| 16 | +function resolvesToNativeOpenAIStrictTools( |
17 | 17 | model: OpenAIStrictToolModel, |
18 | 18 | transport: OpenAITransportKind, |
19 | 19 | ): boolean { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,7 +67,7 @@ export function isStrictOpenAIJsonSchemaCompatible(schema: unknown): boolean {
|
67 | 67 | return isStrictOpenAIJsonSchemaCompatibleRecursive(normalizeStrictOpenAIJsonSchema(schema)); |
68 | 68 | } |
69 | 69 | |
70 | | -export type OpenAIStrictToolSchemaDiagnostic = { |
| 70 | +type OpenAIStrictToolSchemaDiagnostic = { |
71 | 71 | toolIndex: number; |
72 | 72 | toolName?: string; |
73 | 73 | violations: string[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,7 @@ import { normalizeUsage } from "./usage.js";
|
23 | 23 | |
24 | 24 | type AnyMessage = Message & { role: string; content: unknown }; |
25 | 25 | type AssistantMessageWithPhase = AssistantMessage & { phase?: OpenAIResponsesAssistantPhase }; |
26 | | -export type ReplayModelInfo = { input?: ReadonlyArray<string>; api?: string }; |
| 26 | +type ReplayModelInfo = { input?: ReadonlyArray<string>; api?: string }; |
27 | 27 | type ReplayableReasoningItem = Extract<InputItem, { type: "reasoning" }>; |
28 | 28 | type ReplayableReasoningSignature = { |
29 | 29 | type: "reasoning" | `reasoning.${string}`; |
@@ -33,7 +33,7 @@ type ReplayableReasoningSignature = {
|
33 | 33 | summary?: unknown; |
34 | 34 | }; |
35 | 35 | type ToolCallReplayId = { callId: string; itemId?: string }; |
36 | | -export type PlannedTurnInput = { |
| 36 | +type PlannedTurnInput = { |
37 | 37 | inputItems: InputItem[]; |
38 | 38 | previousResponseId?: string; |
39 | 39 | mode: "incremental_tool_results" | "full_context_initial" | "full_context_restart"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -26,12 +26,12 @@ type WsOptions = Parameters<StreamFn>[2] & {
|
26 | 26 | reasoningSummary?: string; |
27 | 27 | }; |
28 | 28 | |
29 | | -export interface PlannedWsTurnInput { |
| 29 | +interface PlannedWsTurnInput { |
30 | 30 | inputItems: InputItem[]; |
31 | 31 | previousResponseId?: string; |
32 | 32 | } |
33 | 33 | |
34 | | -export type PlannedWsRequestPayload = { |
| 34 | +type PlannedWsRequestPayload = { |
35 | 35 | mode: "full_context" | "incremental"; |
36 | 36 | payload: ResponseCreateEvent; |
37 | 37 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。