AGC 官方 LLM Router 账号链路与流式联网输出 #242

Merged
kdletters merged 59 commits from feat/agc-llm-router-official-chain into master 2026-09-06 16:49:13 +08:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit 938c37ca1b - Show all commits
@@ -7,6 +7,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
const appRoot = fileURLToPath(new URL('..', import.meta.url));
const inheritedChildEnvironment = { ...globalThis['process']['env'] };
const localConfigPath = path.join(appRoot, 'game-creator.config.local.json');
const projectRoot = path.join(
os.tmpdir(),
@@ -671,6 +672,11 @@ function runAgent() {
{
cwd: appRoot,
stdio: ['pipe', 'pipe', 'pipe'],
env: {
...inheritedChildEnvironment,
// 该 smoke 只使用一次性 loopback Provider;生产路由仍保持锁定。
GENARRATIVE_AGC_DEBUG_PROVIDER_E2E: '1',
},
},
);
let stdout = '';
@@ -151,16 +151,18 @@ fn build_game_creator_platform_llm_config(
if game_creator_official_llm_route_locked() {
return build_game_creator_official_platform_llm_config(llm);
}
if debug_provider_e2e_route_unlocked() {
return build_game_creator_provider_llm_config(llm, config_path);
}
#[cfg(not(test))]
{
return Err("AGC 正式运行只允许通过 API Server 使用官方 LLM Router".to_string());
}
#[cfg(test)]
build_game_creator_test_platform_llm_config(llm, config_path)
build_game_creator_provider_llm_config(llm, config_path)
}
#[cfg(test)]
fn build_game_creator_test_platform_llm_config(
fn build_game_creator_provider_llm_config(
llm: &GameCreatorLlmConfig,
config_path: &str,
) -> Result<LlmConfig, String> {