3 Commits

Author SHA1 Message Date
Tarik Moussa
5317e40fe7 chore: interne Host-Adresse durch generischen Hostnamen ersetzt
Ersetzt die private LAN-IP des Jetson durch jetson.local in Doku,
Beispiel-Workflows und als Default in scripts/llm.py. Betrifft nur
Fallback-Werte -- die Org-Variable JETSON_OLLAMA_URL bzw. AI_BASE_URL
hat weiterhin Vorrang.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 00:35:23 +02:00
Tarik Moussa
38a6851b46 feat(cd): auto-deploy ci-ai-bot on push + dehard-code Jetson URL
- .gitea/workflows/cd.yml: on push to main (bot/** or scripts/**),
  build ci-ai-bot:latest on the Pi runner via DooD and force-recreate
  the container with docker compose (no registry push needed)
- reusable-{ai-review,commands,security}.yml: replace hardcoded
  192.168.178.103:11434 with ${{ vars.JETSON_OLLAMA_URL }} (org variable
  set in conformallab → fallback to old IP if variable is missing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 08:19:01 +02:00
Tarik Moussa
72a902010a chore(llm): refresh defaults to match deployed Jetson backend
llm.py defaulted to AI_PROVIDER=anthropic, AI_MODEL=qwen-light, and the
dead .20 Jetson IP — none of which match how workflows/bot actually run
it (ollama / coder / .103). Update the defaults and docstring to reflect
the live self-hosted setup, and refresh the README note that flagged the
mismatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 15:20:15 +02:00
9 changed files with 12 additions and 12 deletions

View File

@@ -11,7 +11,7 @@
# - Runner config must list /var/run/docker.sock and /mnt/external in valid_volumes
# (set in ansible-eulernest roles/gitea_runner/templates/config.yaml.j2).
# - Set org variable JETSON_OLLAMA_URL in conformallab → Actions → Variables:
# value = http://192.168.178.103:11434/v1
# value = http://jetson.local:11434/v1
name: CD — ci-ai-bot
on:

View File

@@ -31,7 +31,7 @@ jobs:
AI_PROVIDER: ollama
AI_MODEL: coder
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }}
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
run: python /opt/ci-ai/scripts/ai_review.py

View File

@@ -23,7 +23,7 @@ jobs:
AI_PROVIDER: ollama
AI_MODEL: coder
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }}
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
steps:

View File

@@ -74,7 +74,7 @@ jobs:
AI_PROVIDER: ollama
AI_MODEL: coder
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://jetson.local:11434/v1' }}
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
run: |

View File

@@ -83,7 +83,7 @@ IPs — `[webhook] ALLOWED_HOST_LIST` muss den Bot-Host (`ci-ai-bot`) erlauben.
| `WEBHOOK_SECRET` | — | HMAC-Secret, muss zum Gitea-Webhook passen (leer = Check aus) |
| `GITEA_TOKEN` | — | Token fürs Kommentieren (`write:issue`) |
| `GITEA_API` | `http://gitea:3000/api/v1` | Gitea-API (intern, kein Hairpin) |
| `AI_PROVIDER` / `AI_MODEL` / `AI_BASE_URL` | `ollama` / `coder` / `http://192.168.178.103:11434/v1` | KI-Backend (Jetson) |
| `AI_PROVIDER` / `AI_MODEL` / `AI_BASE_URL` | `ollama` / `coder` / `http://jetson.local:11434/v1` | KI-Backend (Jetson) |
## In ein Repo einbauen (CI-Workflows)
@@ -117,7 +117,7 @@ Kosten, kein Datenabfluss. In Workflows **und** Bot per Env gesetzt:
```yaml
AI_PROVIDER: ollama
AI_MODEL: coder # qwen2.5-coder:7b
AI_BASE_URL: http://192.168.178.103:11434/v1
AI_BASE_URL: http://jetson.local:11434/v1
```
Provider-Wechsel = **nur Env**, kein Code-Change (`scripts/llm.py`). Anthropic-Variante:
@@ -134,7 +134,7 @@ Provider-Wechsel = **nur Env**, kein Code-Change (`scripts/llm.py`). Anthropic-V
|---|---|---|
| `AI_PROVIDER` | `ollama` | `ollama` |
| `AI_MODEL` | `coder` (ollama) / `claude-3-5-haiku-latest` (anthropic) | `coder` |
| `AI_BASE_URL` | `http://192.168.178.103:11434/v1` | `…178.103…` |
| `AI_BASE_URL` | `http://jetson.local:11434/v1` | `…178.103…` |
| `JETSON_API_KEY` | — | Bearer für Ollama (optional) |
| `ANTHROPIC_API_KEY` | — | nur bei provider=anthropic |
| `GITEA_API` | `https://git.eulernest.eu/api/v1` | Bot: intern `http://gitea:3000/api/v1` |

View File

@@ -10,7 +10,7 @@ Umschalten zwischen Backends über Env-Vars:
Weitere Env-Vars:
AI_MODEL Modellname (Default je nach Provider; ollama: "coder" = qwen2.5-coder:7b)
AI_BASE_URL OpenAI-kompatible Basis-URL (für ollama),
Default http://192.168.178.103:11434/v1
Default http://jetson.local:11434/v1
JETSON_API_KEY Bearer-Token (für ollama, optional)
ANTHROPIC_API_KEY (für anthropic)
@@ -88,7 +88,7 @@ def _anthropic(system: str, user: str, model: str, max_tokens: int) -> str:
def _ollama_openai(system: str, user: str, model: str, max_tokens: int) -> str:
base = os.environ.get("AI_BASE_URL", "http://192.168.178.103:11434/v1").rstrip("/")
base = os.environ.get("AI_BASE_URL", "http://jetson.local:11434/v1").rstrip("/")
headers = {"content-type": "application/json"}
key = os.environ.get("JETSON_API_KEY", "")
if key:

View File

@@ -28,7 +28,7 @@ jobs:
env:
AI_PROVIDER: ollama
AI_MODEL: coder
AI_BASE_URL: http://192.168.178.103:11434/v1
AI_BASE_URL: http://jetson.local:11434/v1
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
run: python /opt/ci-ai/scripts/ai_review.py

View File

@@ -28,7 +28,7 @@
# env:
# AI_PROVIDER: ollama
# AI_MODEL: coder
# AI_BASE_URL: http://192.168.178.103:11434/v1
# AI_BASE_URL: http://jetson.local:11434/v1
# GITEA_TOKEN: ${{ github.token }}
# GITEA_API: https://git.eulernest.eu/api/v1
# run: |

View File

@@ -55,7 +55,7 @@ jobs:
env:
AI_PROVIDER: ollama
AI_MODEL: coder
AI_BASE_URL: http://192.168.178.103:11434/v1
AI_BASE_URL: http://jetson.local:11434/v1
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
run: |