MCPcopy
hub / github.com/coder/mux / buildParentRuntimeAiSettings

Function buildParentRuntimeAiSettings

src/node/services/tools/task.ts:95–109  ·  view source on GitHub ↗
(
  config: ToolConfiguration
)

Source from the content-addressed store, hash-verified

93}
94
95function buildParentRuntimeAiSettings(
96 config: ToolConfiguration
97): { modelString?: string; thinkingLevel?: ThinkingLevel } | undefined {
98 const modelString = coerceNonEmptyString(config.muxEnv?.MUX_MODEL_STRING);
99 const thinkingLevel = coerceThinkingLevel(config.muxEnv?.MUX_THINKING_LEVEL);
100
101 if (modelString == null && thinkingLevel == null) {
102 return undefined;
103 }
104
105 return {
106 ...(modelString != null ? { modelString } : {}),
107 ...(thinkingLevel != null ? { thinkingLevel } : {}),
108 };
109}
110
111/**
112 * Parse the optional `model`/`thinking` overrides supplied on a task launch,

Callers 1

createTaskToolFunction · 0.85

Calls 2

coerceNonEmptyStringFunction · 0.90
coerceThinkingLevelFunction · 0.90

Tested by

no test coverage detected