Tune LLM routing and prompts

This commit is contained in:
dahyeon committed 2026-04-21 15:24:21 -07:00
1 parent 9c013f7d4f
commit 60f33b8f4b
19 files changed
+736 -803

No files matched your search

+4 -3
View File
@@ -22,7 +22,7 @@ import type {
DerivedState,
} from "@skills/onboarding/state/onboarding-state";
import { noopShadowEvalPublisher } from "./shadow-bus.js";
import { getOnboardingSessionKeyPrefix, getOpenRouterApiUrl, getOpenRouterEnabled } from "../config.js";
import { getOnboardingSessionKeyPrefix, getOpenRouterApiUrl } from "../config.js";
import { judgeOnboardingWithLlm } from "./judges/llm-judge.js";
import { judgeOnboardingRuleCase } from "./judges/rule-judge.js";
import type {
@@ -188,7 +188,8 @@ function createEvalLlmClient(): LlmClient {
process.env["AGENT_LLM_API_URLS"],
process.env["LLAMA_SERVER_API_URL"],
);
const openRouterEndpoints = getOpenRouterEnabled()
const openRouterApiKey = firstNonEmpty(process.env["OPENROUTER_API_KEY"]);
const openRouterEndpoints = openRouterApiKey
? parseEndpointList(process.env["OPENROUTER_API_URL"], getOpenRouterApiUrl())
: [];
@@ -200,7 +201,7 @@ function createEvalLlmClient(): LlmClient {
[
["cliproxy", firstNonEmpty(process.env["CLI_PROXY_API_KEY"])],
["llama", llmApiKey],
["openrouter", firstNonEmpty(process.env["OPENROUTER_API_KEY"])],
["openrouter", openRouterApiKey],
].filter((entry): entry is [string, string] => typeof entry[1] === "string"),
) as Partial<Record<ProviderName, string>>;