Emit the existing model-setup-changed signal after successful preset selection or override clearing. The setup gate checks its original chat and retries the retained prompt automatically, preserving new composer drafts and ignoring failed saves.
Validation: 67 focused gate, selector, model-config, and DOM tests passed; the 11 gate tests passed again after final cleanup. Live Docker WebUI checks verified automatic retry after selecting a ready preset and clearing an unconfigured override, with the draft and original chat target preserved.
Every send paid a blocking model_config_get round-trip before dispatching, because the frontend had to know whether a chat model is configured to decide between sending and rendering the setup card. Move the check behind the dispatch: a user_message_ui extension in _model_config flags unconfigured chats, the message handlers reject before logging or dispatching and return a model_not_configured payload, and the client opens the setup gate from that response. Isolated sends no longer make any configuration round-trip, the optimistic user row and draft handling stay intact through the gate flow, and the post-setup retry drops its bypass flag since the backend re-checks on dispatch.
Validation: pytest tests/test_model_gate_backend_reject.py tests/test_welcome_composer_static.py tests/test_webui_chat_deletion.py tests/test_webui_send_pause_responsiveness_static.py tests/test_message_action_buttons_static.py tests/test_markdown_tilde_rendering.py tests/test_webui_message_queue_static.py (23 passed); node --check webui/index.js webui/components/chat/model-gate-store.js
The model field sent its current text as a server-side search query, so typing MiniMax-M3 filtered the provider list down to the exact match and hid sibling models that exist in the catalog. The field now always requests the full provider list and relies on the existing client-side groupResults ranking to surface current-input matches first, so the whole catalog stays visible without requerying while typing.
Validation: pytest tests/test_model_search_controller.py tests/test_model_search.py tests/test_model_config_ui.py tests/test_onboarding_static.py (29 passed, controller test asserts empty query and draft/provider/base stale-discard).
The switcher raised its loading flag on every refresh, so the chat or agent profile switch unmounted the whole selector button and the label flashed away until the fresh state arrived. Raise the flag only on the first load when no presets are known yet and let background refreshes replace selector state in place under the existing sequence guards.
Validation: pytest tests/test_chat_loading_refresh.py (12 passed, new regression fails without the fix) and node --check on the mixin on the framework runtime.
Remove the running-context guard from the agent profile endpoint and the switcher so a profile can be changed during an active monologue, matching chat model-preset overrides. Enable the switcher dropdown items while running by dropping the running gate from their disabled state; only the saving gate remains. The new profile applies to subsequent model turns and intentionally forfeits the prompt cache. Subordinate agents keep their own profile configs.
Validation: 73 subagent profile tests passed including a new endpoint test that switches the profile while a real task is running; static regression tests guard against reintroducing the running guard in the endpoint, switcher mixin, and dropdown markup; node --check passed on the switcher mixin.
Venice and Agent Zero API missed automatic cache hints because the transport
only recognized a fixed set of provider routes. Default both to stable
prompt_cache_key routing and expose a0_prompt_cache_mode through the existing
Additional parameters field for custom providers.
Support cache keys, cache_control markers, automatic detection, and disabling
automatic hints. Preserve explicit caller keys, keep marked requests on Chat
Completions, and strip the internal control before either provider API call.
Document the configuration and add regression and installed-SDK HTTP coverage.
Validation: 316 targeted tests passed in the live Docker framework runtime;
git diff --check passed. Full suite and upstream cache-hit measurements were
not run.
Cap preset and agent profile menus to the space above the selector when
opening or resizing the window. Keep the full scroll track reachable
without changing its width, and preserve shared overflow positioning.
Add browser regression coverage for short viewports, resize, native
scrollbar dragging, wheel scrolling, and preset selection through overflow.
Update the plugin contracts and README.
Validation: 11 focused tests passed; live UI verified at localhost:32081.
Run model/profile, context-usage and goal display refreshes independently
of snapshot rendering so chat switches do not wait for their API calls.
Guard refreshes and save completions by request sequence and selected chat.
Pending saves still finish for their original chat, while late responses
cannot replace the current selector state or finish a newer loading cycle.
Add deterministic pending-request and save-race regressions and update
the owning plugin contracts.
Validation: 94 focused tests passed for the loading change, followed by
47 focused tests after the model/profile race fixes. Live checks at
localhost:32081 covered delayed API responses, rapid chat switching,
late profile/preset/clear saves, and desktop/mobile behavior.
The Anthropic thoughts-prompt hook previously activated only when the
provider or model name contained "anthropic". Claude models exposed by
third-party or OpenAI-compatible providers without that identifier
therefore missed the prompt adaptation.
Extend the existing detection with a case-insensitive "claude" match
in the effective main model name, regardless of provider. Preserve the
existing "anthropic" match in either the provider or model name.
Keep the public-action-summary substitutions and prompt scope unchanged.
Preserve shared prompt templates, the thoughts JSON field, saved history,
custom wording, and native protocol projection. Do not change transport
error handling or suppress provider content-policy errors.
Add regression coverage for Claude-only model names across OpenRouter,
OpenAI-compatible, Vertex AI, Bedrock, and generic providers, plus mixed
case and negative cases. Update the plugin contract and README.
Validation:
- Reproduced five failing Claude-only cases before the fix.
- Passed 99 targeted prompt, model-config, and onboarding tests using
/opt/venv-a0/bin/python.
- Passed git diff --check.
Live A0 API/provider behavior was not retested; this fixes the detection
gap but does not establish that every provider refusal is resolved.
The preset editor builds its draft as soon as it renders. The store's
loaded flags stay set after the first open, so later opens showed the
previous preset list and fell back to Default when the requested preset
was new. Saving that stale draft deleted presets created elsewhere:
another tab, the API, or a plugin.
Reload the global presets and resolve the initial preset in an
open_modal_before hook, so every open starts from fresh data, including
/presets, which opens the modal without openPresetEditor(). The modal
now appears after that reload; the editor still renders at once from the
fresh store data, so its footer stays pinned.
Verified with a behavioural regression test and the full suite (2171
passed, including the new test; the same 5 failures as 0efb0d4f).
Fixes#1928
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Target x-icon children in the model search button so the magnifier and loading spinner share the same grid cell. The stale span selector placed the spinner in a second row after the icon migration. Document the alignment contract.
Validation: 9 focused tests passed; verified centered icons during loading in the live WebUI at localhost:32081.
Model config resolution called get_presets() about 25 times per model
call, re-parsing presets.yaml and the fallback collection each time.
Cache the parsed collection in model_presets(plugins), keyed by the
stat signature of the user, fallback and legacy config files, and
return deep copies. save_presets and reset_presets clear the area;
plugin watchdog clears and file signature changes cover other writers.
Keep failure-derived fallbacks uncached so temporary read errors in
any of the three sources recover without a file edit. Missing files
still allow caching. Cover cache reuse, independent copies, save and
out-of-band invalidation, and recovery from each source's read failure.
Document the cache contract.
Validation: 88 focused tests, including 40 preset tests, passed with
this change alone on the original base in the Docker framework runtime.
Earlier live measurements: get_effective_config dropped from 36.2 ms
to 0.5 ms per call; Agent.get_chat_model fell from 250-350 ms to
5-14 ms per turn.
Add a model-config Agent.read_prompt extension that adjusts two bundled
thoughts instructions when the effective main provider or model name
contains anthropic, case-insensitively. This also covers Anthropic models
routed through OpenRouter and named Bedrock endpoints.
Request public action summaries while preserving the thoughts JSON field,
shared prompt files, saved history, custom wording, and other models.
Apply the same adjustment to standalone communication reads so native
protocol projection continues to match the rendered main prompt.
Add regression coverage for provider matching, unaffected models and
custom text, and native prompt projection. Document the scoped behavior.
Validation: 125 focused tests passed across this and the refusal-handling
change. Live Opus 5.5 WebUI checks using the Anthropic API preset completed
a greeting and a terminal calculation with visible thoughts and valid
tool JSON. OpenRouter routing was verified by unit tests.
Keep composer selectors on one row with x-overflow and open their existing
menus from the overflow list. Preserve plugin controls, live avatars and
percentage rings, Alpine state, and mouse, touch, and keyboard interaction.
Fit submenus within the available space and tolerate fractional-pixel
rounding at browser zoom levels. Add DOM and native Chromium zoom
regressions and document the shared directive's contracts.
Validation: 57 focused WebUI checks and 10 context-window checks passed.
Verified the live UI at 100%, 110%, 150%, and 175% browser zoom. Two existing
startup favicon assertions remain unrelated failures.
- Notification modal: expose a toast-compatible scope so action buttons authored against toast.toastId keep working when notification message HTML is rendered through x-html inside the notifications modal; dismissToastAndReload now resolves the notification id even when the toast is no longer in the stack, and dismissToast marks the notification read instead of being a silent no-op.
- Preset editor: keep the select DOM selection in sync with Alpine's selectedKey via :selected on options, so the editor opens showing the actual preset and selecting Default works on first click (x-model syncs before x-for renders options, leaving the DOM on the first option with no change event when clicked).
- Add regression tests for both fixes.
Separate reading the configured key value from selecting a runtime key.
Settings and key reveal retain the complete comma-separated list; model
calls keep the existing rotation and provider hooks. Runtime-only OAuth
placeholders are not treated as configured keys.
Keep the existing 6.5x Git-version-cache save optimization unchanged.
Verified 24 focused settings/profile tests, 30 model-key tests, and the
Docker framework getter/cache/OAuth suite, including alias preservation
and the configured-key versus runtime-hook boundary.
Add editor context to parser failures so an invalid draft can be located
after switching presets. Reuse the existing model-section titles and keep
parsing independent of UI state; title lookup occurs only on errors.
Validation: non-selected invalid drafts covered for all four slots. Live
Save identified Venice Main Model while Codex was selected and made zero
preset writes. Final root suite: 1641 passed, one skipped.
Extend the existing provider/base request guard with model-draft identity
and the submitted query. Preserve the single-request loading lifecycle and
allow a fresh search after stale results are rejected.
Validation: 8 controller/UI tests passed, covering query, draft, provider
and base changes. Live editor accepted fresh results and discarded a delayed
response after changing the query; test drafts were not saved.
Reuse before/after preset snapshots and their Default definitions when
checking save/reset embedding changes. This removes per-preset collection
loads while preserving inheritance, reference repair and change notifications.
Keep single-preset selection resolution unchanged; add no persistent cache.
Validation: 36 preset tests passed, including inherited and explicit embedding
changes. Framework profiling reduced collection reads from 35 to 2 and YAML
parses from 70 to 4. Live unchanged saves of 15 presets measured 51.7 ms median,
down from the prior 1170.8 ms baseline, with validation enabled and preset
contents unchanged.
Reject malformed structured values and invalid KEY=VALUE lines with a
standard notification, retaining plain-string compatibility and editable
drafts. Reparse every model slot before preset or API-key persistence so
failed blur validation cannot silently save stale kwargs.
Validation: 51 focused model-config tests passed, followed by 8 final handler
and parser checks. Live invalid JSON produced an error and zero save requests;
corrected input parsed successfully. Unchanged-preset measurements showed no
measurable save-time regression: 1.171 s baseline vs 1.156 s proposed medians.
Do not replace an empty or failed OAuth catalog with models from the generic LiteLLM registry. Use existing auth metadata to preserve account boundaries while retaining labeled, unverified registry suggestions for API-key providers.
Consume detailed discovery results in the model picker, report failures through safe standard notifications, and discard responses for a changed provider or endpoint. Verified with 106 focused tests, a real Codex account catalog lookup, and live picker failure/source checks without saving presets.
Strip the internal a0_api_mode flag at the shared embedding request boundary for every provider. Repair Venice preset migration so chat-only parameters are removed from embedding slots while valid embedding kwargs are preserved.
Render API keys, access tokens, client secrets, and similar non-password credentials as masked text inputs so browsers do not offer to save them as passwords. Preserve readable placeholders and reveal controls while leaving genuine password fields unchanged.
Expose timeout and max-token controls only in the visible Vision sidecar advanced settings, defaulting to 300 seconds and 2000 tokens, and pass them through the model builder.
Point prompt customization to Agent Editor and promote legacy kwargs into the dedicated preset fields.
Expose extension slots beside the model/profile strip and at the end of Interface visibility controls.
Let plugin stores register responsive visibility defaults without coupling shared WebUI components to a specific affordance.
Keep profile catalog reads lightweight by detecting sparse editor overrides without building removal plans for every agent.
Use the chat snapshot refresh as the single switch trigger and share concurrent same-context catalog requests while preserving newest-context-wins behavior.
Centralize omission of the internal default profile in the shared presentation catalog and keep status reporting intact for existing chats. Align Settings, model-switcher, Connector, Telegram, and selector contracts with focused regressions.
Rebase new-agent drafts when scope changes, recompute Review paths, preserve authored creation metadata, and align client validation with backend prompt requirements.
Guard pending removals and stale manager transitions from discarding edits, let only the newest profile-catalog request own selector state, and hide stale rows during refresh.
Finish the themed, responsive Easy and Advanced presentation and exercise the real Alpine stores with controlled state and request-order regressions.
Add per-scope availability, duplication, active-profile status, and inline project selection while keeping the profile switcher synchronized with runtime state.
Reconcile unavailable profiles at explicit disable, deletion, project-transition, and context-creation boundaries; polish validation, prompt layout, deletion, and completion states; and extend focused backend and WebUI coverage.
Refine the Easy and Advanced surfaces with direct prompt editing, visible tool controls, compact transfer lists, per-row profile actions, and clearer review and removal states.
Reuse the shared compact model preset selector, improve responsive layouts and copy, and extend focused WebUI contracts for the polished behavior.
Add the Easy and Advanced editor modal, its single Alpine store, profile-switcher entry points and avatars, and the fresh-chat handoff after a successful save.
Restore focus across the shared modal stack and lock down the current interaction contracts as a stable baseline for the dedicated visual-polish phase.
Stop scanning every global model preset for missing credentials when building Welcome banners. Keep readiness scoped to the effective model configuration so first-send setup remains in the deferred chat gate.
Add regression coverage for unused OpenRouter presets and document the boundary.
Introduce the x-icon custom element and migrate first-party WebUI and bundled plugin markup while retaining legacy Material icon compatibility. Defer icon-font readiness until the splash-installed document is parsed so Firefox does not leave icons transparent. Centralize chat message collapse handling, avoid false Show More controls on short user messages, and align grouped-message pagination styling. Update DOX and add regression coverage for the icon and collapse behavior.
Make model presets a single global collection and treat presets as reusable setups (main, utility, embedding). Persisted scope configs now store only a preset name (Default is always present and immutable); project-scoped preset definitions were removed and attempts to edit/reset project presets are rejected. Add embedding-model support throughout: include embedding slot in presets, surface embedding in the switcher and override APIs, and notify extensions when the effective embedding model changes. Implement rename/retire propagation to update plugin configs, saved chats, and live AgentContext objects when preset names change or presets are removed. Update CLI/integration commands to use an "inherit" action for returning to the scoped preset and to report the effective scoped-or-chat preset. Add startup migration/bootstrap to initialize presets from remote or bundled fallback and numerous docs/UI text updates to reflect the new preset model. Extra: refactor config resolution helpers and add safety checks (validation, atomic writes) when saving presets.
Treat the Current project config selection as inherited when no project-scoped model config exists, even when the UI omits scope metadata.
Cover the browser-normalized save payload so project saves do not create _model_config/config.json.
Add a confirmed Reset to default action to the preset editor and refresh its draft after resets from either entry point.
Resolve the toast helper at action time so resetting model settings cannot abort before removing the preset override. Rename the generic reset action for clarity and add regression coverage.
Reset additional parameters together with the custom API base when a model provider changes, preventing stale provider-specific options from leaking into the new provider.
Update the model-config contract and README, and extend the focused frontend regression check.
Simplify provider cards and model-slot copy, align model pickers with the main model configuration UI, and infer a sole connected OAuth provider only when it does not silently replace a different saved provider.\n\nAdd focused static coverage for the updated picker and provider-default behavior.
Create local preset drafts and handle add, remove, and save actions through modelConfig.createPresetEditor so the HTML remains declarative.
Document the project-wide Alpine expression boundary and keep the plugin contract specific to preset editor ownership.
Give each preset editor row a stable UI-only key so Alpine does not reuse nested model state after a middle row is removed.
Add a regression guard and document the row identity invariant in the model-config plugin contract.
Repair saved _model_config user config and presets so Venice model slots use chat completions with the Venice system prompt disabled. Leave a0_venice slots untouched and add regression coverage for parsing and slot preservation.
Set the bundled model config, Balance preset, and onboarding OpenRouter default to anthropic/claude-sonnet-5. Refresh the model config README example to match.
Move missing-model setup out of the welcome screen and into an in-thread gate that preserves the pending prompt, survives refresh, and auto-dispatches after a usable model is configured.
Reuse existing onboarding, OAuth account settings, and advanced model configuration surfaces instead of duplicating provider forms. Connected OAuth accounts can now populate Main and Utility defaults when no chat model is configured.
Update model readiness checks, focused static regressions, and DOX contracts for the new deferred setup flow.