--- title: "[bojemoi] feat(ml-threat): migrate AI agents from Ollama to Anthropic API" date: 2026-07-05T16:13:38+02:00 draft: false tags: ["commit", "bojemoi", "main"] categories: ["Git Activity"] summary: "Commit af7ab90 par grafana-watcher dans bojemoi" author: "grafana-watcher" --- ## Commit `af7ab90` | | | |---|---| | **Repository** | bojemoi | | **Branch** | `main` | | **Author** | grafana-watcher | | **Hash** | `af7ab90b7893e6f3194311fa7fdfd40cab47661d` | ### Description - ai_agents.py: replace Ollama HTTP calls with Anthropic Messages API (claude-haiku-4-5) for CorrelatorAgent and ReportGenerator - api.py: read anthropic_api_key directly from /run/secrets/ without env var - stack/45-service-ml-threat-intel.yml: add anthropic_api_key secret (no env var) - Dockerfile.ml-threat: remove COPY models/*.pkl (models live in runtime volume) Co-Authored-By: Claude Sonnet 4.6 ### Files Changed ``` M ml-threat/Dockerfile.ml-threat M ml-threat/ai_agents.py M ml-threat/api.py M stack/45-service-ml-threat-intel.yml ``` ### Diff Summary ``` ml-threat/Dockerfile.ml-threat | 3 +- ml-threat/ai_agents.py | 121 +++++++++++++---------------------- ml-threat/api.py | 9 ++- stack/45-service-ml-threat-intel.yml | 3 + 4 files changed, 55 insertions(+), 81 deletions(-) ```