Repository navigation
chore: bump fantasy to sync from upstream - #26440
Merged
Merged
Conversation
ethanndickson
force-pushed
the
bedrock-fantasy-followup
branch
from
June 17, 2026 05:54
e49c8bc to
2309760
Compare
ethanndickson
marked this pull request as ready for review
June 17, 2026 06:54
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
ethanndickson
force-pushed
the
bedrock-fantasy-followup
branch
from
June 18, 2026 02:03
b2f90a7 to
d3bad36
Compare
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
johnstcn
approved these changes
Jun 18, 2026
Bump charm.land/fantasy to the coder_2_33 head, which syncs upstream charmbracelet/fantasy main (v0.31.0) and mirrors the request region when prefixing cross-region inference profiles. The fantasy bump pulls its required transitive dependency upgrades (aws-sdk-go-v2, otel, genai, golang.org/x/*, etc.) via MVS. Adapt chatd to the new fantasy and surface the Bedrock region end to end: - Thread a per-provider Region through ConfiguredProvider and ProviderAPIKeys (RegionByProvider), and merge/prune/resolve it alongside API keys and base URLs. - Source the Bedrock region from AI provider settings and pass fantasybedrock.WithRegion when a region is configured. - Migrate Bedrock model examples and form placeholders to fully-qualified global.anthropic.* IDs. - Emit a finish_reason in the test OpenAI streaming server so streams close on a terminal event, matching fantasy's fail-closed stream handling.
Extract the shared fallback-merge prologue from MergeProviderAPIKeys and ResolveUserProviderKeys into mergedFromFallback, and lift the lazy RegionByProvider population into a setRegion method on *ProviderAPIKeys. Removes ~45 lines of byte-identical duplication with no behavior change.
ethanndickson
force-pushed
the
bedrock-fantasy-followup
branch
from
June 18, 2026 14:32
d3bad36 to
c9953fd
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes CODAGT-572
Overview
Bumps
charm.land/fantasyto the head ofcoder_2_33(v0.0.0-20260617050554-2e3ddbca75dd) and adaptschatdto it.The fantasy bump:
charmbracelet/fantasymain (v0.31.0) intocoder_2_33(chore: sync upstream main into coder_2_33 fantasy#42).Pulling in the new fantasy version propagates its required transitive dependency upgrades (aws-sdk-go-v2, OpenTelemetry, google genai,
golang.org/x/*, etc.) through MVS, which accounts for the bulk of thego.mod/go.sumchurn.chatd changes
RegionthroughConfiguredProviderandProviderAPIKeys(RegionByProvider), and merge/prune/resolve it alongside API keys and base URLs.chatdand passfantasybedrock.WithRegionwhen a region is configured.global.anthropic.*ID.finish_reasonin the test OpenAI streaming server so streams close on a terminal event, matching fantasy's fail-closed stream handling.Heads-up: most of this is short-lived
Almost all of the
chatdcode in this PR only executes on the direct (non-gateway) routing path — the branch taken whenAIGatewayRoutingEnabledisfalse. That flag was a transition crutch for AI Gateway routing, and it (plus the entire direct path /x/chatd/chatproviderpackage that backs it) is slated for removal in CODAGT-598. Under AI Gateway routing — which is the path every deployment is expected to run — the Bedrock region is resolved by aibridge directly from provider settings (cli/aibridged.gobuildsaibridge.AWSBedrockConfig{Region: settings.Bedrock.Region}), so none of the region plumbing added here is reached.Concretely, expect the following to be deleted alongside the direct path:
RegionByProvidermap, theRegion()accessor, and the region preservation in merge/resolve plus the region pruning inPruneDisabledProviderKeys(chatprovider.go).fantasybedrock.WithRegion(region)branch inModelFromConfig— only reachable on the direct path; the gateway path builds afantasyanthropicclient with no region key.settings.Bedrock.RegioninaiProviderConfigFromKeys(chatd.go).chatprovider_test.go, and thechattest/model_coverageadjustments that support direct-path testing.What survives the cleanup (independent of routing):
charm.land/fantasybump and itsgo.mod/go.sumtransitive churn.global.anthropic.*Bedrock title-generation model ID inquickgen.go(a runtime-valid model identifier, not direct-path-specific).We're landing the full change anyway so the direct path stays correct for the remaining transition window; just don't be surprised when CODAGT-598 reclaims most of it.
Notes
Depends on coder/fantasy
coder_2_33already containing the upstream sync and Bedrock region fix (merged via coder/fantasy#42 and coder/fantasy#43).