commandcode 0.1.11: a streamed Go reply Command Code stops before its finish line ends cut short, with a note, instead of failing the turn (#91)
This is the sibling of zen-free 0.1.4 (6a5dd01). /alpha/generate's reply
is turned into a Chat Completions stream, which magpie's gateway can't go
on with, so the error frame threw away what the client was already shown.
Now a streamed reply that said something (text, reasoning or a tool call)
and then lost its finish line ends with the note, a finish (`stop`, or
`tool_calls` after a call) and [DONE]. Tool calls arrive whole here, so
none can be half written. A reply that said nothing, or one that wasn't
streamed, is still a 502, so magpie retries it.
Run: HOME=$(mktemp -d) bun test packages/commandcode gave 37 pass. The
whole repo's bun test gave 1129 pass, 0 fail. bun scripts/check.mjs passed.
On the old index.mjs, 3 of the 4 new tests fail. With the cut branch
disabled by hand they fail again.
Not tried: a real Go account. The owner's two Command Code accounts aren't
on Go, and the real upstream can't be made to cut a stream. A streamed
request through the patched loader on those accounts still takes the
Provider API path, which this commit doesn't touch.
This commit is contained in:
@@ -37,6 +37,9 @@ Keys don't expire, so there is nothing to refresh.
|
||||
or not.
|
||||
- Failures keep their statuses: a model the plan lacks is a 403, running
|
||||
out of credits is a 402, and a usage-window limit is a 429.
|
||||
- A reply that stops before its finish line is a 502, unless it was
|
||||
streamed and had already said something. Then it ends cut short, with
|
||||
a note saying so, and `[DONE]` (#91).
|
||||
|
||||
The plan is read from `/alpha/billing/subscriptions`. It is cached for 10
|
||||
minutes; after a failed read, the plugin tries again after 1 minute.
|
||||
|
||||
Reference in New Issue
Block a user