Feat: reuse persisted model and reasoning effort on thread resume#14888
Merged
shijie-oai merged 5 commits intomainfrom Mar 18, 2026
Merged
Feat: reuse persisted model and reasoning effort on thread resume#14888shijie-oai merged 5 commits intomainfrom
shijie-oai merged 5 commits intomainfrom
Conversation
5ac8787 to
a6502e7
Compare
shijie-oai
added a commit
that referenced
this pull request
Mar 17, 2026
…14859) ### Summary The goal is for us to get the latest turn model and reasoning effort on thread/resume is no override is provided on the thread/resume func call. This is the part 1 which we write the model and reasoning effort for a thread to the sqlite db and there will be a followup PR to consume the two new fields on thread/resume. [part 2 PR is currently WIP](#14888) and this one can be merged independently.
f4d512e to
7c7b5a8
Compare
shijie-oai
commented
Mar 17, 2026
| &response_history, | ||
| rollout_path.as_path(), | ||
| fallback_model_provider.as_str(), | ||
| persisted_resume_metadata.as_ref(), |
Collaborator
Author
There was a problem hiding this comment.
Pass down persisted_resume_metadata if available to avoid an additional db read.
shijie-oai
commented
Mar 18, 2026
Comment on lines
+7527
to
+7529
| if has_model_resume_override(request_overrides.as_ref(), typesafe_overrides) { | ||
| return; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
If any override is detected, we not merged the persisted model settings.
owenlin0
approved these changes
Mar 18, 2026
codex-rs/app-server/README.md
Outdated
| To continue a stored session, call `thread/resume` with the `thread.id` you previously recorded. The response shape matches `thread/start`, and no additional notifications are emitted. You can also pass the same configuration overrides supported by `thread/start`, including `approvalsReviewer`: | ||
| To continue a stored session, call `thread/resume` with the `thread.id` you previously recorded. The response shape matches `thread/start`, and no additional notifications are emitted. You can also pass the same configuration overrides supported by `thread/start`, including `approvalsReviewer`. | ||
|
|
||
| When no model-related resume override is provided, resume reuses the latest persisted `model` and `reasoningEffort` values for that thread. Supplying any of `model`, `modelProvider`, `config.model`, or `config.model_reasoning_effort` disables that persisted fallback and uses the explicit overrides plus normal config resolution instead: |
Collaborator
There was a problem hiding this comment.
nit: codex language can be a bit robotic sounding haha
maybe something like this would be better
By default, resume uses the latest `model` and `reasoningEffort` values associated with the thread. Supplying any of...
3044794 to
e997f56
Compare
e997f56 to
82375e8
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
This PR makes
thread/resumereuse persisted thread model metadata when the caller does not explicitly override it.Changes:
thread/resumemodelandmodel_reasoning_effortas resume-time defaultsWhy
Before this change, resuming a thread without explicit overrides derived
modelandmodel_reasoning_effortfrom current config, which could drift from the thread’s last persisted values. That meant a resumed thread could report and run with different model settings than the ones it previously used.Behavior
Precedence on
thread/resumeis now: