@magpie-community/opencode-agy-tui-auth 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +11 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1717,6 +1717,16 @@ export async function handle(home, input, init = {}) {
1717
1717
  // model's and still sends it here under that id. A variant sends its level
1718
1718
  // as reasoning_effort, for OpenCode, which says no X-Magpie-Effort.
1719
1719
  export function modelEntry(m) {
1720
+ const caps = {
1721
+ // a model with levels says it thinks in its capabilities, where the
1722
+ // host reads a models hook's: reasoning beside the variants alone read
1723
+ // as a model that doesn't, with no level to pick in the agent
1724
+ // (lijiho96940561 on X, dsh)
1725
+ ...(m.variants?.length ? { reasoning: true } : {}),
1726
+ // Gemini's and Claude's see the images agy attaches, as agy-cli says,
1727
+ // and Gemini's the videos too
1728
+ ...(/^(?:gemini-|claude-)/.test(m.id) ? { attachment: true, input: { text: true, image: true, video: m.id.startsWith("gemini-"), audio: false, pdf: false }, output: { text: true } } : {}),
1729
+ }
1720
1730
  return {
1721
1731
  id: m.id,
1722
1732
  name: m.name,
@@ -1724,9 +1734,7 @@ export function modelEntry(m) {
1724
1734
  api: { id: m.id, url: "agy-tui://local", npm: NPM },
1725
1735
  limit: { context: contextOf(m.id), output: 65_536 },
1726
1736
  ...(m.variants?.length ? { reasoning: true, variants: Object.fromEntries(m.variants.map((e) => [e, { reasoningEffort: e }])), former: m.former ?? [] } : {}),
1727
- // Gemini's and Claude's see the images agy attaches, as agy-cli says,
1728
- // and Gemini's the videos too
1729
- ...(/^(?:gemini-|claude-)/.test(m.id) ? { capabilities: { attachment: true, input: { text: true, image: true, video: m.id.startsWith("gemini-"), audio: false, pdf: false }, output: { text: true } } } : {}),
1737
+ ...(Object.keys(caps).length ? { capabilities: caps } : {}),
1730
1738
  }
1731
1739
  }
1732
1740
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magpie-community/opencode-agy-tui-auth",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Magpie/OpenCode model provider that runs Antigravity's models through agy's own interactive mode: each request is typed into the real agy TUI and its answer streamed from agy's own conversation store as the model writes it",
5
5
  "type": "module",
6
6
  "main": "./opencode.mjs",