mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-09 03:22:40 +00:00
fix(foundry): expose Claude 4.6 max effort
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user