Resolve conflicts

This commit is contained in:
ideoutrea
2026-02-06 18:13:42 +08:00
parent 3997316fb0
commit 7a9deb2400
2 changed files with 14 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ export type AuthChoiceGroupId =
| "synthetic"
| "venice"
| "qwen"
| "qianfan";
| "qianfan"
| "xai";
export type AuthChoiceGroup = {

View File

@@ -229,13 +229,6 @@ export async function applyNonInteractiveAuthChoice(params: {
flagValue: opts.qianfanApiKey,
flagName: "--qianfan-api-key",
envVar: "QIANFAN_API_KEY",
if (authChoice === "xai-api-key") {
const resolved = await resolveNonInteractiveApiKey({
provider: "xai",
cfg: baseConfig,
flagValue: opts.xaiApiKey,
flagName: "--xai-api-key",
envVar: "XAI_API_KEY",
runtime,
});
if (!resolved) {
@@ -250,7 +243,19 @@ export async function applyNonInteractiveAuthChoice(params: {
mode: "api_key",
});
return applyQianfanConfig(nextConfig);
setXaiApiKey(resolved.key);
}
if (authChoice === "xai-api-key") {
const resolved = await resolveNonInteractiveApiKey({
provider: "xai",
cfg: baseConfig,
flagValue: opts.xaiApiKey,
flagName: "--xai-api-key",
envVar: "XAI_API_KEY",
runtime,
});
if (!resolved) {
return null;
}
nextConfig = applyAuthProfileConfig(nextConfig, {
profileId: "xai:default",