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

Function sendMessageWithModel

tests/ipc/helpers.ts:192–205  ·  view source on GitHub ↗
(
  source: OrpcSource,
  workspaceId: string,
  message: string,
  modelId: string = DEFAULT_MODEL_ID,
  options?: SendMessageWithModelOptions
)

Source from the content-addressed store, hash-verified

190 * Send a message with an explicit model id (defaults to the shared Sonnet integration model).
191 */
192export async function sendMessageWithModel(
193 source: OrpcSource,
194 workspaceId: string,
195 message: string,
196 modelId: string = DEFAULT_MODEL_ID,
197 options?: SendMessageWithModelOptions
198): Promise<Result<void, SendMessageError>> {
199 const resolvedModel = modelId.includes(":") ? modelId : modelString(DEFAULT_PROVIDER, modelId);
200
201 return sendMessage(source, workspaceId, message, {
202 ...options,
203 model: resolvedModel,
204 });
205}
206
207/**
208 * Create a workspace via IPC

Calls 2

modelStringFunction · 0.85
sendMessageFunction · 0.70

Tested by

no test coverage detected