Repository navigation
fix: Bedrock ARN region routing, Copilot device-flow pacing, TUI input fixes - #109740
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e82311fa8a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| profile: options.profile, | ||
| }; | ||
| const configuredRegion = getConfiguredBedrockRegion(options); | ||
| const requestRegion = options.region || getBedrockModelArnRegion(model.id) || configuredRegion; |
There was a problem hiding this comment.
Prefer ARN region over injected fallback region
When the normal embedded-runner path applies the Amazon Bedrock wrapStreamFn, the wrapper derives a fallback region from model.baseUrl/config and injects it with Object.assign({}, options, region ? { region } : {}) (extensions/amazon-bedrock/register.sync.runtime.ts:583-609). For an application-inference-profile ARN whose embedded region differs from that provider/base URL region, this line treats the wrapper fallback as an explicit override and never reaches getBedrockModelArnRegion, so production calls still construct BedrockRuntimeClient for the wrong region even though the direct streamBedrock unit test passes.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 3:46 AM ET / 07:46 UTC. Summary PR surface: Source +52, Tests +216, Config 0, Other 0. Total +268 across 11 files. Reproducibility: yes. from source with high confidence: use an application inference-profile ARN whose region differs from the configured provider or base-URL region, then invoke it through the registered Bedrock Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Resolve Bedrock region precedence once at the provider wrapper or shared resolver as explicit call option, then ARN region, then configured/base-URL/environment fallback, and prove it through the registered Do we have a high-confidence way to reproduce the issue? Yes from source with high confidence: use an application inference-profile ARN whose region differs from the configured provider or base-URL region, then invoke it through the registered Bedrock Is this the best way to solve the issue? No; changing only the stream client's precedence is too narrow because the provider wrapper has already collapsed fallback and explicit regions into the same option before that code runs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f095549d1d31. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +52, Tests +216, Config 0, Other 0. Total +268 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Merged via squash.
|
…t fixes (openclaw#109740) * build(deps): bump terminal UI library to 0.80.9 * fix(plugins): Bedrock ARN region routing, stop-reason detail, and Copilot device-flow pacing
…t fixes (openclaw#109740) * build(deps): bump terminal UI library to 0.80.9 * fix(plugins): Bedrock ARN region routing, stop-reason detail, and Copilot device-flow pacing
What Problem This Solves
Three plugin-level provider fixes plus a terminal-UI dependency refresh:
AWS_REGION, requests were routed to the wrong region and failed. The region embedded in an ARN model id is now used (explicit option still wins). Unknown/guardrail stop reasons surfaced as an opaque "An unknown error occurred"; the raw stop reason (e.g.guardrail_intervened) is now carried into the error message, with the mapping exhaustive over the current SDK union.interval, and treatedslow_downas a fixed one-shot +2s. Per RFC 8628 it now waits the initial interval before the first poll and increases the interval cumulatively (or adopts the server's value) onslow_down— fixing logins that hung or looped on rate-limited responses.pnpm-lock.yamland the rootnpm-shrinkwrap.jsonare regenerated in lockstep.Why This Change Was Made
All three provider issues are user-reported-shaped failures at plugin boundaries (wrong-region Bedrock calls, stuck Copilot logins, unreadable Bedrock errors); the dependency bump carries small input-handling fixes users hit daily in the TUI.
User Impact
Bedrock inference-profile ARNs work across regions and failures are diagnosable; Copilot device login completes reliably under
slow_down; TUI paste/keys/tab rendering artifacts fixed; user-message markdown matches assistant rendering.Evidence
node scripts/run-vitest.mjs extensions/amazon-bedrock/stream.runtime.test.ts extensions/github-copilot/login.test.ts— 56 tests passing (new cases: ARN region precedence incl. GovCloud, stop-reason detail mapping, RFC 8628 pacing with scripted token endpoint and fake timers).node scripts/run-vitest.mjs src/tui— 30 files, 689 tests passing on the bumped dependency; new user-message rendering regression test.pnpm deps:shrinkwrap:checkgreen (root + package shrinkwraps current); typecheck/lint lanes green on changed files; autoreview clean.