feat: add generateLlmPredictionWithContext with web search geopolitical context

- New method uses web_search_20260209 server-side tool so Claude fetches
  48h of oil/geopolitical news autonomously before predicting direction
- Prompt uses raw prices only — no pre-computed EWMA indicators
- pause_turn loop handles server-side search continuation (up to 5 iters)
- generatePrediction() now tries context method first, falls back to
  generateLlmPrediction(), then EWMA
- Default model updated to claude-sonnet-4-6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ovidiu U
2026-04-04 15:32:53 +01:00
parent 1d2eb12e83
commit fb4c413926
3 changed files with 229 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ return [
'anthropic' => [
'api_key' => env('ANTHROPIC_API_KEY'),
'model' => env('ANTHROPIC_MODEL', 'claude-haiku-4-5-20251001'),
'model' => env('ANTHROPIC_MODEL', 'claude-sonnet-4-6'),
],
];