Skip to content

[FEATURE] Reload configuration in chat with /reload #1502

Description

@inference-gateway-maintainer

Summary

Make configuration reload in chat real. shortcuts.SideEffectReloadConfig exists and ChatShortcutHandler.handleReloadConfigSideEffect handles it, but nothing emits the side effect and the handler only prints "Configuration reloaded successfully" without reloading anything. There is no file watcher either (no fsnotify or viper.WatchConfig anywhere). Today a change to config.yaml takes effect on the next infer chat.

This is the second prerequisite of the /config skill (#1499): "adjust the gateway timeout to 300" must apply to the running session, otherwise the skill is just a slower infer config set.

Split out of #1499. Sibling prerequisite: #1501 (protected tools.yaml).

Proposed shape

  • One reload entry point in cmd/runtime that re-runs the existing load (defaults, userspace config.yaml, project override, INFER_* env) and returns a fresh *config.Config, then applies it to the running services. Reuse the loader that already exists; do not write a second one.
  • Apply in place where services hold *config.Config so pointers stay valid, or route through runtime.State. Decide once, document it in the code.
  • Define what is hot: gateway.* (url, timeout, api_key), agent.model, agent.max_turns, agent.max_tokens, agent.effort, output.*, logging.level. Everything else (tools, sandbox, channels, mcp, plugins, hooks) is restart-only; the reload reports which changed keys need a restart instead of pretending. Keeping tools and sandbox restart-only is deliberate: the agent must not be able to change its own approval policy mid-session even if a file somehow changes.
  • Trigger: a /reload shortcut that emits SideEffectReloadConfig, with the handler doing the reload and reporting changed keys and restart-only keys. Optional: infer config set prints a hint to run /reload. No file watcher for v1; a watcher can emit the same side effect later if wanted.
  • Headless (infer headless, daemon) is out of scope for this issue.

Acceptance Criteria

  • /reload re-reads config files and env and the status line lists the keys that changed.
  • After infer config set gateway.timeout 300 and /reload, the next gateway request uses the new timeout (observable in traces or debug logging).
  • After infer config set agent.model <provider/model> and /reload, the next turn uses the new model and the status bar reflects it.
  • Changing a restart-only key and running /reload produces a clear "takes effect on restart" message and does not change the running policy; a test covers tools.safety.approval_behaviour specifically.
  • A reload that fails validation keeps the previous config and shows the error.
  • The dead handleReloadConfigSideEffect message is replaced by the real outcome; go test ./... passes.

Activity

  1. added theissue type on Oct 2, 2026
  2. moved this from In progress to QA in 2026on Oct 2, 2026
  3. inference-gateway-releaser commented on Oct 3, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.223.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  4. moved this from QA to Done in 2026on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions