Improve PATCH /config - Add hot-reload w/ selective cache invalidation (#15)#4303
Closed
shuv1337 wants to merge 37 commits into
Closed
Improve PATCH /config - Add hot-reload w/ selective cache invalidation (#15)#4303shuv1337 wants to merge 37 commits into
shuv1337 wants to merge 37 commits into
Conversation
PATCH /config hot-reload w/ selective cache invalidation
* Fix cache corruption bug in refresh function
- Add enabled_providers config for whitelisting providers - Add per-provider whitelist/blacklist for models - Keep hot-reload branch openrouter npm fix - Resolve merge conflicts in provider.ts
917250b to
f4593c6
Compare
f1dc981 to
3e15a39
Compare
df8bdf9 to
0dd5039
Compare
Resolve conflicts in: - config/config.ts: Use resolveGlobalFile import and updated NamedError path - plugin/index.ts: Keep State.register pattern with cleanup, update plugin versions - provider/provider.ts: Keep State.register pattern for hot-reload support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update import to use @opencode-ai/util/error to match the NamedError module relocation from dev branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
I don't see this getting merged any time soon so i'm just going to close it and maintain it in my own fork |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements runtime configuration updates through a PATCH /config endpoint with optional hot-reload capability controlled by OPENCODE_CONFIG_HOT_RELOAD environment variable.
Changes
Features
Infrastructure
Testing
Documentation
Breaking Changes
None. Hot-reload is opt-in via environment variable. Default behavior maintains existing cache semantics.
Configuration
Set OPENCODE_CONFIG_HOT_RELOAD=true before starting server to enable runtime config updates without restart. Without this flag, disk writes persist but in-memory cache remains until process restart.