mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 00:50:27 +00:00
refactor: move provider runtime into extensions
This commit is contained in:
@@ -44,6 +44,7 @@ export type {
|
||||
ProviderAuthResult,
|
||||
ProviderAugmentModelCatalogContext,
|
||||
ProviderBuildMissingAuthMessageContext,
|
||||
ProviderBuildUnknownModelHintContext,
|
||||
ProviderBuiltInModelSuppressionContext,
|
||||
ProviderBuiltInModelSuppressionResult,
|
||||
ProviderCacheTtlEligibilityContext,
|
||||
|
||||
@@ -9,9 +9,11 @@ export type {
|
||||
export {
|
||||
OLLAMA_DEFAULT_BASE_URL,
|
||||
OLLAMA_DEFAULT_MODEL,
|
||||
} from "../../extensions/ollama/src/defaults.js";
|
||||
|
||||
export {
|
||||
buildOllamaProvider,
|
||||
configureOllamaNonInteractive,
|
||||
ensureOllamaModelPulled,
|
||||
promptAndConfigureOllama,
|
||||
} from "../plugins/provider-ollama-setup.js";
|
||||
|
||||
export { buildOllamaProvider } from "../agents/models-config.providers.discovery.js";
|
||||
} from "../../extensions/ollama/src/setup.js";
|
||||
|
||||
9
src/plugin-sdk/ollama-stream.ts
Normal file
9
src/plugin-sdk/ollama-stream.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export {
|
||||
buildAssistantMessage,
|
||||
convertToOllamaMessages,
|
||||
createConfiguredOllamaStreamFn,
|
||||
createOllamaStreamFn,
|
||||
OLLAMA_NATIVE_BASE_URL,
|
||||
parseNdjsonStream,
|
||||
resolveOllamaBaseUrlForRun,
|
||||
} from "../../extensions/ollama/src/stream.js";
|
||||
@@ -22,6 +22,7 @@ export type {
|
||||
ProviderBuiltInModelSuppressionContext,
|
||||
ProviderBuiltInModelSuppressionResult,
|
||||
ProviderBuildMissingAuthMessageContext,
|
||||
ProviderBuildUnknownModelHintContext,
|
||||
ProviderCacheTtlEligibilityContext,
|
||||
ProviderDefaultThinkingPolicyContext,
|
||||
ProviderFetchUsageSnapshotContext,
|
||||
|
||||
@@ -26,6 +26,10 @@ export {
|
||||
} from "../agents/model-compat.js";
|
||||
export { normalizeProviderId } from "../agents/provider-id.js";
|
||||
export { normalizeXaiModelId } from "../agents/model-id-normalization.js";
|
||||
export {
|
||||
createMoonshotThinkingWrapper,
|
||||
resolveMoonshotThinkingType,
|
||||
} from "../agents/pi-embedded-runner/moonshot-thinking-stream-wrappers.js";
|
||||
export {
|
||||
cloneFirstTemplateModel,
|
||||
matchesExactOrPrefix,
|
||||
@@ -78,7 +82,16 @@ export {
|
||||
CHUTES_MODEL_CATALOG,
|
||||
discoverChutesModels,
|
||||
} from "../agents/chutes-models.js";
|
||||
export { resolveOllamaApiBase } from "../agents/ollama-models.js";
|
||||
export {
|
||||
buildOllamaModelDefinition,
|
||||
enrichOllamaModelsWithContext,
|
||||
fetchOllamaModels,
|
||||
queryOllamaContextWindow,
|
||||
resolveOllamaApiBase,
|
||||
type OllamaModelWithContext,
|
||||
type OllamaTagModel,
|
||||
type OllamaTagsResponse,
|
||||
} from "../../extensions/ollama/src/provider-models.js";
|
||||
export {
|
||||
buildSyntheticModelDefinition,
|
||||
SYNTHETIC_BASE_URL,
|
||||
@@ -116,7 +129,12 @@ export {
|
||||
DOUBAO_MODEL_CATALOG,
|
||||
buildDoubaoModelDefinition,
|
||||
} from "../agents/doubao-models.js";
|
||||
export { OLLAMA_DEFAULT_BASE_URL } from "../agents/ollama-defaults.js";
|
||||
export {
|
||||
OLLAMA_DEFAULT_BASE_URL,
|
||||
OLLAMA_DEFAULT_CONTEXT_WINDOW,
|
||||
OLLAMA_DEFAULT_COST,
|
||||
OLLAMA_DEFAULT_MAX_TOKENS,
|
||||
} from "../../extensions/ollama/src/defaults.js";
|
||||
export { VLLM_DEFAULT_BASE_URL } from "../agents/vllm-defaults.js";
|
||||
export { SGLANG_DEFAULT_BASE_URL } from "../agents/sglang-defaults.js";
|
||||
export {
|
||||
|
||||
1
src/plugin-sdk/provider-reasoning.ts
Normal file
1
src/plugin-sdk/provider-reasoning.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { isReasoningModelHeuristic } from "../../extensions/ollama/src/provider-models.js";
|
||||
@@ -20,10 +20,13 @@ export {
|
||||
export {
|
||||
OLLAMA_DEFAULT_BASE_URL,
|
||||
OLLAMA_DEFAULT_MODEL,
|
||||
} from "../../extensions/ollama/src/defaults.js";
|
||||
export {
|
||||
buildOllamaProvider,
|
||||
configureOllamaNonInteractive,
|
||||
ensureOllamaModelPulled,
|
||||
promptAndConfigureOllama,
|
||||
} from "../plugins/provider-ollama-setup.js";
|
||||
} from "../../extensions/ollama/src/setup.js";
|
||||
export {
|
||||
VLLM_DEFAULT_BASE_URL,
|
||||
VLLM_DEFAULT_CONTEXT_WINDOW,
|
||||
@@ -32,7 +35,6 @@ export {
|
||||
promptAndConfigureVllm,
|
||||
} from "../plugins/provider-vllm-setup.js";
|
||||
export {
|
||||
buildOllamaProvider,
|
||||
buildSglangProvider,
|
||||
buildVllmProvider,
|
||||
} from "../agents/models-config.providers.discovery.js";
|
||||
|
||||
@@ -17,7 +17,7 @@ export {
|
||||
export {
|
||||
createMoonshotThinkingWrapper,
|
||||
resolveMoonshotThinkingType,
|
||||
} from "../agents/pi-embedded-runner/moonshot-stream-wrappers.js";
|
||||
} from "../agents/pi-embedded-runner/moonshot-thinking-stream-wrappers.js";
|
||||
export {
|
||||
createOpenAIAttributionHeadersWrapper,
|
||||
createOpenAIDefaultTransportWrapper,
|
||||
|
||||
@@ -4,6 +4,7 @@ export type { OpenClawConfig } from "../config/config.js";
|
||||
export type { DmPolicy, GroupPolicy } from "../config/types.js";
|
||||
export type { SecretInput } from "../config/types.secrets.js";
|
||||
export type { WizardPrompter } from "../wizard/prompts.js";
|
||||
export { WizardCancelledError } from "../wizard/prompts.js";
|
||||
export type { ChannelSetupAdapter } from "../channels/plugins/types.adapters.js";
|
||||
export type { ChannelSetupInput } from "../channels/plugins/types.core.js";
|
||||
export type {
|
||||
|
||||
Reference in New Issue
Block a user