fix(ai-review model validation): 驗證 model 並支援自動選模
This commit is contained in:
+2
-1
@@ -209,8 +209,9 @@ async function runProxyAPI({ provider, baseURL, apiKeys, model }, prompt) {
|
||||
*/
|
||||
export async function chat(systemPrompt, userContent) {
|
||||
const cfg = getLLMConfig();
|
||||
const { provider, baseURL, model } = cfg;
|
||||
const { provider, baseURL, model, modelError } = cfg;
|
||||
if (!provider || !baseURL) throw new Error('未偵測到可用的 CLIProxyAPI 設定,請確認 CLI_PROXY_API');
|
||||
if (modelError) throw new Error(modelError);
|
||||
|
||||
line(`[LLM] provider=${provider} baseURL=${baseURL} model=${model || 'auto'}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user