Skip to content

Fix/resolve model tier aliases at dispatch#10

Open
superbusinesstools wants to merge 6 commits intooxgeneral:mainfrom
superbusinesstools:fix/resolve-model-tier-aliases-at-dispatch
Open

Fix/resolve model tier aliases at dispatch#10
superbusinesstools wants to merge 6 commits intooxgeneral:mainfrom
superbusinesstools:fix/resolve-model-tier-aliases-at-dispatch

Conversation

@superbusinesstools
Copy link
Copy Markdown

  1. feat(models) — adds Claude Opus 4.7 to the tier map and TUI model pickers (claude + opencode) — this was the pre-existing diff on the branch
  2. fix(orchestrator) — resolves tier aliases at dispatch time so any agent YAML storing balanced/capable/fast as the model works correctly without needing migration

superbusinesstools and others added 5 commits April 17, 2026 13:35
Pressing Enter inside wizard textareas (goal/task/agent descriptions) adds a
newline — there was no Linux-friendly way to confirm. Ctrl+Enter is
indistinguishable from Enter in most Linux terminals, so the only confirm path
was unusable.

Ctrl+S now confirms any textarea step in FormWizard. It is surfaced in the
bottom CommandBar, which switches to step-specific hints while a wizard is
open (bold amber Ctrl+S for textareas, step-appropriate hints for
text/select/multiselect).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two small UX fixes:

* Empty single-line inputs rendered the cursor after the placeholder, making
  it look like the cursor was floating mid-line. Render cursor before
  placeholder so it sits at column 0, matching user expectation.
* Reopening the edit-agent wizard immediately after saving showed the pre-save
  values because refreshAll() is async. Merge the returned agent into
  liveAgents synchronously in the save callback, and add liveAgents to
  launchEditAgentWizard's dependency array so the wizard uses the latest
  snapshot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Convenience scripts for testing a local build against the globally-installed
orch binary. dev-link.sh builds and npm-links the fork; dev-unlink.sh
restores the global install.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents whose YAML stored a semantic tier name (capable/balanced/fast)
instead of a concrete model string would pass the alias directly to the
adapter CLI (e.g. --model balanced), causing a 404 from the API.

Now resolves any tier alias to the adapter-specific model string at
dispatch time, making legacy YAML files safe without requiring migration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oxgeneral
Copy link
Copy Markdown
Owner

Great follow-up — the live tier-alias idea (so agents automatically ride the new flagship when MODEL_TIER_MAP is bumped) is a nice piece of engineering. Isolated from the PR #9 stack, this change is just +11 / −2 lines across 3 files, very clean. Opus 4.7 is the correct current flagship.

A few questions/asks before merge — nothing blocking, but worth clarifying:

❓ Motivation for resolving at dispatch

Right now both agent-factory.ts:27 and wizardConfigs.ts:167 already resolve tier → concrete model at agent creation time. So freshly created agents never store 'capable' in their YAML. Could you clarify which case this PR targets?

  • (a) Backward-compat for older agent YAMLs stored before model-tiers.ts existed?
  • (b) A new intentional capability — let users store tier aliases in YAML on purpose and have them re-resolve on every dispatch (so claude-opus-4-6claude-opus-4-7 migration is automatic)?
  • (c) Accommodating hand-edited YAML?

If (b), it's worth a small companion change: the agent edit wizard could offer a "Use tier (capable/balanced/fast)" option alongside concrete model picks — otherwise the capability exists but has no user-facing way to opt in. A one-line README/CHANGELOG note explaining the semantic would also help.

🟡 Missing orchestrator test

The resolve logic touches core dispatch in orchestrator.ts but isn't covered by tests. Without one, a future refactor could silently drop the resolve step. Sketch (~10 lines) for test/unit/application/orchestrator.test.ts:

it('resolves tier alias in agent config before dispatch', async () => {
  const agent = makeAgent({ adapter: 'claude', config: { model: 'capable' } });
  // spy adapter.execute; run a tick; assert call.config.model === 'claude-opus-4-7'
});

There's also no assertion anywhere that claude.capable === 'claude-opus-4-7' — if model-tiers.test.ts exists it'll need an update; if not, this is a good opportunity to add one-line coverage.

🔵 Nits (optional)

  • CLAUDE_MODELS now has two entries labeled "most capable" (4.7 and 4.6). Consider renaming the 4.6 hint to 'previous flagship' or 'legacy' so the picker has a single clear top choice.
  • openrouter/anthropic/claude-opus-4.7 — have you verified this slug exists in OpenRouter's catalog today? A stale slug would 404 at dispatch from the opencode adapter.

🧵 Workflow — stacked on PR #9

This PR includes all three commits from PR #9. Since PR #9 has a blocker (Ctrl+S conflict with launchShopWizard at App.tsx:1808), how would you like to proceed?

I'm fine with either. Let me know what fits your workflow.

Also heads-up: CI hasn't run on this PR yet because it inherits the same "first-time contributor" workflow gate as PR #9. I'll click Approve and run once the above is sorted so we see a green test check.

Thanks again — two solid PRs in a day is a rare signal 🙌

…ier aliases in wizard

- model-tiers: update opencode.capable to claude-opus-4.7 (matches wizardConfigs)
- wizardConfigs: rename opus 4.6 hints 'most capable' → 'previous flagship' so
  there is one clear top choice; add capable/balanced/fast tier aliases as wizard
  options so users can opt into live tier resolution without hand-editing YAML
- model-tiers.test.ts: update claude capable assertion to 4-7 (was failing); add
  explicit named assertion so a future bump is impossible to miss
- orchestrator-tier-aliases.test.ts: 4 new tests covering capable/balanced/fast
  alias resolution and concrete model pass-through at dispatchTask time

Co-Authored-By: Claude Sonnet 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.

2 participants