Skip to content

fix(desktop): local-as-last-resort reads Off when unset, like the agent (ATO-1643) - #1701

Draft
sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
fix/ato-1643-fallback-local-off
Draft

sosidudku1 wants to merge 2 commits into
rel/xp-buildfrom
fix/ato-1643-fallback-local-off

Conversation

@sosidudku1

Copy link
Copy Markdown
Collaborator

What

Settings > Fallback showed "Use local models as the last resort: On" and drew the local model at the end of the chain when llm.fallback.appendLocal was not written in the config. The agent does the opposite: since v0.7.0 it only appends the local model when the value is true (DEFAULT_APPEND_LOCAL = false in src/llm/fallback/fallback-config.ts). The turn gate had the same old default, so its "running this turn through the fallback chain" notice could promise a local fallback that never runs.

Now both places in desktop/renderer/renderer.js read an unset value as off:

  • llmFallbackView(): appendLocal = fb.appendLocal === true
  • localTurnGate(): appends the local model only when fb.appendLocal === true

The toggle already writes the flipped view value, so turning it on from Off writes true as before.

Why

The screen should show what the agent actually does.

Tests

New desktop/test/fallback-append-local-default.test.mjs: no fallback block, a block without the key, true and false, plus a check that the turn gate no longer uses the unset-means-on test.

Verification

  • MBP: npm run test:unit in desktop/ (the new file).
  • Manual: remove llm.fallback from ~/.atomic-agent/config.json, open Settings > Fallback: the switch reads Off and no local model sits in the chain. Turn it on: the config gets appendLocal: true and the local model appears last.

Not yet checked on the second Mac.

… value (ATO-1643)

Since v0.7.0 the agent leaves the local model out of the fallback chain
unless llm.fallback.appendLocal is true. The desktop read an unset value
as on, so Settings > Fallback showed On with the local model in the chain
and the turn gate promised a fallback the agent never runs. Both places
now treat unset as off, like DEFAULT_APPEND_LOCAL.

This branch has not been deployed

No deployments
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