Skip to content

fix: auto-upgrade models below minLevel/minModel floor instead of crashing#248

Open
mark-dingwall wants to merge 1 commit into
the-open-engine:devfrom
mark-dingwall:fix/minlevel-readonly-crash
Open

fix: auto-upgrade models below minLevel/minModel floor instead of crashing#248
mark-dingwall wants to merge 1 commit into
the-open-engine:devfrom
mark-dingwall:fix/minlevel-readonly-crash

Conversation

@mark-dingwall

@mark-dingwall mark-dingwall commented Jan 31, 2026

Copy link
Copy Markdown

Summary

Auto-upgrade models/levels to meet floor instead of throwing errors.

Motivation

When users set minModel or minLevel to a higher tier, agents configured with lower models (like the hardcoded haiku in completion-detector) cause validation errors and crash the cluster. This affects both cluster execution (#98) and read-only operations like zeroshot 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 logging
  • src/providers/base-provider.js - auto-upgrade for minLevel, warn-once logging
  • src/agent-wrapper.js - defensive getState() for status display
  • src/agent/agent-task-executor.js - use validated model in CLI args
  • tests/max-model.test.js - tests for auto-upgrade behavior

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All tests pass locally

Breaking Changes

None

Checklist

  • Tests pass (npm test)
  • Linting passes (npm run lint)
  • Type checking passes (npm run typecheck)
  • Documentation updated
  • CLAUDE.md updated (if architecture changed)

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>
@mark-dingwall mark-dingwall changed the base branch from main to dev February 1, 2026 04:38
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>
@mark-dingwall mark-dingwall force-pushed the fix/minlevel-readonly-crash branch from adf483e to 61838fb Compare February 1, 2026 04:59
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.

[BUG] Logs command error: Error viewing logs: Level "level1" is below minLevel "level3" for provider "claude"

1 participant