refactor: trim provider helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 16:25:05 +01:00
parent d9401c7deb
commit c1f31f3870
10 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ type DdgPluginConfig = {
};
};
export function resolveDdgWebSearchConfig(
function resolveDdgWebSearchConfig(
config?: OpenClawConfig,
): DdgPluginConfig["webSearch"] | undefined {
const pluginConfig = config?.plugins?.entries?.duckduckgo?.config as DdgPluginConfig | undefined;

View File

@@ -86,7 +86,7 @@ export function resolveFirecrawlSearchConfig(cfg?: OpenClawConfig): FirecrawlSea
return firecrawl as FirecrawlSearchConfig;
}
export function resolveFirecrawlFetchConfig(cfg?: OpenClawConfig): FirecrawlFetchConfig {
function resolveFirecrawlFetchConfig(cfg?: OpenClawConfig): FirecrawlFetchConfig {
const pluginConfig = cfg?.plugins?.entries?.firecrawl?.config as PluginEntryConfig;
const pluginWebFetch = pluginConfig?.webFetch;
if (pluginWebFetch && typeof pluginWebFetch === "object" && !Array.isArray(pluginWebFetch)) {

View File

@@ -8,8 +8,8 @@ export const AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
export const TOKEN_URL = "https://oauth2.googleapis.com/token";
export const USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json";
export const CODE_ASSIST_ENDPOINT_PROD = "https://cloudcode-pa.googleapis.com";
export const CODE_ASSIST_ENDPOINT_DAILY = "https://daily-cloudcode-pa.sandbox.googleapis.com";
export const CODE_ASSIST_ENDPOINT_AUTOPUSH = "https://autopush-cloudcode-pa.sandbox.googleapis.com";
const CODE_ASSIST_ENDPOINT_DAILY = "https://daily-cloudcode-pa.sandbox.googleapis.com";
const CODE_ASSIST_ENDPOINT_AUTOPUSH = "https://autopush-cloudcode-pa.sandbox.googleapis.com";
export const LOAD_CODE_ASSIST_ENDPOINTS = [
CODE_ASSIST_ENDPOINT_PROD,
CODE_ASSIST_ENDPOINT_DAILY,

View File

@@ -1,4 +1,4 @@
export const DEFAULT_GEMINI_WEB_SEARCH_MODEL = "gemini-2.5-flash";
const DEFAULT_GEMINI_WEB_SEARCH_MODEL = "gemini-2.5-flash";
export type GeminiConfig = {
apiKey?: unknown;

View File

@@ -28,7 +28,7 @@ function getOAuthEndpoints(region: MiniMaxRegion) {
};
}
export type MiniMaxOAuthAuthorization = {
type MiniMaxOAuthAuthorization = {
user_code: string;
verification_uri: string;
expired_in: number;
@@ -36,7 +36,7 @@ export type MiniMaxOAuthAuthorization = {
state: string;
};
export type MiniMaxOAuthToken = {
type MiniMaxOAuthToken = {
access: string;
refresh: string;
expires: number;

View File

@@ -20,7 +20,7 @@ export const MISTRAL_MODEL_TRANSPORT_PATCH = {
maxTokensField: "max_tokens";
};
export const MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP: Record<string, string> = {
const MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP: Record<string, string> = {
off: "none",
minimal: "none",
low: "high",

View File

@@ -8,7 +8,7 @@ import { contributeMistralResolvedModelCompat } from "./provider-compat.js";
import { buildMistralRealtimeTranscriptionProvider } from "./realtime-transcription-provider.js";
const PROVIDER_ID = "mistral";
export function buildMistralReplayPolicy() {
function buildMistralReplayPolicy() {
return {
sanitizeToolCallIds: true,
toolCallIdMode: "strict9" as const,

View File

@@ -23,7 +23,7 @@ function isMistralModelHint(modelId: string): boolean {
);
}
export function shouldContributeMistralCompat(params: {
function shouldContributeMistralCompat(params: {
modelId: string;
model: { api?: unknown; baseUrl?: unknown; provider?: unknown; compat?: unknown };
}): boolean {

View File

@@ -13,7 +13,7 @@ const DEFAULT_CLUSTER = "volcano_tts";
const DEFAULT_RESOURCE_ID = "seed-tts-1.0";
const DEFAULT_APP_KEY = "aGjiRDfUWi";
export const VOLCENGINE_VOICES: readonly string[] = [
const VOLCENGINE_VOICES: readonly string[] = [
"en_female_anna_mars_bigtts",
"en_male_adam_mars_bigtts",
"en_female_sarah_mars_bigtts",

View File

@@ -3,7 +3,7 @@ import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
export type VolcengineTtsEncoding = "ogg_opus" | "mp3" | "pcm" | "wav";
export type VolcengineTTSParams = {
type VolcengineTTSParams = {
text: string;
apiKey?: string;
appId?: string;