|
tui: show the currently-served model in the status panel
The status panel's Model line was fed the global ollama_default_model, not the
session/profile model, and the server never told the client which model
actually served a call. Now:
- Backends stamp the resolved model onto LLMChunk (first chunk) / LLMResponse.
The fallback backend reports the model that survived its server+model
priority list (may differ from the profile's first choice).
- New ModelInfo event ({"type":"model_info","model":...}) emitted once per
turn from agent._consume_stream, re-emitted only when the model changes
across iterations. Additive WS event — old clients ignore it.
- TUI: attach_session/switch fetch the profile's configured model (first of
profile.model) via api.get_profile_model so the panel shows a value before
the first request; model_info then refines it to the actually-served model.
Not forwarded to the chat panel. raw CLI prints "[model] ...".
Co-Authored-By: Claude <noreply@anthropic.com>
|
|---|
|
|
| clients/terminal/api.py |
|---|
| clients/terminal/render.py |
|---|
| clients/terminal/tui/tui_app.py |
|---|
| navi/core/agent.py |
|---|
| navi/core/agent_run_context.py |
|---|
| navi/core/events.py |
|---|
| navi/llm/base.py |
|---|
| navi/llm/fallback.py |
|---|
| navi/llm/ollama.py |
|---|
| tests/clients/test_tui_app.py |
|---|
| tests/unit/core/test_agent.py |
|---|
| tests/unit/llm/test_model_stamping.py 0 → 100644 |
|---|