fix(tui): keep saved models across session transitions - #104
Merged
Conversation
Contributor
There was a problem hiding this comment.
No issues found in the model-default session transitions or continuation-compatibility changes. The changes look good to merge. Validation: diff whitespace checks passed; focused OpenAI provider and TUI tests were attempted but could not run because compilation exhausted local disk space.
Contributor
There was a problem hiding this comment.
No issues found. The updated provider preserves cross-model continuation state while retaining session, authentication, schema, and item validation; legacy migration preserves bounded originating-model provenance. The dependency update is confined to agentkit-provider-openai 0.10.8. Validation passed: 16 OpenAI provider tests, 44 TUI tests, and diff whitespace checks.
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.
Summary
Keep a model saved as the default active for new sessions created by the running TUI. Upgrade
agentkit-provider-openaito0.10.8so OpenAI sessions can replay continuation state across model changes without discarding encrypted reasoning or provider item IDs.Motivation
The ACP backend snapshots its startup model, so creating another session after saving a new default could revert to the previous model until Kit restarted. Separately, exact model-binding validation rejected cross-model continuation locally even though the ChatGPT API accepts it for the model boundaries exercised.
Technical details
Saved model defaults
Track the saved model choice in the running TUI and apply it to newly created sessions before submitting their first prompt.
Cross-model continuation
Use the provider fix released from AgentKit #19, replacing this PR's continuation-discard workaround. Legacy continuation migration no longer compares the originating model with the active model; it preserves the originating model as bounded, non-empty provenance while retaining schema, session, item-kind, and authentication validation. The dependency update is limited to
agentkit-provider-openaiand its lockfile entry.