fix(cli): don't crash when --model is omitted from fle inspect-eval - #385
Open
phaestos2501 wants to merge 1 commit into
Open
fix(cli): don't crash when --model is omitted from fle inspect-eval#385phaestos2501 wants to merge 1 commit into
phaestos2501 wants to merge 1 commit into
Conversation
The openrouter check at the bottom of the command builder did `"openrouter" in args.model` while args.model defaults to None, so `fle inspect-eval` without an explicit --model always raised "argument of type 'NoneType' is not iterable" before launching. Assign the documented default back to args.model instead of only appending it to the subprocess command, so the openrouter check and the FLE_MODEL env var both see the model actually being used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
fle inspect-evalwithout an explicit--modelalways crashes before launching:The openrouter check near the bottom of the command builder does
"openrouter" in args.modelwhileargs.modeldefaults toNone— the documented default (openai/gpt-4o-mini) was only ever appended to the subprocess command, never assigned back toargs.model.Fix
Assign the default back to
args.modelinstead of only appending it, so the openrouter check and theFLE_MODELenv var both see the model actually being used.Verification
Reproduced the crash on main, then confirmed the same invocation proceeds to
Running: inspect eval ... --model openai/gpt-4o-mini ...after the fix.🤖 Generated with Claude Code