Repository navigation
feat(agent): connect DeepSeek and Kimi keys and a Kimi Code plan - #453
Merged
Merged
Conversation
Adds `deepseek-key` and `kimi-key` model accounts on the Chat Completions transport, each against a fixed endpoint with a curated roster and vision flags. Both providers refuse a tool-calling conversation that drops an earlier turn's reasoning_content, so the transport now keeps it as a thinking block in the run's history and sends it back for them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryAdds native DeepSeek and Kimi key connections through the existing Chat Completions transport.
kgoedecke explicitly keeps
|
A Kimi membership's Kimi Code key, billed to the membership: its own endpoint and ids, sent with a Doop User-Agent as Kimi Code's terms ask of third-party tools. Also fixes a test tuple type tsgo rejected. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Nov 9, 2026
This was referenced Nov 10, 2026
kgoedecke
added a commit
that referenced
this pull request
Nov 16, 2026
search_logos' keyless fallback handed agents DuckDuckGo .ico URLs, which sharp cannot decode. A small decoder now reads the icon's largest entry, PNG or bitmap, with its transparency; the favicon is converted to PNG and stored as a Doop asset (one per domain per process), so frames hold a plain image on our own origin. When an open-source vector mark exists and the only brand hit is a favicon, the vector marks come first and the favicon is labelled as one, in both the MCP tool and the resident agent. (cherry picked from commit b42dc426a05555e4a40f81eb452ba963f4c6cbbe, without the Figma and Canva export paths, which OSS does not ship) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 2bfe8f4)
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.
Native BYOK for DeepSeek and Kimi (Moonshot), asked for by a Discord user who uses their DeepSeek key in every other AI tool. Until now both were only reachable through OpenRouter.
What changes
deepseek-keyandkimi-key. They run on the existing Chat Completions transport (server/chatCompletionsAgent.ts) against fixed URLs:https://api.deepseek.com/chat/completionsandhttps://api.moonshot.ai/v1/chat/completions. As with the other providers, users can't supply an endpoint (SSRF). Operators can overrideDEEPSEEK_CHAT_URL/KIMI_CHAT_URL, for example to point Kimi atapi.moonshot.cnfor China-platform keys.shared/modelMenu.ts, like OpenRouter's. The model picker only accepts roster ids, and an off-roster env override runs text-only.deepseek-flash(V4.1 Flash, vision, the default) anddeepseek-v4-pro(marked text-only until its image input is confirmed).kimi-k3.1-pro(the default),kimi-k3.1-pro-highspeedandkimi-k3, all with vision.kimi-code): runs on a Kimi membership (Plus and up) instead of per-token billing. Members paste a key from the Kimi Code console (Moonshot offers no OAuth). It has its own endpoint (api.kimi.ai/coding/v1, overrideKIMI_CODE_CHAT_URL) and its own model ids (k3.1-pro,k3.1-pro-highspeed,k3). Requests sendUser-Agent: Doop/<version>, because Kimi Code's terms require third-party tools to identify themselves truthfully. DeepSeek has no subscription equivalent; its API is pay-per-token only.reasoning_contentand answer 400 to a tool-calling conversation that leaves it out of an earlier assistant turn. The transport now keeps the reasoning as athinkingblock in the run's history (TurnBlockwidened accordingly). It sends that reasoning back only for configs withechoReasoning, so OpenRouter and Gemini requests are unchanged. A response that contains only reasoning still fails as empty.deepseek-key/kimi-keykinds are added to the model-account plumbing:modelAccounts(key shapesk-…, roster policy, vision),agentModelrouting (now a per-kind config table),agentRunnersmenus and the connect routes.deepseek/kimiBrandMarkandAppIconmarks (Lobe Icons paths, MIT) and en / pt-BR strings. README,.env.exampleand.contextdocs are updated.Tests
chatCompletionsAgent.test.ts: the fixed endpoints and auth, notemperaturesent (Kimi rejects any value but its own), reasoning kept as a thinking block, echoed only when the flag is set, a full two-turn DeepSeek round-trip, and a thinking-only response still failing.rosterRouting.test.ts: routing, labels and vision flags for both kinds, including the text-only Pro and an off-roster id.providerKeyAccounts.test.ts: key-shape validation, roster-only model picks, and keys never echoed back.Not verified against the live APIs
deepseek-v4-proaccepts images (if it does, flipvisionto true) and whether the Kimi Code ids see images the way the platform's K3 tiers do.🤖 Generated with Claude Code