fix: provider-aware model selection to prevent cross-provider conflicts

When multiple providers share the same model name, the selector now
uses both model ID and provider as the unique identifier instead of
model name alone. Backend returns default_provider alongside default
model, and model switching sends provider to the config.

Fixes #52

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-19 15:05:05 +08:00
parent b4f809d8b5
commit 8a4ab2d69d
4 changed files with 13 additions and 6 deletions
+1
View File
@@ -33,6 +33,7 @@ export interface AvailableModelGroup {
export interface AvailableModelsResponse {
default: string
default_provider: string
groups: AvailableModelGroup[]
}