feat: wire TradingGraph to use settings for model, temperature, and risk config
This commit is contained in:
@@ -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 || [];
|
||||
|
||||
Reference in New Issue
Block a user