Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Loop options for AIRO's instrument: floor, coverage, turn limit, debrief - #3

Merged
elsehow merged 1 commit into
mainfrom
airo-parity
Oct 14, 2026
Merged

elsehow merged 1 commit into
mainfrom
airo-parity

Conversation

@elsehow

@elsehow elsehow commented Oct 14, 2026

Copy link
Copy Markdown
Member

Lets AIRO's published instrument run through pi with the same loop rules as its own litellm loop (redlines.llm.call_tools), for a shadow comparison before any cut-over.

All options are off by default, so the ForecastBench loop is unchanged (its four tests pass untouched; the registered names still match the code).

option mirrors in call_tools
floor_counts="returned" min_evidence counts every returned research call
coverage=[keys] the coverage rule: a recent_days search with cause per group
withhold_final=True the final tool not offered until floor and coverage are met
warn_missing_keys=False the final answer accepted as sent
max_turns=N max_iters, the forced last turn as for models that refuse a forced tool_choice, + 2 turns; prose replies nudged
debrief={...} _debrief_turn: merged deliveries, validator, retries
tool_parameters AIRO's tool schemas verbatim (e.g. the cause enum)

Known differences, recorded for the shadow comparison: pi cannot force tool_choice, so every model gets the ask-in-words last turn (AIRO forces it for OpenAI models); after an accepted answer or debrief pi makes one more short request; the debrief's text-only fallback for a model that returns nothing (Fable 5.1) is not ported; per-turn max_tokens is pi's model default rather than 64k/48k.

Tests: each option through the real pi with the scripted model, each checked by breaking it in pi_tools.ts.

🤖 Generated with Claude Code

pi_tools.ts gains options, all off by default so the ForecastBench loop is
unchanged: floor_counts ("returned" counts failed research), coverage (a
recent-window search tagged with each group before submission),
withhold_final (submit tools not offered until unlocked), warn_missing_keys,
max_turns (then only submit_forecast, asked for in words, two more turns,
then no tools; prose replies get a nudge), debrief (one more turn after the
answer: merged deliveries, a Python validator via tool_cli.py validate,
retries, debrief.json), and per-tool parameter schemas. Together they mirror
AIRO's redlines.llm.call_tools. harness.run passes them through and returns
`debrief` and `forced`.

Tests drive each option through the real pi with the scripted model; each
was checked by breaking it in pi_tools.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@elsehow
elsehow merged commit 10f5473 into main Oct 14, 2026
2 checks passed
@elsehow
elsehow deleted the airo-parity branch October 14, 2026 19:46
elsehow added a commit that referenced this pull request Oct 19, 2026
* tools: optional URL guard (FORECASTER_BLOCK_URL_PATTERNS), off unless set

read_page refuses a matching URL without calling Tavily (neutral error);
web_search drops matching results and AIRO-paper titles, and blanks the
answer when it dropped anything. For AIRO's anchor-guard experiment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Box: airo-dev/anchor-guard (claude)

* url guard: case-insensitive; note that commas separate patterns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Box: airo-dev/anchor-guard (claude)

* Tests for the URL guard's contract, and a README line for the variable

Cover unset and empty (nothing changes), one pattern, several patterns
split on commas and newlines, case, and a blocked search result dropped
while the others pass. One pi test hands FORECASTER_BLOCK_URL_PATTERNS
to harness.run(env=...) and checks it reaches tools.py through pi,
pi_tools.ts and the real tool_cli, with no Tavily key so nothing is
fetched. tools.py is untouched: AIRO mirrors it verbatim.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Box: agent-box-dev/url-guard (claude)

---------

Co-authored-by: Nick Merrill <nick@forecastingresearch.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f425641)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant