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
+4 -1
View File
@@ -36,7 +36,8 @@ export class OpenRouterClient {
async createChatCompletion(
messages: Message[],
model?: string
model?: string,
options?: { temperature?: number; max_tokens?: number }
): Promise<unknown> {
const response = await fetch(`${this.baseURL}/chat/completions`, {
method: "POST",
@@ -49,6 +50,8 @@ export class OpenRouterClient {
body: JSON.stringify({
model: model ?? this.defaultModel,
messages,
...(options?.temperature != null && { temperature: options.temperature }),
...(options?.max_tokens != null && { max_tokens: options.max_tokens }),
}),
});