post: commit 3217f0b in bojemoi
Some checks failed
Hugo Build & Deploy / build-deploy (push) Failing after 1m6s

This commit is contained in:
grafana-watcher
2026-07-21 20:23:41 +02:00
committed by Betty
parent cf55f25256
commit a3a7490342

View File

@@ -0,0 +1,56 @@
---
title: "[bojemoi] feat(alert-agent): intégration Claude API (Haiku) comme backend LLM principal"
date: 2026-07-21T20:23:41+02:00
draft: false
tags: ["commit", "bojemoi", "main"]
categories: ["Git Activity"]
summary: "Commit 3217f0b par grafana-watcher dans bojemoi"
author: "grafana-watcher"
---
## Commit `3217f0b`
| | |
|---|---|
| **Repository** | bojemoi |
| **Branch** | `main` |
| **Author** | grafana-watcher |
| **Hash** | `3217f0b22abb1c42444282a068e544257b0dc725` |
### Description
Remplace Ollama (trop lent) par Claude API (Anthropic). Le backend est
sélectionnable via LLM_BACKEND: claude/kimi/ollama. Le LLM évalue
désormais la sévérité réelle de l'alerte (critical/high/medium/low/info)
indépendamment du label Prometheus.
- llm.py: ajout _call_claude + _extract_json pour parser la réponse
- config.py: claude_api_key (secret), claude_model, llm_backend=claude
- requirements.txt: anthropic>=0.40
- alerter.py: emoji selon sévérité LLM (🔴🟠🟡🔵⚪)
- webhook.py: sévérité Telegram = decision["severity"] (LLM) > label Prometheus
- stack: LLM_BACKEND=claude, secret claude_api_key monté
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
### Files Changed
```
M alert-agent/alert_agent/__main__.py
M alert-agent/alert_agent/config.py
M alert-agent/alert_agent/llm.py
M alert-agent/requirements.txt
M stack/48-service-alert-agent.yml
```
### Diff Summary
```
alert-agent/alert_agent/__main__.py | 2 +-
alert-agent/alert_agent/config.py | 11 +++++++--
alert-agent/alert_agent/llm.py | 48 +++++++++++++++++++++++++++++++++----
alert-agent/requirements.txt | 1 +
stack/48-service-alert-agent.yml | 6 ++++-
5 files changed, 59 insertions(+), 9 deletions(-)
```