You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve model selection reliability, make gateway model source of truth (#598)
### TL;DR
Model selection was unreliable/broken.
Added dynamic model selection with PostHog Gateway integration, replacing hardcoded model options.
### What changed?
- Added API to fetch available models from PostHog's LLM Gateway
- Created a new `modelsStore` to manage model state and selection
- Updated the `ModelSelector` component to use dynamically fetched models
- Added model information to session responses, including available models and current model
- Implemented proper model persistence between sessions
- Refactored the agent package to use more granular exports instead of a single entry point
- Added model conversion between Gateway model IDs and Claude SDK model IDs
### How to test?
1. Log in to the application
2. Start a new session and verify the model selector shows models from the Gateway
3. Change models mid-session and verify the change is applied
4. Start a new session and verify your model selection persists
5. Reconnect to an existing session and verify the model selection is maintained
0 commit comments