Skip to content

fix: sync RLM model/provider into child calls after interactive model switch#14

Open
GitHubFoxy wants to merge 1 commit into
rawwerks:masterfrom
GitHubFoxy:master
Open

fix: sync RLM model/provider into child calls after interactive model switch#14
GitHubFoxy wants to merge 1 commit into
rawwerks:masterfrom
GitHubFoxy:master

Conversation

@GitHubFoxy

@GitHubFoxy GitHubFoxy commented Apr 17, 2026

Copy link
Copy Markdown

Bug

When starting a session in ypi with ChatGPT model, hitting a limit, and switching to another model, rlm_query still uses the ChatGPT model. Expected: rlm_query should use the newly selected model, same as the parent.

Fix

This change ensures that when a user switches models interactively, the RLM_PROVIDER and RLM_MODEL environment variables are properly synchronized into child calls.

Key improvements:

  • Extracted syncRlmEnv and updateUi helper functions for better code organization
  • Added model_select event handler to update environment when user changes models
  • Preserved existing model state on session_start with preserveExistingModel option
  • Ensures bash tool executions inherit correct model information

Testing

Verified by:

  1. Starting ypi session with one model
  2. Switching to a different model interactively
  3. Confirming rlm_query uses the new model for sub-calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant