Vendor OpenClaw source as Adolf fork baseline
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11), free to diverge. Tree copied sans upstream .git; upstream remote added for future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19. Preserves docs/ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
13
extensions/tencent/README.md
Normal file
13
extensions/tencent/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Tencent Cloud OpenClaw provider
|
||||
|
||||
Official OpenClaw provider plugin for Tencent Cloud.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
openclaw plugins install @openclaw/tencent-provider
|
||||
```
|
||||
|
||||
## Docs
|
||||
|
||||
See `docs/providers/tencent.md` in the OpenClaw repository, or the published docs at `https://docs.openclaw.ai/providers/tencent`.
|
||||
8
extensions/tencent/api.ts
Normal file
8
extensions/tencent/api.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// Tencent API module exposes the plugin public contract.
|
||||
export {
|
||||
buildTokenHubModelDefinition,
|
||||
TOKENHUB_BASE_URL,
|
||||
TOKENHUB_MODEL_CATALOG,
|
||||
TOKENHUB_PROVIDER_ID,
|
||||
} from "./models.js";
|
||||
export { buildTokenHubProvider } from "./provider-catalog.js";
|
||||
65
extensions/tencent/index.ts
Normal file
65
extensions/tencent/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
// Tencent plugin entrypoint registers its OpenClaw integration.
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
|
||||
import { buildSingleProviderApiKeyCatalog } from "openclaw/plugin-sdk/provider-catalog-shared";
|
||||
import { TOKENHUB_MODEL_CATALOG, TOKENHUB_PROVIDER_ID } from "./models.js";
|
||||
import { applyTokenHubConfig, TOKENHUB_DEFAULT_MODEL_REF } from "./onboard.js";
|
||||
import { buildTokenHubProvider } from "./provider-catalog.js";
|
||||
|
||||
function buildStaticCatalogEntries(providerId: string, catalog: typeof TOKENHUB_MODEL_CATALOG) {
|
||||
return catalog.map((entry) => ({
|
||||
provider: providerId,
|
||||
id: entry.id,
|
||||
name: entry.name,
|
||||
reasoning: entry.reasoning,
|
||||
input: [...entry.input],
|
||||
contextWindow: entry.contextWindow,
|
||||
}));
|
||||
}
|
||||
|
||||
export default definePluginEntry({
|
||||
id: "tencent",
|
||||
name: "Tencent Cloud Provider",
|
||||
description: "Bundled Tencent Cloud provider plugin (TokenHub)",
|
||||
register(api) {
|
||||
api.registerProvider({
|
||||
id: TOKENHUB_PROVIDER_ID,
|
||||
label: "Tencent TokenHub",
|
||||
docsPath: "/providers/tencent",
|
||||
envVars: ["TOKENHUB_API_KEY"],
|
||||
auth: [
|
||||
createProviderApiKeyAuthMethod({
|
||||
providerId: TOKENHUB_PROVIDER_ID,
|
||||
methodId: "api-key",
|
||||
label: "Tencent TokenHub",
|
||||
hint: "Hy via Tencent TokenHub Gateway",
|
||||
optionKey: "tokenhubApiKey",
|
||||
flagName: "--tokenhub-api-key",
|
||||
envVar: "TOKENHUB_API_KEY",
|
||||
promptMessage: "Enter Tencent TokenHub API key",
|
||||
defaultModel: TOKENHUB_DEFAULT_MODEL_REF,
|
||||
expectedProviders: [TOKENHUB_PROVIDER_ID],
|
||||
applyConfig: (cfg) => applyTokenHubConfig(cfg),
|
||||
wizard: {
|
||||
choiceId: "tokenhub-api-key",
|
||||
choiceLabel: "Tencent TokenHub",
|
||||
groupId: "tencent",
|
||||
groupLabel: "Tencent Cloud",
|
||||
groupHint: "Tencent TokenHub",
|
||||
},
|
||||
}),
|
||||
],
|
||||
catalog: {
|
||||
order: "simple",
|
||||
run: (ctx) =>
|
||||
buildSingleProviderApiKeyCatalog({
|
||||
ctx,
|
||||
providerId: TOKENHUB_PROVIDER_ID,
|
||||
buildProvider: buildTokenHubProvider,
|
||||
}),
|
||||
},
|
||||
augmentModelCatalog: () =>
|
||||
buildStaticCatalogEntries(TOKENHUB_PROVIDER_ID, TOKENHUB_MODEL_CATALOG),
|
||||
});
|
||||
},
|
||||
});
|
||||
26
extensions/tencent/models.ts
Normal file
26
extensions/tencent/models.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
// Tencent plugin module implements models behavior.
|
||||
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" };
|
||||
|
||||
// ---------- TokenHub provider ----------
|
||||
|
||||
export const TOKENHUB_PROVIDER_ID = "tencent-tokenhub";
|
||||
|
||||
const TOKENHUB_MANIFEST_PROVIDER = buildManifestModelProviderConfig({
|
||||
providerId: TOKENHUB_PROVIDER_ID,
|
||||
catalog: manifest.modelCatalog.providers[TOKENHUB_PROVIDER_ID],
|
||||
});
|
||||
|
||||
export const TOKENHUB_BASE_URL = TOKENHUB_MANIFEST_PROVIDER.baseUrl;
|
||||
|
||||
export const TOKENHUB_MODEL_CATALOG: ModelDefinitionConfig[] = TOKENHUB_MANIFEST_PROVIDER.models;
|
||||
|
||||
export function buildTokenHubModelDefinition(
|
||||
model: (typeof TOKENHUB_MODEL_CATALOG)[number],
|
||||
): ModelDefinitionConfig {
|
||||
return {
|
||||
...model,
|
||||
api: "openai-completions",
|
||||
};
|
||||
}
|
||||
12
extensions/tencent/npm-shrinkwrap.json
generated
Normal file
12
extensions/tencent/npm-shrinkwrap.json
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "@openclaw/tencent-provider",
|
||||
"version": "2026.6.11",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openclaw/tencent-provider",
|
||||
"version": "2026.6.11"
|
||||
}
|
||||
}
|
||||
}
|
||||
39
extensions/tencent/onboard.ts
Normal file
39
extensions/tencent/onboard.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
// Tencent setup module handles plugin onboarding behavior.
|
||||
import {
|
||||
applyAgentDefaultModelPrimary,
|
||||
applyProviderConfigWithModelCatalog,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/provider-onboard";
|
||||
import {
|
||||
buildTokenHubModelDefinition,
|
||||
TOKENHUB_BASE_URL,
|
||||
TOKENHUB_MODEL_CATALOG,
|
||||
TOKENHUB_PROVIDER_ID,
|
||||
} from "./api.js";
|
||||
|
||||
// ---------- TokenHub ----------
|
||||
|
||||
export const TOKENHUB_DEFAULT_MODEL_REF = `${TOKENHUB_PROVIDER_ID}/hy3-preview`;
|
||||
|
||||
function applyTokenHubProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
const models = { ...cfg.agents?.defaults?.models };
|
||||
models[TOKENHUB_DEFAULT_MODEL_REF] = {
|
||||
...models[TOKENHUB_DEFAULT_MODEL_REF],
|
||||
alias: models[TOKENHUB_DEFAULT_MODEL_REF]?.alias ?? "Hy3 preview (TokenHub)",
|
||||
};
|
||||
|
||||
return applyProviderConfigWithModelCatalog(cfg, {
|
||||
agentModels: models,
|
||||
providerId: TOKENHUB_PROVIDER_ID,
|
||||
api: "openai-completions",
|
||||
baseUrl: TOKENHUB_BASE_URL,
|
||||
catalogModels: TOKENHUB_MODEL_CATALOG.map(buildTokenHubModelDefinition),
|
||||
});
|
||||
}
|
||||
|
||||
export function applyTokenHubConfig(cfg: OpenClawConfig): OpenClawConfig {
|
||||
return applyAgentDefaultModelPrimary(
|
||||
applyTokenHubProviderConfig(cfg),
|
||||
TOKENHUB_DEFAULT_MODEL_REF,
|
||||
);
|
||||
}
|
||||
91
extensions/tencent/openclaw.plugin.json
Normal file
91
extensions/tencent/openclaw.plugin.json
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"id": "tencent",
|
||||
"activation": {
|
||||
"onStartup": false
|
||||
},
|
||||
"enabledByDefault": true,
|
||||
"providerCatalogEntry": "./provider-discovery.ts",
|
||||
"providers": ["tencent-tokenhub"],
|
||||
"modelCatalog": {
|
||||
"providers": {
|
||||
"tencent-tokenhub": {
|
||||
"baseUrl": "https://tokenhub.tencentmaas.com/v1",
|
||||
"api": "openai-completions",
|
||||
"models": [
|
||||
{
|
||||
"id": "hy3-preview",
|
||||
"name": "Hy3 preview (TokenHub)",
|
||||
"reasoning": true,
|
||||
"input": ["text"],
|
||||
"contextWindow": 256000,
|
||||
"maxTokens": 64000,
|
||||
"cost": {
|
||||
"input": 0.176,
|
||||
"output": 0.587,
|
||||
"cacheRead": 0.059,
|
||||
"cacheWrite": 0,
|
||||
"tieredPricing": [
|
||||
{
|
||||
"input": 0.176,
|
||||
"output": 0.587,
|
||||
"cacheRead": 0.059,
|
||||
"cacheWrite": 0,
|
||||
"range": [0, 16000]
|
||||
},
|
||||
{
|
||||
"input": 0.235,
|
||||
"output": 0.939,
|
||||
"cacheRead": 0.088,
|
||||
"cacheWrite": 0,
|
||||
"range": [16000, 32000]
|
||||
},
|
||||
{
|
||||
"input": 0.293,
|
||||
"output": 1.173,
|
||||
"cacheRead": 0.117,
|
||||
"cacheWrite": 0,
|
||||
"range": [32000]
|
||||
}
|
||||
]
|
||||
},
|
||||
"compat": {
|
||||
"supportsUsageInStreaming": true,
|
||||
"supportsReasoningEffort": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"discovery": {
|
||||
"tencent-tokenhub": "static"
|
||||
}
|
||||
},
|
||||
"setup": {
|
||||
"providers": [
|
||||
{
|
||||
"id": "tencent-tokenhub",
|
||||
"envVars": ["TOKENHUB_API_KEY"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"providerAuthChoices": [
|
||||
{
|
||||
"provider": "tencent-tokenhub",
|
||||
"method": "api-key",
|
||||
"choiceId": "tokenhub-api-key",
|
||||
"choiceLabel": "Tencent TokenHub",
|
||||
"groupId": "tencent",
|
||||
"groupLabel": "Tencent Cloud",
|
||||
"groupHint": "Tencent TokenHub",
|
||||
"optionKey": "tokenhubApiKey",
|
||||
"cliFlag": "--tokenhub-api-key",
|
||||
"cliOption": "--tokenhub-api-key <key>",
|
||||
"cliDescription": "Tencent TokenHub API key"
|
||||
}
|
||||
],
|
||||
"configSchema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
35
extensions/tencent/package.json
Normal file
35
extensions/tencent/package.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "@openclaw/tencent-provider",
|
||||
"version": "2026.6.11",
|
||||
"description": "OpenClaw Tencent Cloud provider plugin (TokenHub + Token Plan)",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@openclaw/plugin-sdk": "workspace:*"
|
||||
},
|
||||
"openclaw": {
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
],
|
||||
"install": {
|
||||
"clawhubSpec": "clawhub:@openclaw/tencent-provider",
|
||||
"npmSpec": "@openclaw/tencent-provider",
|
||||
"defaultChoice": "npm",
|
||||
"minHostVersion": ">=2026.6.9"
|
||||
},
|
||||
"compat": {
|
||||
"pluginApi": ">=2026.6.11"
|
||||
},
|
||||
"build": {
|
||||
"openclawVersion": "2026.6.11",
|
||||
"bundledDist": false
|
||||
},
|
||||
"release": {
|
||||
"publishToClawHub": true,
|
||||
"publishToNpm": true
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/openclaw/openclaw"
|
||||
}
|
||||
}
|
||||
15
extensions/tencent/provider-catalog.ts
Normal file
15
extensions/tencent/provider-catalog.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// Tencent provider module implements model/runtime integration.
|
||||
import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import {
|
||||
buildTokenHubModelDefinition,
|
||||
TOKENHUB_BASE_URL,
|
||||
TOKENHUB_MODEL_CATALOG,
|
||||
} from "./models.js";
|
||||
|
||||
export function buildTokenHubProvider(): ModelProviderConfig {
|
||||
return {
|
||||
baseUrl: TOKENHUB_BASE_URL,
|
||||
api: "openai-completions",
|
||||
models: TOKENHUB_MODEL_CATALOG.map(buildTokenHubModelDefinition),
|
||||
};
|
||||
}
|
||||
18
extensions/tencent/provider-discovery.ts
Normal file
18
extensions/tencent/provider-discovery.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// Tencent provider module implements model/runtime integration.
|
||||
import type { ProviderPlugin } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { buildTokenHubProvider } from "./provider-catalog.js";
|
||||
|
||||
const tencentProviderDiscovery: ProviderPlugin = {
|
||||
id: "tencent-tokenhub",
|
||||
label: "Tencent TokenHub",
|
||||
docsPath: "/providers/models",
|
||||
auth: [],
|
||||
staticCatalog: {
|
||||
order: "simple",
|
||||
run: async () => ({
|
||||
provider: buildTokenHubProvider(),
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
export default tencentProviderDiscovery;
|
||||
16
extensions/tencent/tsconfig.json
Normal file
16
extensions/tencent/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../tsconfig.package-boundary.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": ["./*.ts", "./src/**/*.ts"],
|
||||
"exclude": [
|
||||
"./**/*.test.ts",
|
||||
"./dist/**",
|
||||
"./node_modules/**",
|
||||
"./src/test-support/**",
|
||||
"./src/**/*test-helpers.ts",
|
||||
"./src/**/*test-harness.ts",
|
||||
"./src/**/*test-support.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user