mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 04:37:59 +00:00
Ask the registry about the models Anthropic lists
This commit is contained in:
3 files changed
+26
-3
No files matched your search
@@ -213,9 +213,14 @@ public sealed class ProviderAnthropic() : BaseProvider(LLMProviders.ANTHROPIC, n
|
||||
var result = await this.LoadModels(SecretStoreType.LLM_PROVIDER, apiKeyProvisional, token);
|
||||
return result with
|
||||
{
|
||||
//
|
||||
// The API is the authority: when it reports a model we also keep as a fallback above,
|
||||
// its entry comes first and the fallback is dropped.
|
||||
Models = [..result.Models.Concat(additionalModels).DistinctBy(x => x.Id).OrderBy(x => x.Id)]
|
||||
// its entry comes first and the fallback is dropped. What it reports is asked about
|
||||
// first, though -- the route says nothing about what a model is made for, and Claude
|
||||
// has not always been only something to talk to. The six above skip that question
|
||||
// because they are not a catalog: every one of them was picked by hand.
|
||||
//
|
||||
Models = [..result.Models.Where(model => model.IsChatModel(this.Provider)).Concat(additionalModels).DistinctBy(x => x.Id).OrderBy(x => x.Id)]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user