mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 14:50:26 +00:00
Summary: - The branch adds a Google provider thinking-policy resolver and opt-in profile flag, updates shared thinking validation and cron/proof-policy tests, and adjusts ClawSweeper proof parsing. - Reproducibility: yes. source-reproducible: current main applies the generic off-only profile before provider ... figured thinking through that resolver. I did not execute a live systemd cron run in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: preserve Google Gemini 3 cron thinking Validation: - ClawSweeper review passed for heada6cd2e826e. - Required merge gates passed before the squash merge. Prepared head SHA:a6cd2e826eReview: https://github.com/openclaw/openclaw/pull/85300#issuecomment-4517662575 Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
/**
|
|
* Provider-owned thinking policy input.
|
|
*
|
|
* Used by shared `/think`, ACP controls, and directive parsing to ask a
|
|
* provider whether a model supports special reasoning UX such as adaptive,
|
|
* xhigh, max, or a binary on/off toggle.
|
|
*/
|
|
export type ProviderThinkingPolicyContext = {
|
|
provider: string;
|
|
modelId: string;
|
|
};
|
|
|
|
/**
|
|
* Provider-owned default thinking policy input.
|
|
*
|
|
* `reasoning` is the merged catalog hint for the selected model when one is
|
|
* available. Providers can use it to keep "reasoning model => low" behavior
|
|
* without re-reading the catalog themselves.
|
|
*/
|
|
export type ProviderDefaultThinkingPolicyContext = ProviderThinkingPolicyContext & {
|
|
reasoning?: boolean;
|
|
};
|
|
|
|
export type ProviderThinkingLevelId =
|
|
| "off"
|
|
| "minimal"
|
|
| "low"
|
|
| "medium"
|
|
| "high"
|
|
| "xhigh"
|
|
| "adaptive"
|
|
| "max";
|
|
|
|
export type ProviderThinkingLevel = {
|
|
id: ProviderThinkingLevelId;
|
|
/**
|
|
* Optional display label. Use this when the stored value differs from the
|
|
* provider-facing UX, for example binary providers storing `low` but showing
|
|
* `on`.
|
|
*/
|
|
label?: string;
|
|
/**
|
|
* Relative strength used when downgrading a stored level that the selected
|
|
* model no longer supports.
|
|
*/
|
|
rank?: number;
|
|
};
|
|
|
|
export type ProviderThinkingProfile = {
|
|
levels: ProviderThinkingLevel[] | ReadonlyArray<ProviderThinkingLevel>;
|
|
defaultLevel?: ProviderThinkingLevelId | null;
|
|
/**
|
|
* Some bundled providers have model-specific thinking contracts that are more
|
|
* current than cached generic catalog metadata. Keep this opt-in so
|
|
* `reasoning: false` remains authoritative for ordinary catalog entries.
|
|
*/
|
|
preserveWhenCatalogReasoningFalse?: boolean;
|
|
};
|