Skip to content

[codex] Hot-reload DeepSeek connection config#97

Merged
Cyberforker merged 1 commit into
Yapie0:mainfrom
Star-Star66:codex/issue-95-config-hot-reload
Jun 15, 2026
Merged

[codex] Hot-reload DeepSeek connection config#97
Cyberforker merged 1 commit into
Yapie0:mainfrom
Star-Star66:codex/issue-95-config-hot-reload

Conversation

@Star-Star66

@Star-Star66 Star-Star66 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • watch ~/.carboncode/config.json for DeepSeek API key and base URL changes
  • apply connection changes only while the loop is idle, preserving the active session and transcript
  • update the main loop, context folding, balance/model refreshes, and future subagents to use the replacement client
  • preserve explicit environment-variable overrides and ignore partially written JSON

Why

Issue #95 notes that changing provider connection settings currently requires restarting Carbon Code. The TUI constructed one DeepSeekClient at startup, and both context folding and the subagent closure retained that original client.

This change atomically replaces the client after the current turn finishes, so dashboard or config-file edits take effect within about one second without losing conversation state.

Addresses the configuration hot-reload suggestion in #95 without closing the broader issue.

Validation

  • npm run verify
  • 340 test files passed
  • 3918 tests passed, 2 skipped

@Star-Star66 Star-Star66 mentioned this pull request Jun 12, 2026
@Star-Star66 Star-Star66 force-pushed the codex/issue-95-config-hot-reload branch from 5c2ebb3 to ae2e6e2 Compare June 13, 2026 02:55
@Cyberforker Cyberforker merged commit 20b0743 into Yapie0:main Jun 15, 2026
4 checks passed
@Cyberforker

Copy link
Copy Markdown
Collaborator

Review Summary

Reviewed & merged by Carbon Code

Tests: npm run verify - 3918/3918 passed, 2 skipped
Feat: hot-reload DeepSeek API key and base URL changes while the loop is idle, preserving active sessions and env override precedence.

Thanks @Star-Star66 for the clean client-replacement architecture and thorough config reload coverage.

Co-Authored-By: Carbon Code carboncode@code.ai6666.com

-- Carbon Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants