mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:10:44 +00:00
refactor: trim provider helper exports
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user