mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 19:52:02 +00:00
review: stage1
This commit is contained in:
parent
570ec432af
commit
aa9cdf2a3c
10 changed files with 206 additions and 19 deletions
|
|
@ -31,6 +31,10 @@ import {
|
|||
} from '@qwen-code/qwen-code-core';
|
||||
import { extensionsCommand } from '../commands/extensions.js';
|
||||
import type { Settings } from './settings.js';
|
||||
import {
|
||||
buildGenerationConfigSources,
|
||||
getModelProvidersConfigFromSettings,
|
||||
} from '../utils/modelProviderUtils.js';
|
||||
import yargs, { type Argv } from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
import * as fs from 'node:fs';
|
||||
|
|
@ -979,6 +983,18 @@ export async function loadCliConfig(
|
|||
}
|
||||
}
|
||||
|
||||
const modelProvidersConfig = getModelProvidersConfigFromSettings(settings);
|
||||
const generationConfigSources = buildGenerationConfigSources({
|
||||
argv: {
|
||||
model: argv.model,
|
||||
openaiApiKey: argv.openaiApiKey,
|
||||
openaiBaseUrl: argv.openaiBaseUrl,
|
||||
},
|
||||
settings,
|
||||
selectedAuthType,
|
||||
env: process.env as Record<string, string | undefined>,
|
||||
});
|
||||
|
||||
return new Config({
|
||||
sessionId,
|
||||
sessionData,
|
||||
|
|
@ -1036,6 +1052,8 @@ export async function loadCliConfig(
|
|||
inputFormat,
|
||||
outputFormat,
|
||||
includePartialMessages,
|
||||
modelProvidersConfig,
|
||||
generationConfigSources,
|
||||
generationConfig: {
|
||||
...(settings.model?.generationConfig || {}),
|
||||
model: resolvedModel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue