Repository navigation
Pin the OpenCode build agent's model to the primary route - #269
Draft
FredLiu876 wants to merge 1 commit into
Draft
FredLiu876 wants to merge 1 commit into
FredLiu876 wants to merge 1 commit into
Conversation
OpenCode 2 can create a --prompt session and resolve its model before it has applied the settings file, so on cold starts the session falls back to OpenCode's built-in free models instead of the configured route. OpenCode resolves the session model from the default (build) agent before the global model setting, so setup now pins the build agent's model alongside it in both settings formats.
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.
OpenCode 2 resolves the session model before applying settings, so a cold start falls back to built-in free models instead of the configured route, causing flaky
Test_Grid_OpenCodeServedModel_RealOpenCode2failures.grid setupnow pins the build agent's model, which OpenCode consults before the globalmodelkey, to the primary route in both settings formatsagent.build.modelis set in the original formatagents.build.modelis set in the native OpenCode 2 formatTesting shows
go build,go vet,gofmt, andgo mod tidyare clean, andgo testpasses forinternal/harnessandinternal/cmd. The real-binary test passes in an isolated environment against@opencode/cli2.3.0, though the race does not reproduce on fast machines.Out of scope: pinning
@opencode/cliin CI, changes to the served-model plugin, andreleaseDate-based config.