Model selection - #482
Model selection#482mschwoer wants to merge 15 commits into
Conversation
- should be on a dedicated page (09_LLM_Config.py) - mutiple models should be configurable (incl. API key) - the configured models should be selectable on the @alphastats/gui/pages_/06_LLM.py page Please analyze the current implementation thoroughly. Afterwards, ask clarifying questions.
- should be on a dedicated page (09_LLM_Config.py) DONE - mutiple models should be configurable (incl. API key) DONE - the configured models should be selectable on the @alphastats/gui/pages_/06_LLM.py page Please analyze the current implementation thoroughly. Pay particular attention to the StateKeys MODEL_NAME, BASE_URL, MAX_TOKENS, OPENAI_API_KEY: this data now needs to be taken from StateKeys.LLM_CONFIGURATIONS. Pay particular attention to the LLMKeys MODEL_NAME, BASE_URL, MAX_TOKENS: this date now compes from the session state LLM_CONFIGURATION, referenced by StateKeys.LLM_CONFIGURATION_ID. Afterwards, ask clarifying questions. Then, write an IMPLEMENTATION_PLAN.md
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a dedicated LLM Configuration page to centralize model management, replacing the previous approach where model settings were configured directly on the Home page. The changes simplify the LLM workflow by storing multiple model configurations that can be selected per analysis.
Key changes:
- Created a new dedicated LLM Configuration page (
09_LLM_Configuration.py) for managing multiple LLM model configurations - Refactored state management to store model configurations as a list (
LLM_CONFIGURATIONS) instead of individual state keys for model name, API key, and base URL - Updated LLM chat workflow to select configurations per analysis rather than globally
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
alphastats/gui/pages_/09_LLM_Configuration.py |
New dedicated page for managing LLM model configurations |
alphastats/gui/utils/llm_config_helper.py |
New helper module providing configuration management UI components and utilities |
alphastats/gui/pages_/06_LLM.py |
Updated to use configuration-based model selection instead of global state |
alphastats/gui/utils/state_keys.py |
Removed global model-related keys, added LLM_CONFIGURATIONS and LLM_CONFIGURATION_ID |
alphastats/gui/utils/state_utils.py |
Updated session state initialization to preserve LLM configurations across resets |
alphastats/gui/utils/llm_helper.py |
Removed llm_config(), set_api_key(), and model synchronization logic |
alphastats/gui/pages_/01_Home.py |
Removed LLM configuration UI from Home page |
alphastats/llm/llm_integration.py |
Updated Claude model version; removed strict model validation |
alphastats/gui/utils/session_manager.py |
Updated to exclude LLM configurations from disk storage |
tests/llm/test_llm_helper.py |
Removed tests for deleted set_api_key() function |
tests/gui/utils/test_session_manager.py |
Updated test data to reflect new configuration structure |
alphastats/gui/utils/ui_helper.py |
Enabled LLM support by default |
alphastats/gui/AlphaPeptStats.py |
Registered new LLM Configuration page |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add dedicated page for model selection, simplify