What is the version of the following sentence with correct punctuation?

The governor could specify how long the legislature would remain in session but the legislature itself determined how long it would remain in session
The governor could specify how long the legislature would remain in session, but the legislature itself determined how long it would remain in session.