3 Commits
Author SHA1 Message Date
Chanyeong Lim 3fedabba29 pig 0.1.2: talk to Magpie over the Responses API so reasoning survives turns (#925)
PiG's Magpie provider now speaks openai-responses instead of openai-completions, so encrypted reasoning items round-trip across turns. Magpie's gateway takes Responses clients for every upstream and translates for Chat-only ones (covered by internal/gateway TestResponsesClientChatUpstream, TestDshResponsesReachChatVendor). agent-pig 0.1.2.

Reviewed at 87085bce. Run on the merged tree in WSL: bun test packages/pig 11 pass / 0 fail; bun scripts/check.mjs rc=0.
Not tried here: a real PiG binary; the author reports real tool calls and resume through Codex and a Chat-only upstream.
2026-11-10 13:38:07 +08:00
yetone 74cdf0de97 pig 0.1.1: the Agents row picks the model PiG starts on (str_)
str_ on Discord: PiG's row only listed models, where Pi's picks the one it
starts on. PiG keeps that in ~/.pig/agent/settings.json as
defaultProvider and defaultModel (PiG's settings reference and
startup_model.go). The descriptor now says `startup: {config:
settings.json, model: "defaultModel", keys: {defaultProvider: "magpie"}}`,
which magpie v0.1.3008 (1fd02d33c) reads: the row gets a model picker,
both keys are kept aside and put back on disconnect. An older magpie
ignores startup and keeps 0.1.0's connect-only row. The READMEs say so,
and that an enabledModels scope leaving the model out starts PiG on the
scope's first model.

Run (mote): bun test pig.test.mjs (11 pass; the new startup test checks
connect writes the provider defaultProvider names), bun scripts/check.mjs
ok. Real PiG 0.5.3 (darwin-arm64 release, SHA256SUMS checked) in a
sandbox HOME with this connect's models.json and the startup keys,
against a fake OpenAI server: `pig -p` sent model deepseek/flash; with
enabledModels ["magpie/deepseek/pro"] it sent deepseek/pro.

Not tried: PiG on Windows or Linux, a real magpie gateway in front of it.
2026-11-05 10:47:30 +08:00
yetoneandnetube 43ffb46018 agent: PiG (Pi in Go), with Magpie's endpoint and model catalog (#264)
New package @magpie-community/agent-pig 0.1.0, a connect-only Agent:
it manages the whole providers.magpie object in ~/.pig/agent/models.json
(name, baseUrl, apiKey, api openai-completions, models) and nothing else.
settings.json and auth.json are not touched; disconnect restores a prior
same-name provider or removes the provider whole. Models keep their ids,
names, image input, positive limits (output capped at the window), and
map Pi's seven thinking levels onto the model's efforts (off -> none,
unsupported -> null).

Re-review of head 7134b1038: both points of the 10-21 review are fixed.
The package README no longer names e2e scripts that aren't shipped, and
installs with `magpie plugin add @magpie-community/agent-pig`. Code is
unchanged from the reviewed 43fb5d927.

Run at this tree (PR squashed onto origin/main 397a890), sandbox HOME:
- bun test: 2093 pass, 0 fail.
- bun scripts/check.mjs: ok.
- Broken by hand, pig.test.mjs red each time: unsupported level as
  undefined (2 fail), no output cap (1), zero context written (1), off
  not mapped to none (1), hardcoded apiKey (1), ids rewritten (3).
- Read every line: no imports, no file or network access, no install
  hooks; the icon is a URL (pi-in-go.dev) as aider's is.
- npm has no @magpie-community/agent-pig yet, so 0.1.0 stays.

Not tried at this head: a real PiG binary or the magpie host. The 10-21
review ran both at 43fb5d927 (PiG v0.5.1 darwin-arm64 offline parse,
fake-upstream request, host connect/disconnect); the runtime file is
byte-identical since.

Co-authored-by: netube <61469467+netube99@users.noreply.github.com>
2026-10-22 02:24:08 +08:00