Tune LLM routing and prompts
This commit is contained in:
1 parent
9c013f7d4f
commit
60f33b8f4b
19 files changed
+736
-803
No files matched your search
+11
-11
@@ -163,8 +163,7 @@ export function getDeadlineNearThresholdMin(): number {
|
||||
}
|
||||
|
||||
export function getOpenRouterEnabled(): boolean {
|
||||
const value = process.env["OPENROUTER_ENABLED"]?.trim().toLowerCase();
|
||||
return value === "1" || value === "true" || value === "yes";
|
||||
return Boolean(process.env["OPENROUTER_API_KEY"]?.trim());
|
||||
}
|
||||
|
||||
export function getOpenRouterApiUrl(): string {
|
||||
@@ -203,15 +202,16 @@ export function getTier2CriticModel(): string {
|
||||
);
|
||||
}
|
||||
|
||||
export function getOpenRouterTier1Model(): string {
|
||||
return (
|
||||
process.env["OPENROUTER_TIER1_MODEL"]?.trim() ||
|
||||
"openai/gpt-5.3-codex-spark"
|
||||
);
|
||||
}
|
||||
|
||||
export function getOpenRouterTier2Model(): string {
|
||||
return process.env["OPENROUTER_TIER2_MODEL"]?.trim() || "openai/gpt-5.4";
|
||||
export function getOpenRouterModels(): string[] {
|
||||
const raw = process.env["OPENROUTER_MODEL"]?.trim();
|
||||
if (!raw) {
|
||||
return ["openai/gpt-5.3-codex-spark"];
|
||||
}
|
||||
const models = raw
|
||||
.split(",")
|
||||
.map((value) => value.trim())
|
||||
.filter((value) => value.length > 0);
|
||||
return models.length > 0 ? models : ["openai/gpt-5.3-codex-spark"];
|
||||
}
|
||||
|
||||
export function getLlmMaxTokens(): number {
|
||||
|
||||
Reference in new issue
Block a user