Initialize session provider metadata from global config#8164
Draft
i386 wants to merge 2 commits intoblock:mainfrom
Draft
Initialize session provider metadata from global config#8164i386 wants to merge 2 commits intoblock:mainfrom
i386 wants to merge 2 commits intoblock:mainfrom
Conversation
Signed-off-by: James Dumay <jameswdumay@gmail.com>
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
This fixes two related session metadata issues in
goose-server:POST /agent/startnow initializes new sessions with the active global provider and model when there is no recipe override.POST /agent/resumenow always refetches the session after provider restore so the response reflects the persisted provider/model instead of returning stalenullfields.These changes make freshly created and resumed sessions report the same provider/model state that the backend is actually using.
Changes
provider_nameandmodel_configfromConfig::global()duringstart_agentresume_agentafterrestore_provider_from_sessionserial_testandtempfileasgoose-servertest dependencies to isolateGOOSE_PATH_ROOTsafely in those regressionsWhy
This showed up while validating
flockagainst Goose’s external backend APIs:provider_name = nullandmodel_config = nulleven though the backend had an active global provider/model configuredThat combination made external-backend clients think the session had no configured provider/model even when Goose could recover it.
Validation
cargo test -p goose-server routes::agent -- --nocaptureNotes
just generate-openapi. Backend schema generation succeeded, but the frontend SDK generation step failed in this environment becausenpx @hey-api/openapi-tscould not resolveget-tsconfig@4.13.6.