Q170: agent model suggestions and choices follow the picked provider
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a8fbc08df6
commit
7c291cf7a7
5 files changed
+60
-13
No files matched your search
@@ -9,6 +9,11 @@ export function agentModel(agentModelId: string | null, providerModel: string |
|
||||
return { model: null, source: "none" };
|
||||
}
|
||||
|
||||
/** A model names one of its provider's models, so it means nothing without that provider. */
|
||||
export function assertModelHasProvider(modelProviderId: string | null, modelId: string | null): void {
|
||||
if (modelId?.trim() && !modelProviderId) throw new Error("Pick the provider before its model.");
|
||||
}
|
||||
|
||||
/** Agents a change to this provider's default model reaches, and those that keep their own model. */
|
||||
export function defaultModelReach(agents: Array<{ modelProviderId: string | null; modelId: string | null }>, providerId: string): { following: number; ownModel: number } {
|
||||
const bound = agents.filter((agent) => agent.modelProviderId === providerId);
|
||||
|
||||
Reference in new issue
Block a user