fix(opencode): Accept nested provider model paths - #90
Merged
Merged
Conversation
buildArgs rejected any model carrying more than two segments, so opening a session on openrouter/meta/muse-spark-1.3-contributor died before spawn with "must be provider/model". Allow extra slash-separated segments, and keep rejecting empty segments, whitespace and names with no slash at all. Co-Authored-By: Claude <noreply@anthropic.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.



Opening a session on a provider model with more than two path segments failed before spawn. Three sessions died on this yesterday with the same error:
MODEL_SHAPEinbuildArgsonly acceptedprovider/model, and it is the only gate insrc/producing that message. It now accepts extra slash-separated segments, while still rejecting empty segments (a//b,a/b/,/a), whitespace, and names with no slash at all.The opencode catalog preflight is not part of this. It warns and continues instead of gating the launch, so it never blocked these sessions.
On coverage: the existing rejection list already pinned the bare name, whitespace, leading slash and trailing slash cases. The empty middle segment was missing, and so was anything that pinned the end anchor once nesting is allowed. Both gaps are closed here, and both were confirmed by injecting the corresponding regression and watching a named test fail.