Unify secure-gateway URL wrappers: inference_models proxy builder lacks idempotence guard and drops gateway base path
Maintainers usually reply within 1 day
@adhavan18 is already working on this.
Since Aug 15, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with roboflow_secure_gateway_proxy_url_builder in inference_models/inference_models/weights_providers/roboflow.py and compare it with wrap_url in inference/core/utils/url_utils.py. Then inspect inference_sdk's InferenceHTTPClient and the StepExecutionMode consumption point. Done means wrapped URLs remain idempotent and preserve gateway base paths, while REMOTE execution cannot bypass the gateway, with shared behavior or cross-package tests.
Written by the indexing model from the issue text.
Description
Follow-ups from the secure-gateway audit on #2658 (out of that PR's scope):
1. roboflow_secure_gateway_proxy_url_builder (inference_models/inference_models/weights_providers/roboflow.py) diverges from wrap_url (inference/core/utils/url_utils.py):
- No idempotence guard: an already-wrapped
download_urlgets double-proxied ({gateway}/proxy?url={gateway}%2Fproxy%3Furl%3D...).wrap_urlgained this guard in #2658. - Base-path handling differs: the builder uses
urlsplitscheme+netloc only, dropping any path on the gateway value (SECURE_GATEWAY=https://gw.local/edge→ weights traffic goes togw.local/proxywhile server traffic goes togw.local/edge/proxy).
Both wrappers implement the same /proxy?url= contract; they should either share one implementation or be kept behavior-identical with cross-package tests.
2. Per-run step_execution_mode bypasses the env-level hosted-endpoint gate: #2658 forces WORKFLOWS_STEP_EXECUTION_MODE=local behind SECURE_GATEWAY when the hosted target is configured, but a caller passing workflows_core.step_execution_mode=StepExecutionMode.REMOTE via init_parameters still routes all 42 run_remotely blocks at HOSTED_*_URL — unreachable behind a gateway. The durable fix is gateway support in inference_sdk's InferenceHTTPClient (it path-joins onto api_url, which cannot compose with /proxy?url=<encoded>), or a guard at the StepExecutionMode consumption point.
Context: #2658, #2263.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 340
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 92
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from roboflow/inference
-
Allow Pillow 13 in inference-sdkMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
roboflow/inference#3335 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
roboflow/inference#3173 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
roboflow/inference#2993 · 2 comments ·
Maintainers usually reply within 1 day
-
Add context manager (__enter__ / __exit__) support to InferencePipelinePossibly taken @KushagraKanaujia claimed this 67 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
roboflow/inference#2744 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
roboflow/inference#1913 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
All issues in roboflow/inference
Similar issues
-
area:core-platform effort:S priority:P3 risk:night-safe status:ready type:test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3620 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FinanceFlash/unvibecode#760 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
google-research/google-research#3470 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
mrvautin/ha-workouts#11 ·