mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:50:42 +00:00
53 lines
1.4 KiB
TypeScript
53 lines
1.4 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;
|
|
};
|