Draft
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Mark the skill template TextPart as synthetic so the full prompt is
sent to the model but hidden from the user. Add a short ignored
summary part ('Running skill: <command>') so the user still sees
confirmation that the skill was loaded.
Rebased from flexion/hide-skill-prompt-in-chat onto v1.4.0.
Gate tool resolution, LiteLLM noop injection, activeTools, tools, and toolChoice behind input.model.capabilities.toolcall. Without this fix, tool_call: false in opencode.json is parsed and stored but never checked, causing Bedrock models that don't support streaming + tool use to fail. Adds regression test verifying body.tools is not sent when toolcall: false. Cherry-picked from lgarceau768#1 and rebased onto v1.4.0.
Covers cloning, building with bun, AWS SSO profile config, opencode.json Bedrock provider setup, and the opencode-work shell alias. Notes the tool_call fix included in this branch.
Bun's embedded code signature is rejected by Darwin 25+ at runtime, killing the binary with SIGKILL (exit 137) before it starts. Strip the signature and apply a fresh ad-hoc one via codesign after each darwin build. Also documents the fix in LOCAL_AWS_SETUP.md.
fix: re-sign macOS binaries after Bun compile to fix Darwin 25+ SIGKILL
…ditional models - Add palmyra and pixtral to US cross-region inference profile prefix list - Strip reasoning content from message history for non-reasoning models - Exclude palmyra from reasoning variant generation to prevent unsupported params
…session/prompt.ts
chore - merge dev into flex, resolve conflicts in session/llm.ts and session/prompt.ts
…o flex # Conflicts: # packages/opencode/src/provider/provider.ts # packages/opencode/src/provider/transform.ts
Resolves duplicate module instances (0.1.99 vs 0.1.101) that caused opentui-spinner to register the spinner component in a different componentCatalogue than the one the reconciler uses, resulting in "[Reconciler] Unknown component type: spinner" at runtime.
- add install-flex: single curl | bash installer that clones the flex
branch, builds the binary, writes the AWS SSO profile, writes
~/.config/opencode/opencode.json, and appends opencode-work() to
the user's shell rc file; all steps are idempotent
- hardcode SSO start URL and us-east-2 SSO region; prompt only for
account ID and preferred AWS region
- correct sso_role_name from AdministratorAccess to ClaudeCodeAccess
- fix opencode-work(): replace undeclared \${opencode_args[@]} with
"\$@", replace hardcoded path and arch with runtime uname detection
- add Quick Install section to LOCAL_AWS_SETUP.md
…B fragmentation Without this, every build bakes the current git branch name as the installation channel, causing OpenCode to open a new empty SQLite database each time you rebuild from a different branch (opencode-chore-bolster-install.db, opencode-feat-mcp-awareness.db, etc). Setting OPENCODE_CHANNEL=flex means all Flexion fork builds share opencode-flex.db regardless of which branch was built.
…unners Blacksmith's ubuntu-2404 runners run on ARM64 hardware (RUNNER_ARCH=ARM64). The previous action only built an explicit bun download URL for X64, so ARM64 fell through to oven-sh/setup-bun@v2's default path which downloads bun-linux-aarch64.zip and extracts it via the system unzip command. Blacksmith's ARM64 Ubuntu image doesn't pre-install unzip, causing all e2e and unit CI jobs to fail at the Setup Bun step. Two changes: - Add a Linux step that installs unzip if not already present (direct fix) - Rewrite the URL construction with case/esac covering both X64 and ARM64 for all OS variants, replacing the x64-only if block (architecture fix)
…ion on ARM64 tree-sitter-powershell builds a native addon via node-gyp during bun install. Blacksmith ARM64 runners don't pre-install make or g++, so the build fails with: gyp ERR! not found: make Extend the prerequisite step to also check for make and install build-essential (which provides make + g++) when missing, alongside the existing unzip check.
…in test timeouts Plugin integration tests (auth-override, plugin config providers) each create a fresh temp dir and trigger @npmcli/arborist to install @opencode-ai/plugin from the npm registry. On Blacksmith ARM64, this network fetch takes 10-30 s per test, consistently hitting the 30 s bun test timeout. Two changes to the unit job in test.yml: - Cache ~/.npm across runs so arborist finds tarballs locally on repeat runs - Pre-warm step: npm install @opencode-ai/plugin once before tests run, which populates ~/.npm so arborist's per-test installs resolve from cache (~0.5 s) rather than the network (~10-30 s)
…t timeout
Root cause of all 7 test timeouts:
config.ts fires a background @npmcli/arborist.reify() for @opencode-ai/plugin
in every .opencode/ directory it discovers. plugin/index.ts and tool/registry.ts
then call waitForDependencies() which joins that fiber before loading plugins
or custom tools. On Blacksmith ARM64, a cold arborist fetch takes 10-30 s per
test. Running in parallel across a 4-vCPU runner saturates CPU/IO and starves
even unrelated tests (session.processor, snapshot.revert) past their 30 s limit.
Fixes:
- flag.ts: add OPENCODE_DISABLE_PLUGIN_DEPS_INSTALL flag
- config.ts: guard the npmSvc.install() + deps.push() block with the new flag
- preload.ts: set OPENCODE_DISABLE_PLUGIN_DEPS_INSTALL=true for all tests
(safe: bun resolves @opencode-ai/plugin from the workspace node_modules;
tests do not author plugins that import the SDK at runtime)
- snapshot.test.ts: raise timeout on the 280-file revert test to 60 s
(git operations across 280 files can push past 30 s on ARM64)
Blacksmith ARM64 runner subprocess startup overhead can consume 2-3 s, pushing the 'loop waits while shell runs' test past its 3 s failsafe. The test validates ordering (loop waits while shell is running), not wall time, so a larger timeout doesn't change what is being tested.
chore: add install-flex, fix Blacksmith ARM64 CI (build tools + test timeouts), fix per-branch DB
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.
DO NOT MERGE
This is a permanent tracking PR that shows all Flexion-specific customizations on top of upstream anomalyco/opencode.
It mirrors the pattern used in flexion/open-webui#14.
Branching Strategy
devanomalyco/opencode:devexactly — synced via force-push when upstream releasesflexdevafter each upstream syncKeeping in sync with upstream
Flexion Customizations (rebased onto v1.4.0)
1.
fix: hide skill prompt text from chat UIFile:
packages/opencode/src/session/prompt.tsMark the skill template
TextPartassynthetic: trueso the full prompt is sent to the model but hidden from the user. Adds a shortignored: truesummary part (Running skill: <command>) so the user still sees confirmation the skill was loaded.Originally merged as flexion/opencode#1.
2.
fix: respect tool_call: false capability flag at runtimeFiles:
packages/opencode/src/session/llm.ts,packages/opencode/test/session/llm.test.tsGates tool resolution, LiteLLM noop injection,
activeTools,tools, andtoolChoicebehindinput.model.capabilities.toolcall. Without this fix,tool_call: falseinopencode.jsonis parsed and stored but never checked — causing Bedrock models that don't support streaming + tool use to fail.Includes a regression test verifying
body.toolsis not sent whentoolcall: false.Originally from lgarceau768/opencode#1.
3.
docs: add local build and AWS Bedrock setup instructionsFile:
LOCAL_AWS_SETUP.mdCovers cloning, building with bun, AWS SSO profile config,
opencode.jsonBedrock provider setup, and theopencode-workshell alias.Originally from lgarceau768/opencode#1.
4.
fix: re-sign macOS binaries after Bun compile to fix Darwin 25+ SIGKILLFile:
LOCAL_AWS_SETUP.mdBun's embedded code signature is rejected by Darwin 25+ (macOS 16) at runtime, killing the binary with SIGKILL (exit 137) before it starts
Adds a post-compile step in script/build.ts to strip Bun's signature and apply a fresh ad-hoc one via codesign for all darwin targets
Documents the fix in LOCAL_AWS_SETUP.md
Originally from fix/bun-build-issue-on-macos-darwin25.
5.
fix: Bedrock model config updateFiles:
packages/opencode/src/provider/provider.ts,packages/opencode/src/provider/transform.ts,packages/opencode/test/provider/transform.test.tsFixes compatibility with the following AWS Bedrock models:
Changes:
"palmyra"and"pixtral"to the Bedrockusregion cross-region inference prefix list inprovider.ts, so these models receive the requiredus.prefix at runtimeid.includes("palmyra")to thevariantsearly-return list intransform.ts— Palmyra does not support reasoning effort variantstype: "reasoning"part stripping innormalizeMessages— Bedrock rejects messages containing reasoning parts for models that don't support reasoning; scoped tomodel.id.toLowerCase().includes("palmyra")to avoid affecting OpenAI/Anthropic modelsPalmyra models strip reasoning content (Bedrock rejects reasoning parts)Originally from (flexion/opencode#4)
6.
fix: bump @opentui/core and @opentui/solid catalog to 0.1.101Files:
bun.lock,packages.jsonResolves duplicate module instances (0.1.99 vs 0.1.101) that caused opentui-spinner to register the spinner component in a different componentCatalogue than the one the reconciler uses, resulting in "[Reconciler] Unknown component type: spinner" at runtime.
Originally from flexion/opencode#9
7.
feature: update opencode-work shell functionFile:
LOCAL_AWS_SETUP.mdUpdates opencode-work shell function with credential check and session resume.
If your AWS session already exists it won't re-authenticate
Add an existing opencode session id to resume a session:
opencode-work ses-234556677abcdeOriginally from flexion/opencode#10
Local Development Setup
See
LOCAL_AWS_SETUP.mdfor full setup instructions including AWS Bedrock configuration.