{"_id":"@smart-coders-hq/opencode-model-fallback","_rev":"13-715997b7a93b52a7da9491dc14709d63","name":"@smart-coders-hq/opencode-model-fallback","dist-tags":{"latest":"1.3.4"},"versions":{"1.0.1":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.0.1","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.0.1","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"a91c88f26d9b8e73cccf20d1192ca15114b1e4ab","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.0.1.tgz","fileCount":50,"integrity":"sha512-bbdhF1xPYZuZZLOBIb280UGhIp/PLgAJcar5ioVE1KFrDdsr3LfGaEzZDBbs/0dfQXQaciKOPmTzR+VgZ/JDvQ==","signatures":[{"sig":"MEUCICj19F0aFHQchUD5JwEEjPC0ZS6JHdWq7iOXUpL29XP/AiEAjiF5AQv+kzqf3PdNA6vw3pgBBLQxEH+CcaYpLGX/q5Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":188919},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f1ad73578de55249a9e7c1b0f433ae402421bad7","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome format --write .","release":"semantic-release","lint:fix":"biome lint --write .","typecheck":"tsc --noEmit","format:check":"biome format --check ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.0.1_1773789561774_0.3129545773739626","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.0.3","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.0.3","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"24b69266d78288753928b98dcb620e0799098522","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.0.3.tgz","fileCount":50,"integrity":"sha512-JlGfN7FPm5oJ/tLi5EAn9a3TSzgImEv23sg0h7ej1E8eC5Tric7inxs9Cj+j7Q67aY3l12zFlsNnsVXOE4q7Gg==","signatures":[{"sig":"MEYCIQDPRCZFKyBx1xMOoW0BEJDCtDH0Vu8emLj6RBZQeN/JUwIhAKKDUkRMrldfCOTep/+PcMawMskCRP+xvKkNPCE9ANKA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":188960},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"774ad97e38018b6e97a63919a4f66362f8c388b7","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome format --write .","release":"semantic-release","lint:fix":"biome lint --write .","typecheck":"tsc --noEmit","format:check":"biome format --check ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.0.3_1773862602229_0.29696185043293366","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.0.4","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.0.4","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"dcfef11fee5275d46047e5fb5bd0a9be078af1d1","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.0.4.tgz","fileCount":50,"integrity":"sha512-mdMAyCl60eCNYwAuyFrSBx27N9T2OvqJyuue4QgbF38aSHURvL4+LW8ZAFYs60li6E+Cvvpu7FaFHbBvoh3MbQ==","signatures":[{"sig":"MEYCIQCCw3UgejHEuC5DgvjmQNG9WdfJsczjMTQhdY/lIzUIvAIhAK1XhzfE2O18DpGT5ED8z2mLlvivjcPa/SJ7KW8ufVMU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191442},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"dda3dbb3915cffdbff0479ce0a37202d212ec830","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome format --write .","release":"semantic-release","lint:fix":"biome lint --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.0.4_1773867271202_0.766439320796771","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.0.5","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.0.5","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"df07deb8525ea74eec2d86a8275cbefc1cf59f74","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.0.5.tgz","fileCount":50,"integrity":"sha512-7qRr1LnQUvAInwzOEd0dOsz2gRv/ckcOE9GQKBiXmIafqMhZhTEJwKYyyV/xBB0beUc5e2ZWpFx7PlEZ2zc0TQ==","signatures":[{"sig":"MEUCIQCc5rpg578IftzypGA7sngmrKcYJBLwUilvftidUiMiTwIgMxwzookCe27UjsXC80EOkpGVsBWDaLoNvySZn+00mMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191402},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"2b9a0fa734ebe1b7e689f6d847260b92995a3c6e","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.0.5_1773867471565_0.9618746883670215","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.0.6","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.0.6","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"458f664de5e556deb9931d6e49928514d7d645df","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.0.6.tgz","fileCount":50,"integrity":"sha512-HhRnrJjFDvm1mVYEKbc2vey9zIjLNTwUFYvy0clz0QTppZfGjPzqdjnOokIXbcCDRdqGpNGEATtjZ5b0oCJMKw==","signatures":[{"sig":"MEYCIQCfbQsmKqJIzmp1xC/FSSywCaylZujE9LpiTf8UlRGtJAIhAKTSwPUdfYZP+fXWV7L0gEoMhTBMr5Ij4tE7lf49mtTv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191442},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4851f47bb31ed78672acaf249a5da014f13070f3","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.0.6_1773867795052_0.3610388429524287","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.1.0","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.1.0","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"4db6ef162d636b0b7c0aee3080a137db90cb7e1a","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.1.0.tgz","fileCount":50,"integrity":"sha512-OpYmIZnB1dXazD4vADRMfL0aqxVB369vHG5c4v4IkZr0q4LGbv3uklZtbOGr/Lmtk14rTZbr60oCmIAF28A90g==","signatures":[{"sig":"MEQCIF+1bOgtktyox/PlHyUh5aY6188P2JnIeJufv93KhLueAiBWKFBXXiowyejJbPUjxQ9XmfQ7ayQmDbYf7eW+GCx/mg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191661},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"19b3094ff484d7531d64bdc88ae6420ed50e6fbd","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.1.0_1773867993031_0.9420775180359782","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.1.1","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.1.1","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"bbf142e353b30170830106bc825bfc27b71e9202","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.1.1.tgz","fileCount":50,"integrity":"sha512-U51XbFr1K4eUQfWo73mIzX8GjK3pekcEOwXHLowGm7Th2gzvVtXLXZu2V+zuEafTJqWTIRSNQU2jkWFDh+zGEw==","signatures":[{"sig":"MEUCIBiZRvr5J7RdwPLT9l4kkHDgtRa7XfN+NjPcDTCLoZ+7AiEA5lBalEsRxYg4d4UM9BQ3h+vntgC7LzPemcef/N5BnuQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191661},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3a998138f0bee6c5bd23865314b89b1af936f333","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.1.1_1773868110330_0.1919237054594758","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.2.0","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.2.0","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"4f747678f0641a8435f8dfca59efe9ade8fc2c3b","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.2.0.tgz","fileCount":50,"integrity":"sha512-2i+cweqVataMT6JpkculBofC57aSfNuBogvPdZQu2ZAkvEpPZVrv8ee/bAqvB9TyvwjOdKpZ/fwq7QvuShlZLA==","signatures":[{"sig":"MEYCIQCFyAZ9jr74I+5Sv+rRW3lciIHsA4NId4oQtPdwIuTTUgIhAOIoamN6xX7Ho9Pb2nvDOYjR3JI3TRZ7ObfDne4kkQMx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191840},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"614f7d0d668db710e1f212d6497d11998e8d83b2","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.2.0_1773868553331_0.9789086004850271","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.3.0","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.3.0","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"886eacc51efff0d882e8618a06a9b63803dff096","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.3.0.tgz","fileCount":50,"integrity":"sha512-U0qGDUXiESpFuaI5vYGq+ni/43DctaQYMORhYWQQaUEoZVQGHPzIOXvlL7Soy6Kr2KkNaRBBtdmLhTRgAqJpRg==","signatures":[{"sig":"MEUCIQDPXma3fWnkpPQ26HIL4wjNg7YM2UOKZ+Aj8WS+wKVRoQIgVs5gY+gHbNSY0dSWs0pp/poRGza6Ydpdp4R9NTXklaw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":194964},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9ffd08de56f25c0a2fd757593665c2a572b83092","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.3.0_1774082657179_0.3488336892696875","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.3.1","keywords":["opencode","plugin","model-fallback","rate-limit","failover"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.3.1","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"2bf4c75b0aa455806268798a087618f3ee3bd4fd","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.3.1.tgz","fileCount":50,"integrity":"sha512-T5HSjx/Eg3Dk+MmgHfYPOKouJYr/ITUeEN2rrgBwL8xHDrxUo7h9v2sNmtZ0GlxTsKlw4QgA8jiCg+1nWWUGFQ==","signatures":[{"sig":"MEUCIDimgSgtVY6uJsulUNlyuvsfeZldR6RORj8lgB4ynw2cAiEAyl0svFIw8VAljGMsZpBHt8HvaT9/iZ9OVD8FwqTNJq0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":188228},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"80d73854304613bf29ee8ae4659e3c9011e02b88","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"Ordered model fallback chains with health tracking for OpenCode","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.3.1_1774128026264_0.12480043477065084","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.3.2","keywords":["opencode","opencode-plugin","plugin","llm","ai","model-fallback","fallback-chain","rate-limit","rate-limit-recovery","failover","model-routing","provider-fallback","openai","claude","gemini"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.3.2","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"0e1d5c92b4a0b3da00ef01374cc078939a8e9f65","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.3.2.tgz","fileCount":50,"integrity":"sha512-akYMNS8euvTIAjZTrxe8BKKkccw3Yrhr8qhqw2L+bnGB0wK0Y7PmhNG/ZQCb9GStv62znmu1MgsuSdkVXnWUQQ==","signatures":[{"sig":"MEYCIQCbUWDAhsZZLZrMC2xoCnU6Fc71AIPiQH9n8oHNdiPNzAIhAK5hJLIDXMkOa3emM7tTSt1S6v1XDK4Tspb5W9jl63Un","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":189499},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"01be30723206ec53eb6f779b68a4f7c848e92f57","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"OpenCode plugin for ordered model fallback chains, preemptive redirect, and automatic rate limit recovery.","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.3.2_1774600015937_0.5912373469681849","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.3.3","keywords":["opencode","opencode-plugin","plugin","llm","ai","model-fallback","fallback-chain","rate-limit","rate-limit-recovery","failover","model-routing","provider-fallback","openai","claude","gemini"],"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","_id":"@smart-coders-hq/opencode-model-fallback@1.3.3","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"dist":{"shasum":"4c5d56853fa5e6e66a5c4399568ae495141be8fa","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.3.3.tgz","fileCount":50,"integrity":"sha512-UZKJ8h/7oEyQuaMWLHUsaiGrknh4W4X11DfOajPIMgLhYwqZQPgCNHyBLbaRxxLgXKMy7Gz3hxWmdbQHMMI8ig==","signatures":[{"sig":"MEQCIG74svJOUxcLk7hYavZosKcHgFBSzyX4cCOy8JZ7XgkiAiBamKYxIjR4xMTeor2tRywte9enWujTwdC1OmFj8CG9XA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191441},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"00422b89cc8738f045b8abda5727125804338076","scripts":{"dev":"tsc --watch --noEmit","lint":"biome lint .","test":"bun test","build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","format":"biome check --write .","release":"semantic-release","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","format:check":"biome ci ."},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"repository":{"url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git","type":"git"},"_npmVersion":"11.11.1","description":"OpenCode plugin for ordered model fallback chains, preemptive redirect, and automatic rate limit recovery.","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","js-yaml":"^4.1.0","@types/bun":"^1.3.10","typescript":"^5.9.3","@biomejs/biome":"2.4.7","@types/js-yaml":"^4.0.9","semantic-release":"^25.0.3","@opencode-ai/plugin":"^1.2.24","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.1.5","@semantic-release/exec":"^7.1.0","@semantic-release/github":"^12.0.6","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/release-notes-generator":"^14.1.0"},"peerDependencies":{"zod":">=4.0.0","@opencode-ai/plugin":">=1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/opencode-model-fallback_1.3.3_1774607396128_0.5183121446878476","host":"s3://npm-registry-packages-npm-production"}},"1.3.4":{"name":"@smart-coders-hq/opencode-model-fallback","version":"1.3.4","description":"OpenCode plugin for ordered model fallback chains, preemptive redirect, and automatic rate limit recovery.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"bun build index.ts --outdir dist --target node --format esm --external @opencode-ai/plugin --external zod && tsc --emitDeclarationOnly","test":"bun test","typecheck":"tsc --noEmit","dev":"tsc --watch --noEmit","lint":"biome lint .","lint:fix":"biome check --write .","format":"biome check --write .","format:check":"biome ci .","release":"semantic-release"},"peerDependencies":{"@opencode-ai/plugin":">=1.2.0","zod":">=4.0.0"},"devDependencies":{"@biomejs/biome":"2.4.7","@opencode-ai/plugin":"^1.2.24","@semantic-release/changelog":"^6.0.3","@semantic-release/commit-analyzer":"^13.0.1","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.6","@semantic-release/npm":"^13.1.5","@semantic-release/release-notes-generator":"^14.1.0","@types/bun":"^1.3.10","@types/js-yaml":"^4.0.9","js-yaml":"^4.1.0","semantic-release":"^25.0.3","typescript":"^5.9.3","zod":"^4.3.6"},"keywords":["opencode","opencode-plugin","plugin","llm","ai","model-fallback","fallback-chain","rate-limit","rate-limit-recovery","failover","model-routing","provider-fallback","openai","claude","gemini"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git"},"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"gitHead":"4920240fb95c48b42f8d9e9d7648aa473740afe0","_id":"@smart-coders-hq/opencode-model-fallback@1.3.4","_nodeVersion":"24.14.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-UiRwGBTLvNCcO/chmQY0kq/h3+4Cd/XMpQgU4z0rcYjauoQXTAyzEK/Lxmz3vJ+79dPT2a53F0RU8XaNh4Lm8w==","shasum":"17dca0c77771047a8944609b76adddc0849b83c2","tarball":"https://registry.npmjs.org/@smart-coders-hq/opencode-model-fallback/-/opencode-model-fallback-1.3.4.tgz","fileCount":50,"unpackedSize":192791,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDhaN21HPgWX7GMGCO4rGNGl+Vq2swZ7rRin9M+HmzafgIhAKg1oDtJlhyaV5ckE0JndYqs3P06EO028oaLMMB9qu6l"}]},"_npmUser":{"name":"bpawlak","email":"blazej@smartcoders.xyz"},"directories":{},"maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-model-fallback_1.3.4_1775069294504_0.4796175777081757"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-17T23:19:21.698Z","modified":"2026-04-01T18:48:14.798Z","1.0.1":"2026-03-17T23:19:21.936Z","1.0.3":"2026-03-18T19:36:42.377Z","1.0.4":"2026-03-18T20:54:31.338Z","1.0.5":"2026-03-18T20:57:51.701Z","1.0.6":"2026-03-18T21:03:15.223Z","1.1.0":"2026-03-18T21:06:33.177Z","1.1.1":"2026-03-18T21:08:30.564Z","1.2.0":"2026-03-18T21:15:53.482Z","1.3.0":"2026-03-21T08:44:17.343Z","1.3.1":"2026-03-21T21:20:26.429Z","1.3.2":"2026-03-27T08:26:56.079Z","1.3.3":"2026-03-27T10:29:56.301Z","1.3.4":"2026-04-01T18:48:14.647Z"},"bugs":{"url":"https://github.com/Smart-Coders-HQ/opencode-model-fallback/issues"},"author":{"name":"Błażej Pawlak","email":"blazej@smartcoders.xyz"},"license":"Apache-2.0","homepage":"https://github.com/Smart-Coders-HQ/opencode-model-fallback#readme","keywords":["opencode","opencode-plugin","plugin","llm","ai","model-fallback","fallback-chain","rate-limit","rate-limit-recovery","failover","model-routing","provider-fallback","openai","claude","gemini"],"repository":{"type":"git","url":"git+https://github.com/Smart-Coders-HQ/opencode-model-fallback.git"},"description":"OpenCode plugin for ordered model fallback chains, preemptive redirect, and automatic rate limit recovery.","maintainers":[{"name":"bpawlak","email":"blazej@smartcoders.xyz"}],"readme":"# opencode-model-fallback\n\nOpenCode plugin for ordered model fallback chains, preemptive redirect, and automatic rate limit recovery.\n\nWhen a primary model becomes rate-limited, overloaded, times out, or hits a configured 5xx path, the plugin automatically redirects or replays the message with the next healthy model in your fallback chain. It helps keep OpenCode sessions running when GPT, Claude, Gemini, and other providers temporarily stop accepting requests.\n\n## What problem does this solve?\n\nIf you use OpenCode with multiple models or providers, rate limits and transient provider failures can interrupt chats and force manual model switching. This plugin adds automatic model failover so OpenCode can continue with the next healthy model instead of getting stuck on repeated retries, 429s, or provider overload errors.\n\n## How does model fallback work in OpenCode?\n\nThe plugin tracks model health globally, keeps fallback depth per session, and walks an ordered fallback chain when the active model fails. If a model is already known to be unhealthy, the `chat.message` hook can preemptively redirect the next prompt before the provider returns another 429.\n\n## Features\n\n- Preemptive redirect via `chat.message` when a model is already known to be rate-limited\n- Reactive fallback from both `session.status` retry events and `session.error` API errors\n- Per-agent ordered fallback chains with `\"*\"` wildcard support\n- Global model health tracking with automatic recovery windows\n- `/fallback-status` slash command for session depth, history, and model health\n- Structured logs with provider free-form error text redacted\n\n## Installation\n\nAdd the plugin to `~/.config/opencode/opencode.jsonc`:\n\n```jsonc\n{\n  \"plugin\": [\"@smart-coders-hq/opencode-model-fallback\"],\n}\n```\n\nFor local development:\n\n```jsonc\n{\n  \"plugin\": [\"file:///path/to/opencode-model-fallback/dist/index.js\"],\n}\n```\n\n## Configuration\n\nCreate `model-fallback.json` in either:\n\n- `.opencode/model-fallback.json`\n- `~/.config/opencode/model-fallback.json`\n\nMinimal example:\n\n```json\n{\n  \"enabled\": true,\n  \"defaults\": {\n    \"fallbackOn\": [\n      \"rate_limit\",\n      \"quota_exceeded\",\n      \"5xx\",\n      \"timeout\",\n      \"overloaded\"\n    ],\n    \"cooldownMs\": 300000,\n    \"retryOriginalAfterMs\": 900000,\n    \"maxFallbackDepth\": 3\n  },\n  \"agents\": {\n    \"*\": {\n      \"fallbackModels\": [\n        \"anthropic/claude-sonnet-4-20250514\",\n        \"google/gemini-flash-2-5\"\n      ]\n    }\n  },\n  \"logging\": true,\n  \"logLevel\": \"info\",\n  \"logPath\": \"~/.local/share/opencode/logs/model-fallback.log\"\n}\n```\n\nMost important knobs:\n\n- `defaults.fallbackOn` - which error categories trigger fallback\n- `defaults.cooldownMs` - how long a rate-limited model stays unavailable\n- `defaults.retryOriginalAfterMs` - when a cooled-down model becomes healthy again\n- `defaults.maxFallbackDepth` - max cascading fallbacks within one message\n- `agents` - ordered fallback chains per agent\n- `logging`, `logLevel`, `logPath` - structured file logging controls\n\nPer-agent example:\n\n```json\n{\n  \"agents\": {\n    \"build\": {\n      \"fallbackModels\": [\n        \"anthropic/claude-sonnet-4-20250514\",\n        \"google/gemini-3-pro\",\n        \"openai/gpt-4o\"\n      ]\n    },\n    \"coder\": {\n      \"fallbackModels\": [\"anthropic/claude-sonnet-4-20250514\"]\n    },\n    \"*\": {\n      \"fallbackModels\": [\n        \"anthropic/claude-sonnet-4-20250514\",\n        \"google/gemini-flash-2-5\"\n      ]\n    }\n  }\n}\n```\n\nIf you still have `rate-limit-fallback.json`, it is discovered and auto-migrated on load.\n\n## `/fallback-status`\n\nRun `/fallback-status` in any OpenCode session to see:\n\n- current session fallback depth and history\n- tracked model health and time remaining\n- active agent name\n\nVerbose mode adds token and cost breakdown by fallback period:\n\n```text\n/fallback-status verbose:true\n```\n\nWhen enabled, the plugin auto-creates `~/.config/opencode/commands/fallback-status.md` at startup.\n\n## Troubleshooting\n\n- **No toast appears** - toasts require an active OpenCode TUI session; headless/API runs still log events\n- **`/fallback-status` is missing** - verify `~/.config/opencode/commands/` is writable and check logs for `fallback-status.command.write.failed`\n- **\"no fallback chain configured\"** - add `agents[\"*\"]` or an entry for the active agent with at least one `fallbackModels` value\n- **\"all fallback models exhausted\"** - every configured fallback is currently rate-limited; wait for recovery or add more models\n- **\"max fallback depth reached\"** - all models in the chain failed within one message; start a new session or raise `maxFallbackDepth`\n- **Reactive fallback logged `replay.revert.failed`** - if OpenCode applied the revert but returned an invalid revert response, newer plugin builds verify session revert state and continue replay instead of aborting immediately\n\nCheck logs with:\n\n```bash\ntail -f ~/.local/share/opencode/logs/model-fallback.log | jq .\n```\n\nFor more event detail, set `\"logLevel\": \"debug\"` and restart OpenCode.\n\n## Development\n\n```bash\nbun install\nbun run lint\nbun test\nbunx tsc --noEmit\nbun run build\n```\n\nLocal plugin config:\n\n```jsonc\n{ \"plugin\": [\"file:///absolute/path/to/dist/index.js\"] }\n```\n\nFor local testing, place `model-fallback.json` in `.opencode/` in your project directory.\n","readmeFilename":"README.md"}