mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:40:44 +00:00
refactor: trim openai helper exports
This commit is contained in:
@@ -11,7 +11,7 @@ type OpenAICompletionsCompatDefaultsInput = {
|
||||
usesExplicitProxyLikeEndpoint?: boolean;
|
||||
};
|
||||
|
||||
export type OpenAICompletionsCompatDefaults = {
|
||||
type OpenAICompletionsCompatDefaults = {
|
||||
supportsStore: boolean;
|
||||
supportsDeveloperRole: boolean;
|
||||
supportsReasoningEffort: boolean;
|
||||
@@ -22,7 +22,7 @@ export type OpenAICompletionsCompatDefaults = {
|
||||
supportsStrictMode: boolean;
|
||||
};
|
||||
|
||||
export type DetectedOpenAICompletionsCompat = {
|
||||
type DetectedOpenAICompletionsCompat = {
|
||||
capabilities: ProviderRequestCapabilities;
|
||||
defaults: OpenAICompletionsCompatDefaults;
|
||||
};
|
||||
@@ -97,7 +97,7 @@ export function resolveOpenAICompletionsCompatDefaults(
|
||||
};
|
||||
}
|
||||
|
||||
export function resolveOpenAICompletionsCompatDefaultsFromCapabilities(
|
||||
function resolveOpenAICompletionsCompatDefaultsFromCapabilities(
|
||||
input: Pick<
|
||||
ProviderRequestCapabilities,
|
||||
| "endpointClass"
|
||||
|
||||
@@ -41,7 +41,7 @@ type OpenAIResponsesEndpointClass =
|
||||
| "custom"
|
||||
| "invalid";
|
||||
|
||||
export type OpenAIResponsesPayloadPolicy = {
|
||||
type OpenAIResponsesPayloadPolicy = {
|
||||
allowsServiceTier: boolean;
|
||||
compactThreshold: number;
|
||||
explicitStore: boolean | undefined;
|
||||
|
||||
@@ -13,7 +13,7 @@ type OpenAIStrictToolModel = {
|
||||
|
||||
const optionalString = readStringValue;
|
||||
|
||||
export function resolvesToNativeOpenAIStrictTools(
|
||||
function resolvesToNativeOpenAIStrictTools(
|
||||
model: OpenAIStrictToolModel,
|
||||
transport: OpenAITransportKind,
|
||||
): boolean {
|
||||
|
||||
@@ -67,7 +67,7 @@ export function isStrictOpenAIJsonSchemaCompatible(schema: unknown): boolean {
|
||||
return isStrictOpenAIJsonSchemaCompatibleRecursive(normalizeStrictOpenAIJsonSchema(schema));
|
||||
}
|
||||
|
||||
export type OpenAIStrictToolSchemaDiagnostic = {
|
||||
type OpenAIStrictToolSchemaDiagnostic = {
|
||||
toolIndex: number;
|
||||
toolName?: string;
|
||||
violations: string[];
|
||||
|
||||
@@ -23,7 +23,7 @@ import { normalizeUsage } from "./usage.js";
|
||||
|
||||
type AnyMessage = Message & { role: string; content: unknown };
|
||||
type AssistantMessageWithPhase = AssistantMessage & { phase?: OpenAIResponsesAssistantPhase };
|
||||
export type ReplayModelInfo = { input?: ReadonlyArray<string>; api?: string };
|
||||
type ReplayModelInfo = { input?: ReadonlyArray<string>; api?: string };
|
||||
type ReplayableReasoningItem = Extract<InputItem, { type: "reasoning" }>;
|
||||
type ReplayableReasoningSignature = {
|
||||
type: "reasoning" | `reasoning.${string}`;
|
||||
@@ -33,7 +33,7 @@ type ReplayableReasoningSignature = {
|
||||
summary?: unknown;
|
||||
};
|
||||
type ToolCallReplayId = { callId: string; itemId?: string };
|
||||
export type PlannedTurnInput = {
|
||||
type PlannedTurnInput = {
|
||||
inputItems: InputItem[];
|
||||
previousResponseId?: string;
|
||||
mode: "incremental_tool_results" | "full_context_initial" | "full_context_restart";
|
||||
|
||||
@@ -26,12 +26,12 @@ type WsOptions = Parameters<StreamFn>[2] & {
|
||||
reasoningSummary?: string;
|
||||
};
|
||||
|
||||
export interface PlannedWsTurnInput {
|
||||
interface PlannedWsTurnInput {
|
||||
inputItems: InputItem[];
|
||||
previousResponseId?: string;
|
||||
}
|
||||
|
||||
export type PlannedWsRequestPayload = {
|
||||
type PlannedWsRequestPayload = {
|
||||
mode: "full_context" | "incremental";
|
||||
payload: ResponseCreateEvent;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user