feat: add TUI /model — provider/model config CRUD and between-turns model switch#3
Merged
Merged
Conversation
…-turns switch Wire the TUI /model command end to end: model.* RPC handlers (options / save_key / disconnect / add_model / remove_model); a config.set "model" branch that rebuilds the live provider and reassigns the agent loop so a switch takes effect on the next turn (guarded by is_turn_active); ProviderConfig.models for the manual picker catalogue; the custom provider routed through LiteLLM; and a base LLMProvider.chat_stream non-streaming fallback so non-litellm providers degrade gracefully instead of crashing. Frontend: the model picker gains an api_base input, inline model add/delete, and a structured switch through config.set; openrpc-derived types regenerated. Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
Kendrick-Song
added a commit
that referenced
this pull request
Jul 22, 2026
- Move _everos_server.py from raven/cli/ to raven/plugin/memory/everos/ _server.py to fix plugin->cli layering violation (CR #1) - Split HTTP timeout: client default 60s (recall/health), memorize add/flush per-request 360s (CR #2) - Defer backend.start() to post-handshake background task in TUI so first render is not blocked by server startup (CR #3) - Remove unused app_id/project_id from ImportSession and scanner (CR #4) - Add note on per-source-unit checkpoint granularity (CR #5) - Add fcntl file lock to prevent concurrent server spawn race (CR #6) - Fix loguru %s format to {} in state.py (CR #7) - Fix docstring step numbering (CR #8) - Remove redundant Table import in status_cmd (CR #9) Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
Kendrick-Song
added a commit
that referenced
this pull request
Jul 22, 2026
- Move _everos_server.py from raven/cli/ to raven/plugin/memory/everos/ _server.py to fix plugin->cli layering violation (CR #1) - Split HTTP timeout: client default 60s (recall/health), memorize add/flush per-request 360s (CR #2) - Defer backend.start() to post-handshake background task in TUI so first render is not blocked by server startup (CR #3) - Remove unused app_id/project_id from ImportSession and scanner (CR #4) - Add note on per-source-unit checkpoint granularity (CR #5) - Add fcntl file lock to prevent concurrent server spawn race (CR #6) - Fix loguru %s format to {} in state.py (CR #7) - Fix docstring step numbering (CR #8) - Remove redundant Table import in status_cmd (CR #9) Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
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.
Change description
What changes:
model.*RPC handlers:model.options/save_key/disconnect/add_model/remove_model. The model-name source is the user's manual config (providers.<slug>.models). OAuth providers are gated to the terminalraven provider login;api_baseis required for custom/azure.config.setgains amodelbranch that persistsagents.defaults.model(+ provider), rebuilds the provider viamake_provider, and reassigns the live agent loop — guarded byis_turn_active(rejects a switch mid-turn), build-before-persist so a failed rebuild aborts cleanly. Effective on the next turn, no restart.customprovider is routed throughLiteLLMProvider(it lackedchat_stream, so selecting it crashed every TUI turn), and a baseLLMProvider.chat_streamnon-streaming fallback is added so the remaining bespoke providers (azure/codex) degrade gracefully instead of crashing.ProviderConfig.models(manual catalogue) plus the writer helpers.api_baseinput (required custom/azure, optional other api_key, hidden OAuth), inline add/delete of model names, OAuth gating copy, and a structured switch throughconfig.set; openrpc-derived TS types regenerated.Type of change
Related issues (if there is)
Checklists
Development
Security
Code review
Notes: Tests — Python
model/config/ provider suites green (81 relevant pass) and the full unit regression shows no net-new failures; ui-tuitscclean, build clean, full suite 854 pass / 16 skip. Lint not run in this branch (left unchecked). Security: no dependency changes; the credential write/read path (set_provider_fields/reset_provider) is unchanged;customnow flows through the existing LiteLLM env-setup path. Human smoke against the built TUI passed (provider/model CRUD + a real between-turns switch + a live turn).