Skip to content

fix: keep insights model metadata in sync after /model switch#22282

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/3988-insights-switch-runtime
Open

fix: keep insights model metadata in sync after /model switch#22282
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/3988-insights-switch-runtime

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • overwrite persisted session runtime metadata when an active session explicitly switches models
  • keep /insights aligned with the live provider/base URL instead of preserving stale first-write metadata forever
  • add a regression test that reproduces the stale Gemini-vs-GLM provider report and asserts the corrected insights output

Testing

  • ./scripts/run_tests.sh tests/run_agent/test_switch_model_context.py tests/run_agent/test_switch_model_fallback_prune.py -q
  • git diff --check
  • uv sync --frozen --extra all
  • uv run --frozen ruff check .
  • repo lint-diff semantics (ruff clean; ty advisory signal recorded in proof)
  • clean env -i pytest attribution against latest origin/main (30 head failures, 27 reproduced on base, remaining 3 isolated and passed on retry/base)

Fixes #3988.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: /insights shows wrong model name — displays Gemini instead of actual active model (GLM-5.1 via zai provider)

2 participants