diff --git a/internal/api/server.go b/internal/api/server.go index 76e9a33aa3..a610b76c2a 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -993,7 +993,7 @@ func (s *Server) UpdateClients(cfg *config.Config) { } total := authEntries + geminiAPIKeyCount + claudeAPIKeyCount + codexAPIKeyCount + vertexAICompatCount + openAICompatCount - fmt.Printf("server clients and configuration updated: %d clients (%d auth entries + %d Gemini API keys + %d Claude API keys + %d Codex keys + %d Vertex-compat + %d OpenAI-compat)\n", + log.Debugf("server clients and configuration updated: %d clients (%d auth entries + %d Gemini API keys + %d Claude API keys + %d Codex keys + %d Vertex-compat + %d OpenAI-compat)", total, authEntries, geminiAPIKeyCount, diff --git a/sdk/cliproxy/auth/conductor.go b/sdk/cliproxy/auth/conductor.go index cd447e68d4..6a2caed39c 100644 --- a/sdk/cliproxy/auth/conductor.go +++ b/sdk/cliproxy/auth/conductor.go @@ -2159,7 +2159,12 @@ func (m *Manager) refreshAuth(ctx context.Context, id string) { updated.NextRefreshAfter = time.Time{} updated.LastError = nil updated.UpdatedAt = now - _, _ = m.Update(ctx, updated) + // Use WithSkipPersist to avoid writing the refreshed token back to disk. + // The in-memory state is already updated; persisting here would trigger + // the file watcher, which calls reloadCallback -> UpdateClients, creating + // a write-back feedback loop that spams the log with "configuration updated" + // messages every ~1 minute per token. + _, _ = m.Update(WithSkipPersist(ctx), updated) } func (m *Manager) executorFor(provider string) ProviderExecutor {