Skip to content

fix: move model resolution from TUI handlers to runtime coordinator#663

Merged
FL4TLiN3 merged 4 commits intomainfrom
fix/move-model-resolution-to-runtime
Mar 2, 2026
Merged

fix: move model resolution from TUI handlers to runtime coordinator#663
FL4TLiN3 merged 4 commits intomainfrom
fix/move-model-resolution-to-runtime

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Mar 2, 2026

Summary

  • Fixed: perstack start create-expert executing all agents with claude-sonnet-4-5 instead of respecting each expert's defaultModelTier
  • Root cause: TUI handlers always filled in a default model before runtime started, and resolved tiers only from local perstack.toml — API-resolved experts never got tier resolution
  • Fix: Made model optional at the TUI boundary and moved resolution to CoordinatorExecutor.execute(), which resolves after setupExperts() using: explicit model > expert's defaultModelTier > middle tier fallback

Test plan

  • bun run typecheck — 23/23 packages pass
  • bun run test — all tests pass including 4 new coordinator-executor tests and 1 new delegation-executor test
  • bun run build — 23/23 packages build
  • bun run format-and-lint — no new warnings

🤖 Generated with Claude Code

FL4TLiN3 and others added 4 commits March 2, 2026 11:50
TUI handlers always filled in a default model before runtime started,
causing all experts to run with claude-sonnet-4-5 regardless of their
defaultModelTier. Now model is optional at the TUI boundary and the
coordinator-executor resolves it after expert setup, respecting each
expert's defaultModelTier from both local config and API-resolved experts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 merged commit aa43fe8 into main Mar 2, 2026
11 checks passed
@FL4TLiN3 FL4TLiN3 deleted the fix/move-model-resolution-to-runtime branch March 2, 2026 12:37
@FL4TLiN3 FL4TLiN3 mentioned this pull request Mar 2, 2026
FL4TLiN3 added a commit that referenced this pull request Mar 2, 2026
Since #663 made `model` optional in RunSetting/RunParamsInput with
tier-based auto-resolution, update all documentation and code examples
to reflect this change. Remove hardcoded model values from run() calls,
add comments explaining auto-resolution, and rewrite the default model
documentation to explain the tier-based system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3 added a commit that referenced this pull request Mar 2, 2026
* docs: update model parameter as optional in docs and examples

Since #663 made `model` optional in RunSetting/RunParamsInput with
tier-based auto-resolution, update all documentation and code examples
to reflect this change. Remove hardcoded model values from run() calls,
add comments explaining auto-resolution, and rewrite the default model
documentation to explain the tier-based system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: remove unnecessary optional model comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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