Skip to content

Add ROBOFLOW_REGION env var for easy EU region selection in inference-cli#2701

Open
imbgar-roboflow wants to merge 1 commit into
mainfrom
brandongarcia/inf-314-cli-eu-region
Open

Add ROBOFLOW_REGION env var for easy EU region selection in inference-cli#2701
imbgar-roboflow wants to merge 1 commit into
mainfrom
brandongarcia/inf-314-cli-eu-region

Conversation

@imbgar-roboflow

Copy link
Copy Markdown
Contributor

Description

One env var now points inference-cli at the Roboflow EU data-residency platform:

ROBOFLOW_REGION=eu inference ...   # API calls go to https://api.roboflow.eu

Part of the EU region rollout across our CLI tools (Linear INF-314); roboflow-python is getting the same ROBOFLOW_REGION switch plus roboflow auth login --region eu in a sibling PR.

Changes

  • inference_cli/lib/env.pyAPI_BASE_URL default honors ROBOFLOW_REGION (us default / eu, case-insensitive). Precedence: explicit API_BASE_URL > ROBOFLOW_REGION=eu > existing PROJECT-based default. Unknown values warn on stderr and fall back to us.
  • inference_cli/lib/enterprise/inference_compiler/constants.py — same for ROBOFLOW_API_HOST (explicit override > region > ROBOFLOW_ENVIRONMENT default).
  • tests/inference_cli/unit_tests/lib/test_env.py — 7 unit tests: defaults unchanged with no region set, EU mapping, normalization, override precedence, unknown-region fallback.

With ROBOFLOW_REGION unset, behavior is byte-identical to today.

Testing

  • python -m pytest tests/inference_cli/unit_tests — 166 passed (7 new)
  • Live smoke: default → api.roboflow.com; ROBOFLOW_REGION=euapi.roboflow.eu (both constants); ROBOFLOW_REGION=eu API_BASE_URL=… → explicit override wins
  • api.roboflow.eu verified live
  • black + isort clean

…-cli

ROBOFLOW_REGION=eu points the CLI's Roboflow API defaults at
https://api.roboflow.eu (the EU data-residency platform). Explicit
API_BASE_URL / ROBOFLOW_API_HOST overrides still win, unknown region
values warn and fall back to US, and with no region set behavior is
unchanged. Mirrors the region switch shipping in roboflow-python
(ROBOFLOW_REGION / roboflow auth login --region eu). INF-314
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely.

🚦 This PR is marked Ready for review, so automated Claude review will run — and every pass spends real credits.

Warning

💸 The Claude reviewer bills in credits, not vibes

Automated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared.

Draft when unsure, Ready when you mean it:

  • 🌱 Not sure the PR is in good shape yet? Keep it (or set it back) as a draft — drafts pause review, so you can push and iterate without burning credits on a moving target.
  • 💪 Feel strong about the contents? Mark it Ready for review and the reviewer will take a look.

However you get there, arrive prepared:

  • 🧱 Bring a SOLID, thorough PR. Point your local agent at our skills/ to tune it to our guidelines first — or, if you are one of those fabled carbon-based contributors, read them yourself. A half-baked diff costs exactly the same to review as a finished one.
  • Resolve every comment before you re-request review. Re-requesting with threads still open means paying twice for the same conversation.
  • 🔁 Do not use CI review as an inner loop for a local agent. The reviewer is not a step-by-step debugger — do the unfolding locally and arrive with the answer, not the search.
  • 🙋 If something looks off, ask a human. One question to a maintainer is cheaper and faster than three rounds of agent re-review chasing a misread.

Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.

  • Prefer to skip automated review entirely? Add the skip-claude-review label.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude review started at commit a3e620a6b83cbbbde2cea17654a504a68385a711.

New commits are not auto-reviewed. Add the claude-review label (remove & re-add it to trigger again) when you want another review.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Claude review started at commit a3e620a6b83cbbbde2cea17654a504a68385a711.

New commits are not auto-reviewed. Add the claude-review label (remove & re-add it to trigger again) when you want another review.

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bigger change - let's make it right so that we could easily select all regions / environments with staging / prod switches + propagate to all components the same way (sdk, inference models etc)

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.

2 participants