fix: local model switching, mid-run settings, deterministic chess endings; release 0.0.12 - #18
Merged
Conversation
…ings; release 0.0.11
- useWebLLMModel tracks the current modelId: switch it and model / ready /
loading / progress / error describe the new one (not loaded yet) instead of
the old model, which kept `ready` true and hid the load button. The previous
model stays in memory (loadedModelId; switching back is instant) until the
next load frees its GPU memory first, or unload(). A load superseded by
another one frees its engine; a second load() of the same id shares the
download.
- useAgent: a rebuild while a run is in flight (a setting changed mid-run) no
longer flips the status out of 'running'; the run keeps its agent, the next
run gets the new one, and the run's end restores the build's own status.
- Thinking: a 'none' level ("No thinking") in the composer chip and labels;
with agent-web 0.0.21 it turns a local Qwen3's thinking off.
- Demo: the model card reopens for a model that needs a key or a load, names
the local model still in GPU memory, and can unload it. Chess outcomes come
from the rules, not the model: a mate / stalemate / draw ends the game on
the spot (a mating move is never answered by the agent), with the result
over the board and in the chat; a turn the agent ends without moving (API
error, quota, stop, limit) is reported with its reason and the board stays
locked until it moves (Retry or the engine).
- e2e: chess endings, a failed agent turn, a mid-run settings change.
- Depends on @dudko.dev/agent-web ^0.0.21 (dev + demo); peer stays >=0.0.20.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A7jHa5Pim4ufrdgxg561G5
main already published 0.0.11 (the MCP SDK autoupdate), so these fixes go out as 0.0.12: devDependencies take both sides (@dudko.dev/agent-web ^0.0.21, @modelcontextprotocol/sdk ^1.32.0), the lockfile is regenerated with npm, and CHANGELOG gets a 0.0.12 entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A7jHa5Pim4ufrdgxg561G5
siarheidudko
marked this pull request as ready for review
October 3, 2026 01:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the demo problems reported after the last release.
Problem: switching local models
Report: after loading one local model, switching to another had no effect, and there was no way to load it.
Cause:
useWebLLMModelkept the loaded model acrossmodelIdchanges. Soreadystayed true, the card said "loaded", the Load button never appeared, and the agent kept using the old model.Fix:
modelId:model,ready,loading,progressanderror.loadedModelId), so switching back is instant.unloadWebLLMModel. There is also a newunload().load()twice for the same id shares one download.Problem: settings not applying
Report: settings didn't seem to apply.
Cause:
reasoning. That is fixed in the core (agent-web 0.0.21, merged as feat: local models with their real windows; useLocalModel; refreshed demo models (Kimi, Groq, Mistral, OpenRouter, Gemini Nano, transformers.js); fast answers; release 0.0.13 #19) by mapping thinking ontoextra_body.enable_thinking.Fix:
useAgentkeeps the run's status through a rebuild. The run keeps its agent, and the next run gets the new one.none) in the composer chip, the labels and the demo settings.Chess
make_movesays the game is over.Demo model card
Version
main already published 0.0.11 (the MCP SDK autoupdate, #17), so this ships as 0.0.12. I merged main in:
@dudko.dev/agent-web^0.0.21 and@modelcontextprotocol/sdk^1.32.0;The peer stays
>=0.0.20.Checks
These are after the merge.
npm test43/43, demo typecheck and build.npm run test:e2e15/15, with 3 new tests:ready: truewith model A.🤖 Generated with Claude Code
https://claude.ai/code/session_01A7jHa5Pim4ufrdgxg561G5