#76: Zen's free models sometimes call a tool by a name the agent never declared (tkhs101's table: bedit, bcp, ash, mcp__netcatcatty__unused, beside declared edit, bash, mcp__netcatty-external__list_hosts). The guard answered each with "Upstream called a tool not declared by the client", which failed the whole turn. The rows without a name are from before 0.1.1 (published 10-10 11:51 UTC), which added the name. Now such a call (or one with no name) is left out of the reply instead: - chat: dropped from tool_calls/function_call; the reply's content says "(The model called a tool this agent doesn't have: "bedit". The call was left out.)"; kept calls are renumbered from 0; finish_reason becomes "stop" when no call is left, including a repeated finish. - responses: the function_call item becomes a message item with the note (added, text deltas, done, and in response.completed); its argument events are not passed on. - anthropic: the tool_use block becomes a text block with the note; its input deltas are not passed on; stop_reason tool_use becomes end_turn when no call is left. A call of an unsupported type (custom tools, non-object input) still fails as before. Run: - bun test packages/zen-free: 155 pass, 0 fail; node --test packages/zen-free/*.test.mjs: 155/155; bun scripts/check.mjs zen-free. - The new tests on the old tool-response.mjs: 35 fail. - Breaking the finish rewrite by hand: 5 fail. - Chat stream fixtures use the shape a live step-5-preview-free stream sent (name whole in the first delta, arguments in pieces, two tool_calls finishes). Zen sends names whole, so the names in #76 are the model's own; a real misnamed call was not reproduced live.
OpenCode Zen Free
OpenCode Zen's free models in magpie and OpenCode. Provider id:
opencode-zen-free.
Install
magpie plugin add @magpie-community/opencode-zen-free-auth
magpie plugin login opencode-zen-free
Sign in
Enter public in the key field. No personal API key is needed.
The credential is kept in OpenCode's auth.json or magpie's
plugin-auth.json.
Models
The plugin discovers Zen's current free models, including their context
windows and reasoning levels. Use opencode-zen-free/<model>, for example
opencode-zen-free/big-pickle.
Retired models and SystemOne models are excluded. The list is asked again each time the host lists models (magpie does this on start and every hour): a model Zen no longer gives free leaves it, and a new free one joins it. When Zen's list can't be read, the last list is kept. A request for a model that isn't free now gets a 404 naming the free ones; one made free since the last list is served after the list is asked again (at most once a minute). Availability and rate limits are set by Zen; the plugin has no remaining-quota data.
Requests
Requests go to https://opencode.ai/zen/v1 using each model's native
Chat Completions, Responses or Anthropic Messages API. Streaming and
ordinary JSON replies are supported.
The agent's tools are preserved. Zen's models often call OpenCode's own
tool names; such a call is given the agent's tool whose name differs only
in case (bash to Bash), or else only in case and _/- (todowrite
to todo_write, webfetch to web_fetch), when exactly one does. A
call with no such tool (or with no name) is left out of the reply, and
the reply's text says which name was left out; a turn whose every call
was left out ends as an ordinary answer. Tools run in the agent.