Files
plugins/packages/factory/package.json
T
XIQI d7d8d61c42 factory: adapt Claude Code's standalone model-switch system updates (#9)
After /model, Claude Code 2.1.287 sends a separate string-content system message that opens with the new model paragraph and carries <total_tokens> metadata but no environment block; Factory refused it with 403, so continuing a conversation after a model switch failed. systemContext now also adapts that shape: only when the message starts with the model paragraph and has a complete generated <total_tokens>N tokens left</total_tokens> paragraph, it rewrites each whole model paragraph (named or not, routing-group ids, accumulated switches) to Current model / Model ID / Model knowledge cutoff, leaving every other byte, role and order as sent; inference and count_tokens share it, and a second pass is byte-identical. Tests cover accumulated switches across both endpoints with idempotence, and pass-through for incomplete markers, quoted text, array content and non-system roles. Factory bumped to 0.1.9.
2026-10-02 23:22:21 +08:00

11 lines
345 B
JSON

{
"name": "@magpie-community/opencode-factory-auth",
"version": "0.1.9",
"description": "Sign in to a Factory (Droid) subscription from OpenCode or magpie",
"type": "module",
"main": "./index.mjs",
"files": ["index.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "magpie", "factory", "droid"],
"license": "MIT"
}