fix(foundry): expose Claude 4.6 max effort

This commit is contained in:
Vincent Koc
2026-06-11 08:05:20 +09:00
parent cc344fee65
commit 76ce9d6d22
2 changed files with 24 additions and 1 deletions

View File

@@ -1443,6 +1443,26 @@ describe("microsoft-foundry plugin", () => {
{ id: "max" },
],
});
for (const modelName of ["claude-opus-4-6", "claude-sonnet-4-6"]) {
expect(
provider.resolveThinkingProfile?.({
provider: "microsoft-foundry",
modelId: `prod-${modelName}`,
params: { canonicalModelId: modelName },
}),
).toMatchObject({
defaultLevel: "adaptive",
levels: [
{ id: "off" },
{ id: "minimal" },
{ id: "low" },
{ id: "medium" },
{ id: "high" },
{ id: "adaptive" },
{ id: "max" },
],
});
}
expect(
provider.resolveThinkingProfile?.({
provider: "microsoft-foundry",

View File

@@ -2,6 +2,7 @@
import type { ProviderNormalizeResolvedModelContext } from "openclaw/plugin-sdk/core";
import {
resolveClaudeThinkingProfile,
supportsClaudeNativeMaxEffort,
type ModelProviderConfig,
type ProviderPlugin,
} from "openclaw/plugin-sdk/provider-model-shared";
@@ -190,7 +191,9 @@ export function buildMicrosoftFoundryProvider(): ProviderPlugin {
if (!capabilities.reasoning || capabilities.api !== "anthropic-messages") {
return undefined;
}
const profile = resolveClaudeThinkingProfile(capabilities.modelName);
const profile = resolveClaudeThinkingProfile(capabilities.modelName, undefined, {
includeNativeMax: supportsClaudeNativeMaxEffort({ id: capabilities.modelName }),
});
if (!isFoundryClaudeMythosPreview(capabilities.modelName)) {
return profile;
}