fix(opencode): resolve opencodeModel "inherit" on all structured-output paths#195
Open
anagnorisis2peripeteia wants to merge 1 commit into
Open
Conversation
…ut paths Auto-capture already expanded "inherit" from the chat.params-recorded session model. Profile learning, conflict/dedup checks, and other generateStructuredOutput callers still forwarded modelID="inherit" literally, producing ProviderModelNotFoundError: Model not found: local/inherit (and the same for other providers). Resolve inherit centrally in generateStructuredOutput: prefer a recorded prompt model, else fall back to OpenCode's recent model.json entry for the configured provider. Document the behavior and lock it in with tests.
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
opencodeModel: "inherit"(from #151) only expanded to a concrete model on the auto-capture path. Profile learning, conflict/dedup checks, description evolution, and othergenerateStructuredOutputcallers still sentmodelID: "inherit"to OpenCode, which fails with:(and the same shape for any configured provider).
This expands
inheritcentrally insidegenerateStructuredOutput:chat.params)model.jsonfor the configured providerTest plan
bun test tests/opencode-provider.test.ts(26 pass, including 5 new inherit cases)"opencodeModel": "inherit"configured, trigger profile learning / auto-capture and confirm noModel not found: <provider>/inherittoastschat.paramshas run