Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[FEATURE]: Add dynamic model selection

Open lancelotF opened this issue 9 months ago • 4 comments

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

Image

Additional Context

No response

lancelotF avatar Feb 22 '26 03:02 lancelotF

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:

  1. Runtime variable interpolation in config fields:

    • Allow {{variable}} syntax in the model name field
    • Resolve at execution time from flow variables or session context
  2. Model router node:

    • Dedicated node that takes model preference as input
    • Routes to appropriate model node downstream
    • More explicit but adds visual complexity
  3. 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.

xXMrNidaXx avatar Feb 25 '26 10:02 xXMrNidaXx

Hi maintainers, @lancelotF, @xXMrNidaXx , Can I work on this feature?

smartcoder0777 avatar Mar 03 '26 07:03 smartcoder0777

I'd like to work on this issue. Can anybody confirm so I can start and create a PR?

smartcoder0777 avatar Mar 03 '26 13:03 smartcoder0777

Hey, @lancelotF thanks for reporting the enhancement. I'd love to take this, if needed.

dataCenter430 avatar Mar 05 '26 20:03 dataCenter430