Repository navigation
Refuse deployment model keys for self_hosted guests - #486
Merged
Merged
Conversation
Until the Harness runs on an agent host, the guest daemon of a self_hosted Environment runs on the caller's machine, so the deployment default provider must not be frozen into its Session. Creation without a Session or Agent provider returns model_provider_required before any write.
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.
Until the Harness runs on an agent host (cutover PR5), a self_hosted Environment's guest daemon runs on the caller's machine. #477 let every Environment type resolve the deployment default provider, so a self_hosted Session could freeze the deployment key and dispatch would deliver it to that machine.
This restores the refusal for self_hosted only: a self_hosted Session with no Session or Agent provider returns
400 model_provider_required(paramx_agents_core.model_provider) before any write.createSessionis the only producer of a deployment-sourced provider.The guard is temporary and goes in PR5, so the route description and docs stay at the target state.
Checks:
go test ./internal/api/, andTestUnifiedModelConfigurationHTTP,TestDeploymentModelProvidersHTTPandTestSessionRetryAfterDeploymentDefaultChangesagainst Postgres.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.