Files
openclaw/extensions/baseten/thinking.ts
Peter Steinberger f703d803cc chore(models): curate all provider model catalogs to current-generation lineups (#113681)
* 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
2026-07-25 07:21:17 -07:00

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;
}