You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fix] fix startup summary model banner resolution (#305)
* fix startup summary model banner resolution
* fix: use runtime config for startup model resolution
Keep registration-time plugin overrides from api.pluginConfig, but always source the OpenClaw config surface from the best validated runtime config available. This fixes the startup ordering where pluginConfig is ready before api.config, so the compaction banner and summarizer fallback both see the configured default model. Also add a regression test for that ordering, relax the provider-config loadConfig call-count assertion to match the earlier registration lookup, and add a patch changeset for the user-visible startup behavior fix.
Regeneration-Prompt: |
Address the PR review finding that registration-time config resolution still broke when
OpenClaw populated api.pluginConfig before api.config. Preserve the intended behavior of
preferring api.pluginConfig for lossless-claw-specific overrides, but stop coupling that to
the top-level OpenClaw config used for default and compaction model discovery.
Update the registration tests to cover the startup order where runtime.config.loadConfig()
contains the default model while api.config is still empty, and verify both the startup
banner and resolveModel() pick up that default. Because registration now consults runtime
config earlier, adjust any overly strict tests that asserted an exact loadConfig call count.
Since the startup banner output changes for users, include a patch changeset.
* test: align rebased startup-banner assertions
Current main logs startup banner messages through the plugin logger info path instead of console.error. Update the rebased PR 305 registration-order tests to assert the current logging surface so the branch reflects the intended startup-model fix and the targeted test run stays green.
Regeneration-Prompt: |
Rebase the old PR 305 startup-model fix onto current origin/main and resolve conflicts without losing main's newer registration diagnostics and logger plumbing. After the rebase, re-run the targeted registration/provider-config tests and account for any drift caused by current main no longer emitting startup banner lines through console.error. Preserve the actual runtime-config fallback behavior being tested; only update the assertions to match the current info-log surface used by registration startup banners.
---------
Co-authored-by: Josh Lehman <josh@martian.engineering>
0 commit comments