Commit Graph
1 Commits
Author SHA1 Message Date
yetone aec06bdf96 devin 0.1.19: a chat's response_format is told in the instructions, as the built-in told it
Devin's GetChatMessage has no field for the answer's format, so magpie's
built-in Devin (internal/gateway/devin.go, req.inSystem()) told the model
in the instructions: the json_schema's schema, or any JSON object for
json_object. The plugin dropped response_format, and magpie's generic
plugin path falls back to inSystem only when an upstream answers 400
naming the format, so a moved user asking for JSON got prose. build()
now adds the built-in's words (format.go's instruction) after the
system messages, ahead of the tool descriptions, at the head of the
first user message. A json_schema with no schema asks for any JSON
object, as the built-in's openAIFormat reads it.

Checked against the built-in, no change needed:
- Lightning variants (swe-2-high-lightning, swe-1-7-lightning-medium):
  the built-in's tiers are fast and priority only (devinTiers), so a
  -lightning id is no effort and no tier and is listed as its own model,
  as the plugin lists it.
- A failed tool's result: magpie sends its content as "Error: …", and
  build() passes a tool message's text to Devin as it came; a test now
  holds that.

Run: HOME=$(mktemp -d) bun test in packages/devin: 89 pass, 0 fail.
structured-output.test.mjs: 3 of its 5 tests red with the index.mjs
change taken out (the other two: no format unchanged, and the
"Error: " pass-through). bun scripts/check.mjs devin: ok.
Not run: a real Devin account, nor magpie end to end.
2026-10-16 17:32:23 +08:00