fix(opencode): drop skills emission to avoid provider 400 errors - #8
Merged
Conversation
OpenCode v1.x does not recognize `skills` as an agent field; the CLI forwards unknown top-level options to the LLM provider as payload fields. Strict providers (Pydantic `additionalProperties: false`, e.g. GLM-5.2) reject them with HTTP 400 `Extra inputs are not permitted`, which made every OpenCode-backed agent with a pivot `agents[].skills` binding unusable from providers with strict schemas. Stop emitting `skills` from the OpenCode agent fragment. The pivot field is still consumed by the Claude Code adapter (frontmatter) and the Codex adapter (instruction hint). OpenCode agents are expected to reference their skills from the prompt body (e.g. an `## Available skills` section) or rely on the opencode `skill` tool at runtime. Tested: - TestGenerateAgent, TestGenerateAgentSkills, TestGoldenOpenCodeJSON updated to assert the key is absent - TestEndToEnd_SkillsRoundTrip updated to assert the OpenCode build agent has no `skills` key (Claude and native-only `legacy-helper` paths still validated) - Golden file (expected_opencode.json) and init bootstrap fixture updated - Docs (README, docs/SKILLS.md, docs/prd/shenron.md D9 + FR11) updated to describe the new policy
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe change removes per-agent ChangesOpenCode skill handling
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 v1.x does not recognize
skillsas an agent field; the CLI forwards unknown top-level options to the LLM provider as payload fields. Strict providers (PydanticadditionalProperties: false, e.g. GLM-5.2) reject them with HTTP 400Extra inputs are not permitted, which made every OpenCode-backed agent with a pivotagents[].skillsbinding unusable from providers with strict schemas.Stop emitting
skillsfrom the OpenCode agent fragment. The pivot field is still consumed by the Claude Code adapter (frontmatter) and the Codex adapter (instruction hint). OpenCode agents are expected to reference their skills from the prompt body (e.g. an## Available skillssection) or rely on the opencodeskilltool at runtime.Tested:
skillskey (Claude and native-onlylegacy-helperpaths still validated)Summary by CodeRabbit
Documentation
skillsfield, while Claude Code and Codex receive skill bindings through supported formats.Bug Fixes