Skip to content

fix(ui): sync provider when selecting cross-provider model#2860

Closed
dpshde wants to merge 1 commit intotailcallhq:mainfrom
dpshde:fix/provider-model-selection-sync
Closed

fix(ui): sync provider when selecting cross-provider model#2860
dpshde wants to merge 1 commit intotailcallhq:mainfrom
dpshde:fix/provider-model-selection-sync

Conversation

@dpshde
Copy link
Copy Markdown

@dpshde dpshde commented Apr 6, 2026

Summary

  • sync the active provider when :model selects a model owned by a different provider
  • prevent invalid session pairs like fireworks-ai + glm-5.1
  • keep request routing consistent with the selected model instead of the previously active provider

Problem

Forge allowed cross-provider model selection from the all-provider model picker, but only persisted the new model. That made it possible to save impossible session state such as:

[session]
provider_id = "fireworks-ai"
model_id = "glm-5.1"

This caused confusing routing and misleading upstream errors because the selected model and active provider no longer matched.

Fix

When :model selects a model from another provider, resolve that model's owning provider and activate it before finalizing the model selection.

Verification

  • reproduced the invalid provider/model session pair locally
  • confirmed Forge routed incorrectly in the corrupted state
  • confirmed valid Fireworks configuration routes to Fireworks after setting a valid provider/model pair
  • confirmed the session config now stays provider/model consistent

Related

Closes #2859

Ensure :model cannot persist an invalid provider/model pair when the selected model belongs to a different provider. This keeps session routing consistent with the chosen model and avoids misleading upstream errors.
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 6, 2026
@amitksingh1490
Copy link
Copy Markdown
Contributor

There were several places this issue could have been caused. With the latest changes, the model selection prompt now appears every time a user logs in. We also removed the separate provider selection, since both the model and provider can now be chosen directly through model selection.

Closing in favour of #2803

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

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix cross-provider model selection creating invalid session provider/model pairs

3 participants