feat: add priority service tier controls - #2492
Draft
kassieclaire wants to merge 3 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: b8aecc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Related Issue
Related to #1674
Related to #568
Problem
Some providers offer a priority service tier with provider-dependent pricing, latency, and reliability, but Kimi Code could not request it. Main-agent and subagent requests also need independent control: a subagent may intentionally use a different tier even when it inherits the main model, and priority must remain disabled by default.
What changed
/prioritychoice dialog with four states: main agent and subagents, main agent only, subagents only, and neither.service_tier: "priority"through both agent engines and the Kimi, OpenAI Chat Completions, and OpenAI Responses provider paths.priorityafter the model and thinking effort in the v1/v2 footer and/status, and in single-subagent cards and swarm headers according to each subagent's own tier.v1 engine demo
v2 engine demo
Both demos were captured from the locally built source override with verbose logging enabled. I inspected the picker and final status-line frames, then downloaded both hosted GIFs and verified that their SHA-256 hashes exactly match the local captures.
Live provider verification
Built the CLI from this branch, replaced the local
kimilauncher with that build, and ranllmgateway/kimi-k3with verbose logging enabled.serviceTier=priority; the response reportedservice_tier=priorityandmodel=fireworks/kimi-k3, confirming the expected Fireworks route.Automated verification
pnpm run typecheck— passed across all packages and applications on Node 24.15.0 / pnpm 10.33.0.pnpm run lint— passed with 0 errors and 2,703 warnings.pnpm --filter @moonshot-ai/agent-core-v2 lint:imports— passed for 1,042 files.zipdependency — 54 of 55 tests passed; the sole residual failure is the unrelatedpackages/minidb/test/server-extra.test.tsoversized-request socket timeout, which also reproduces when run alone.pnpm exec changeset status --since main— validated the CLI minor changeset.pnpm --dir docs run build— passed with existing ES2024 and chunk-size warnings.pnpm --dir apps/kimi-code run build— passed and supplied the executable used for both demos.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.