Skip to content

fix(solver): don't send OpenRouter transforms to every provider - #390

Open
phaestos2501 wants to merge 1 commit into
JackHopkins:mainfrom
phaestos2501:fix/controlled-solver-transforms
Open

fix(solver): don't send OpenRouter transforms to every provider#390
phaestos2501 wants to merge 1 commit into
JackHopkins:mainfrom
phaestos2501:fix/controlled-solver-transforms

Conversation

@phaestos2501

Copy link
Copy Markdown
Contributor

Problem

factorio_controlled_solver hardcodes 'transforms': ['middle-out'] into the GenerateConfig for every generate call. transforms is an OpenRouter-specific option, and current inspect-ai validates GenerateConfig strictly, so every step of every lab-play run fails with:

Value error, Unknown GenerateConfig field(s): transforms. Use extra_body for provider-specific options.

The model is never called and every task scores 0, regardless of provider.

Fix

Guard the option behind an openrouter model-name check, matching the pattern already used at the other generate sites in solver.py and solver_variants.py.

Note: on current inspect-ai the guarded sites will also need migrating to extra_body for OpenRouter runs (per the validation error's guidance). Left out of scope here since it changes OpenRouter-path behavior; happy to follow up.

Verification

Before: an fle inspect-eval run (iron_plate_throughput, deepseek-v4-flash via openai-api/) logged the validation error at every step, zero assistant messages, score 0. After: the same run completes with the model responding normally (score 1.0).

🤖 Generated with Claude Code

The controlled solver hardcoded 'transforms': ['middle-out'] into
GenerateConfig for every generate call. transforms is an
OpenRouter-specific option, and current inspect-ai validates
GenerateConfig strictly, so every step of every lab-play run fails
with "Unknown GenerateConfig field(s): transforms" regardless of
provider — the model is never called and tasks score 0.

Guard it behind an openrouter model-name check, matching the pattern
already used at the other generate sites in solver.py and
solver_variants.py. (Those guarded sites will still need migrating to
extra_body for OpenRouter runs on current inspect-ai, per the
validation error's guidance — left out of scope here since it changes
OpenRouter behavior.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant