feat(gate): fast no-think selection + dedicated selection Llm #88

Merged
michal merged 2 commits from feat/gate-select-no-think into main 2026-07-24 13:29:59 +00:00
Showing only changes of commit 5225b54901 - Show all commits

View File

@@ -147,10 +147,14 @@ export function registerProjectMcpEndpoint(app: FastifyInstance, mcpdClient: Mcp
providerRegistry: effectiveRegistry, providerRegistry: effectiveRegistry,
}; };
if (resolvedModel) pluginConfig.modelOverride = resolvedModel; if (resolvedModel) pluginConfig.modelOverride = resolvedModel;
// Route gate prompt-selection through this project's server Llm (mcpd // Route gate prompt-selection through a server Llm (mcpd inference proxy)
// inference proxy) so cloud/server keys stay at the k8s level; the local // so cloud/server keys stay at the k8s level; the local personal-token
// personal-token provider is the fallback. See credential-tiering. // provider is the fallback. See credential-tiering. A dedicated fast
if (mcpdConfig.llmProvider) pluginConfig.llmProvider = mcpdConfig.llmProvider; // (no-think) selection Llm can be pinned globally via
// MCPCTL_GATE_SELECTION_LLM — it overrides the project's chat llmProvider so
// selection stays fast while chat keeps its (thinking) model.
const gateSelectionLlm = process.env['MCPCTL_GATE_SELECTION_LLM'] || mcpdConfig.llmProvider;
if (gateSelectionLlm) pluginConfig.llmProvider = gateSelectionLlm;
const basePlugin = createDefaultPlugin(pluginConfig); const basePlugin = createDefaultPlugin(pluginConfig);
// Optional favourite-index presentation: curated favourite/<tool> + full // Optional favourite-index presentation: curated favourite/<tool> + full
// all/<server>/<tool> + a "prefer favourite/" instruction. Composed AFTER // all/<server>/<tool> + a "prefer favourite/" instruction. Composed AFTER