Conversation
Add support for Moonshot AI models (kimi-k2.5, kimi-k2.6) via NVIDIA NIM and direct Moonshot API. The Vercel AI SDK sends fields that Moonshot does not support (parallel_tool_calls, strict response_format, frequency/presence penalties, unlimited max_tokens), causing 400 errors. Changes: - moonshot-fetch.ts: intercept and filter unsupported request fields * Remove parallel_tool_calls * Remove json_schema response_format without name * Remove strict flag from response_format * Clamp max_tokens > 98304 to 32768, remove if 0 * Force frequency_penalty and presence_penalty to 0 - provider-factory.ts: wire createMoonshotFetch() into Moonshot factory - provider.ts (llm): wire createMoonshotFetch() into Moonshot model - provider-factory.ts + provider.ts: pass baseURL for Anthropic provider to support Z.AI custom endpoints (https://z.ai/api/anthropic/v1) - urls.ts: fix ZAI_API from broken https://api.z.ai to https://z.ai - moonshot-fetch.test.ts: unit tests for all filtering logic Tested with: - NVIDIA NIM: moonshotai/kimi-k2.6 via integrate.api.nvidia.com - Z.AI: glm-5.1 via z.ai/api/anthropic/v1
Owner
Author
|
Closing to split into focused PRs |
gHashTag
added a commit
that referenced
this pull request
May 24, 2026
#1) - queen-browseros.md: BrowserOS Agent for Trinity A2A - skills: tri, doctor, god-mode, bridge - cron-queen.sh: 15-min autonomous lifecycle - launchd: com.trinity.queen-cron running - .trinity/experience.md: knowledge base - Full MCP access: fs_read, fs_write, shell_execute
gHashTag
added a commit
that referenced
this pull request
Aug 1, 2026
The supervisor surface was opened and looked at for the first time tonight, and it works. In the narrow panel: an OPEN DASHBOARD control at the top, a compact line reading "1 needs you - 0/4 working", and the bee board below it with a WAITING ON YOU section and a card carrying the state, the worker, the branch and an Accept button. Widened, the same plus the full swarm strip with the issue, the branch, awaitingReview and Review. gHashTag/trios#1118 closed on its last criterion, which was readability and could only ever be answered this way. Looking found a defect no test had: the issue number printed as `#1,124`. A SwiftUI `Text` interpolating an Int formats it as a quantity, and an issue number is an identifier - you cannot search for `#1,124` or paste it anywhere. Fixed on both screens that print one. The bee's own assertion for it could not pass: it compared lengths and claimed the identifier was shorter, while `browseros-ai#1129` and `1,129` are both five characters. A test that is false by construction fails the same way a real defect does, and it was caught only because the gate went red. It asserts the shape now - the rendered identifier carries no group separator. Also this cycle: an empty diff no longer sends the reviewer the first 500 lines of a file, and a verdict is bound to the tree state it was judged against. Ratchet 552 -> 559. Closes gHashTag/trios#1129 Refs gHashTag/trios#1118, gHashTag/trios#1124
gHashTag
added a commit
that referenced
this pull request
Aug 19, 2026
Bee work for browseros-ai#1129, landed as she wrote it. She introduced `IssueBadgeForm` with the rule stated in one place - an issue number is an identifier that happens to be written in digits, so routing it through a value formatter returns `#1,124`, by which rendering the issue cannot be found on GitHub and the number cannot be copied out of the card. Her edit sat uncommitted in the shared tree: her task predates worktrees, so she worked where every bee used to. The e2e check called this a regression. It searched for the literal `Text(verbatim: "#\(task.issue.number)")` - the first fix's exact spelling - while she had replaced it with `Text(verbatim: IssueBadgeForm.badge(...))`, a named form with its own assertions. The requirement is that the number reaches the screen verbatim; the check had pinned one way of writing that, and so failed the day someone wrote it better. It now accepts either.
dmitrii-f-t27
added a commit
that referenced
this pull request
Oct 2, 2026
… the next number A key added without a name was stored as an empty label and shown as the bare provider, so the owner's 25th NVIDIA key read "nvidia" above "nvidia #1".."#24". Environment keys are now named by their place in their pool (Z.ai's pool-2 keys become zai #1..#10 instead of #10001..#10010), a key added unnamed or named only after its provider takes the next free number under the add lock, and a managed key saved before numbering is numbered once, compare-and-set, the first time the owner's keys are listed.
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.
Summary
Adds support for Moonshot AI models (kimi-k2.5, kimi-k2.6) and fixes Z.AI connectivity via Anthropic-compatible API.
Moonshot API Compatibility
The Vercel AI SDK sends fields that Moonshot does not support, causing 400 errors:
parallel_tool_callsresponse_format.json_schemawithout nameresponse_format.strictmax_tokens > 98304ormax_tokens = 0frequency_penalty/presence_penalty(Moonshot only supports 0)Changes:
moonshot-fetch.ts: new fetch wrapper that intercepts and sanitizes request bodiesprovider-factory.ts: wirescreateMoonshotFetch()into the Moonshot factoryprovider.ts(llm): wirescreateMoonshotFetch()into the Moonshot modelmoonshot-fetch.test.ts: unit tests for all filtering logicZ.AI BaseURL Fix
Z.AI uses an Anthropic-compatible API at
https://z.ai/api/anthropic/v1, but the built-in Anthropic factories were ignoring custombaseUrl, sending requests toapi.anthropic.com. This caused "invalid x-api-key" errors.Changes:
provider-factory.ts: passbaseURLtocreateAnthropic()when setprovider.ts(llm): passbaseURLtocreateAnthropic()when seturls.ts: fixZAI_APIfrom brokenhttps://api.z.aitohttps://z.aiTested With
moonshotai/kimi-k2.6https://integrate.api.nvidia.com/v1glm-5.1https://z.ai/api/anthropic/v1Closes browseros-ai#657