feat: wire TradingGraph to use settings for model, temperature, and risk config

This commit is contained in:
2026-05-16 21:37:27 +02:00
parent ae45071973
commit 2ab55060f3
5 changed files with 50 additions and 16 deletions
+2 -2
View File
@@ -89,13 +89,13 @@ export function enrichExecutionPlan(decision: TradingDecision, input: any): Trad
}
// Optional LLM verification step: review computed executionPlan and suggest adjustments
export async function verifyExecutionPlanWithLLM(decision: TradingDecision, input: any): Promise<TradingDecision> {
export async function verifyExecutionPlanWithLLM(decision: TradingDecision, input: any, model?: string): Promise<TradingDecision> {
try {
const apiKey = process.env.OPENROUTER_API_KEY;
if (!apiKey) return decision;
const { OpenRouterClient } = await import("./openrouter");
const client = new OpenRouterClient(apiKey);
const client = new OpenRouterClient(apiKey, { defaultModel: model });
const plan = decision.executionPlan || {};
const prices: number[] = input?.technicalData?.prices || [];