@capybara-hq/plugin-anthropic 0.1.0-rc.0 → 0.1.0-rc.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.
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "anthropic",
4
- "version": "0.1.0-rc.0",
4
+ "version": "0.1.0-rc.1",
5
5
  "publisher": "Capybara",
6
6
  "description": "Anthropic model provider (model-provider@2) using the official SDK and the native Messages API",
7
+ "displayName": {
8
+ "zh": "Anthropic",
9
+ "en": "Anthropic"
10
+ },
7
11
  "homepage": "https://github.com/capybara-hq/plugins/tree/main/plugins/anthropic#readme",
8
12
  "extension": {
9
13
  "entry": "./dist/index.mjs",
10
14
  "manifest": {
11
15
  "name": "anthropic",
12
- "version": "0.1.0-rc.0",
16
+ "version": "0.1.0-rc.1",
13
17
  "sdk": "^0.1.0-rc.0",
14
18
  "provides": [
15
19
  "model-provider@2"
@@ -46,6 +50,73 @@
46
50
  ],
47
51
  "org": []
48
52
  }
53
+ },
54
+ "configSchemas": {
55
+ "deployment": {
56
+ "type": "object",
57
+ "properties": {
58
+ "apiKey": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "x-secret": true,
62
+ "x-ui": {
63
+ "label": {
64
+ "zh": "API 密钥",
65
+ "en": "API key"
66
+ }
67
+ },
68
+ "title": "API key"
69
+ },
70
+ "baseUrl": {
71
+ "type": "string",
72
+ "format": "uri",
73
+ "x-ui": {
74
+ "label": {
75
+ "zh": "接口地址",
76
+ "en": "API URL"
77
+ }
78
+ },
79
+ "title": "API URL"
80
+ },
81
+ "models": {
82
+ "default": [
83
+ "claude-opus-5-5",
84
+ "claude-sonnet-5-5",
85
+ "claude-haiku-5-5"
86
+ ],
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "x-ui": {
93
+ "label": {
94
+ "zh": "可用模型",
95
+ "en": "Models"
96
+ }
97
+ },
98
+ "title": "Models"
99
+ },
100
+ "serverFallbacks": {
101
+ "default": "default",
102
+ "type": "string",
103
+ "enum": [
104
+ "default",
105
+ "off"
106
+ ],
107
+ "x-ui": {
108
+ "label": {
109
+ "zh": "服务端回退",
110
+ "en": "Server fallbacks"
111
+ }
112
+ },
113
+ "title": "Server fallbacks"
114
+ }
115
+ },
116
+ "required": [
117
+ "apiKey"
118
+ ]
119
+ }
49
120
  }
50
121
  }
51
122
  }
package/dist/index.mjs CHANGED
@@ -25805,7 +25805,8 @@ import {
25805
25805
  defineExtension,
25806
25806
  EFFORT_VALUES,
25807
25807
  MODEL_PROVIDER_EXTENSION_POINT_V2,
25808
- secret
25808
+ secret,
25809
+ ui
25809
25810
  } from "@capybara-hq/plugin-sdk";
25810
25811
  import { z } from "zod";
25811
25812
 
@@ -26358,14 +26359,19 @@ function createAnthropicProvider(opts) {
26358
26359
  };
26359
26360
  }
26360
26361
  var DeploymentConfig = z.object({
26361
- apiKey: secret(z.string().min(1)),
26362
- baseUrl: z.string().url().optional(),
26363
- models: z.array(z.string().min(1)).default(["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"]),
26364
- serverFallbacks: z.enum(["default", "off"]).default("default")
26362
+ apiKey: ui(secret(z.string().min(1)), { label: { zh: "API 密钥", en: "API key" } }),
26363
+ baseUrl: ui(z.string().url().optional(), { label: { zh: "接口地址", en: "API URL" } }),
26364
+ models: ui(
26365
+ z.array(z.string().min(1)).default(["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"]),
26366
+ { label: { zh: "可用模型", en: "Models" } }
26367
+ ),
26368
+ serverFallbacks: ui(z.enum(["default", "off"]).default("default"), {
26369
+ label: { zh: "服务端回退", en: "Server fallbacks" }
26370
+ })
26365
26371
  });
26366
26372
  var index_default = defineExtension({
26367
26373
  name: "anthropic",
26368
- version: "0.1.0-rc.0",
26374
+ version: "0.1.0-rc.1",
26369
26375
  sdk: "^0.1.0-rc.0",
26370
26376
  provides: [MODEL_PROVIDER_EXTENSION_POINT_V2],
26371
26377
  // 默认端点;部署配置 baseUrl 可改指向代理(只展示,平台不拦截)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-anthropic",
3
- "version": "0.1.0-rc.0",
3
+ "version": "0.1.0-rc.1",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Anthropic model provider (model-provider@2) using the official SDK and the native Messages API",