earendil-works/pi · error
Unsupported Google thinking level mapping for ${model.provid
Error message
Unsupported Google thinking level mapping for ${model.provider}/${model.id}: ${level} -> ${String(mapped)} What it means
Error "Unsupported Google thinking level mapping for ${model.provider}/${model.id}: ${level} -> ${String(mapped)}" thrown in earendil-works/pi.
Source
Thrown at packages/ai/src/api/google-shared.ts:47
export type ResolvedGoogleThinkingLevel = Exclude<ThinkingLevel, "xhigh" | "max">;
/** Resolve a supported pi level or model-specific Google mapping to a standard Google level. */
export function resolveGoogleThinkingLevel<T extends GoogleApiType>(
model: Model<T>,
level: ModelThinkingLevel,
): ResolvedGoogleThinkingLevel {
if (level === "off") return "high";
const mapped = model.thinkingLevelMap?.[level];
const resolvedLevel = typeof mapped === "string" ? mapped.toLowerCase() : level;
switch (resolvedLevel) {
case "minimal":
case "low":
case "medium":
case "high":
return resolvedLevel;
default:
throw new Error(
`Unsupported Google thinking level mapping for ${model.provider}/${model.id}: ${level} -> ${String(mapped)}`,
);
}
}
/**
* Determines whether a streamed Gemini `Part` should be treated as "thinking".
*
* Protocol note (Gemini / Vertex AI thought signatures):
* - `thought: true` is the definitive marker for thinking content (thought summaries).
* - `thoughtSignature` is an encrypted representation of the model's internal thought process
* used to preserve reasoning context across multi-turn interactions.
* - `thoughtSignature` can appear on ANY part type (text, functionCall, etc.) - it does NOT
* indicate the part itself is thinking content.
* - For non-functionCall responses, the signature appears on the last part for context replay.
* - When persisting/replaying model outputs, signature-bearing parts must be preserved as-is;
* do not merge/move signatures across parts.
*View on GitHub (pinned to 4af9d21d3b)
Solutions
- Use a supported thinking level for this Google model, or update the thinking-level mapping table.
When it happens
Trigger: Thrown at packages/ai/src/api/google-shared.ts:47 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/36db636631ee317c.
Report an issue: GitHub.