feat(gate): MCPCTL_GATE_SELECTION_LLM — pin a dedicated fast selection Llm
Some checks failed
CI/CD / lint (pull_request) Successful in 1m2s
CI/CD / typecheck (pull_request) Successful in 2m7s
CI/CD / test (pull_request) Successful in 1m19s
CI/CD / build (pull_request) Successful in 2m11s
CI/CD / smoke (pull_request) Failing after 2m47s
CI/CD / publish (pull_request) Has been skipped
Some checks failed
CI/CD / lint (pull_request) Successful in 1m2s
CI/CD / typecheck (pull_request) Successful in 2m7s
CI/CD / test (pull_request) Successful in 1m19s
CI/CD / build (pull_request) Successful in 2m11s
CI/CD / smoke (pull_request) Failing after 2m47s
CI/CD / publish (pull_request) Has been skipped
Lets ops route gate prompt-selection at a fast (no-think) server Llm independent of the project's chat llmProvider — so selection stays ~1-2s while chat keeps its thinking model. Overrides the project llmProvider for the gate's server-selection path; unset → prior behavior (use the project's llmProvider). Pairs with the litellm qwen3-fast no-think alias (kubernetes-deployment) + a `vllm-fast` mcpd Llm. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -147,10 +147,14 @@ export function registerProjectMcpEndpoint(app: FastifyInstance, mcpdClient: Mcp
|
||||
providerRegistry: effectiveRegistry,
|
||||
};
|
||||
if (resolvedModel) pluginConfig.modelOverride = resolvedModel;
|
||||
// Route gate prompt-selection through this project's server Llm (mcpd
|
||||
// inference proxy) so cloud/server keys stay at the k8s level; the local
|
||||
// personal-token provider is the fallback. See credential-tiering.
|
||||
if (mcpdConfig.llmProvider) pluginConfig.llmProvider = mcpdConfig.llmProvider;
|
||||
// Route gate prompt-selection through a server Llm (mcpd inference proxy)
|
||||
// so cloud/server keys stay at the k8s level; the local personal-token
|
||||
// provider is the fallback. See credential-tiering. A dedicated fast
|
||||
// (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);
|
||||
// Optional favourite-index presentation: curated favourite/<tool> + full
|
||||
// all/<server>/<tool> + a "prefer favourite/" instruction. Composed AFTER
|
||||
|
||||
Reference in New Issue
Block a user