mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 12:48:10 +00:00
* feat(anthropic): support Claude Fable 5 * test(anthropic): tighten Fable stream fixtures * fix(anthropic): preserve Vertex input types * test(anthropic): use provider-ready Vertex effort * fix(anthropic): support Fable deployment aliases * fix(anthropic): discard incomplete Fable output * feat(anthropic): support Fable on Bedrock * fix(anthropic): preserve Fable reasoning contracts * refactor(anthropic): unify canonical Claude model policy * fix(anthropic): satisfy extension thinking types * test(anthropic): complete canonical alias fixture * fix(bedrock): scope thinking case declarations
22 lines
746 B
TypeScript
22 lines
746 B
TypeScript
// Github Copilot API module exposes the plugin public contract.
|
|
import type { ProviderDefaultThinkingPolicyContext } from "openclaw/plugin-sdk/core";
|
|
import { resolveCopilotExtendedThinkingLevels } from "./model-metadata.js";
|
|
|
|
export function resolveThinkingProfile(context: ProviderDefaultThinkingPolicyContext) {
|
|
if (context.provider.trim().toLowerCase() !== "github-copilot") {
|
|
return null;
|
|
}
|
|
const extendedLevels = resolveCopilotExtendedThinkingLevels(context.modelId, context.compat);
|
|
|
|
return {
|
|
levels: [
|
|
{ id: "off" as const },
|
|
{ id: "minimal" as const },
|
|
{ id: "low" as const },
|
|
{ id: "medium" as const },
|
|
{ id: "high" as const },
|
|
...extendedLevels.map((id) => ({ id })),
|
|
],
|
|
};
|
|
}
|