@openclaw/arcee-provider 0.0.0 → 2026.6.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,12 @@
1
- # @openclaw/arcee-provider
1
+ # OpenClaw Arcee AI Provider
2
2
 
3
- Reserved placeholder for the official OpenClaw plugin package. Use a published release version instead.
3
+ Official OpenClaw provider plugin for Arcee AI.
4
+
5
+ Install from OpenClaw:
6
+
7
+ ```bash
8
+ openclaw plugins install @openclaw/arcee-provider
9
+ openclaw gateway restart
10
+ ```
11
+
12
+ See <https://docs.openclaw.ai/providers/arcee> for setup and configuration.
package/dist/api.js ADDED
@@ -0,0 +1,4 @@
1
+ import { ARCEE_BASE_URL, ARCEE_MODEL_CATALOG, buildArceeModelDefinition } from "./models.js";
2
+ import { buildArceeOpenRouterProvider, buildArceeProvider } from "./provider-catalog.js";
3
+ import { ARCEE_DEFAULT_MODEL_REF, ARCEE_OPENROUTER_DEFAULT_MODEL_REF, applyArceeConfig, applyArceeOpenRouterConfig } from "./onboard.js";
4
+ export { ARCEE_BASE_URL, ARCEE_DEFAULT_MODEL_REF, ARCEE_MODEL_CATALOG, ARCEE_OPENROUTER_DEFAULT_MODEL_REF, applyArceeConfig, applyArceeOpenRouterConfig, buildArceeModelDefinition, buildArceeOpenRouterProvider, buildArceeProvider };
package/dist/index.js ADDED
@@ -0,0 +1,119 @@
1
+ import { buildArceeOpenRouterProvider, buildArceeProvider, normalizeArceeOpenRouterBaseUrl, toArceeOpenRouterModelId } from "./provider-catalog.js";
2
+ import { ARCEE_DEFAULT_MODEL_REF, ARCEE_OPENROUTER_DEFAULT_MODEL_REF, applyArceeConfig, applyArceeOpenRouterConfig } from "./onboard.js";
3
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
4
+ import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
5
+ import { readConfiguredProviderCatalogEntries } from "openclaw/plugin-sdk/provider-catalog-shared";
6
+ import { OPENAI_COMPATIBLE_REPLAY_HOOKS } from "openclaw/plugin-sdk/provider-model-shared";
7
+ //#region extensions/arcee/index.ts
8
+ /**
9
+ * Arcee AI provider plugin entry. It supports direct Arcee auth and OpenRouter
10
+ * routing while normalizing OpenRouter model ids and base URLs.
11
+ */
12
+ const PROVIDER_ID = "arcee";
13
+ const ARCEE_WIZARD_GROUP = {
14
+ groupId: "arcee",
15
+ groupLabel: "Arcee AI",
16
+ groupHint: "Direct API or OpenRouter"
17
+ };
18
+ function buildArceeAuthMethods() {
19
+ return [createProviderApiKeyAuthMethod({
20
+ providerId: PROVIDER_ID,
21
+ methodId: "arcee-platform",
22
+ label: "Arcee AI API key",
23
+ hint: "Direct access to Arcee platform",
24
+ optionKey: "arceeaiApiKey",
25
+ flagName: "--arceeai-api-key",
26
+ envVar: "ARCEEAI_API_KEY",
27
+ promptMessage: "Enter Arcee AI API key",
28
+ defaultModel: ARCEE_DEFAULT_MODEL_REF,
29
+ expectedProviders: [PROVIDER_ID],
30
+ applyConfig: (cfg) => applyArceeConfig(cfg),
31
+ wizard: {
32
+ choiceId: "arceeai-api-key",
33
+ choiceLabel: "Arcee AI API key",
34
+ choiceHint: "Direct (chat.arcee.ai)",
35
+ ...ARCEE_WIZARD_GROUP
36
+ }
37
+ }), createProviderApiKeyAuthMethod({
38
+ providerId: PROVIDER_ID,
39
+ methodId: "openrouter",
40
+ label: "OpenRouter API key",
41
+ hint: "Access Arcee models via OpenRouter",
42
+ optionKey: "openrouterApiKey",
43
+ flagName: "--openrouter-api-key",
44
+ envVar: "OPENROUTER_API_KEY",
45
+ promptMessage: "Enter OpenRouter API key",
46
+ profileId: "openrouter:default",
47
+ defaultModel: ARCEE_OPENROUTER_DEFAULT_MODEL_REF,
48
+ expectedProviders: [PROVIDER_ID, "openrouter"],
49
+ applyConfig: (cfg) => applyArceeOpenRouterConfig(cfg),
50
+ wizard: {
51
+ choiceId: "arceeai-openrouter",
52
+ choiceLabel: "OpenRouter API key",
53
+ choiceHint: "Via OpenRouter (openrouter.ai)",
54
+ ...ARCEE_WIZARD_GROUP
55
+ }
56
+ })];
57
+ }
58
+ async function resolveArceeCatalog(ctx) {
59
+ const directKey = ctx.resolveProviderApiKey(PROVIDER_ID).apiKey;
60
+ if (directKey) return { provider: {
61
+ ...buildArceeProvider(),
62
+ apiKey: directKey
63
+ } };
64
+ const openRouterKey = ctx.resolveProviderApiKey("openrouter").apiKey;
65
+ if (openRouterKey) return { provider: {
66
+ ...buildArceeOpenRouterProvider(),
67
+ apiKey: openRouterKey
68
+ } };
69
+ return null;
70
+ }
71
+ function normalizeArceeResolvedModel(model) {
72
+ const normalizedBaseUrl = normalizeArceeOpenRouterBaseUrl(model.baseUrl);
73
+ if (!normalizedBaseUrl) return;
74
+ const normalizedId = toArceeOpenRouterModelId(model.id);
75
+ if (normalizedId === model.id && normalizedBaseUrl === model.baseUrl) return;
76
+ return {
77
+ ...model,
78
+ id: normalizedId,
79
+ baseUrl: normalizedBaseUrl
80
+ };
81
+ }
82
+ /** Provider entry for Arcee direct and OpenRouter-backed models. */
83
+ var arcee_default = definePluginEntry({
84
+ id: PROVIDER_ID,
85
+ name: "Arcee AI Provider",
86
+ description: "Bundled Arcee AI provider plugin",
87
+ register(api) {
88
+ api.registerProvider({
89
+ id: PROVIDER_ID,
90
+ label: "Arcee AI",
91
+ docsPath: "/providers/arcee",
92
+ envVars: ["ARCEEAI_API_KEY", "OPENROUTER_API_KEY"],
93
+ auth: buildArceeAuthMethods(),
94
+ catalog: { run: resolveArceeCatalog },
95
+ augmentModelCatalog: ({ config }) => readConfiguredProviderCatalogEntries({
96
+ config,
97
+ providerId: PROVIDER_ID
98
+ }),
99
+ normalizeConfig: ({ providerConfig }) => {
100
+ const normalizedBaseUrl = normalizeArceeOpenRouterBaseUrl(providerConfig.baseUrl);
101
+ return normalizedBaseUrl && normalizedBaseUrl !== providerConfig.baseUrl ? {
102
+ ...providerConfig,
103
+ baseUrl: normalizedBaseUrl
104
+ } : void 0;
105
+ },
106
+ normalizeResolvedModel: ({ model }) => normalizeArceeResolvedModel(model),
107
+ normalizeTransport: ({ api: apiLocal, baseUrl }) => {
108
+ const normalizedBaseUrl = normalizeArceeOpenRouterBaseUrl(baseUrl);
109
+ return normalizedBaseUrl && normalizedBaseUrl !== baseUrl ? {
110
+ api: apiLocal,
111
+ baseUrl: normalizedBaseUrl
112
+ } : void 0;
113
+ },
114
+ ...OPENAI_COMPATIBLE_REPLAY_HOOKS
115
+ });
116
+ }
117
+ });
118
+ //#endregion
119
+ export { arcee_default as default };
package/dist/models.js ADDED
@@ -0,0 +1,68 @@
1
+ //#region extensions/arcee/models.ts
2
+ /** Default direct Arcee API base URL. */
3
+ const ARCEE_BASE_URL = "https://api.arcee.ai/api/v1";
4
+ /** Static Arcee model catalog used for provider registration. */
5
+ const ARCEE_MODEL_CATALOG = [
6
+ {
7
+ id: "trinity-mini",
8
+ name: "Trinity Mini 26B",
9
+ reasoning: false,
10
+ input: ["text"],
11
+ contextWindow: 131072,
12
+ maxTokens: 8e4,
13
+ cost: {
14
+ input: .045,
15
+ output: .15,
16
+ cacheRead: .045,
17
+ cacheWrite: .045
18
+ }
19
+ },
20
+ {
21
+ id: "trinity-large-preview",
22
+ name: "Trinity Large Preview",
23
+ reasoning: false,
24
+ input: ["text"],
25
+ contextWindow: 131072,
26
+ maxTokens: 16384,
27
+ cost: {
28
+ input: .25,
29
+ output: 1,
30
+ cacheRead: .25,
31
+ cacheWrite: .25
32
+ }
33
+ },
34
+ {
35
+ id: "trinity-large-thinking",
36
+ name: "Trinity Large Thinking",
37
+ reasoning: true,
38
+ input: ["text"],
39
+ contextWindow: 262144,
40
+ maxTokens: 8e4,
41
+ cost: {
42
+ input: .25,
43
+ output: .9,
44
+ cacheRead: .25,
45
+ cacheWrite: .25
46
+ },
47
+ compat: {
48
+ supportsTools: false,
49
+ supportsReasoningEffort: false
50
+ }
51
+ }
52
+ ];
53
+ /** Build one OpenAI-compatible Arcee model definition. */
54
+ function buildArceeModelDefinition(model) {
55
+ return {
56
+ id: model.id,
57
+ name: model.name,
58
+ api: "openai-completions",
59
+ reasoning: model.reasoning,
60
+ input: model.input,
61
+ cost: model.cost,
62
+ contextWindow: model.contextWindow,
63
+ maxTokens: model.maxTokens,
64
+ ...model.compat ? { compat: model.compat } : {}
65
+ };
66
+ }
67
+ //#endregion
68
+ export { ARCEE_BASE_URL, ARCEE_MODEL_CATALOG, buildArceeModelDefinition };
@@ -0,0 +1,48 @@
1
+ import { ARCEE_BASE_URL } from "./models.js";
2
+ import { OPENROUTER_BASE_URL, buildArceeCatalogModels, buildArceeOpenRouterCatalogModels } from "./provider-catalog.js";
3
+ import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
4
+ //#region extensions/arcee/onboard.ts
5
+ /**
6
+ * Arcee setup preset appliers. They seed model catalog defaults for direct
7
+ * Arcee API usage and the OpenRouter-backed path.
8
+ */
9
+ /** Default Arcee model ref for direct API setup. */
10
+ const ARCEE_DEFAULT_MODEL_REF = "arcee/trinity-large-thinking";
11
+ /** Default Arcee model ref for OpenRouter setup. */
12
+ const ARCEE_OPENROUTER_DEFAULT_MODEL_REF = "arcee/trinity-large-thinking";
13
+ const arceePresetAppliers = createModelCatalogPresetAppliers({
14
+ primaryModelRef: ARCEE_DEFAULT_MODEL_REF,
15
+ resolveParams: (_cfg) => ({
16
+ providerId: "arcee",
17
+ api: "openai-completions",
18
+ baseUrl: ARCEE_BASE_URL,
19
+ catalogModels: buildArceeCatalogModels(),
20
+ aliases: [{
21
+ modelRef: ARCEE_DEFAULT_MODEL_REF,
22
+ alias: "Arcee AI"
23
+ }]
24
+ })
25
+ });
26
+ const arceeOpenRouterPresetAppliers = createModelCatalogPresetAppliers({
27
+ primaryModelRef: ARCEE_OPENROUTER_DEFAULT_MODEL_REF,
28
+ resolveParams: (_cfg) => ({
29
+ providerId: "arcee",
30
+ api: "openai-completions",
31
+ baseUrl: OPENROUTER_BASE_URL,
32
+ catalogModels: buildArceeOpenRouterCatalogModels(),
33
+ aliases: [{
34
+ modelRef: ARCEE_OPENROUTER_DEFAULT_MODEL_REF,
35
+ alias: "Arcee AI (OpenRouter)"
36
+ }]
37
+ })
38
+ });
39
+ /** Apply direct Arcee provider defaults to config. */
40
+ function applyArceeConfig(cfg) {
41
+ return arceePresetAppliers.applyConfig(cfg);
42
+ }
43
+ /** Apply OpenRouter-backed Arcee provider defaults to config. */
44
+ function applyArceeOpenRouterConfig(cfg) {
45
+ return arceeOpenRouterPresetAppliers.applyConfig(cfg);
46
+ }
47
+ //#endregion
48
+ export { ARCEE_DEFAULT_MODEL_REF, ARCEE_OPENROUTER_DEFAULT_MODEL_REF, applyArceeConfig, applyArceeOpenRouterConfig };
@@ -0,0 +1,46 @@
1
+ import { ARCEE_BASE_URL, ARCEE_MODEL_CATALOG, buildArceeModelDefinition } from "./models.js";
2
+ //#region extensions/arcee/provider-catalog.ts
3
+ /** Canonical OpenRouter API base URL for Arcee-routed models. */
4
+ const OPENROUTER_BASE_URL = "https://openrouter.ai/api/v1";
5
+ const OPENROUTER_LEGACY_BASE_URL = "https://openrouter.ai/v1";
6
+ function normalizeBaseUrl(baseUrl) {
7
+ return (baseUrl ?? "").trim().replace(/\/+$/, "");
8
+ }
9
+ /** Normalize OpenRouter base URLs accepted for Arcee model routing. */
10
+ function normalizeArceeOpenRouterBaseUrl(baseUrl) {
11
+ const normalized = normalizeBaseUrl(baseUrl);
12
+ if (!normalized) return;
13
+ if (normalized === "https://openrouter.ai/api/v1" || normalized === OPENROUTER_LEGACY_BASE_URL) return OPENROUTER_BASE_URL;
14
+ }
15
+ /** Convert a bare Arcee model id to the OpenRouter `arcee/*` id. */
16
+ function toArceeOpenRouterModelId(modelId) {
17
+ const normalized = modelId.trim();
18
+ if (!normalized || normalized.startsWith("arcee/")) return normalized;
19
+ return `arcee/${normalized}`;
20
+ }
21
+ /** Build direct Arcee catalog models. */
22
+ function buildArceeCatalogModels() {
23
+ return ARCEE_MODEL_CATALOG.map(buildArceeModelDefinition);
24
+ }
25
+ /** Build OpenRouter-routed Arcee catalog models. */
26
+ function buildArceeOpenRouterCatalogModels() {
27
+ return buildArceeCatalogModels().map((model) => Object.assign({}, model, { id: toArceeOpenRouterModelId(model.id) }));
28
+ }
29
+ /** Build the direct Arcee provider config. */
30
+ function buildArceeProvider() {
31
+ return {
32
+ baseUrl: ARCEE_BASE_URL,
33
+ api: "openai-completions",
34
+ models: buildArceeCatalogModels()
35
+ };
36
+ }
37
+ /** Build the OpenRouter-backed Arcee provider config. */
38
+ function buildArceeOpenRouterProvider() {
39
+ return {
40
+ baseUrl: OPENROUTER_BASE_URL,
41
+ api: "openai-completions",
42
+ models: buildArceeOpenRouterCatalogModels()
43
+ };
44
+ }
45
+ //#endregion
46
+ export { OPENROUTER_BASE_URL, buildArceeCatalogModels, buildArceeOpenRouterCatalogModels, buildArceeOpenRouterProvider, buildArceeProvider, normalizeArceeOpenRouterBaseUrl, toArceeOpenRouterModelId };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@openclaw/arcee-provider",
3
+ "version": "2026.6.9-beta.1",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@openclaw/arcee-provider",
9
+ "version": "2026.6.9-beta.1"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "id": "arcee",
3
+ "activation": {
4
+ "onStartup": false
5
+ },
6
+ "enabledByDefault": true,
7
+ "providers": ["arcee"],
8
+ "setup": {
9
+ "providers": [
10
+ {
11
+ "id": "arcee",
12
+ "envVars": ["ARCEEAI_API_KEY"]
13
+ }
14
+ ]
15
+ },
16
+ "providerAuthChoices": [
17
+ {
18
+ "provider": "arcee",
19
+ "method": "arcee-platform",
20
+ "choiceId": "arceeai-api-key",
21
+ "choiceLabel": "Arcee AI API key",
22
+ "choiceHint": "Direct (chat.arcee.ai)",
23
+ "groupId": "arcee",
24
+ "groupLabel": "Arcee AI",
25
+ "groupHint": "Direct API or OpenRouter",
26
+ "optionKey": "arceeaiApiKey",
27
+ "cliFlag": "--arceeai-api-key",
28
+ "cliOption": "--arceeai-api-key <key>",
29
+ "cliDescription": "Arcee AI API key"
30
+ },
31
+ {
32
+ "provider": "arcee",
33
+ "method": "openrouter",
34
+ "choiceId": "arceeai-openrouter",
35
+ "choiceLabel": "OpenRouter API key",
36
+ "choiceHint": "Via OpenRouter (openrouter.ai)",
37
+ "groupId": "arcee",
38
+ "groupLabel": "Arcee AI",
39
+ "groupHint": "Direct API or OpenRouter",
40
+ "optionKey": "openrouterApiKey",
41
+ "cliFlag": "--openrouter-api-key",
42
+ "cliOption": "--openrouter-api-key <key>",
43
+ "cliDescription": "OpenRouter API key for Arcee AI models"
44
+ }
45
+ ],
46
+ "configSchema": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "properties": {}
50
+ }
51
+ }
package/package.json CHANGED
@@ -1,14 +1,50 @@
1
1
  {
2
2
  "name": "@openclaw/arcee-provider",
3
- "version": "0.0.0",
4
- "description": "Reserved package name for an official OpenClaw plugin.",
5
- "license": "MIT",
3
+ "version": "2026.6.9-beta.1",
4
+ "description": "OpenClaw Arcee provider plugin.",
6
5
  "repository": {
7
6
  "type": "git",
8
- "url": "git+https://github.com/openclaw/openclaw.git"
7
+ "url": "https://github.com/openclaw/openclaw"
9
8
  },
10
- "publishConfig": {
11
- "access": "public",
12
- "tag": "placeholder"
13
- }
9
+ "type": "module",
10
+ "openclaw": {
11
+ "extensions": [
12
+ "./index.ts"
13
+ ],
14
+ "install": {
15
+ "clawhubSpec": "clawhub:@openclaw/arcee-provider",
16
+ "npmSpec": "@openclaw/arcee-provider",
17
+ "defaultChoice": "npm",
18
+ "minHostVersion": ">=2026.6.8"
19
+ },
20
+ "compat": {
21
+ "pluginApi": ">=2026.6.9-beta.1"
22
+ },
23
+ "build": {
24
+ "openclawVersion": "2026.6.9-beta.1",
25
+ "bundledDist": false
26
+ },
27
+ "release": {
28
+ "publishToClawHub": true,
29
+ "publishToNpm": true
30
+ },
31
+ "runtimeExtensions": [
32
+ "./dist/index.js"
33
+ ]
34
+ },
35
+ "files": [
36
+ "dist/**",
37
+ "openclaw.plugin.json",
38
+ "npm-shrinkwrap.json",
39
+ "README.md"
40
+ ],
41
+ "peerDependencies": {
42
+ "openclaw": ">=2026.6.9-beta.1"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "openclaw": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "bundledDependencies": []
14
50
  }