MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / hasToolSupport

Function hasToolSupport

packages/baseai/src/dev/utils/has-tool-support.ts:3–18  ·  view source on GitHub ↗
({
	provider,
	modelName
}: {
	modelName: string;
	provider: string;
})

Source from the content-addressed store, hash-verified

1import { modelsByProvider } from '@/data/models';
2
3export function hasToolSupport({
4 provider,
5 modelName
6}: {
7 modelName: string;
8 provider: string;
9}) {
10 const toolSupportedModels = modelsByProvider[provider].filter(
11 model => model.toolSupport
12 );
13 const hasToolCallSupport = toolSupportedModels
14 .flatMap(model => model.id)
15 .includes(modelName);
16
17 return hasToolCallSupport;
18}
19
20export function getSupportedToolSettings({
21 provider,

Callers 1

addToolsToParamsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected