- Removed the canonical model variant indexing, selection, and tracking logic from the model registry and resolver. - Eliminated the `canonical` sub-command, tab view, search tokens, and equivalence configuration structures from the CLI and model selector components. - Refined model identification, lookup, and provider fallback resolution to bind exclusively to standard, raw model IDs. - Relocated the equivalence utility script within the catalog package to support script-only policy generation.
27 lines
848 B
TypeScript
27 lines
848 B
TypeScript
import { modelFamilyToken } from "@oh-my-pi/pi-catalog/identity";
|
|
|
|
/**
|
|
* Resolves whether full tool descriptors should be inlined into the system
|
|
* prompt (and stripped from provider tool schemas) for a given model and
|
|
* setting.
|
|
*
|
|
* `auto` enforces a per-model policy: inline for Gemini models, off otherwise.
|
|
* Gemini benefits from descriptors in-prompt; other providers keep them in the
|
|
* tool schemas. `on`/`off` are explicit user overrides.
|
|
*
|
|
* @param modelId Model id (e.g. `gemini-3-pro`) used to classify `auto`.
|
|
*/
|
|
export function shouldInlineToolDescriptors(
|
|
setting: "auto" | "on" | "off" | undefined,
|
|
modelId: string | undefined,
|
|
): boolean {
|
|
switch (setting ?? "auto") {
|
|
case "on":
|
|
return true;
|
|
case "off":
|
|
return false;
|
|
default:
|
|
return modelId !== undefined && modelFamilyToken(modelId) === "gemini";
|
|
}
|
|
}
|