refactor(ui): use tokenlens as sole model source, remove provider listModels

Remove the per-provider listModels API (GET /providers/:id/models) and all
four provider implementations (OpenAI Compatible, OpenAI Responses, Anthropic,
Gemini). ModelCombobox now only shows tokenlens suggestions (tagged '推荐') plus
free-form custom input — no more unfiltered 'API' models from provider SDKs.

Fixes: switching provider type in ProviderDialog no longer shows stale models
from the original provider's API.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
jeffusion
2026-03-05 23:18:33 +08:00
committed by 路遥知码力
parent 71bd310459
commit fdfd49be63
12 changed files with 29 additions and 125 deletions

View File

@@ -134,7 +134,6 @@ function ProviderDialogInner({ onOpenChange, provider }: Omit<ProviderDialogProp
<div className="space-y-2">
<Label htmlFor="defaultModel"> <span className="text-red-500">*</span></Label>
<ModelCombobox
providerId={provider?.hasKey ? provider.id : null}
providerType={type}
value={defaultModel}
onChange={setDefaultModel}