fix(kimi): restore kimi-k3[1m] entry accidentally dropped in edd8a89 - #29
Open
sruckh wants to merge 2 commits into
Open
fix(kimi): restore kimi-k3[1m] entry accidentally dropped in edd8a89#29sruckh wants to merge 2 commits into
sruckh wants to merge 2 commits into
Conversation
The kimi-k3[1m] variant (context_length 1048576) was added deliberately in 39e46b6 and renamed to lowercase in eb5a30c, then removed 4.5 hours later as collateral damage in edd8a89 -- a commit whose stated purpose was updating Gemini display names. CLIProxyAPI's kimi executor already has first-class support for the [1m] suffix, so the code path is complete; only the catalog entry is missing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
|
Not even sure this is even accurate. In the kimi client kimi-k3 gives me the 1M context window, but within CLIProxyAPI I only get about 200k. I thought I had the full 1M context before, although not positive. |
The restored entry is byte-identical to the block accidentally deleted in edd8a89, except for its display_name: "Kimi K3" -> "Kimi K3 (1M)". Both kimi-k3 and kimi-k3[1m] otherwise render as "Kimi K3" in client model pickers, making the two context-window variants indistinguishable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
kimi-k3is currently the only Kimi K3 entry in the catalog, atcontext_length: 262144. The 1M variantkimi-k3[1m]is gone, so there is no way to get Kimi K3's full 1M context window through CLIProxyAPI.This is a regression, not a design decision
The entry was added on purpose and removed by accident, all on 2026-07-18:
kimi-k3[1m]3a51061kimi-k3added at104857639e46b6kimi-k3→262144,kimi-k3[1M]added at1048576eb5a30ckimi-k3[1m]("Fix casing in Kimi K3 model ID")edd8a89edd8a89is titled "Update Gemini model names by removing "Preview" from entries inmodels.json". It is+19 −38; five of its six hunks are Gemini display-name edits around lines 620–780, and the sixth silently drops all 19 lines of thekimi-k3[1m]block at line 2189. The deletion is unrelated to the commit's stated purpose and has no accompanying message — it reads as a bad rebase/merge rather than an intentional removal, especially given the entry had been deliberately created and then carefully renamed just 4.5 hours earlier.This PR restores exactly those 19 lines (
+19 −0, the precise inverse of that hunk).The consuming code already supports it
CLIProxyAPI's Kimi executor has first-class, tested handling for the suffix —
internal/runtime/executor/kimi_executor.go:with table tests in
kimi_executor_test.gocoveringkimi-k3[1m]→k3,Kimi-K3[1M]→k3,k3[1m]→k3, andkimi-k3[1m](1024)→k3(1024). So the routing path is complete and the suffix is stripped before the upstream call; only the catalog entry that makes the ID resolvable is missing. Without it the registry lookup fails and the model is unreachable.Why 1048576 is the correct value for this variant
moonshotai/kimi-k3at 1M.Keeping both entries preserves the two-tier split introduced in
39e46b6:kimi-k3stays conservative at 256K, andkimi-k3[1m]is the explicit opt-in for the full window.Verification
models.jsonparses cleanly; no duplicate model IDs in any provider array.+19 −0, byte-identical to the block removed inedd8a89./v1/modelsreportsmax_input_tokens: 262144for Kimi K3, while Gemini entries correctly report1048576— so the metadata pipeline is fine and only the catalog value/entry is at fault.🤖 Generated with Claude Code
Rollout requires no release
internal/registry/model_updater.gofetches this catalog at runtime fromraw.githubusercontent.com/router-for-me/models/refs/heads/main/models.jsonon a 3-hour refresh ticker (the embedded copy is only a startup fallback), so merging this PR propagates to running CLIProxyAPI instances on their next refresh or restart — no new image release needed.One deliberate deviation from the deleted block
The restored entry is byte-identical to what
edd8a89deleted except itsdisplay_name, changed from"Kimi K3"to"Kimi K3 (1M)". Bothkimi-k3andkimi-k3[1m]otherwise render identically as "Kimi K3" in client model pickers, making the 256K and 1M variants indistinguishable.