larkin 0.2.90 → 0.2.91
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.
|
@@ -14,7 +14,7 @@ import { managedLarkCliEnv } from "../app/agent-lark-cli-workspace.mjs";
|
|
|
14
14
|
import { resolveOfficialLarkCli } from "../app/official-lark-cli.mjs";
|
|
15
15
|
import { collectSetupAgentChoice, recoverUnavailableExternalPi, terminalSetupQuestioner } from "./setup-agent-choice.mjs";
|
|
16
16
|
import { probeNativeRuntimeReadiness } from "../runtime/runtime-readiness.mjs";
|
|
17
|
-
import { configureBuiltinPiProviderModel, stageBuiltinPiProvider, validatePiBaseUrl, listProviderModels, PI_PROVIDER_PRESETS } from "../runtime/pi-provider-config.mjs";
|
|
17
|
+
import { configureBuiltinPiProviderModel, stageBuiltinPiProvider, validatePiBaseUrl, validateBuiltinPiProviderSelection, listProviderModels, PI_PROVIDER_PRESETS } from "../runtime/pi-provider-config.mjs";
|
|
18
18
|
import { beginBuiltinPiCredentialTransaction, createOfficialPiCredentialRuntime, createOfficialPiAuthInteraction, createOfficialPiModelRuntime, createOfficialPiLogoutRuntime, createOfficialPiRegistryRuntime, listOfficialPiAuthProviders, logoutOfficialPiProvider, officialPiAuthStatus, runOfficialPiLogin, verifyOfficialPiProviderTurn, } from "../runtime/pi-official-auth.mjs";
|
|
19
19
|
import { documentCommentSubscriptionCapability, markDocumentCommentSubscriptionVerified, } from "../platform/callback-capability.mjs";
|
|
20
20
|
// qrcode-terminal does not publish TypeScript declarations.
|
|
@@ -631,8 +631,12 @@ export async function main() {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
stageBuiltinPiProvider(CFG_DIR, id, { ...raw, apiKey: setupApiKey });
|
|
634
|
+
// 选择文件写入解析后的全称模型(custom 预设为 larkin-custom/<model>):
|
|
635
|
+
// pi 运行时按 provider 前缀解析凭证,裸模型名会回落到默认 provider(deepseek)
|
|
636
|
+
// 导致「No API key found for deepseek」。
|
|
637
|
+
const validated = validateBuiltinPiProviderSelection({ ...raw, apiKey: setupApiKey });
|
|
634
638
|
temporaryAgentChoiceFile = path.join(CFG_DIR, `.setup-agent-choice-${process.pid}-${Date.now()}.json`);
|
|
635
|
-
fs.writeFileSync(temporaryAgentChoiceFile, `${JSON.stringify({ ...raw, runtime: "pi", authCompleted: true, readinessCompleted: true })}\n`, { mode: 0o600, flag: "wx" });
|
|
639
|
+
fs.writeFileSync(temporaryAgentChoiceFile, `${JSON.stringify({ ...raw, runtime: "pi", model: validated.model, authCompleted: true, readinessCompleted: true })}\n`, { mode: 0o600, flag: "wx" });
|
|
636
640
|
say(`[setup 2/5] ✓ 内置 Pi provider 已配置(${presetId}${setupBaseUrl ? " / custom" : ""})`);
|
|
637
641
|
}
|
|
638
642
|
else if (piDistributionFlag === "external" && (setupProvider || setupApiKey || setupBaseUrl)) {
|