fix: use resolved authType to initialize ACP agent

This commit is contained in:
mingholy.lmh 2026-01-27 14:56:22 +08:00
parent 7177b41120
commit 2c9399f8e0
9 changed files with 75 additions and 68 deletions

View file

@ -19,7 +19,9 @@ export async function validateNonInteractiveAuth(
): Promise<Config> {
try {
// Get the actual authType from config which has already resolved CLI args, env vars, and settings
const authType = nonInteractiveConfig.modelsConfig.getCurrentAuthType();
const authType = nonInteractiveConfig
.getModelsConfig()
.getCurrentAuthType();
if (!authType) {
throw new Error(
'No auth type is selected. Please configure an auth type (e.g. via settings or `--auth-type`) before running in non-interactive mode.',