[FEATURE]: Add dynamic model selection
Feature Description
Allow variables to go into the model selection field
Feature Category
Workflow/Flow Management
Problem Statement
I want to dynamically change the model based on the customer preference, this way they could choose different models and pricing tiers based on their needs.
Proposed Solution
Allow the fields inside the model selection to support variables
Mockups or References
Additional Context
No response
Great feature request. This is essential for multi-tenant SaaS platforms where you want to offer different model tiers.
Implementation approaches I've seen work well:
-
Runtime variable interpolation in config fields:
- Allow
{{variable}}syntax in the model name field - Resolve at execution time from flow variables or session context
- Allow
-
Model router node:
- Dedicated node that takes model preference as input
- Routes to appropriate model node downstream
- More explicit but adds visual complexity
-
Model registry pattern:
// Pseudo-code for model selection const modelRegistry = { "tier1": "gpt-4o-mini", "tier2": "gpt-4o", "tier3": "claude-opus-4-5" }; const model = modelRegistry[customerTier] || "gpt-4o-mini";
Considerations:
- Cost tracking becomes important when customers choose models
- May want to add validation that customer's plan allows the selected model
- Fallback behavior when a model is unavailable
For the UI, a dropdown that shows "Use Variable" option and then exposes a text field for the variable name would be cleanest.
Hi maintainers, @lancelotF, @xXMrNidaXx , Can I work on this feature?
I'd like to work on this issue. Can anybody confirm so I can start and create a PR?
Hey, @lancelotF thanks for reporting the enhancement. I'd love to take this, if needed.