Skip to content

Commit a6da9da

Browse files
qazbnm456claude
andcommitted
docs: sync README + CHANGELOG with skills inject mode, output-chars knob, and litellm fix
- README/CHANGELOG: document `discovery="inject"` (read_skill-only + `render_skills_manifest` catalog injection) alongside the default list mode. - README Configuration: add the `RLM_MAX_OUTPUT_CHARS` env knob to the list. - CHANGELOG: add a Fixed entry for forcing litellm onto httpx (`disable_aiohttp_transport`) to silence the "Unclosed connector" warning. - README: mark v0.2.0 as in-development (not yet tagged/published). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3d14441 commit a6da9da

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ surfaced by dogfooding a real downstream consumer.
152152
validate → post-process pipeline; `model_as_tool` exposes extra models for LM-decided
153153
multi-model routing. *(Renamed from `make_middleware_lm` — see Changed.)*
154154
- **Skills-as-tools** (`skills.py`): `load_skills_as_tools` surfaces a Skills
155-
directory to the RLM as `list_skills` / `read_skill` tools.
155+
directory to the RLM. Default `discovery="list"` gives the LM `list_skills` /
156+
`read_skill` (discover-then-read). `discovery="inject"` returns `read_skill`
157+
only, and the caller injects the catalog into the prompt itself via
158+
`render_skills_manifest(dir)` (or reads it structurally with `discover_skills`) —
159+
skipping the `list_skills` round-trip when the skill set is small and fixed.
156160
- **Unified trajectory recording** (`trace.py`): `TraceRecorder` writes an
157161
append-only JSONL stream — main steps (`Prediction.trajectory`), every sub-LM
158162
call, every tool call — keyed by `run_id` + `step_id`. Optional Langfuse mirror.
@@ -193,6 +197,16 @@ surfaced by dogfooding a real downstream consumer.
193197
- **GEPA harness skeleton** (`optimize.py`): metric templates now; `compile_task`
194198
is a documented Phase-2 stub.
195199

200+
### Fixed
201+
202+
- **No more "Unclosed connector" warning from litellm** (`runtime.py`). litellm
203+
(dspy's LM backend) defaults to an aiohttp transport whose pooled `ClientSession`
204+
is bound to the per-run `asyncio.run` loop; when that loop closes, aiohttp logs a
205+
noisy "Unclosed connector" through the loop's exception handler. `RLMTask` now sets
206+
`litellm.disable_aiohttp_transport = True` before the first LM call, forcing litellm
207+
onto httpx so no aiohttp session is created and nothing dangles. Best-effort and
208+
idempotent — a litellm-free install just no-ops.
209+
196210
### Changed / Hardened (surfaced by dogfooding a consumer)
197211

198212
- **`RLMConfig.max_retries` now defaults to `1` (was `3`) — no whole-RLM retry by default** (`config.py`;

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ body. The list→read split is two-level **progressive disclosure**; and because
187187
these as tools inside the REPL, "which knowledge did I load" lands in the trajectory (and the
188188
RL dataset).
189189

190+
For a larger catalog you can skip the discovery round-trip: `load_skills_as_tools(dir,
191+
discovery="inject")` returns **only** `read_skill`, and you inject the catalog into the system
192+
prompt yourself with `render_skills_manifest(dir)`. The LM then sees every skill's
193+
`name` + `description` at startup (no `list_skills` call) and still pulls a full body
194+
just-in-time with `read_skill`. The default `discovery="list"` keeps the `list_skills` tool
195+
instead. See `examples/harness_run.py`.
196+
190197
Scope & caveats:
191198
- **Knowledge only.** `read_skill` returns the markdown text — it does NOT execute bundled
192199
scripts or expand linked files. A "just instructions" skill works fully; a skill that ships
@@ -360,8 +367,8 @@ tends to retry verbatim. Isolation is unchanged; `RLMTask` owns the teardown.
360367
All via env (`RLMConfig.from_env()`): `RLM_MAIN_MODEL` (or `AI_MODEL_NAME`),
361368
`RLM_SUB_MODEL` (or `SUB_AI_MODEL_NAME`), `RLM_API_KEY` (or `AI_API_KEY`),
362369
`RLM_BASE_URL` (or `AI_BASE_URL`), `RLM_INTERPRETER`, `RLM_ADAPTER`,
363-
`RLM_MAX_TOKENS`, `RLM_ALLOW_INSECURE_SANDBOX`, `RLM_MAX_ITERATIONS`,
364-
`RLM_MAX_LLM_CALLS`, `RLM_MAX_RETRIES`, `RLM_OBSERVE`.
370+
`RLM_MAX_TOKENS`, `RLM_MAX_OUTPUT_CHARS`, `RLM_ALLOW_INSECURE_SANDBOX`,
371+
`RLM_MAX_ITERATIONS`, `RLM_MAX_LLM_CALLS`, `RLM_MAX_RETRIES`, `RLM_OBSERVE`.
365372

366373
The `AI_*` fallbacks let the kit drop into projects already keyed on those vars
367374
without re-keying env; the `RLM_*` form wins when both are set.
@@ -420,7 +427,8 @@ invariants when modifying the kit.
420427

421428
## Status
422429

423-
**v0.2.0** — scaffold + harness-engineering layer (sub-LM hook, skills-as-tools,
430+
**v0.2.0** (in development — not yet tagged or published to PyPI; the version is the
431+
target) — scaffold + harness-engineering layer (sub-LM hook, skills-as-tools,
424432
trajectory recording, replay, dataset export). Hardened by dogfooding against a
425433
real downstream consumer; the changes that surfaced are in [`CHANGELOG.md`](https://github.com/qazbnm456/rlm-kit/blob/main/CHANGELOG.md).
426434

0 commit comments

Comments
 (0)