Adds fallbackThinkingLevel plumbing so, when Fusion swaps from a primary model to a configured fallback model (executor, validator/reviewer, merger, planning, title-summarizer, heartbeat, and workflow-step lanes), the fallback's own configured thinking level is applied instead of silently reusing the primary lane's level. - Add fallbackThinkingLevel option to AgentRuntimeOptions (agent-runtime.ts), AgentOptions (pi.ts), and ReviewOptions (reviewer.ts) - Add per-lane resolvers: resolveExecutorFallbackThinkingLevel, resolvePlanningFallbackThinkingLevel, resolveValidatorFallbackThinkingLevel, resolveTitleSummarizerFallbackThinkingLevel, resolveMergerFallbackThinkingLevel (agent-session-helpers.ts), each following fallback-provider precedence and falling back to the primary lane/default thinking level when unset - Export new resolvers from packages/engine/src/index.ts - Apply the resolved fallback thinking level in createFnAgent's applyThinkingLevelIfSupported once a session has swapped to the fallback model (pi.ts) - Wire fallbackThinkingLevel through executor session creation (workflow-step, task validator, child-agent, and main executor session paths), merger session creation, and heartbeat session creation - Promote the fallback thinking level alongside the fallback model/provider when the no-visible-key Grok CLI fallback is promoted to primary, so the cleared fallback pair doesn't leave the session on the superseded primary's thinking level - Route workflow-step fallback thinking level by which fallback candidate (validatorFallback vs globalFallback) actually matched - Document fallbackThinkingLevel runtime-swap behavior in docs/settings-reference.md - Add minor changeset for @runfusion/fusion - Add regression tests covering fallback thinking-level resolution and application (agent-session-helpers.test.ts, pi.test.ts) and a shared test helper (executor-test-helpers.ts) Files changed: .changeset/fn-7794-fallback-thinking-level.md | 7 ++ docs/settings-reference.md | 3 + .../src/__tests__/agent-session-helpers.test.ts | 38 ++++++ .../engine/src/__tests__/executor-test-helpers.ts | 23 ++++ packages/engine/src/__tests__/pi.test.ts | 136 +++++++++++++++++++++ packages/engine/src/agent-heartbeat.ts | 3 +- packages/engine/src/agent-runtime.ts | 5 + packages/engine/src/agent-session-helpers.ts | 54 ++++++++ packages/engine/src/executor.ts | 31 ++++- packages/engine/src/index.ts | 5 + packages/engine/src/merger.ts | 7 +- packages/engine/src/pi.ts | 16 ++- packages/engine/src/reviewer.ts | 6 + 13 files changed, 327 insertions(+), 7 deletions(-) Fusion-Task-Id: FN-7794 Fusion-Task-Lineage: c94d621a-ccbd-42b2-9fe6-cb619418ad90 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Changeset Format Guide
Each changeset file in this directory describes one user-facing change for release notes.
Required body format
---
"@runfusion/fusion": minor
---
summary: Add a Command Center productivity control for LOC backfills.
category: feature
dev: Uses the new `fn_backfill_loc` tool; settings key `commandCenter.locBackfill`.
Fields
| Field | Required | Description |
|---|---|---|
summary |
Yes | One line, user-facing, max 120 chars. Describe what changed for the operator. |
category |
Yes | One of: feature, fix, breaking, security, performance, internal. |
dev |
No | Developer or migration detail. Preserved in per-package CHANGELOGs but excluded from distilled release notes. |
Audience
The summary is the only content that appears in end-user release notes by default. Write for Fusion operators — describe behavior, fixes, and what changed. Avoid internal class names, file paths, and implementation detail.
Bump types
patch— bug fixes, internal changesminor— new features, CLI additions, toolsmajor— breaking changes
Validation
Run pnpm check:changesets to validate. The linter runs in the PR-check gate and test:gate. Legacy freeform changesets pass with a warning during the transition period.