fix: auto-upgrade models below minLevel/minModel floor instead of crashing#248
Open
mark-dingwall wants to merge 1 commit into
Open
fix: auto-upgrade models below minLevel/minModel floor instead of crashing#248mark-dingwall wants to merge 1 commit into
mark-dingwall wants to merge 1 commit into
Conversation
mark-dingwall
added a commit
to mark-dingwall/zeroshot
that referenced
this pull request
Feb 1, 2026
…shing Auto-upgrade models/levels to meet minModel/minLevel floor instead of throwing. Fixes crash when running `zeroshot logs` with agents configured below the floor. Cherry-picked from PR the-open-engine#248 (covibes/zeroshot) Closes the-open-engine#162 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Auto-upgrade models/levels to meet minModel/minLevel floor instead of throwing. Fixes crash when running `zeroshot logs` with agents configured below the floor. Closes the-open-engine#162 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
adf483e to
61838fb
Compare
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.
Summary
Auto-upgrade models/levels to meet floor instead of throwing errors.
Motivation
When users set
minModelorminLevelto a higher tier, agents configured with lower models (like the hardcodedhaikuincompletion-detector) cause validation errors and crash the cluster. This affects both cluster execution (#98) and read-only operations likezeroshot logs(#162).Instead of throwing, we now auto-upgrade to the minimum required level with a warning.
Closes #162
Closes #98
Changes
lib/settings.js- auto-upgrade for minModel, warn-once loggingsrc/providers/base-provider.js- auto-upgrade for minLevel, warn-once loggingsrc/agent-wrapper.js- defensive getState() for status displaysrc/agent/agent-task-executor.js- use validated model in CLI argstests/max-model.test.js- tests for auto-upgrade behaviorTesting
Breaking Changes
None
Checklist
npm test)npm run lint)npm run typecheck)