u1s1-cli 0.12.0 → 0.12.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/dist/agent-setup.d.ts +3 -2
- package/dist/agent-setup.js +5 -6
- package/package.json +1 -1
package/dist/agent-setup.d.ts
CHANGED
|
@@ -41,8 +41,9 @@ export declare function toProviderModels(models: ModelDef[]): {
|
|
|
41
41
|
}[];
|
|
42
42
|
/**
|
|
43
43
|
* 自定义端点 → pi provider 条目。密钥走环境变量引用(启动器已 set,见
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* endpointKeyEnv),文件里不落明文;没配密钥的端点(本机 Ollama 等)写
|
|
45
|
+
* 字面量 "local" —— pi 没有凭据会直接拒启("No API key found"),
|
|
46
|
+
* 这是 pi 自带 llama provider 的同款兜底,本地服务会忽略 Authorization 头。
|
|
46
47
|
*/
|
|
47
48
|
export declare function endpointProviderEntry(ep: CustomEndpoint): Record<string, unknown>;
|
|
48
49
|
/** 把各端点密钥放进环境(TUI 直接 process.env;web 传给子进程)。 */
|
package/dist/agent-setup.js
CHANGED
|
@@ -147,19 +147,18 @@ export function toProviderModels(models) {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* 自定义端点 → pi provider 条目。密钥走环境变量引用(启动器已 set,见
|
|
150
|
-
*
|
|
151
|
-
*
|
|
150
|
+
* endpointKeyEnv),文件里不落明文;没配密钥的端点(本机 Ollama 等)写
|
|
151
|
+
* 字面量 "local" —— pi 没有凭据会直接拒启("No API key found"),
|
|
152
|
+
* 这是 pi 自带 llama provider 的同款兜底,本地服务会忽略 Authorization 头。
|
|
152
153
|
*/
|
|
153
154
|
export function endpointProviderEntry(ep) {
|
|
154
|
-
|
|
155
|
+
return {
|
|
155
156
|
name: ep.name,
|
|
156
157
|
baseUrl: ep.baseUrl,
|
|
157
158
|
api: ep.api,
|
|
159
|
+
apiKey: ep.apiKey ? `$${endpointKeyEnvName(ep.id)}` : "local",
|
|
158
160
|
models: toProviderModels(ep.models),
|
|
159
161
|
};
|
|
160
|
-
if (ep.apiKey)
|
|
161
|
-
entry["apiKey"] = `$${endpointKeyEnvName(ep.id)}`;
|
|
162
|
-
return entry;
|
|
163
162
|
}
|
|
164
163
|
/** 把各端点密钥放进环境(TUI 直接 process.env;web 传给子进程)。 */
|
|
165
164
|
export function endpointKeyEnv() {
|