Skip to content

Add DeepSeek V4 Pro model option#189

Merged
lewtun merged 3 commits into
mainfrom
add-dsv4
Apr 30, 2026
Merged

Add DeepSeek V4 Pro model option#189
lewtun merged 3 commits into
mainfrom
add-dsv4

Conversation

@lewtun
Copy link
Copy Markdown
Member

@lewtun lewtun commented Apr 29, 2026

Merge only once we validate DSv4 is working with inference providers. The below fails due to absence of conversational tag:

curl https://router.huggingface.co/v1/chat/completions \
    -H "Authorization: Bearer $HF_TOKEN" \
    -H 'Content-Type: application/json' \
    -d '{
        "messages": [
            {
                "role": "user",
                "content": "What is the capital of France?"
            }
        ],
        "model": "deepseek-ai/DeepSeek-V4-Pro:deepinfra",
        "stream": false
    }'

Co-authored-by: Codex <codex@openai.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

PR Review: Add DeepSeek V4 Pro model option

  • Gather context (CLAUDE.md, changed files, git diff)
  • Analyze changes
  • Post review findings

View job run

Co-authored-by: Codex <codex@openai.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Claude finished @lewtun's task in 1m 46s —— View job


PR Review: Add DeepSeek V4 Pro model option

  • Gather context (CLAUDE.md, changed files, git diff)
  • Analyze changes
  • Post review findings

LGTM
Verdict: ready to merge

What I checked

  • backend/routes/agent.py — New entry in AVAILABLE_MODELS, model ID allowlist validation (lines 332–334, 373–375, 435–437), _is_anthropic_model gate ("anthropic" in model_idFalse for DeepSeek, passes correctly), and the updated 403 error message at agent.py:103.
  • frontend/src/components/Chat/ChatInput.tsx — New MODEL_OPTIONS entry, findModelByPath round-trip correctness: frontend sends modelPath = 'deepseek-ai/DeepSeek-V4-Pro:deepinfra', backend stores and returns that exact string, exact-match branch m.modelPath === path at ChatInput.tsx:69 resolves it correctly on session reload.
  • frontend/src/utils/model.tsFIRST_FREE_MODEL_PATH and isClaudePath are unchanged and unaffected by this PR.
  • agent/core/model_switcher.py:deepinfra tag is a valid HF Router provider override per the documented pattern (model_switcher.py:22–25); no issues.
  • frontend/src/components/ClaudeCapDialog.tsx — Text update only; correct.
  • agent/sft/tagger.py — Pre-existing if "deepseek" in n: return "deepseek" at tagger.py:74 already handles tagging; no change needed.
  • Consistency across all four files — Model ID deepseek-ai/DeepSeek-V4-Pro:deepinfra and label DeepSeek V4 Pro are uniform throughout.

Resolve the premium-model conflict by keeping GPT-5.5 gating and the DeepSeek free-model option.

Co-authored-by: OpenAI Codex <codex@openai.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Claude finished @lewtun's task in 1m 22s —— View job


PR Review: Add DeepSeek V4 Pro model option

  • Gather context (CLAUDE.md, changed files, git diff)
  • Analyze changes
  • Post review findings

1 P0
Verdict: changes requested

This is a re-review; the latest push (5c1665d) is a merge from main with no changes to the DeepSeek additions. Code correctness from the prior review stands. One P0 remains unresolved.

P0 — Model endpoint not yet routable on HF Router

The PR description states the curl request fails with a missing conversational tag:

"model": "deepseek-ai/DeepSeek-V4-Pro:deepinfra"

As of this commit, no code change addresses that gap. The model is registered in backend/routes/agent.py:98-103, frontend/src/components/Chat/ChatInput.tsx:72-78, and agent/core/model_switcher.py:35 — all four surfaces will present the option to users, but every inference call will fail at the HF Router level until the conversational tag is added on the HF side.

This is the author's stated merge gate ("Merge only once we validate DSv4 is working with inference providers"). The PR should stay open until a successful end-to-end call is confirmed and noted here.

What I checked

  • Latest diff (5c1665d Merge main into add-dsv4) contains no changes to the DeepSeek additions — the sync pulled unrelated commits from main.
  • model_switcher.py:76-103 — catalog lookup warns but doesn't block when a provider tag isn't live; no new protection was added.
  • All four changed files are internally consistent (model ID and label uniform throughout).
  • No new P1 findings beyond prior review.

@lewtun lewtun merged commit 1b922dd into main Apr 30, 2026
1 check passed
@lewtun lewtun deleted the add-dsv4 branch April 30, 2026 15:18
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.

1 participant