ac4af582301a4e8a29245dbba767eba31334ddf9
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9bb1efdde3 |
gateway: a reply names the model the agent asked for when it went out under another name (issennknight)
issennknight on Discord (#general): an agent asked for deepseek-v4.1-flash, which goes out as deepseek-v4.1-flash-1017 (settings' ModelIDs). The vendor's reply said -1017, magpie passed it back, and the agent warned that the model didn't match. Before, only MemberModel (#822) or X-Magpie-Response-Model: member rewrote a reply's model, and only to the group member's id. Now the default is nameAsked. When magpie sent the request under another name than the agent asked for (a model's own id, a routing group, a provider/model id), the reply names the asked model. That covers Chat and Anthropic `model`, Responses `response.model` (created, in_progress, completed), Anthropic `message.model` (message_start) and Gemini `modelVersion`, streamed and whole, translated paths and plugins included: it all goes through serve's one memberWriter. A vendor that sent back the wire name as asked keeps its own name, a dated -20261017 too. Usage rows, recent calls and the Routing page still record served = the vendor's name: the writer sits outside captureResponseWriter. Claude Code, Claude Desktop and Codex get the asked name (or the vendor's), never the member's id, as before. Streams are rewritten one complete line at a time (memberLines). A run with no "model" in it is written through as the same slice. Only a JSON reply that has a target at decide time is held whole, which is what MemberModel already did. A JSON body that doesn't parse (a reply cut short) goes on as it came. A request to a remote magpie now sends X-Magpie-Response-Model: vendor (passOnCaller). That magpie names the vendor's model, as before, so this one still records what served the call (TestRemoteMagpieGroupNotSwapped went red without it). Existing tests that held a native reply byte for byte now expect only its model renamed to the asked id (namedAs in member_test.go): passthrough_severed, stream_accounting, refusal, refusal_thinking, thinking_signature and vertex. The archive keeps the reply as the vendor sent it, under the vendor's name (archive_test). Also dropped: the openai-model header code. serve never relays that header, so the test for it could not pass. Run (mote, at this head rebased on origin/main |
||
|
|
5c1ccec4a1 |
provider: WorkBuddy plugin min 0.2.6, an empty tool_calls is no call (plugins #540)
itspig (plugins #540, 2026-10-31) ran v0.1.2283 with workbuddy 0.2.5 on
the live account in a [workbuddy, volcengine] group: the refusal
"\nSorry, I can't respond to this question.\n" still reached the client
and the workbuddy try was done/200 with firstText 3208, volcengine never
asked.
The cause was in the plugin. copilot.tencent.com puts "tool_calls": []
on every delta (
|
||
|
|
f1d5bedba6 |
provider: WorkBuddy plugin min 0.2.5, the filter's line with its newlines (plugins #540)
itspig (plugins #540, 2026-10-30) found v0.1.2278 with workbuddy 0.2.4 still passed WorkBuddy's content_filter refusal to the agent: the real chunk's content is "\nSorry, I can't respond to this question.\n", and 0.2.4 trimmed only the leading newline, so the line went on as an answer and the group's next member was never asked. workbuddy 0.2.5 (plugins b5cc782) trims both sides. - The workbuddy mover's min is 0.2.5 (npm view --prefer-online: 0.2.5). - TestDeepSeekRefusalAfterThinkingFailsOver gets a subtest with what 0.2.5 hands on from itspig's literal chunks (empty content and refusal on the reasoning chunk, extra_fields/function_call null, role on the content_filter chunk): the try fails as refused and b answers. Run on mote at this tree: go test ./internal/gateway -run TestDeepSeekRefusalAfterThinkingFailsOver -count=1 ok (3 subtests); go test ./internal/provider -run 'Mover|Moved|Workbuddy|WorkBuddy' ok; gofmt -l clean. Broken by hand: the new subtest fed 0.2.4's output (the line with its newlines left in the content_filter chunk) goes red. Not tried: a live WorkBuddy account; the full ./... suite. |
||
|
|
c8f199695c |
gateway: DeepSeek's reasoning is held for a refusal after it; WorkBuddy plugin min 0.2.4 (plugins #540)
itspig (plugins #540): deepseek-v4.1-flash on WorkBuddy, through group/tiered, reasoned ~5s, said "Sorry, I can't respond to this question.", and ended finish_reason content_filter with 0 output tokens under a 200. The try was recorded done/200, none of the 15 members behind it was asked, and DeepSeek Harness failed "The model refused to complete the request". Two halves: - workbuddy 0.2.4 (plugins 4883f94) takes the filter's canned line out of a streamed chat that ends content_filter with nothing else said. - refusesAfterThinking now holds DeepSeek's reasoning too (as Claude's, GPT's and Gemini's), only while another candidate could answer: with it let through as it came, a refusal after it could never go to the next member. DeepSeek's own API documents finish_reason content_filter. The cost: in a group with a member behind it, DeepSeek's thinking reaches the agent once its text begins (kept alive meanwhile), as Claude's does; on the last candidate it streams as before. GLM, Kimi and others are unchanged. - The workbuddy mover's min is 0.2.4 (npm view --prefer-online: 0.2.4). Run on mote at this tree: go test ./internal/gateway -run 'TestDeepSeekRefusalAfterThinkingFailsOver|TestThinkingHeldFor| TestRefusalAfterThinkingFailsOver|TestThinkingStreams' ok; go test ./internal/provider ok; gofmt -l clean. The full ./... suite was started at this tree minus the one-line min and is still running; its result goes on plugins #540 (owner rule: tag without waiting). Broken by hand: without the deepseek prefix, TestDeepSeekRefusalAfterThinkingFailsOver/refused goes red (DeepSeek's reasoning reached the agent, b never asked) and TestThinkingHeldFor red for the three DeepSeek ids; /answered stays green. Not tried: a real WorkBuddy refusal (no prompt reproduces it on demand); the upstream's literal chunking isn't in the issue, so the fixture is built from its fields (reasoning, content_filter, 0 tokens). |
||
|
|
2fc277de9f |
gateway: GLM's thinking streams again through a group (悠悠哥 on Discord: ZCode's thinking shows only at the end, all at once) — since a8f0baaa (#248) a stream that had only reasoned was held, up to 4 minutes, until its text or a call began, for a refusal after the reasoning to go to the next account; so GLM on a ZCode account (or any key with retries left, or any group member before the last) showed Claude Code its thinking only once the text came, in one burst. Only Claude's, OpenAI's and Gemini's safety filters end a reply that has only reasoned with a refusal, so reasoning is now held only for those models (claude-*, gpt-*/o-series/codex, gemini-*); anybody else's (GLM, DeepSeek, Kimi, MiniMax…) goes through as it comes, as before #248. Requests, headers and prompts are unchanged. TestThinkingStreamsThroughGroup (a fake vendor streaming three thoughts 200ms apart, on Anthropic's API and on Chat with reasoning_content, read by a real HTTP client through a group) and TestThinkingHeldFor fail without the change; TestRefusalAfterThinkingFailsOver now names Claude and GPT models and still passes. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass.
|
||
|
|
a8f0baaaa0 | gateway: a refusal after only thinking goes to the next account (#248, Koohoko: safeguards stopped the response above) — Opus 5.5 at xhigh thought 10–25s and then ended with stop_reason refusal, and magpie had counted the first thinking delta as the reply having started, so the stream was already Claude Code's and the refusal passed through instead of the next account being asked. Reasoning (Anthropic thinking, Responses reasoning and summaries, Chat reasoning_content, Gemini thought parts) is now held with the reply, up to 4 minutes, and let through with it as soon as text or a call comes. A ChatGPT bio_policy translated for Claude Code or a Chat agent kept only its message, read as any failure, and set the account aside; the refusal's code now survives translation. TestRefusalAfterThinkingFailsOver and TestThinkingHeldLonger fail without the change. |