mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 07:51:26 +00:00
chore: apply local workspace updates (#9911)
* chore: apply local workspace updates * fix: resolve prep findings after rebase (#9898) (thanks @gumadeiras) * refactor: centralize model allowlist normalization (#9898) (thanks @gumadeiras) * fix: guard model allowlist initialization (#9911) * docs: update changelog scope for #9911 * docs: remove model names from changelog entry (#9911) * fix: satisfy type-aware lint in model allowlist (#9911)
This commit is contained in:
committed by
GitHub
parent
93b450349f
commit
4629054403
@@ -53,7 +53,7 @@ describe("image tool implicit imageModel config", () => {
|
||||
};
|
||||
expect(resolveImageModelConfigForTool({ cfg, agentDir })).toEqual({
|
||||
primary: "minimax/MiniMax-VL-01",
|
||||
fallbacks: ["openai/gpt-5-mini", "anthropic/claude-opus-4-6"],
|
||||
fallbacks: ["openai/gpt-5-mini", "anthropic/claude-opus-4-5"],
|
||||
});
|
||||
expect(createImageTool({ config: cfg, agentDir })).not.toBeNull();
|
||||
});
|
||||
|
||||
@@ -24,6 +24,8 @@ import {
|
||||
} from "./image-tool.helpers.js";
|
||||
|
||||
const DEFAULT_PROMPT = "Describe the image.";
|
||||
const ANTHROPIC_IMAGE_PRIMARY = "anthropic/claude-opus-4-6";
|
||||
const ANTHROPIC_IMAGE_FALLBACK = "anthropic/claude-opus-4-5";
|
||||
|
||||
export const __testing = {
|
||||
decodeDataUrl,
|
||||
@@ -117,7 +119,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
} else if (primary.provider === "openai" && openaiOk) {
|
||||
preferred = "openai/gpt-5-mini";
|
||||
} else if (primary.provider === "anthropic" && anthropicOk) {
|
||||
preferred = "anthropic/claude-opus-4-6";
|
||||
preferred = ANTHROPIC_IMAGE_PRIMARY;
|
||||
}
|
||||
|
||||
if (preferred?.trim()) {
|
||||
@@ -125,7 +127,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
addFallback("openai/gpt-5-mini");
|
||||
}
|
||||
if (anthropicOk) {
|
||||
addFallback("anthropic/claude-opus-4-6");
|
||||
addFallback(ANTHROPIC_IMAGE_FALLBACK);
|
||||
}
|
||||
// Don't duplicate primary in fallbacks.
|
||||
const pruned = fallbacks.filter((ref) => ref !== preferred);
|
||||
@@ -138,7 +140,7 @@ export function resolveImageModelConfigForTool(params: {
|
||||
// Cross-provider fallback when we can't pair with the primary provider.
|
||||
if (openaiOk) {
|
||||
if (anthropicOk) {
|
||||
addFallback("anthropic/claude-opus-4-6");
|
||||
addFallback(ANTHROPIC_IMAGE_FALLBACK);
|
||||
}
|
||||
return {
|
||||
primary: "openai/gpt-5-mini",
|
||||
@@ -146,7 +148,10 @@ export function resolveImageModelConfigForTool(params: {
|
||||
};
|
||||
}
|
||||
if (anthropicOk) {
|
||||
return { primary: "anthropic/claude-opus-4-6" };
|
||||
return {
|
||||
primary: ANTHROPIC_IMAGE_PRIMARY,
|
||||
fallbacks: [ANTHROPIC_IMAGE_FALLBACK],
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user