Skip to content

Add support for Deepseek v4 flash - #88

Merged
simonpcouch merged 5 commits into
mainfrom
deepseek-v4-flash
Aug 26, 2026
Merged

Add support for Deepseek v4 flash#88
simonpcouch merged 5 commits into
mainfrom
deepseek-v4-flash

Conversation

@simonpcouch

Copy link
Copy Markdown
Collaborator

PR 1/5 to introduce support for Deepseek v4 Flash in Posit AI.

The model requires reasoning_effort: "none" to explicitly disable thinking, while the generic helper omits thinking fields for off. positAiThinkingRequestFields() contains this model-specific exception.

Comment on lines +55 to +56
maxContextLength: 250_000,
maxInputTokens: 250_000,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is smaller than the 'real' context length, but artificially bringing this down to help us stay under rate limits.

@simonpcouch

Copy link
Copy Markdown
Collaborator Author

The failing test seems to be unrelated, so requesting review!

@simonpcouch
simonpcouch requested a review from wch August 26, 2026 21:10
Comment on lines +121 to +128

const deepSeek = inferModelCapabilities("positai", "deepseek-ai/DeepSeek-V4-Flash-0731");
expect(deepSeek.family).toBe("deepseek-v4");
expect(deepSeek.thinkingEffortLevels).toEqual(["off", "low", "high", "max"]);
expect(deepSeek.supportsImages).toBe(false);
expect(deepSeek.maxContextLength).toBe(250_000);
expect(deepSeek.maxInputTokens).toBe(250_000);
expect(deepSeek.maxOutputTokens).toBe(384_000);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the kinds of tests I've been trying to convince the AI to get rid of! Where it just tests some hard coded values.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So true, been meaning to do this in commons. You got it.

@wch wch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - I just had a comment on some extraneous tests.

@simonpcouch
simonpcouch enabled auto-merge (squash) August 26, 2026 21:29
@simonpcouch
simonpcouch merged commit f97686d into main Aug 26, 2026
4 checks passed
@simonpcouch
simonpcouch deleted the deepseek-v4-flash branch August 26, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants