GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(opencode): preserve subagent model variants by sdip15fa · Pull Request #29066 · anomalyco/opencode Conversation
|
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The following comment was made by an LLM, it may be inaccurate: I found several related PRs that address similar concerns about model variants and subagent inheritance: Potential Related PRs
These PRs appear to address the same or overlapping concerns about preserving and inheriting model variants for subagents. PR #12567 seems most directly related as it also deals with passing variants from parent to subagent prompts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds and verifies variant inheritance behavior across parent/child agent prompts, ensuring variants are only propagated when the child uses the same model (and no explicit child variant/model is configured).
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/opencode/test/tool/task.test.ts | Adds seed options and new TaskTool tests covering variant inheritance and persistence. |
| packages/opencode/test/session/prompt.test.ts | Adds SessionPrompt tests for applying agent variant to inherited models and avoiding variant propagation across explicit model changes. |
| packages/opencode/src/tool/task.ts | Implements parent-variant inheritance for same-model subagent execution when no child variant is configured. |
| packages/opencode/src/session/prompt.ts | Restricts variant propagation to same-model scenarios and broadens when agent variant can apply to inherited/default models. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ) | ||
| const model = input.model ?? ag.model ?? (yield* currentModel(input.sessionID)) | ||
| const same = ag.model && model.providerID === ag.model.providerID && model.modelID === ag.model.modelID | ||
| const same = !ag.model || (model.providerID === ag.model.providerID && model.modelID === ag.model.modelID) |
| const seed = Effect.fn("TaskToolTest.seed")(function* ( | ||
| title = "Pinned", | ||
| opts?: { assistantVariant?: string; assistantModel?: typeof ref }, | ||
| ) { |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
TUI drops model variant after entering subagent
There was an error while loading. Please reload this page.