MCPcopy Create free account
hub / github.com/cortexkit/magic-context / getPiMessageModel

Function getPiMessageModel

packages/pi-plugin/src/index.ts:212–224  ·  view source on GitHub ↗
(message: unknown)

Source from the content-addressed store, hash-verified

210}
211
212function getPiMessageModel(message: unknown): {
213 provider: string | undefined;
214 model: string | undefined;
215} {
216 if (!message || typeof message !== "object") {
217 return { provider: undefined, model: undefined };
218 }
219 const msg = message as { provider?: unknown; model?: unknown };
220 return {
221 provider: typeof msg.provider === "string" ? msg.provider : undefined,
222 model: typeof msg.model === "string" ? msg.model : undefined,
223 };
224}
225
226function resolvePiPressureContextLimit(args: {
227 db: ContextDatabase;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected