mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(ai): expose low reasoning effort for native DeepSeek V4 Flash (#7807)
This commit is contained in:
parent
b987ead358
commit
2f8b4b42fe
2 changed files with 9 additions and 3 deletions
|
|
@ -267,6 +267,10 @@ const DEEPSEEK_V4_THINKING_LEVEL_MAP = {
|
|||
high: "high",
|
||||
max: "max",
|
||||
} as const;
|
||||
const DEEPSEEK_V4_FLASH_THINKING_LEVEL_MAP = {
|
||||
...DEEPSEEK_V4_THINKING_LEVEL_MAP,
|
||||
low: "low",
|
||||
} as const;
|
||||
const QWEN_TOKEN_PLAN_HIGH_MAX_THINKING_LEVEL_MAP = {
|
||||
minimal: null,
|
||||
low: null,
|
||||
|
|
@ -875,7 +879,9 @@ function applyThinkingLevelMetadata(model: Model<any>): void {
|
|||
model,
|
||||
model.provider === "openrouter"
|
||||
? { ...DEEPSEEK_V4_THINKING_LEVEL_MAP, xhigh: "xhigh", max: null }
|
||||
: DEEPSEEK_V4_THINKING_LEVEL_MAP,
|
||||
: model.provider === "deepseek" && model.id === "deepseek-v4-flash"
|
||||
? DEEPSEEK_V4_FLASH_THINKING_LEVEL_MAP
|
||||
: DEEPSEEK_V4_THINKING_LEVEL_MAP,
|
||||
);
|
||||
}
|
||||
if (isGoogleThinkingApi(model) && isGemini3ProModel(model.id)) {
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ describe("getSupportedThinkingLevels", () => {
|
|||
expect(getSupportedThinkingLevels(model!)).toEqual(["medium", "high", "xhigh"]);
|
||||
});
|
||||
|
||||
it("includes only high/max plus off for DeepSeek V4 Flash on the DeepSeek provider", () => {
|
||||
it("includes low/high/max plus off for DeepSeek V4 Flash on the DeepSeek provider", () => {
|
||||
const model = getModel("deepseek", "deepseek-v4-flash");
|
||||
expect(model).toBeDefined();
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "high", "max"]);
|
||||
expect(getSupportedThinkingLevels(model!)).toEqual(["off", "low", "high", "max"]);
|
||||
});
|
||||
|
||||
it("includes only high/max plus off for DeepSeek V4 Flash on opencode-go", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue