Skip to content

fix: show correct Bedrock runtime endpoint in /status#20275

Merged
celia-oai merged 2 commits into
mainfrom
dev/cc/small-fix
Apr 30, 2026
Merged

fix: show correct Bedrock runtime endpoint in /status#20275
celia-oai merged 2 commits into
mainfrom
dev/cc/small-fix

Conversation

@celia-oai

@celia-oai celia-oai commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Why

/status was showing the configured ModelProviderInfo.base_url for Amazon Bedrock, which can be stale or misleading because the actual Bedrock Mantle endpoint is derived at runtime from the resolved AWS region. This made sessions report the wrong provider endpoint even though requests used the correct runtime URL.

What changed

  • Added ModelProvider::runtime_base_url() so provider implementations can expose the request-time base URL through the shared runtime provider abstraction.
  • Moved Bedrock region-to-Mantle URL resolution into amazon_bedrock::mantle::runtime_base_url(), keeping region resolution private to the Mantle module.
  • Overrode runtime_base_url() for Amazon Bedrock so it returns the resolved Mantle endpoint instead of the configured default.
  • Resolved and cached the runtime provider base URL during TUI startup, then used that cached value when rendering /status.
  • Added status coverage that verifies Bedrock displays the runtime URL and ignores the configured Bedrock base_url when they differ.

Verification

model provider is resolved correctly in local build:
Screenshot 2026-04-29 at 5 01 36 PM

@celia-oai celia-oai force-pushed the dev/cc/small-fix branch 4 times, most recently from 4357906 to ddcefe6 Compare April 29, 2026 23:49
@celia-oai celia-oai changed the title changes Show Bedrock runtime endpoint in /status Apr 29, 2026
@celia-oai celia-oai changed the title Show Bedrock runtime endpoint in /status fix: show correct Bedrock runtime endpoint in /status Apr 29, 2026
@celia-oai celia-oai marked this pull request as ready for review April 30, 2026 00:05
@celia-oai celia-oai requested a review from pakrym-oai April 30, 2026 00:05
Comment thread codex-rs/tui/src/app.rs
@celia-oai celia-oai requested a review from pakrym-oai April 30, 2026 00:21
@celia-oai celia-oai force-pushed the dev/cc/small-fix branch 2 times, most recently from 2fbf690 to 9e18d78 Compare April 30, 2026 01:30
@celia-oai celia-oai merged commit 31f8813 into main Apr 30, 2026
25 checks passed
@celia-oai celia-oai deleted the dev/cc/small-fix branch April 30, 2026 19:02
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants