feat: add foreman provider type for endpoint overrides
Build & push image / build-and-push (push) Successful in 7s

Accept "foreman" in both resolveModel (GADFLY_BASE_URL) and endpointProvider
(GADFLY_ENDPOINT_*) switches, mapping to majordomo's ollama.Foreman() preset
(handles foreman's non-streaming/long-poll quirks). Unlike the HTTPS-only
LLM_* foreman:// DSN, the base URL is verbatim, so a plaintext http:// foreman
queue works. Tests + README provider table + endpoint-aliases example updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 20:13:47 -04:00
parent a1e9d109e5
commit 6e3a83c437
4 changed files with 45 additions and 9 deletions
+8 -2
View File
@@ -5,10 +5,15 @@
# can then reference as "<name>/<model>" (NAME lowercases: BIGBOX -> bigbox).
# The base URL is used verbatim, so plaintext http LAN endpoints work.
#
# provider is ollama / foreman / openai / anthropic / google. "foreman" targets a
# foreman queue daemon (https://gitea.stevedudenhoeffer.com/steve/foreman) — native
# Ollama on the wire, so just give it the daemon's URL (and optional bearer token).
#
# Gitea note: vars/secrets aren't auto-exposed as env, so map each alias here.
# Suggested repo vars:
# Suggested repo vars (and a secret when the value carries a token):
# GADFLY_ENDPOINT_BIGBOX = ollama|http://192.168.1.50:11434
# GADFLY_ENDPOINT_GPU = openai|http://gpu.lan:8000/v1
# GADFLY_ENDPOINT_M1 = foreman|http://foreman-m1:8080|<token> (use a secret)
name: Adversarial Review (Gadfly)
@@ -49,8 +54,9 @@ jobs:
# --- named endpoints (mapped from repo vars) ---
GADFLY_ENDPOINT_BIGBOX: ${{ vars.GADFLY_ENDPOINT_BIGBOX }} # "ollama|http://192.168.1.50:11434"
GADFLY_ENDPOINT_GPU: ${{ vars.GADFLY_ENDPOINT_GPU }} # "openai|http://gpu.lan:8000/v1"
GADFLY_ENDPOINT_M1: ${{ secrets.GADFLY_ENDPOINT_M1 }} # "foreman|http://foreman-m1:8080|<token>"
# one reviewer (one comment) per model, across the aliased endpoints:
GADFLY_MODELS: "bigbox/qwen2.5-coder:7b,gpu/llama3.1"
GADFLY_MODELS: "bigbox/qwen2.5-coder:7b,gpu/llama3.1,m1/qwen3:14b"
# --- event context (leave as-is) ---
EVENT_NAME: ${{ github.event_name }}
PR: ${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}