mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 15:57: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);
|
var result = await this.LoadModels(SecretStoreType.LLM_PROVIDER, apiKeyProvisional, token);
|
||||||
return result with
|
return result with
|
||||||
{
|
{
|
||||||
|
//
|
||||||
// The API is the authority: when it reports a model we also keep as a fallback above,
|
// 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.
|
// its entry comes first and the fallback is dropped. What it reports is asked about
|
||||||
Models = [..result.Models.Concat(additionalModels).DistinctBy(x => x.Id).OrderBy(x => x.Id)]
|
// 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)]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,11 @@ public sealed class ProviderOpenRouter() : BaseProvider(LLMProviders.OPEN_ROUTER
|
|||||||
/// Nothing is reported from here: this route answers with the embedding models alone, and what
|
/// Nothing is reported from here: this route answers with the embedding models alone, and what
|
||||||
/// is reported replaces everything an instance said before. The windows of the chat models
|
/// is reported replaces everything an instance said before. The windows of the chat models
|
||||||
/// would go missing the moment somebody opens the embedding settings.
|
/// would go missing the moment somebody opens the embedding settings.
|
||||||
|
///
|
||||||
|
/// Nothing is filtered either, for the same reason. The route is the statement: OpenRouter
|
||||||
|
/// serves these to embed with, which is more than a name can say. Asking the registry on top
|
||||||
|
/// could only drop a model whose name we do not recognize -- and where the two disagree, the
|
||||||
|
/// answer is a rule in Models/, not a model missing from this list.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="apiKeyProvisional">An API key which is not stored yet.</param>
|
/// <param name="apiKeyProvisional">An API key which is not stored yet.</param>
|
||||||
/// <param name="token">The cancellation token to use.</param>
|
/// <param name="token">The cancellation token to use.</param>
|
||||||
@@ -156,4 +161,4 @@ public sealed class ProviderOpenRouter() : BaseProvider(LLMProviders.OPEN_ROUTER
|
|||||||
},
|
},
|
||||||
token: token);
|
token: token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,6 +266,19 @@ public static class ModelKindCorpus
|
|||||||
new(ALIBABA_CLOUD, "qvq-max", CHAT),
|
new(ALIBABA_CLOUD, "qvq-max", CHAT),
|
||||||
new(ALIBABA_CLOUD, "qwen-mt-turbo", CHAT),
|
new(ALIBABA_CLOUD, "qwen-mt-turbo", CHAT),
|
||||||
|
|
||||||
|
//
|
||||||
|
// Perplexity's whole catalog, which the app carries as a list because there is no route to
|
||||||
|
// ask. A list somebody picked by hand is not filtered at runtime -- a filter over it could
|
||||||
|
// only ever take a model away, never find one -- so it is held here instead: a rule which
|
||||||
|
// turns one of these into something other than a chat model fails the build rather than
|
||||||
|
// quietly emptying the dropdown.
|
||||||
|
//
|
||||||
|
new(PERPLEXITY, "sonar", CHAT),
|
||||||
|
new(PERPLEXITY, "sonar-pro", CHAT),
|
||||||
|
new(PERPLEXITY, "sonar-reasoning", CHAT),
|
||||||
|
new(PERPLEXITY, "sonar-reasoning-pro", CHAT),
|
||||||
|
new(PERPLEXITY, "sonar-deep-research", CHAT),
|
||||||
|
|
||||||
//
|
//
|
||||||
// Three which were questioned while testing and stay all the same. Grok Build is the coding
|
// Three which were questioned while testing and stay all the same. Grok Build is the coding
|
||||||
// model behind the xAI CLI and answers like any other Grok. The Groq compound systems are
|
// model behind the xAI CLI and answers like any other Grok. The Groq compound systems are
|
||||||
|
|||||||
Reference in new issue
Block a user