Skip to content

feat(tools): FIM edit tool for V4 /beta endpoint (closes #662)#668

Merged
Hmbown merged 4 commits into
Hmbown:mainfrom
merchloubna70-dot:feat/v4-endpoints-662
May 5, 2026
Merged

feat(tools): FIM edit tool for V4 /beta endpoint (closes #662)#668
Hmbown merged 4 commits into
Hmbown:mainfrom
merchloubna70-dot:feat/v4-endpoints-662

Conversation

@merchloubna70-dot

Copy link
Copy Markdown

Adds fim_edit tool skeleton. Closes #662

macworkers and others added 3 commits May 4, 2026 12:39
All system prompts were English-only, causing DeepSeek V4 to reason
and respond in English even when users wrote in Chinese or other
languages.

Add a Language Mirror section to base.md and base.txt that instructs
the model to detect the user's primary language and use it for both
reasoning (thinking tokens) and the final reply.
base.txt is not referenced via include_str! in prompts.rs.
Only base.md is loaded (BASE_PROMPT). Remove the redundant change
to base.txt as noted by Gemini Code Assist review.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@ILoveScratch2

Copy link
Copy Markdown

谁家PR机器人

@Hmbown

Hmbown commented May 5, 2026

Copy link
Copy Markdown
Owner

Triple-check: clean

Verified: FimEditTool implements ToolSpec, registered via with_fim_tool in tool_setup.rs:36, called in the engine turn's tool builder chain. The tool sends requests to DeepSeek's /beta FIM endpoint. Properly wired end-to-end. ✅

Hmbown added a commit that referenced this pull request May 5, 2026
47 fmt drifts had accumulated from the squash-merged community PRs on
this branch (#653, #654, #655, #645, #658, #668, #659, #661, #660,
#667, #656). Pure formatting — no behavioural changes — applied via
`cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Hmbown Hmbown merged commit 2928d20 into Hmbown:main May 5, 2026
1 check passed
MMMarcinho pushed a commit to MMMarcinho/DeepSeek-TUI that referenced this pull request May 6, 2026
MMMarcinho pushed a commit to MMMarcinho/DeepSeek-TUI that referenced this pull request May 6, 2026
47 fmt drifts had accumulated from the squash-merged community PRs on
this branch (Hmbown#653, Hmbown#654, Hmbown#655, Hmbown#645, Hmbown#658, Hmbown#668, Hmbown#659, Hmbown#661, Hmbown#660,
Hmbown#667, Hmbown#656). Pure formatting — no behavioural changes — applied via
`cargo fmt --all` to satisfy CI's `cargo fmt --all -- --check` gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

V4 endpoint adoption tracker: FIM, chat-prefix, strict tool mode, 128-token alignment

3 participants