Zed's cloud reads toolConfig.functionCallingConfig.mode with lowercase variants only (auto, any, none). The Gemini API's proto enums, which the AI SDK's @ai-sdk/google and magpie's Code Assist envelope both write (AUTO, ANY, NONE), were answered 400 "failed to parse Google AI request: unknown variant `AUTO`, expected one of `auto`, `any`, `none`", so every Gemini turn that declared a tool failed while plain chat and a model test worked (atticuskk on magpie#4657). providerRequest's gemini case now lowercases the mode; nothing else in the request moves. ggbdpq (gua2100) found the cause and proposed the fix on magpie's side (a body fitter for the zed account). It is made here instead, where the request is fitted to Zed's cloud: the plugin is what knows Zed's wire, and OpenCode users of this plugin, whose @ai-sdk/google writes AUTO too, are covered the same way. Run (mote): cd packages/zed && bun test: 54 pass, 0 fail; bun scripts/check.mjs zed: ok. Broken by hand: the lowercase line off -> gemini-tool-mode.test.mjs red (3 fail, 400 for AUTO, ANY, NONE). Not tried: a live request to cloud.zed.dev (no Zed account here). Co-authored-by: ggbdpq <ggbdpq@gmail.com>
12 lines
479 B
JSON
12 lines
479 B
JSON
{
|
|
"name": "@magpie-community/opencode-zed-auth",
|
|
"version": "0.1.13",
|
|
"description": "Sign in to a Zed subscription (Zed Pro, trial, student, business) from OpenCode or magpie",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"files": ["index.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "zed"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/zed" }
|
|
}
|