From 18ecb82034d43d49871d91bfc20c5fcce1a487bb Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 4 Jun 2026 08:03:04 -0400 Subject: [PATCH] docs: document byteplus provider --- extensions/byteplus/api.ts | 3 +++ extensions/byteplus/index.ts | 3 +++ extensions/byteplus/models.ts | 9 +++++++++ extensions/byteplus/provider-catalog.ts | 5 +++++ extensions/byteplus/provider-discovery.ts | 3 +++ extensions/byteplus/video-generation-provider.ts | 4 ++++ 6 files changed, 27 insertions(+) diff --git a/extensions/byteplus/api.ts b/extensions/byteplus/api.ts index 4b2de5512b7..d0444988e45 100644 --- a/extensions/byteplus/api.ts +++ b/extensions/byteplus/api.ts @@ -1,3 +1,6 @@ +/** + * Public BytePlus provider plugin API exports. + */ export { buildBytePlusCodingProvider, buildBytePlusProvider } from "./provider-catalog.js"; export { buildBytePlusModelDefinition, diff --git a/extensions/byteplus/index.ts b/extensions/byteplus/index.ts index b32f6d55992..b08ccc2af42 100644 --- a/extensions/byteplus/index.ts +++ b/extensions/byteplus/index.ts @@ -1,3 +1,6 @@ +/** + * BytePlus provider plugin entrypoint for model and video generation providers. + */ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key"; import { ensureModelAllowlistEntry } from "openclaw/plugin-sdk/provider-onboard"; diff --git a/extensions/byteplus/models.ts b/extensions/byteplus/models.ts index 8ce54976c41..04322481c33 100644 --- a/extensions/byteplus/models.ts +++ b/extensions/byteplus/models.ts @@ -1,3 +1,6 @@ +/** + * BytePlus model catalog helpers derived from the plugin manifest. + */ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared"; import type { ModelDefinitionConfig } from "openclaw/plugin-sdk/provider-model-shared"; import manifest from "./openclaw.plugin.json" with { type: "json" }; @@ -12,9 +15,12 @@ const BYTEPLUS_CODING_MANIFEST_PROVIDER = buildManifestModelProviderConfig({ catalog: manifest.modelCatalog.providers["byteplus-plan"], }); +/** Base URL for BytePlus chat/model APIs from the manifest catalog. */ export const BYTEPLUS_BASE_URL = BYTEPLUS_MANIFEST_PROVIDER.baseUrl; +/** Base URL for BytePlus Plan coding APIs from the manifest catalog. */ export const BYTEPLUS_CODING_BASE_URL = BYTEPLUS_CODING_MANIFEST_PROVIDER.baseUrl; +/** Fallback cost shape retained for callers that need BytePlus defaults. */ export const BYTEPLUS_DEFAULT_COST = { input: 0.0001, output: 0.0002, @@ -22,10 +28,13 @@ export const BYTEPLUS_DEFAULT_COST = { cacheWrite: 0, }; +/** BytePlus general model catalog entries. */ export const BYTEPLUS_MODEL_CATALOG: ModelDefinitionConfig[] = BYTEPLUS_MANIFEST_PROVIDER.models; +/** BytePlus coding/planning model catalog entries. */ export const BYTEPLUS_CODING_MODEL_CATALOG: ModelDefinitionConfig[] = BYTEPLUS_CODING_MANIFEST_PROVIDER.models; +/** Clones one manifest model definition so callers can mutate safely. */ export function buildBytePlusModelDefinition(entry: ModelDefinitionConfig): ModelDefinitionConfig { return { ...entry, diff --git a/extensions/byteplus/provider-catalog.ts b/extensions/byteplus/provider-catalog.ts index 401b5dd6874..68766673897 100644 --- a/extensions/byteplus/provider-catalog.ts +++ b/extensions/byteplus/provider-catalog.ts @@ -1,7 +1,11 @@ +/** + * BytePlus model provider builders backed by the plugin manifest catalog. + */ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared"; import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared"; import manifest from "./openclaw.plugin.json" with { type: "json" }; +/** Builds the standard BytePlus model provider config. */ export function buildBytePlusProvider(): ModelProviderConfig { return buildManifestModelProviderConfig({ providerId: "byteplus", @@ -9,6 +13,7 @@ export function buildBytePlusProvider(): ModelProviderConfig { }); } +/** Builds the BytePlus Plan coding-provider config. */ export function buildBytePlusCodingProvider(): ModelProviderConfig { return buildManifestModelProviderConfig({ providerId: "byteplus-plan", diff --git a/extensions/byteplus/provider-discovery.ts b/extensions/byteplus/provider-discovery.ts index dae2e3756e5..35649c335c0 100644 --- a/extensions/byteplus/provider-discovery.ts +++ b/extensions/byteplus/provider-discovery.ts @@ -1,3 +1,6 @@ +/** + * Static provider discovery entries for BytePlus manifest-backed catalogs. + */ import type { ProviderPlugin } from "openclaw/plugin-sdk/provider-model-shared"; import { buildBytePlusCodingProvider, buildBytePlusProvider } from "./provider-catalog.js"; diff --git a/extensions/byteplus/video-generation-provider.ts b/extensions/byteplus/video-generation-provider.ts index d28e9ac6963..1c1734e4afe 100644 --- a/extensions/byteplus/video-generation-provider.ts +++ b/extensions/byteplus/video-generation-provider.ts @@ -1,3 +1,6 @@ +/** + * BytePlus Seedance video generation provider implementation. + */ import { extensionForMime } from "openclaw/plugin-sdk/media-mime"; import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth"; import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime"; @@ -227,6 +230,7 @@ async function downloadBytePlusVideo(params: { }; } +/** Builds the BytePlus video generation provider registered by the plugin. */ export function buildBytePlusVideoGenerationProvider(): VideoGenerationProvider { return { id: "byteplus",