Agent harness for openrouter provisioned open weights models in the glas-harness framework of helix-forge.
Find a file
tegwick 864ff4c124 Record live-verified OpenBao path (GLAS-WP-0002-T02 closed)
Real AppRole login, real KV v2 read, real OpenRouter call, real commit,
with OPENROUTER_API_KEY explicitly unset. Full build record in
ops-mason/plans/rein-openweights-openrouter-approle.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-27 01:53:31 +02:00
examples Bootstrap rein-openweights: minimal agentic loop over OpenRouter (REIN-OW-WP-0001) 2026-07-26 13:37:09 +02:00
src/rein_openweights Bootstrap rein-openweights: minimal agentic loop over OpenRouter (REIN-OW-WP-0001) 2026-07-26 13:37:09 +02:00
tests Bootstrap rein-openweights: minimal agentic loop over OpenRouter (REIN-OW-WP-0001) 2026-07-26 13:37:09 +02:00
workplans Close out statehub-register bootstrap housekeeping (REIN-OW-0001) 2026-07-26 19:46:21 +02:00
.custodian-brief.md chore(consistency): sync task status from DB [auto] 2026-07-26 19:46:36 +02:00
.gitignore Close REIN-OW-WP-0001-T05: repo attached to Forgejo, registered with State Hub 2026-07-26 14:14:09 +02:00
AGENTS.md Close out statehub-register bootstrap housekeeping (REIN-OW-0001) 2026-07-26 19:46:21 +02:00
INTENT.md Record live-verified OpenBao path (GLAS-WP-0002-T02 closed) 2026-07-27 01:53:31 +02:00
LICENSE Initial commit 2026-07-26 10:06:03 +00:00
pyproject.toml Bootstrap rein-openweights: minimal agentic loop over OpenRouter (REIN-OW-WP-0001) 2026-07-26 13:37:09 +02:00
README.md Bootstrap rein-openweights: minimal agentic loop over OpenRouter (REIN-OW-WP-0001) 2026-07-26 13:37:09 +02:00
SCOPE.md Close out statehub-register bootstrap housekeeping (REIN-OW-0001) 2026-07-26 19:46:21 +02:00
WORK-RECORDS.md Regenerate WORK-RECORDS.md 2026-07-26 19:46:56 +02:00

rein-openweights

An agentic tool-use harness that drives current open-weight models via OpenRouter, as an alternative to the frontier-model-vendor harnesses (Claude Code, Grok CLI, Codex/GPT CLI).

Part of the glas-harness "rein" family — see glas-harness ADR-001, ADR-002 (credential ownership), and this repo's workplans/REIN-OW-WP-0001.

Uses its own minimal OpenRouter client (src/rein_openweights/openrouter_client.py), not llm-connect's OpenRouterAdapter — that adapter's execute_prompt(prompt: str, config) takes a single prompt string and never surfaces message.tool_calls, so it can't drive a multi-turn tool-calling loop without a breaking change to llm-connect's frozen Core ABC. llm-connect stays an optional dependency (see pyproject.toml), not load-bearing for the base loop.

Not yet pushed to Forgejo — local scaffold only.

Usage

python3 -m venv .venv && source .venv/bin/activate
pip install -e .

# Credential: either export OPENROUTER_API_KEY directly, or set
# REIN_OPENWEIGHTS_APPROLE_DIR / REIN_OPENWEIGHTS_OPENROUTER_KV_PATH for
# OpenBao-based acquisition (see src/rein_openweights/credentials.py).
export OPENROUTER_API_KEY=sk-...

rein-openweights run --task-file examples/task-hello-sandbox.json --no-hub

Tests: python3 -m pytest tests/ -q (26 tests, no network/OpenBao calls — everything mocked at the httpx/bao subprocess boundary).