WIP: ✨ feat(config): separate datacenter and user regions #4

Draft
mat wants to merge 8 commits from feat/s3-user-region into main
Owner

Context

The existing region setting was ambiguous: it drove inference emissions while also being the only available location for user-facing equivalents.

Impact

Adds explicit user-region configuration via flag, environment, and config file while preserving the existing datacenter calculation. User-grid defaults follow the resolved datacenter grid, unknown regions retain the 480 gCO2e/kWh fallback, and deterministic warnings plus additive JSON metadata expose the ambiguity.

Verification

  • go test ./...
  • go vet ./...
  • git diff --check

This PR is intentionally draft.

## Context The existing region setting was ambiguous: it drove inference emissions while also being the only available location for user-facing equivalents. ## Impact Adds explicit user-region configuration via flag, environment, and config file while preserving the existing datacenter calculation. User-grid defaults follow the resolved datacenter grid, unknown regions retain the 480 gCO2e/kWh fallback, and deterministic warnings plus additive JSON metadata expose the ambiguity. ## Verification - `go test ./...` - `go vet ./...` - `git diff --check` This PR is intentionally draft.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/s3-user-region:feat/s3-user-region
git switch feat/s3-user-region

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/s3-user-region
git switch feat/s3-user-region
git rebase main
git switch main
git merge --ff-only feat/s3-user-region
git switch feat/s3-user-region
git rebase main
git switch main
git merge --no-ff feat/s3-user-region
git switch main
git merge --squash feat/s3-user-region
git switch main
git merge --ff-only feat/s3-user-region
git switch main
git merge feat/s3-user-region
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/cco2usage!4
No description provided.