Skip to content

fix(provider): handle bundled @aws-sdk/credential-providers module format#275

Closed
agustif wants to merge 1059 commits intoLatitudes-Dev:devfrom
agustif:fix/bedrock-credential-provider-import
Closed

fix(provider): handle bundled @aws-sdk/credential-providers module format#275
agustif wants to merge 1059 commits intoLatitudes-Dev:devfrom
agustif:fix/bedrock-credential-provider-import

Conversation

@agustif
Copy link

@agustif agustif commented Jan 7, 2026

Fixes issue where `fromNodeProviderChain` is not a function when
`@aws-sdk/credential-providers` is bundled by `BunProc.install()`.

The bundled module exports all functions via default export, not as
named exports. Update import to handle both bundled (default export)
and unbundled (named exports) formats.

Also use bearer token as apiKey when available to avoid unnecessary
credential provider import.

shuvcode and others added 30 commits December 24, 2025 04:36
Add experimental.askquestion_tool config option to enable the tool.
Matches batch_tool pattern - disabled by default, opt-in via config.
SolidJS wizard UI matching TUI behavior with:
- Tab navigation between questions with completion indicators
- Single/multi-select options with keyboard shortcuts (1-8, Space, Enter)
- Custom text input option
- Mobile-friendly sticky footer and close button
- Full keyboard navigation (arrows, Tab, Escape, Ctrl+Enter)
- Add pendingAskQuestion detection matching TUI logic
- Replace PromptInput with wizard when askquestion is pending
- Wire submit/cancel handlers to API endpoints
- Show toast on API errors
- Add AskQuestion Tool section to README with config example
- Update fork-features.json with web app files and config markers
- Note tool is disabled by default, requires experimental config
Remove implemented plan files and add current askquestion UI plan
Remove sentEstimate, contextEstimate, outputEstimate, and reasoningEstimate
fields that were used for live streaming token approximations. These
estimates added complexity without providing accurate token counts.

The actual token usage from provider responses remains available via
the tokens field after completion.
Replace detailed token breakdown (in/out/reasoning) with a simpler
context token count and percentage display. This provides cleaner
UX while still showing the essential context window usage info.
Update generated SDK types to reflect:
- Removal of token estimate fields from message types
- Removal of TUI question request/response events
- Addition of askquestion_tool config option
- Simplified TUI publish endpoint types
This upstream PR was reverted in 99633cb but we want to keep it for
better small terminal UX. Documented in README and fork-features.json
before merging v1.0.198.
Resolved conflicts by keeping fork-specific features:
- PR anomalyco#5968 small screen styling (reverted upstream, preserved here)
- Search in messages (PR anomalyco#4898)
- Draggable sidebar resize (PR anomalyco#5917)
- AskQuestion tool (PR anomalyco#5958)
- IDE integration
- Bash output viewer with ANSI (PR anomalyco#4791)
- Mobile PWA support
- Share infrastructure for shuv.ai

Merged upstream improvements:
- review.toggle command with mod+shift+r keybind
- Title tag for share pages
- Session navigation and sorting improvements
- Various docs and CI updates
- Provider updates (Cloudflare AI Gateway)
- MCP tools/list_changed notifications
- Prompt stashing feature
- Did you know tips on start screen
- Use decorative ▄/▀ borders instead of split border
- Conditional padding based on terminal height (tall > 40)
- Title truncation on narrow/short screens
- Remove /share reminder to save space
- Keep context usage display (tokens + percentage + cost)
- Remove estimated token count (~N tok) from user messages
- Set finish reason on shell commands so they show duration/context
- Fall back to assistant creation time for shell command duration
- Fall back to last API message tokens for shell command context display
Resolved 19 version-related conflicts by accepting incoming changes:
- Updated version from 1.0.193-1 to 1.0.198
- Added EventMcpToolsChanged type in types.gen.ts
- Updated all package.json files and bun.lock
Resolved conflicts:
- packages/opencode/src/cli/cmd/tui/routes/home.tsx: merged upstream tips feature while preserving fork's useLocal import and selection display
Upstream changes:
- fix(desktop): prompt input fixes (DOM parsing refactor)
- remove list tool from registry
- update download stats

Fork features preserved:
- ghostty-opentui dependency (ANSI terminal emulation)
- AskQuestionTool registration (experimental)
- Shell input mode (! prefix)
- Slash command support

No conflicts - clean merge.
Resolved conflicts:
- packages/app/src/pages/layout.tsx: Kept fork customizations (shuvcode branding,
  theme/font pickers, mobile menu, session rename dialog), incorporated upstream
  improvements (keybind display in tooltips, untrack() for project expand,
  animate-pulse for busy sessions)
shuv1337 and others added 27 commits January 6, 2026 15:13
Resolved conflicts:
- bun.lock: Accept upstream
- install: Keep shuvcode branding, adopt upstream version check
- packages/app/src/components/terminal.tsx: Merge upstream theme logic with our mobile input support
- packages/app/src/context/command.tsx: Accept upstream optimization
- packages/app/src/context/layout.tsx: Accept upstream session pruning
- packages/desktop/README.md: Keep shuvcode branding
- sdks/vscode/package.json: Keep shuvcode branding, update version to 1.1.4

Fork features preserved:
- Mobile terminal input support
- Mobile responsive padding (px-3 sm:px-6)
- Shuvcode branding in install script, desktop README, VSCode extension
Merge shuvcode-dev: upstream v1.1.4 sync
This fixes the issue where the bash spinner in the TUI would not stop even after the command completed because it was using a non-reactive constant for the running state. Also included pending PWA safe area and viewport locking fixes.
- Add getMetadata() helper to check both state.metadata and part.metadata
- Extract findInParts() helper for cleaner part scanning logic
- Add fallback scan of all parts when message list is delayed/out of order
- Track timestamp to find the most recent pending question
- Check inputQuestions as fallback when metadata.questions is empty
- Add updateToolCall() method to processor for local state updates
- Preserve existing title/metadata/time when tool-call event fires
- Handle pending status in ctx.metadata() by transitioning to running
- Block metadata updates after tool has completed or errored
- Update local toolcalls map after Session.updatePart for consistency
- Add vite-plugin-pwa to app package
- Add ghostty-opentui with patch for opencode
- Update various @babel and other transitive dependencies
feat: AskQuestion tool improvements and session metadata fixes

- Improve pending question detection with fallback scan
- Fix session metadata preservation during tool-call events
- Add unified plugin asset bundling with audio support
- New tests for theme, askquestion, and tool completion

Closes anomalyco#274
…rmat

Fixes issue where fromNodeProviderChain is not a function when
@aws-sdk/credential-providers is bundled by BunProc.install().

The bundled module exports all functions via default export, not as
named exports. Update import to handle both bundled (default export)
and unbundled (named exports) formats.

Also use bearer token as apiKey when available to avoid unnecessary
credential provider import.

Co-authored-by: opencode <opencode@opencode.ai>
@greptile-apps
Copy link

greptile-apps bot commented Jan 7, 2026

Skipped: This PR changes more files than the configured file change limit: (293 files found, 200 file limit)

@agustif
Copy link
Author

agustif commented Jan 7, 2026

Recreating with clean branch that only contains the fix without shuvcode fork history

@agustif agustif closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants