Skip to content

Use Kimi K2.6 for free and lite#561

Merged
jahooma merged 2 commits intomainfrom
jahooma/fireworks-kimi-free
Apr 29, 2026
Merged

Use Kimi K2.6 for free and lite#561
jahooma merged 2 commits intomainfrom
jahooma/fireworks-kimi-free

Conversation

@jahooma
Copy link
Copy Markdown
Contributor

@jahooma jahooma commented Apr 28, 2026

Switches base2-free, base2-lite, editor-lite, and code-reviewer-lite from GLM 5.1 to Kimi K2.6. Updates freebuff selection, quotas, waiting-room/session copy, and docs so Kimi keeps the existing deployment-hours availability and MiniMax fallback behavior. Routes Kimi through the Fireworks serverless API via accounts/fireworks/models/kimi-k2p6 and removes the CanopyWave Kimi route so Fireworks wins. Validated with focused Bun tests for model/session/Fireworks/chat completion paths plus full repo typecheck.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

Swaps GLM 5.1 for Kimi K2.6 across free and lite tiers — updating model routing (Fireworks serverless via accounts/fireworks/models/kimi-k2p6), rate-limit configs, session copy, freebuff model constants, and docs. The CanopyWave Kimi route is removed so Fireworks is the sole provider; deployment-hours gating and the MiniMax fallback are preserved unchanged.

Confidence Score: 5/5

Safe to merge — the swap is mechanically complete and all remaining feedback is a minor style suggestion.

All P0/P1 paths (rate limits, deployment-hours gating, Fireworks routing, fallback logic) are correctly updated and covered by tests. The only finding is a redundant ternary in base2.ts that could use the pre-computed isFree flag, which is a cosmetic P2 simplification.

agents/base2/base2.ts — minor simplification opportunity in the model selection ternary.

Important Files Changed

Filename Overview
agents/base2/base2.ts Switches free/lite mode model from GLM 5.1 to Kimi K2.6; redundant two-level ternary can be collapsed using the existing isFree flag.
web/src/llm-api/fireworks.ts Adds Kimi K2.6 to the Fireworks model map and pricing table; keeps Kimi in FIREWORKS_HOURS_GATED_MODELS alongside GLM for backward compat; GLM 5.1 entry retained cleanly.
web/src/llm-api/canopywave.ts Removes the Kimi K2.6 route from CanopyWave so Fireworks is the sole provider; straightforward deletion.
web/src/server/free-session/public-api.ts Rate-limit config updated from GLM 5.1 to Kimi K2.6 (same 5-per-12h quota); logic unchanged.
web/src/server/free-session/config.ts Instant-admit capacity key updated from GLM 5.1 to Kimi K2.6 (50 slots unchanged); MiniMax entry untouched.
common/src/constants/freebuff-models.ts Renames FREEBUFF_GLM_MODEL_ID to FREEBUFF_KIMI_MODEL_ID, updates display name and default model ID; all references in the PR are updated consistently.
agents/editor/editor.ts Adds 'kimi' to the model union type and maps it to moonshotai/kimi-k2.6; correctly excludes think-tags for kimi alongside glm/minimax/gpt-5.
common/src/constants/free-agents.ts Replaces GLM 5.1 with Kimi K2.6 in the allowed-model sets for base2-free, editor-lite, and code-reviewer-lite.
web/src/llm-api/tests/fireworks-deployment.test.ts Adds tests for Kimi serverless routing during and outside deployment hours; covers the lite-mode fallback path.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: agents/base2/base2.ts
Line: 28-33

Comment:
**Redundant ternary — `isFree` already captures both branches**

The `isFree` variable on line 25 is defined as `mode === 'free' || mode === 'lite'`, which is exactly the condition split across these two ternary arms. The two-level chain adds noise without any new distinction.

```suggestion
  const model = isFree ? 'moonshotai/kimi-k2.6' : 'anthropic/claude-opus-4.7'
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Use Kimi K2.6 for free and lite" | Re-trigger Greptile

Comment thread agents/base2/base2.ts Outdated
Comment on lines +28 to +33
const model =
mode === 'free'
? 'moonshotai/kimi-k2.6'
: mode === 'lite'
? 'moonshotai/kimi-k2.6'
: 'anthropic/claude-opus-4.7'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Redundant ternary — isFree already captures both branches

The isFree variable on line 25 is defined as mode === 'free' || mode === 'lite', which is exactly the condition split across these two ternary arms. The two-level chain adds noise without any new distinction.

Suggested change
const model =
mode === 'free'
? 'moonshotai/kimi-k2.6'
: mode === 'lite'
? 'moonshotai/kimi-k2.6'
: 'anthropic/claude-opus-4.7'
const model = isFree ? 'moonshotai/kimi-k2.6' : 'anthropic/claude-opus-4.7'
Prompt To Fix With AI
This is a comment left during a code review.
Path: agents/base2/base2.ts
Line: 28-33

Comment:
**Redundant ternary — `isFree` already captures both branches**

The `isFree` variable on line 25 is defined as `mode === 'free' || mode === 'lite'`, which is exactly the condition split across these two ternary arms. The two-level chain adds noise without any new distinction.

```suggestion
  const model = isFree ? 'moonshotai/kimi-k2.6' : 'anthropic/claude-opus-4.7'
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@jahooma jahooma merged commit 37020fe into main Apr 29, 2026
34 checks passed
@jahooma jahooma deleted the jahooma/fireworks-kimi-free branch April 29, 2026 01:00
jahooma added a commit that referenced this pull request Apr 29, 2026
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