mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 10:51:33 +00:00
* chore(models): fleet-wide provider catalog curation * fix(models): sync provider runtime catalogs and tests with curated manifests * test(models): align venice lifecycle assertions and copilot auth default with curated catalogs * test(models): align catalog lifecycle contract checks
25 lines
1011 B
TypeScript
25 lines
1011 B
TypeScript
/** Baseten model-specific thinking controls. */
|
|
import type { ProviderThinkingProfile } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { usesBasetenChatTemplateThinking } from "./models.js";
|
|
|
|
const BASETEN_BINARY_THINKING_PROFILE = {
|
|
levels: [{ id: "off" }, { id: "low", label: "on" }],
|
|
defaultLevel: "off",
|
|
} as const satisfies ProviderThinkingProfile;
|
|
|
|
const BASETEN_GLM_52_THINKING_PROFILE = {
|
|
levels: [{ id: "off" }, { id: "high" }, { id: "max" }],
|
|
defaultLevel: "off",
|
|
} as const satisfies ProviderThinkingProfile;
|
|
|
|
/** Exposes only the thinking levels that Baseten actually accepts for opt-in models. */
|
|
export function resolveBasetenThinkingProfile(
|
|
modelId: string,
|
|
): ProviderThinkingProfile | undefined {
|
|
const normalized = modelId.trim().toLowerCase();
|
|
if (normalized === "zai-org/glm-5.2" || normalized === "zai-org/glm-5.2-fast") {
|
|
return BASETEN_GLM_52_THINKING_PROFILE;
|
|
}
|
|
return usesBasetenChatTemplateThinking(normalized) ? BASETEN_BINARY_THINKING_PROFILE : undefined;
|
|
}
|