Skip to content

fix: default model deepseek/deepseek-v4.1-flash-1017 (deepseek-reasoner is not on NanoGPT) - #24

Merged
mikkel merged 2 commits into
mainfrom
fix/default-model-retired
Oct 22, 2026
Merged

mikkel merged 2 commits into
mainfrom
fix/default-model-retired

Conversation

@mikkel

@mikkel mikkel commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Bug

This is the companion to 255BITS/patchling#11, where the JS 0.3.0 default xiaomi/mimo-v2.5-pro-ultraspeed is retired and returns HTTP 410. That retired id doesn't appear anywhere in this repo. But the Python default, DEFAULT_MODEL = "deepseek-reasoner", has the same failure mode: it is not listed on NanoGPT, which is the default GPTDIFF_LLM_BASE_URL. So generate_diff/smartapply/the CLI break whenever GPTDIFF_MODEL is unset and no model is passed.

Fix

The default is now deepseek/deepseek-v4.1-flash-1017, the same id as the JS PR.

Why this model: Mikkel asked for DeepSeek V4.1, the 1017 release. In NanoGPT's free GET https://nano-gpt.com/api/v1/models?detailed=true listing (fetched 2026-10-21 13:03 MT):

  • deepseek/deepseek-v4.1-flash-1017 ("DeepSeek V4.1 Flash 1017", the October 17, 2026 snapshot) is listed at $0.10 / $0.60 per 1M input/output tokens, with a 1,048,576 context and 393,216 max output tokens. It is the only id that names the 1017 release with standard serving.
  • Not chosen: the same snapshot is also listed as deepseek/deepseek-v4.1-flash-1017:thinking (same price, thinking always on) and as TEE/deepseek-v4.1-flash (secure-enclave serving, $0.65 / $1.45). The undated deepseek/deepseek-v4.1-flash is a rate-limited beta.
  • NanoGPT lists no non-Flash V4.1 model. "V4.1" here can only mean V4.1 Flash; the only DeepSeek Pro models are v4.
  • Neither retired default is listed: xiaomi/mimo-v2.5-pro-ultraspeed (JS) and deepseek-reasoner (Python).

An earlier commit on this branch used xiaomi/mimo-v2.6-pro. The latest commit replaces it everywhere.

Changes

  • patchling/env.py: DEFAULT_MODEL and its comment. The old comment said the JS default differed; now they match.
  • Docs that state the default: README env table (which wrongly listed gemini-3-pro-preview), docs/api.md ×2, docs/cli.md ×2, and the core.py docstring.
  • The bench/relevance/run.py fallback diff model follows the new default.
  • Tests:
    • New tests/test_default_model.py: the default is deepseek/deepseek-v4.1-flash-1017, neither retired id is the default, and resolve_model(None) with GPTDIFF_MODEL unset returns it.
    • tests/test_public_api.py is updated to the new id.
  • New CHANGELOG.md with an Unreleased note. The repo had no changelog.

Unchanged on purpose:

  • filter_relevant's default, xiaomi/mimo-v2.6-flash, is still listed.
  • Unit tests that pass "deepseek-reasoner" as an arbitrary model string are left as is.
  • Docs that pass --model deepseek-reasoner explicitly (docs/examples/*) are left alone, though those examples would also fail on NanoGPT. Same for the model-recommendation tables and the quickstart, which still recommend gemini-3-pro-preview (and the quickstart still calls it the default). These are worth a separate docs pass.

No version bump, tag, or publish.

Tests (local)

pytest, offline with a cold tiktoken cache and the fake_tiktoken stub: 207 passed, 2 skipped. Main has 204 passed, 2 skipped, so the difference is the 3 new tests. mkdocs build --strict passes.

Live smoke (one call, authorized by Mikkel)

One tiny generate_diff call through the default path: no model argument, GPTDIFF_MODEL unset, the default NanoGPT base URL, and max_tokens 400. The task was a one-line edit (hello → hi).

  • Model sent and model returned: deepseek/deepseek-v4.1-flash-1017, HTTP 200.
  • 128 prompt + 31 completion = 159 tokens, cost $0.0000314, about 2 s.
  • The result was a valid unified diff (-hello / +hi).
  • The API key came from the environment and was never printed, logged or committed.

@mikkel mikkel changed the title fix: default model xiaomi/mimo-v2.6-pro (deepseek-reasoner is not on NanoGPT) fix: default model deepseek/deepseek-v4.1-flash-1017 (deepseek-reasoner is not on NanoGPT) Oct 21, 2026
@mikkel
mikkel marked this pull request as ready for review October 22, 2026 00:17
@mikkel
mikkel merged commit 2d6bf62 into main Oct 22, 2026
2 checks passed
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